Image analysis method, device, equipment, storage medium and program product

CN122637169BActive Publication Date: 2026-10-13四川易景智能终端有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611124179.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-10-13
Estimated Expiration
2046-07-28

AI Technical Summary

Technical Problem

[0005]本申请提供一种影像的分析方法、装置、设备、存储介质及程序产品,用以解决影像的分析效果较差的问题

Benefits of technology

[0069]本申请提供的影像的分析方法、装置、设备、存储介质及程序产品,当需要影像进行分析时,电子设备可以响应于用户的影像分析请求,确定待分析的影像数据相关联的第一信息;根据第一信息,在提示词配置库中确定第一提示词模块,第一提示词模块为适配影像数据的分析场景的策略片段集合;根据预设映射表,确定第一提示词模块对应的多个第一策略片段,预设映射表用于指示提示词模块与策略片段之间的映射关系;按照预设顺序对多个第一策略片段进行拼接处理,生成目标提示词;将目标提示词和影像数据输入预设大模型内进行分析处理,得到影像数据的分析结果。这样,通过上述方法,通过预设不同模块的提示词,并根据第一信息确定适配影像数据的提示词模块,从而使大模型能够在适配影像数据场景、以及在充分的领域知识指导下进行分析推理,从而提高了影像分析的效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122637169B_ABST
    Figure CN122637169B_ABST
Patent Text Reader

Abstract

The application provides an image analysis method, device, equipment, storage medium and program product. It relates to the field of image processing. The method comprises: in response to a user's image analysis request, determining first information associated with image data to be analyzed; determining a first prompt word module in a prompt word configuration library according to the first information, the first prompt word module being a set of strategy segments adapted to the analysis scene of the image data; determining a plurality of first strategy segments corresponding to the first prompt word module according to a preset mapping table, the preset mapping table being used to indicate the mapping relationship between the prompt word module and the strategy segment; performing splicing processing on the plurality of first strategy segments in a preset order to generate a target prompt word; inputting the target prompt word and the image data into a preset large model for analysis and processing to obtain an analysis result of the image data. The analysis effect of the image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and more particularly to an image analysis method, apparatus, device, storage medium, and program product. Background Technology

[0002] With the in-depth application of artificial intelligence technology in the field of image analysis, large models can be used to analyze image quality.

[0003] In related technologies, when users need to analyze image data, they can manually write prompts or modify preset fixed prompts and input the prompts into a large model so that the large model can output the analysis results of the image data.

[0004] However, in the above methods, the quality of prompts written by different users varies greatly, which affects the final image analysis results and leads to poor image analysis performance. Summary of the Invention

[0005] This application provides an image analysis method, apparatus, device, storage medium, and program product to solve the problem of poor image analysis results.

[0006] In a first aspect, this application provides an image analysis method, comprising:

[0007] In response to a user's image analysis request, determine the first information associated with the image data to be analyzed;

[0008] Based on the first information, the first prompt word module is determined in the prompt word configuration library. The first prompt word module is a set of strategy fragments adapted to the analysis scenario of image data.

[0009] According to the preset mapping table, multiple first strategy fragments corresponding to the first prompt word module are determined. The preset mapping table is used to indicate the mapping relationship between the prompt word module and the strategy fragments.

[0010] Multiple first strategy fragments are spliced ​​together in a preset order to generate target prompt words;

[0011] The target prompts and image data are input into a pre-set large model for analysis and processing to obtain the analysis results of the image data.

[0012] In one possible design, multiple first strategy fragments are concatenated in a preset order to generate target prompt words, and the process also includes:

[0013] Determine the configuration status of the preset large model. The configuration status is used to indicate the knowledge injection status of the preset large model.

[0014] When the configuration state is in rule injection state or historical data injection state, the first information and multiple first strategy fragments are spliced ​​together in a preset order to generate target prompt words;

[0015] When the configuration state is in the precise adjustment state, the image data is subjected to quantitative analysis and processing to obtain the first quantitative information of the image data. The first quantitative information is used to quantitatively describe the image data.

[0016] The first quantitative information, the first information, and multiple first strategy fragments are spliced ​​together in a preset order to generate target prompt words.

[0017] In one possible design, before determining the configuration state of the preset large model, the following steps are also included:

[0018] Obtain user commands and preset rule data, inject the user commands and preset rule data into the preset large model, so that the preset large model can perform analysis and processing according to the user commands and preset rule data, and determine the configuration state of the preset large model as the rule injection state;

[0019] When the number of analysis records of the preset large model is greater than or equal to the first threshold, the configuration state of the preset large model is determined to be the historical data injection state, the historical analysis records of the preset large model are obtained, and the preset large model is injected according to the user instructions, historical analysis records and preset rule data in accordance with the first preset ratio so that the preset large model can perform analysis and processing.

[0020] When the preset large model is in a stable running state, the configuration state of the preset large model is set to a precise adjustment state. The second quantitative information of the data to be analyzed is obtained. Based on the second quantitative information, user instructions and preset rule data, the data is injected into the preset large model according to the second preset ratio so that the preset large model can perform analysis and processing.

[0021] In one possible design, in response to a user's image analysis request, first information associated with the image data to be analyzed is determined, including:

[0022] Based on the image analysis request, determine the analysis scenario of the image data and the initial quantity of the image data;

[0023] When the analysis scenario is a comparative analysis scenario and there are multiple first-order images, test images and reference images are identified in the image data, and the identifiers of the test images, the identifiers of the reference images, the number of reference images, and the relationship information between the test images and the reference images are added to the first information.

[0024] When an image analysis request indicates that it should be processed using the deep inference mode, a depth processing identifier is added to the first information;

[0025] When the image analysis request includes user instructions, add the user instructions to the first information.

[0026] In one possible design, prior to responding to the user's image analysis request, the following also applies:

[0027] Retrieve multiple preset strategy prompts and multiple prompt modules;

[0028] Based on multiple strategy scenarios, multiple strategy prompts are split and processed to obtain multiple strategy fragments;

[0029] Based on multiple prompt word modules and multiple strategy fragments, a preset mapping table is generated. The preset mapping table is used to indicate the mapping relationship between multiple prompt word modules and multiple strategy fragments.

[0030] Store the preset mapping table, multiple strategy fragments, and multiple prompt word modules in the preset storage space.

[0031] In one possible design, the method also includes:

[0032] In response to a modification command for the prompt word module, determine the modifications to the prompt word module;

[0033] The modified content is validated.

[0034] When the verification process passes, the modified content is written to the preset storage space. The completeness of the updated prompt word module is verified. If there is a missing second prompt word module, the default prompt word module is obtained and added to the updated prompt word module. The version number and timestamp are also updated.

[0035] An error message is generated when the verification process fails.

[0036] Secondly, this application provides an image analysis apparatus, comprising: a first determining module, a second determining module, a third determining module, a stitching processing module, and an analysis processing module, wherein,

[0037] The first determining module is used to determine, in response to a user's image analysis request, the first information associated with the image data to be analyzed;

[0038] The second determining module is used to determine the first prompt word module in the prompt word configuration library based on the first information. The first prompt word module is a set of strategy fragments adapted to the analysis scenario of image data.

[0039] The third determining module is used to determine multiple first strategy fragments corresponding to the first prompt word module according to a preset mapping table. The preset mapping table is used to indicate the mapping relationship between the prompt word module and the strategy fragments.

[0040] The splicing module is used to splice multiple first strategy segments in a preset order to generate target prompt words;

[0041] The analysis and processing module is used to input target prompts and image data into a preset large model for analysis and processing, and to obtain the analysis results of the image data.

[0042] In one possible design, the splicing processing module is also specifically used for,

[0043] Determine the configuration status of the preset large model. The configuration status is used to indicate the knowledge injection status of the preset large model.

[0044] When the configuration state is in rule injection state or historical data injection state, the first information and multiple first strategy fragments are spliced ​​together in a preset order to generate target prompt words;

[0045] When the configuration state is in the precise adjustment state, the image data is subjected to quantitative analysis and processing to obtain the first quantitative information of the image data. The first quantitative information is used to quantitatively describe the image data.

[0046] The first quantitative information, the first information, and multiple first strategy fragments are spliced ​​together in a preset order to generate target prompt words.

[0047] In one possible design, the splicing processing module is also specifically used for,

[0048] Obtain user commands and preset rule data, inject the user commands and preset rule data into the preset large model, so that the preset large model can perform analysis and processing according to the user commands and preset rule data, and determine the configuration state of the preset large model as the rule injection state;

[0049] When the number of analysis records of the preset large model is greater than or equal to the first threshold, the configuration state of the preset large model is determined to be the historical data injection state, the historical analysis records of the preset large model are obtained, and the preset large model is injected according to the user instructions, historical analysis records and preset rule data in accordance with the first preset ratio so that the preset large model can perform analysis and processing.

[0050] When the preset large model is in a stable running state, the configuration state of the preset large model is set to a precise adjustment state. The second quantitative information of the data to be analyzed is obtained. Based on the second quantitative information, user instructions and preset rule data, the data is injected into the preset large model according to the second preset ratio so that the preset large model can perform analysis and processing.

[0051] In one possible design, the first determining module is specifically used for,

[0052] Based on the image analysis request, determine the analysis scenario of the image data and the initial quantity of the image data;

[0053] When the analysis scenario is a comparative analysis scenario and there are multiple first-order images, test images and reference images are identified in the image data, and the identifiers of the test images, the identifiers of the reference images, the number of reference images, and the relationship information between the test images and the reference images are added to the first information.

[0054] When an image analysis request indicates that it should be processed using the deep inference mode, a depth processing identifier is added to the first information;

[0055] When the image analysis request includes user instructions, add the user instructions to the first information.

[0056] In one possible design, the first determining module is further used for,

[0057] Retrieve multiple preset strategy prompts and multiple prompt modules;

[0058] Based on multiple strategy scenarios, multiple strategy prompts are split and processed to obtain multiple strategy fragments;

[0059] Based on multiple prompt word modules and multiple strategy fragments, a preset mapping table is generated. The preset mapping table is used to indicate the mapping relationship between multiple prompt word modules and multiple strategy fragments.

[0060] Store the preset mapping table, multiple strategy fragments, and multiple prompt word modules in the preset storage space.

[0061] One possible design also includes modifying modules.

[0062] The modification module is used to determine the modification content of the prompt word module in response to the modification instruction of the prompt word module;

[0063] The modified content is validated.

[0064] When the verification process passes, the modified content is written to the preset storage space. The completeness of the updated prompt word module is verified. If there is a missing second prompt word module, the default prompt word module is obtained and added to the updated prompt word module. The version number and timestamp are also updated.

[0065] An error message is generated when the verification process fails.

[0066] Thirdly, this application provides an electronic device, comprising: at least one processor and a memory; the memory storing computer-executable instructions; and at least one processor executing the computer-executable instructions stored in the memory, causing the at least one processor to perform the image analysis method as described in the first aspect above and various possible designs of the first aspect.

[0067] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the image analysis method of the first aspect and various possible designs of the first aspect.

[0068] Fifthly, this application provides a computer program product, including a computer program, which, when executed by a processor, performs an analysis method for images that implement the first aspect and various possible designs of the first aspect.

[0069] The image analysis method, apparatus, device, storage medium, and program product provided in this application, when image analysis is required, allows an electronic device to respond to a user's image analysis request, determine first information associated with the image data to be analyzed, and, based on the first information, determine a first prompt word module from a prompt word configuration library. The first prompt word module is a set of strategy fragments adapted to the analysis scenario of the image data. According to a preset mapping table, determine multiple first strategy fragments corresponding to the first prompt word module. The preset mapping table indicates the mapping relationship between the prompt word module and the strategy fragments. The multiple first strategy fragments are spliced ​​together in a preset order to generate a target prompt word. The target prompt word and image data are input into a preset large model for analysis and processing to obtain the analysis results of the image data. Thus, by using the above method, preset prompt words for different modules, and determining the prompt word module adapted to the image data based on the first information, the large model can perform analysis and reasoning adapted to the image data scenario and under the guidance of sufficient domain knowledge, thereby improving the effectiveness of image analysis. Attached Figure Description

[0070] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0071] Figure 1 This is a schematic diagram of the system architecture provided for an embodiment of this application;

[0072] Figure 2 A flowchart illustrating an image analysis method provided in an embodiment of this application;

[0073] Figure 3 A schematic diagram illustrating the knowledge injection process of the preset large model provided in the embodiments of this application;

[0074] Figure 4 This is a schematic diagram illustrating the process of modifying the prompt word module as provided in an embodiment of this application;

[0075] Figure 5 A schematic diagram of the structure of an image analysis device provided in an embodiment of this application;

[0076] Figure 6 A schematic diagram of another image analysis device provided in an embodiment of this application;

[0077] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0078] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0079] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0080] The collection, storage, use, processing, transmission, provision, and disclosure of user data and other information involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0081] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0082] To facilitate understanding, the following will be combined with... Figure 1 The system architecture applicable to the embodiments of this application will be described.

[0083] Figure 1 This is a schematic diagram of the system architecture provided for an embodiment of this application. Please refer to [link / reference]. Figure 1 This includes electronic devices, which can be devices with on-device computing capabilities, such as terminal devices or servers. The electronic device can store a preset prompt word module containing multiple strategy fragments. The electronic device can receive image analysis requests from users, and based on the user's instructions, the image data sent by the user, and the corresponding strategy fragments, it performs analysis and processing through a large model to obtain the analysis results of the image data.

[0084] Image quality analysis technology is widely used in the imaging evaluation process of devices such as mobile phone cameras, vehicle cameras, action cameras and drone cameras. It usually requires combining the image or video to be analyzed, analysis rules and multimodal large models to make quality judgments on single images, multiple image comparisons or video content.

[0085] In related systems, there are generally three components: an image acquisition end, a prompt information generation end, and a large model analysis end. The prompt information generation end is responsible for organizing the analysis requirements, evaluation rules, and scene descriptions, and then inputting the prompt words and image data into the model to output defect judgments, performance evaluations, or analysis reports.

[0086] In existing image analysis solutions, a common practice is to pre-write fixed prompt templates for single-image analysis, multi-image comparison, or video analysis, or for users to temporarily piece together analysis instructions, supplemented by rule documents to guide the model in completing recognition and judgment. The basic principle is to first select or edit the text prompt content according to the task type, and then input the text and image data together into a large model, which then generates analysis results based on the image content and prompt information.

[0087] However, this approach has limited adaptability to specific scenarios. When the analysis object changes from a single image to a multi-image comparison, or from static images to video sequences, the original prompts often cannot be adjusted synchronously, easily leading to problems such as missing analysis dimensions, unclear comparison relationships, or incomplete rule coverage. Especially when different task requirements and different input types coexist, manually adjusting prompts is not only inefficient, but also results in significant differences in the results written by different people, leading to insufficient stability of the output conclusions.

[0088] Meanwhile, existing solutions do not fully utilize the associated information of image data, and lack a unified correspondence between prompts and analysis scenarios. This makes it difficult to automatically select appropriate strategy content based on specific tasks and organize it in a consistent order, thus affecting the large model's understanding of the analysis focus. Domain rule maintenance also often relies on manual modification, making it difficult to form a reusable and mappable prompt structure, ultimately limiting analysis consistency, adaptability, and iteration efficiency.

[0089] To address the aforementioned technical problems, in this embodiment, when image analysis is required, the electronic device can respond to the user's image analysis request by determining first information associated with the image data to be analyzed; based on the first information, a first prompt word module is determined from the prompt word configuration library, where the first prompt word module is a set of strategy fragments adapted to the analysis scenario of the image data; based on a preset mapping table, multiple first strategy fragments corresponding to the first prompt word module are determined, where the preset mapping table indicates the mapping relationship between the prompt word module and the strategy fragments; multiple first strategy fragments are spliced ​​together in a preset order to generate a target prompt word; the target prompt word and image data are input into a preset large model for analysis and processing to obtain the analysis result of the image data. Thus, by using the above method, by presetting prompt words for different modules, and by determining the prompt word module adapted to the image data based on the first information, the large model can perform analysis and reasoning adapted to the image data scenario and under the guidance of sufficient domain knowledge, thereby improving the effectiveness of image analysis.

[0090] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0091] Figure 2 This is a schematic flowchart illustrating an image analysis method provided in an embodiment of this application. Please refer to [link / reference]. Figure 2 As shown, the method may include the following steps:

[0092] S201. In response to the user's image analysis request, determine the first information associated with the image data to be analyzed.

[0093] The execution subject of this application embodiment can be an electronic device or an image analysis device installed in an electronic device. The image analysis device can be implemented by software or by a combination of software and hardware. The electronic device can be a device with on-device computing capabilities, such as a server or terminal device.

[0094] A user's image analysis request can refer to an image analysis operation triggered by the user through an electronic device. This can be achieved by the user clicking to upload image data on the front-end visual interface of the electronic device, entering user instructions, and finally clicking the "Analyze" control to generate an image analysis request.

[0095] The image data to be analyzed can refer to a single raw image uploaded by the user, a sequence of video frames, multiple sets of comparison images, or images in a report file, etc.

[0096] The first piece of information can refer to the relationship between the image data to be analyzed and the current analysis target. For example, the first piece of information may include analysis type, number of images, image data identifiers, scene labels, and task constraint information, etc.

[0097] In one possible implementation, the first information may further include: determining the analysis scenario and the first quantity of image data based on the image analysis request; when the analysis scenario is a comparative analysis scenario and the first quantity is multiple, identifying test images and reference images in the image data, and adding the identifiers of the test images, the identifiers of the reference images, the quantity of reference images, and the relationship information between the test images and the reference images to the first information; when the image analysis request indicates processing through deep inference mode, adding a deep processing identifier to the first information; and when the image analysis request includes user instructions, adding the user instructions to the first information.

[0098] Understandably, the analysis scenario and the first quantity are used together to determine whether it is necessary to distinguish between the test image and the reference image, and whether to introduce information related to the inference mode and user requirements.

[0099] In its implementation, after receiving a user's image analysis request, the system first parses the task type, number of input images, and additional control fields in the request, and maps the parsing results to an analysis scenario and a first quantity. When the analysis scenario is identified as comparative analysis and the first quantity is greater than one, the system selects a test image and a reference image from the image data, generates corresponding identifiers and a description of the relationship between them, and then writes this content into the data structure of the first information. If the request carries a deep inference mode field, a deep processing identifier is written synchronously; if the request carries natural language or structured user instructions, the instructions are written into the first information either as is or after normalization.

[0100] The initial information can be used to ensure that the comparison object, inference pattern, and user requirements are uniformly expressed before entering the subsequent analysis chain. Since the test image, reference image, and their relationship information are explicitly encoded, the subsequent model can establish a stable comparative semantics based on this. At the same time, since deep processing identifiers and user instructions are incorporated synchronously, the content of the subsequently generated first prompt words can match the corresponding inference strength and task constraints.

[0101] In this way, scene information, comparison relationship information, and user control information in the image analysis request can be consistently summarized into the first information, enabling the subsequent first prompt word construction and model analysis to accurately identify the task role and analysis focus, thereby improving the completeness of information expression in the comparison analysis scenario and the consistency of processing under different request conditions.

[0102] In one possible implementation, before responding to the user's image analysis request, the method further includes: obtaining multiple preset policy prompt words and multiple prompt word modules; splitting the multiple policy prompt words according to multiple policy scenarios to obtain multiple policy fragments; generating a preset mapping table based on the multiple prompt word modules and multiple policy fragments; and storing the preset mapping table, multiple policy fragments, and multiple prompt word modules in a preset storage space.

[0103] Among them, several strategy cue words can refer to pre-prepared text descriptions.

[0104] Multiple prompt word modules can refer to pre-set scene modules. For example, multiple prompt word modules may include a single image analysis module, a comparison analysis module, a video analysis module, and a report generation module.

[0105] Specifically, the single image analysis module can be used for single image quality assessment. Its core analysis dimensions can include a four-dimensional assessment of automatic exposure, white balance, image signal processing, and autofocus, as well as comprehensive scoring and optimization suggestions.

[0106] The comparative analysis module can be used to compare a test image with multiple reference images. Its core analysis dimensions can include a four-dimensional evaluation of automatic exposure, white balance, image signal processing, and autofocus, as well as the determination of the advantages and disadvantages of the reference images and test images, and the optimization direction of the test images.

[0107] The video analytics module can be used for time-series evaluation of video image quality. Its core analysis dimensions can include video scene description, image quality assessment, and annotation of key time points.

[0108] The report generation module can be used to summarize multiple sets of analysis results. Its core analysis dimensions can include an overview of the test situation, a summary of issues, an evaluation of the effect, and comprehensive recommendations.

[0109] Multiple strategy prompts are split into multiple strategy fragments. This splitting can be done according to multiple preset fragment dimensions, where the preset fragment dimensions can be predefined splitting rules. For example, the preset fragment dimensions could include role setting dimensions, analysis dimensions, level standard dimensions, red line rule dimensions, special rule dimensions, and output format dimensions. After splitting the multiple strategy prompts according to these preset fragment dimensions, the resulting strategy fragments can include role setting fragments, analysis dimension fragments, level standard fragments, red line rule fragments, special rule fragments, and output format fragments.

[0110] The preset mapping table can be used to indicate the mapping relationship between multiple prompt word modules and multiple policy fragments, and multiple prompt word modules can share multiple policy fragments.

[0111] For example, a preset mapping table can indicate the corresponding analysis dimension segment, grade standard segment, and red line rule segment for the comparison analysis module, and the corresponding analysis dimension segment and output format segment for the report generation module.

[0112] S202. Based on the first information, determine the first prompt word module in the prompt word configuration library.

[0113] The first prompt word module can be a collection of strategy fragments adapted to the analysis scenarios of image data.

[0114] The prompt word configuration library can refer to the storage or configuration space used to store the available first prompt word modules. It can be implemented using a relational database, key-value store, configuration file repository, or in-memory configuration center.

[0115] The first prompt word module can be used to carry a set of first strategy fragments adapted to the image data analysis scenario, and is the core carrier for generating target prompt words.

[0116] In one possible implementation, the scene category field in the first information can be read first to determine the search scope. When the scene category is single image analysis, the search can be limited to the single image analysis module in the prompt word configuration library; when the scene category is comparative analysis, the search can be limited to the comparative analysis module in the prompt word configuration library; when the scene category is video analysis, the search can be limited to the video analysis module in the prompt word configuration library; and when the scene category is report generation, the search can be limited to the report generation module in the prompt word configuration library.

[0117] In one possible implementation, each prompt word module in the prompt word configuration library can at least include a module identifier, applicable scenario tags, applicable input types, supported analysis dimension set, and version number. Based on this initial information, the scenario matching degree, input type matching degree, and dimension coverage are calculated respectively, and the first prompt word module with the highest matching result is selected.

[0118] In another possible implementation, the system can directly employ rule-based matching. For example, it can pre-establish configuration indexes such as "single image + sharpness detection," "multiple images + comparative analysis," and "video + stability," and use multiple fields from the initial information to form a search key to directly locate the target module. The system can also filter modules based on scene association features in the initial information to ensure that subsequent stitching content remains consistent with the current analysis task.

[0119] In this way, by mapping the first information to the module-level configuration object, a consistent correspondence is established between the analysis scenario and the structure of the first prompt word, so that the source of the first prompt word content under different task types remains consistent, reducing the impact of manual splicing differences on output stability.

[0120] S203. Based on the preset mapping table, determine the multiple first strategy fragments corresponding to the first prompt word module.

[0121] A preset mapping table can be used to indicate the mapping relationship between prompt word modules and strategy fragments. The preset mapping table can be stored internally in the prompt word configuration library or stored independently in the configuration service, and can be queried by module identifier.

[0122] The first strategy fragment can be the smallest reusable unit that constitutes the target prompt word. Each first strategy fragment corresponds to an analysis rule or prompt content that can be directly used for text concatenation, such as an analysis identity definition fragment, an analysis object description fragment, a comparison rule fragment, a defect judgment fragment, an output format fragment, etc.

[0123] In one possible implementation, the module identifier of the first prompt word module can be read first, and then a list of segments corresponding to that module identifier can be retrieved from a preset mapping table. The preset mapping table records at least the mapping relationship between module identifiers, segment identifiers, segment categories, and sequence indices. In one possible embodiment, the mapping table can record multiple first strategy segments corresponding to one first prompt word module in a one-to-many manner. For example, a multi-image analysis module may correspond to a role definition segment, an object description segment, an evaluation dimension segment, a rule description segment, and a conclusion output segment, respectively. After retrieving these segment identifiers, the system continues to read the segment text from the segment storage area and forms the first strategy segment set for the current task.

[0124] In another possible implementation, the preset mapping table can also be linked with additional conditions in the first information. When the analysis requirements in the first information include specific analysis focuses, corresponding dimension segments are added to the basic first strategy segment set. When the first information indicates that the current task is video analysis, the system selects the first strategy segment from the mapping relationship that includes requirements for temporal continuity description, keyframe inspection, or segment-level summary. That is to say, in this application, the preset mapping table can be a static mapping relationship, or it can be conditionally expanded by combining the first information after reading the basic mapping.

[0125] To ensure the accuracy of fragment invocation, the mapping and parsing unit can perform integrity checks before outputting multiple first-strategy fragments. Integrity checks can include at least fragment missing checks and category coverage checks. Fragment missing checks confirm that all fragment identifiers recorded in the mapping table contain valid text in the fragment storage area; category coverage checks confirm that the current set of first-strategy fragments at least covers the three necessary categories of content: analysis object description, rule constraints, and output requirements. In cases of failed checks, the system can fall back to a backup module for the same scenario or call a default fragment of the same category as a replacement, and write the replacement information to the task log.

[0126] In this way, by using a preset mapping table to expand the module to the first strategy segment, the system can call reusable rule content in a unified manner in different image analysis scenarios, so that the construction of the first prompt word has a stable segment-level organizational foundation and reduces mismatches between modules and specific rules.

[0127] S204. Multiple first strategy fragments are spliced ​​together in a preset order to generate target prompt words.

[0128] Target cue words can refer to the text that is ultimately input into the large model, and are used to guide the model in analyzing image data.

[0129] Understandably, although multiple first strategy fragments have been determined, if there is a lack of a unified organizational order, it is easy to cause confusion in the context or incomplete expression of rules. Therefore, in this application, the fragment arrangement rules are predefined before splicing.

[0130] The splicing process can refer to rearranging and integrating multiple first-strategy segments in a preset order.

[0131] The preset order allows users to pre-set the arrangement order of multiple first strategy segments, which can be used to limit the arrangement relationship of multiple first strategy segments in the target prompt words.

[0132] For example, the preset order can be "role setting, analysis dimensions, level standards, red line rules, special rules, quantitative information, test image information and comparison image information, output format requirements, user instructions".

[0133] Among them, the role setting can be used to define the professional identity, professional background, professional ability, and stance of the large model, thereby framing the professional perspective and allowing the large model to conduct image analysis according to the logic of the corresponding industry experts. It is the basic identity premise of the entire prompt word and should be placed first.

[0134] The analysis dimensions can clearly define all the contents that need to be examined, identified, calculated, and compared in this image, define the analysis scope, tell the model which dimensions to analyze the image from, and specify the indicators that must be detected. The analysis dimensions can be determined based on the analysis dimensions defined in the first prompt word module.

[0135] The grading standard can refer to the industry standardization grading threshold or multiple predefined impact analysis levels.

[0136] Red line rules can refer to hard compliance constraints, prohibited behaviors, and output restrictions, stipulating what the model absolutely cannot do, and avoiding conclusions that violate regulations, make misjudgments, or exceed the scope of business.

[0137] Special rules can refer to exclusive constraints and special processing logic unique to the current business scenario, as well as personalized interpretation requirements that cannot be covered by general classification and red lines.

[0138] Quantitative information can refer to objective digital indicators of an image calculated in real time through computer vision (CV) algorithms. It can be structured key-value JSON data and can include objective values ​​such as image quality, defect size, and pixel difference, serving as auxiliary judgment data.

[0139] Test image information can refer to the identifier of the image to be tested, the file name, and the pairing relationship with the comparison image.

[0140] Comparison image information can refer to the identifier of the comparison image (or reference image), file name, and pairing relationship with the test image, etc.

[0141] Output format requirements can refer to the mandatory specification of the structure, fields, layout, and data format of the model's returned results, unifying the output style to facilitate automatic parsing, data entry, and report generation by the backend program.

[0142] User instructions can refer to personalized additional analysis requirements manually entered by the user on the front end. These are temporary additional requirements and should be placed at the end to avoid interfering with the core interpretation rules.

[0143] In this way, the target prompt can include multiple first strategy fragments and contextual information transformed from the first information, thus making the first prompt both contain preset rules and a specific object description of the current task. After concatenation, the system generates a complete target prompt text and writes this text into the task context cache for subsequent inference steps. By organizing fragmented rules into structurally complete and semantically coherent text input through a preset order, a transformation link is established from modular configuration to the first prompt of an executable large model, enabling the content of the first prompt to be constructed in a targeted manner according to changes in the scenario.

[0144] S205. Input the target prompts and image data into the preset large model for analysis and processing to obtain the analysis results of the image data.

[0145] The analysis results can refer to standardized and structured output content, which may include information such as defect coordinates, defect size, defect level, comparison conclusions of differences between multiple images, and quality inspection summary.

[0146] The pre-set large model can be used to receive target prompts and image data, perform analysis and processing, and output the analysis results of the image data.

[0147] The pre-built large model can be deployed on a local server, a cloud inference platform, or dedicated acceleration hardware. Its input interface supports joint input of text and images, text and video, or text and multiple image sets.

[0148] Understandably, target prompts can serve as analysis constraints and rule injection functions, while image data can serve as the object to be analyzed, and together they constitute the reasoning context.

[0149] In one possible implementation, the image data can be adapted for input. When the image data is a single image, the system combines the image encoding result with the target prompt to form a single-round multimodal message body. When the image data consists of multiple images, the image input order can be organized according to the image association method recorded in the first information, and the arrangement in the message body should be consistent with the object description in the target prompt. When the image data is video, a video file can be directly input, or keyframes or fixed-interval frames can be extracted according to the model interface requirements to form a frame sequence input. The target prompt and the adapted image data are then submitted to a pre-set large model, and the corresponding inference interface is called to perform joint analysis.

[0150] The preset large model can be a pre-trained multimodal large model.

[0151] In one possible implementation, the pre-defined large model can be a multimodal large model that supports visual encoding and textual reasoning. The pre-defined large model can first extract visual features from image data, then combine the rule constraints in the target prompt words to perform cross-modal association reasoning, and finally output structured or semi-structured analysis results.

[0152] In another possible implementation, the system can append historical task context or domain rule supplementary content before calling the preset large model. However, this supplementary content is still uniformly expressed through target prompts, ensuring that the model receives only one complete text constraint specific to the current task. The output analysis results can include at least one of the following: defect type, performance evaluation, level determination, difference description, or processing suggestions. If the task is video analysis, the analysis results can also include temporal stability, key segment anomalies, or inter-frame consistency descriptions.

[0153] In this embodiment, when image data needs to be analyzed, the electronic device can respond to the user's image analysis request and determine the first information associated with the image data to be analyzed. The user's image analysis request may refer to an image analysis operation triggered by the user through the electronic device. The image data to be analyzed may refer to a single original image, video frame sequence, multiple sets of comparison images, or report file images uploaded by the user. The first information may refer to the association between the image data to be analyzed and the current analysis target. Based on the first information, a first prompt word module is determined in the prompt word configuration library. The prompt word configuration library may refer to a library used to store selectable first prompt word modules. The storage or configuration space of the block allows the first prompt word module to carry a set of first strategy fragments adapted to the image data analysis scenario. Based on a preset mapping table, multiple first strategy fragments corresponding to the first prompt word module are determined. This preset mapping table indicates the mapping relationship between the prompt word module and the strategy fragments. The first strategy fragment can be the smallest reusable unit constituting the target prompt word. Multiple first strategy fragments are concatenated in a preset order to generate the target prompt word, which can refer to the text ultimately input into the large model. The target prompt word and image data are input into the preset large model for analysis and processing to obtain the image data analysis results. Thus, by parsing the association information of the image analysis request, the appropriate prompt word module and reusable strategy fragments are automatically matched, and standardized target prompt words are generated by concatenating them in a standardized order. This achieves automated, modular, and structured generation of prompt words, avoiding manual configuration deviations and redundant writing issues. This effectively improves the adaptation efficiency, inference stability, and result accuracy of various image scenario analyses, thereby enhancing the image analysis effect.

[0154] Based on any of the above embodiments, the following, in conjunction with Figure 3 The process of knowledge injection into the pre-defined large model is explained in detail.

[0155] Figure 3 This is a schematic diagram illustrating the knowledge injection process of the preset large model provided in the embodiments of this application. Please refer to... Figure 3 The method may include:

[0156] S301. Obtain user instructions and preset rule data, inject the user instructions and preset rule data into the preset large model, so that the preset large model can perform analysis and processing according to the user instructions and preset rule data, and determine the configuration state of the preset large model as the rule injection state.

[0157] User instructions can refer to user-defined image analysis needs and task requirements. For example, a user instruction could be "output image defects".

[0158] Preset rule data can refer to a static professional rule library in the imaging field. Preset rule data can include structured domain knowledge such as defect classification standards, analysis dimensions, compliance red lines, and scene-specific interpretation rules.

[0159] Configuration status can be used to indicate the knowledge injection status of a preset large model. Configuration status can be a unique model status identifier used to accurately distinguish the current knowledge injection stage of the large model. It is divided into three categories: rule injection status, historical data injection status, and precise adjustment status, and is the core basis for the system's adaptive switching logic.

[0160] Understandably, the rule injection state represents the initial analysis and processing state of a pre-defined large model. At this stage, there is no historical analysis data; however, user-defined analysis instructions for the current task can be read, and pre-defined rule data stored in the background can be retrieved. Through knowledge injection, standardized domain interpretation rules, compliance red lines, and output requirements, combined with basic user task instructions, are injected into the cognitive system of the pre-defined large model, completing the model's cold start initialization and inference analysis. This stage does not rely on any real image samples; it only builds the model's industry cognitive framework through structured text rules.

[0161] The pre-set large model can use pre-set rule data and user instructions as the sole basis for reasoning and analysis, learn the basic logic, judgment criteria, and behavioral constraints of image analysis, and establish the basic distinguishing logic between normal and defective images, thereby solving the problem that general large models do not understand industry-specific interpretation rules.

[0162] S302. When the number of analysis records of the preset large model is greater than or equal to the first threshold, the configuration state of the preset large model is determined to be the historical data injection state, the historical analysis records of the preset large model are obtained, and the preset large model is injected according to the user instructions, historical analysis records and preset rule data in accordance with the first preset ratio.

[0163] Historical data injection can refer to the transition from a pure rule-based cold start phase to a knowledge-enhanced phase combining rules with historical samples, i.e., initiating a hybrid analysis and processing mode. This avoids the overly theoretical nature of pure textual rules by using a small number of real historical samples to assist in analysis and processing, allowing the model to understand the application of rules in real-world images and significantly reducing rule comprehension bias.

[0164] The first threshold can be a value preset by the user. Understandably, when the number of analysis records of the preset large model is greater than or equal to the first threshold, it can be considered that the preset large model has accumulated a certain amount of analysis records. At this time, the scene data of the preset large model has been initially accumulated and is ready for sample augmentation analysis processing.

[0165] The historical analysis records of the preset large model can refer to high-quality, error-free data covering various defect scenarios in the analysis records of the preset large model. The historical analysis records can include relevant data such as input image features, quantitative information, analysis conclusions, and defect levels.

[0166] The first preset ratio can be the ratio of user commands, historical analysis records and preset rule data set in advance by the user. For example, the first preset ratio can be 70% for user commands and preset rule data and 30% for historical analysis records.

[0167] Understandably, by analyzing and processing according to the first preset ratio, we can take the domain's hard rules as the core and historical real cases as the auxiliary, which can ensure that industry standards are not lost and allow the model to learn the judgment logic of real-world scenarios.

[0168] In one possible implementation, when the configuration state is in rule injection state or historical data injection state, the first information and multiple first strategy fragments are spliced ​​together in a preset order to generate target prompt words.

[0169] Understandably, when the pre-set large model is in the first two stages (i.e., rule injection state or historical data injection state), there is no need to inject quantitative information. Instead, based on the first information of the image scene (number of images, task type), the corresponding strategy fragments are matched and the target prompt words are generated by splicing them in a standard order. This adapts to the reasoning needs of the cold start and knowledge enhancement stages, thereby simplifying the prompt word structure, reducing system computing power consumption, and improving reasoning speed.

[0170] S303. When the running state of the preset large model is stable, the configuration state of the preset large model is determined to be the precise adjustment state. The second quantitative information of the data to be analyzed is obtained. According to the second quantitative information, user instructions and preset rule data, the data is injected into the preset large model according to the second preset ratio.

[0171] A stable operating state can refer to a state in which the system operates stably for a long time, has a sufficient sample library, a fully connected visual quantization link, minimal fluctuations in model analysis accuracy, and can adapt to various complex scenarios. A stable state can represent that the system has entered a mature and stable operating stage.

[0172] Precise adjustment of the state can refer to the model entering the highest-level analysis, processing and reasoning stage, which can focus on the precision optimization of complex boundary scenarios, subtle defects and multi-dimensional comparison scenarios.

[0173] The second quantitative information can refer to computer vision quantitative indicators of various images in the analysis and processing stage, such as sharpness, defect size, color difference, pixel difference, etc. The second quantitative information can be used as analysis and processing data for offline fine-tuning of the model.

[0174] The second preset ratio can be the ratio between the second quantified information, user instructions, and preset rule data that the user has pre-set. For example, the second preset ratio can be that the ratio of user instructions and preset rule data accounts for 50% of the total ratio, and the second quantified information accounts for 50% of the total ratio.

[0175] Understandably, by injecting industry standards and objective quantitative values ​​in accordance with the second preset ratio, the model can achieve high-precision interpretation based on accurate data.

[0176] In one possible implementation, when the configuration state is in the precise adjustment state, the image data is subjected to quantitative analysis and processing to obtain the first quantitative information of the image data; the first quantitative information, the first information and multiple first strategy segments are spliced ​​together in a preset order to generate target prompt words.

[0177] Among them, the first quantification information can be used to quantify and describe image data, that is, real-time computer vision quantification data of image data in the reasoning stage, which can be used to dynamically assemble prompt words and assist in real-time analysis.

[0178] In this way, during real-time inference, the current image is first quantitatively analyzed using computer vision (CV) algorithms to generate the first quantitative information of the image data. Then, the quantitative data, the first information, and multiple strategy fragments are spliced ​​together in a preset order to generate high-precision target prompt words containing objective values, thereby assisting the model in accurate inference.

[0179] In this way, by setting the configuration state to correspond with different prompt word concatenation methods, and introducing the first quantification information in the precise adjustment state, the target prompt words can be dynamically constructed as the model knowledge injection stage changes, thereby making the prompt content consistent with the image analysis scene, improving stability and consistency of analysis output.

[0180] exist Figure 3In the illustrated embodiment, when knowledge injection is required into a preset large model, user instructions and preset rule data can be obtained and injected into the preset large model so that the preset large model can perform analysis and processing according to the user instructions and preset rule data. The configuration state of the preset large model is determined to be the rule injection state. The preset rule data can refer to a static professional rule library in the image field, and the configuration state can be used to indicate the knowledge injection state of the preset large model. When the number of analysis records of the preset large model is greater than or equal to a first threshold, the configuration state of the preset large model is determined to be the historical data injection state. The historical analysis records of the preset large model are obtained, and the data is injected into the preset large model according to the user instructions, historical analysis records, and preset rule data at a first preset ratio. The historical analysis records can refer to high-quality, error-free data covering various defect scenarios in the analysis records of the preset large model. When the running state of the preset large model is stable, the configuration state of the preset large model is determined to be the precise adjustment state. The second quantitative information of the data to be analyzed is obtained, and the data is injected into the preset large model according to the second quantitative information, user instructions, and preset rule data at a second preset ratio. In this way, by progressively injecting knowledge into the pre-set large model, the above methods avoid problems such as high cold start thresholds in new scenarios, inability to implement without samples, knowledge overload, large subjective interpretation biases of the model, insufficient accuracy in complex scenarios, and lack of gradient in iterative optimization. At the same time, through hierarchical matching analysis, the core weight of domain rules is always guaranteed, taking into account both the model's universality and scenario specialization. Furthermore, relying on differentiated prompt word splicing strategies, it adapts to the inference needs of different operational stages, thereby improving the accuracy, stability, and scenario adaptability of image analysis.

[0181] Based on any of the above embodiments, the following, in conjunction with Figure 4 The process of modifying the prompt word module is explained in detail.

[0182] Figure 4 This is a schematic diagram illustrating the process of modifying the prompt word module according to an embodiment of this application. Please refer to... Figure 4 The method may include:

[0183] S401. In response to the modification instruction for the prompt word module, determine the modification content for the prompt word module.

[0184] The modification commands for the prompt word module can be edit operations triggered by users or operations and maintenance personnel in the configuration backend or frontend configuration interface. Modification commands can include adding, deleting, replacing, modifying policy fragment content, adjusting module binding relationships, modifying output rules, updating hierarchical standards, and other operation commands.

[0185] The modified content can refer to all changes submitted by the user, including the updated strategy fragment text, the mapping relationship of the prompt word module, rule thresholds, user-defined constraints, and other content that needs to be written to the prompt word configuration library.

[0186] The system can compare the original configuration of the prompt word module before modification with the new configuration after modification, thereby accurately identifying the incremental changes and clarifying the specific fields, texts, rules, and binding relationships of this update.

[0187] This allows for precise incremental updates, avoids invalid configuration refreshes, and thus improves the efficiency of modifying the prompt word module.

[0188] S402. Perform verification processing on the modified content to obtain the verification result.

[0189] Validation processing can include format validation, logical validation, compliance validation, rule conflict validation, and field validity validation.

[0190] Electronic devices can have built-in verification rule bases, which can be used to verify modified content.

[0191] Specifically, the verification process can include checking whether the text format is standardized, whether the parameter threshold is valid, whether there are logical contradictions, whether industry red lines are violated, whether there are prohibited statements, whether fields are missing, whether the numerical threshold exceeds the reasonable range, and whether the new rules conflict with the original general rules.

[0192] The result of the verification process can include verification passed and verification failed.

[0193] In this way, incorrect, unauthorized, and contradictory configurations can be intercepted from the source and stored in the database, avoiding model misinterpretation, rule failure, and system errors caused by human editing mistakes. At the same time, by replacing manual review with automated verification, the security of configuration iteration can be improved, avoiding system failures caused by human oversight, and ensuring that the prompt word system is always compliant and logically consistent.

[0194] S403. When the verification process results in a successful verification, the modified content is written to the preset storage space.

[0195] Understandably, writing the modified content to the preset storage space can include the formal entry of the legitimate configuration into the database and the fallback completion process.

[0196] After all modifications have passed verification, the incremental changes can be synchronously written to the corresponding module and fragment data table in the preset storage space, thereby completing the configuration update.

[0197] In one possible implementation, writing the modified content into the preset storage space also includes a fallback completion process, that is, performing an integrity check on the updated prompt word module. If there is a missing second prompt word module, the default prompt word module can be obtained, the default prompt word module can be added to the updated prompt word module, and the version number and timestamp can be updated.

[0198] Integrity verification can refer to checking whether the updated module has all the necessary core content, with no missing functions or core rules.

[0199] The default suggestion module can refer to a preset catch-all standard template, which can be a general, compliant, and defect-free basic module that can be used to automatically complete missing modules.

[0200] Version number and timestamp update processing can refer to iterative upgrade version identifiers, recording the updated version and precise update time, for traceability, rollback, and log auditing.

[0201] Understandably, if the system detects incomplete modules, missing functions, or omitted key rules, it will automatically retrieve the system's built-in default prompt word module to intelligently complete the missing parts, ensuring that the updated module is fully functional and can drive image analysis normally. Finally, it will automatically update the module version number and timestamp, completing a complete, secure, and traceable iterative update.

[0202] In this way, by using post-integrity verification and fallback completion mechanisms, we can avoid module failures and functional abnormalities caused by accidental deletion of core configurations, thereby ensuring the effectiveness of image analysis.

[0203] S404. When the result of the verification process is that the verification fails, an error message is generated.

[0204] If the verification process fails, it can be assumed that the modified content contains logical errors, formatting errors, compliance issues, parameter anomalies, or does not meet the deployment standards. A readable and locatable structured error log and prompt information can be output for anomaly alerts and problem troubleshooting.

[0205] exist Figure 4In the illustrated embodiment, when a user needs to modify the prompt word module, the electronic device can respond to the modification instruction for the prompt word module, determine the content to be modified, and the modification instruction for the prompt word module can be an editing operation triggered by the user or maintenance personnel in the configuration backend or frontend configuration interface. The modification content can refer to all changes submitted by the user. The modified content is verified to obtain the verification result, which can include verification passed and verification failed. When the verification result is verification passed, the modified content is written to a preset storage space. At the same time, the updated prompt word module is checked for completeness. If there is a missing second prompt word module, the default prompt word module can be obtained and added to the updated prompt word module, and the version number and timestamp are updated. When the verification result is verification failed, an error message is generated. In this way, through the above methods, the prompt word module forms a closed-loop management between modification, verification, completion and version update, so that the module content can remain complete and traceable, thereby ensuring the stable calling and consistent output of prompt information during subsequent image analysis. Furthermore, since the default prompt word module can be automatically supplemented when missing, the module structure can maintain the preset integrity, thereby reducing the burden of manual maintenance and improving the consistency of configuration iteration.

[0206] Figure 5 This is a schematic diagram of an image analysis device provided in an embodiment of this application. Please refer to... Figure 5 The image analysis device 10 includes: a first determining module 11, a second determining module 12, a third determining module 13, a stitching processing module 14, and an analysis processing module 15, wherein...

[0207] The first determining module 11 is used to determine, in response to a user's image analysis request, first information associated with the image data to be analyzed;

[0208] The second determining module 12 is used to determine the first prompt word module in the prompt word configuration library according to the first information. The first prompt word module is a set of strategy fragments adapted to the analysis scenario of image data.

[0209] The third determining module 13 is used to determine multiple first strategy fragments corresponding to the first prompt word module according to a preset mapping table. The preset mapping table is used to indicate the mapping relationship between the prompt word module and the strategy fragments.

[0210] The splicing processing module 14 is used to splice multiple first strategy segments in a preset order to generate target prompt words;

[0211] The analysis and processing module 15 is used to input the target prompt words and image data into a preset large model for analysis and processing, and to obtain the analysis results of the image data.

[0212] The image analysis device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0213] In one possible design, the splicing processing module 14 is specifically used for,

[0214] Determine the configuration status of the preset large model. The configuration status is used to indicate the knowledge injection status of the preset large model.

[0215] When the configuration state is in rule injection state or historical data injection state, the first information and multiple first strategy fragments are spliced ​​together in a preset order to generate target prompt words;

[0216] When the configuration state is in the precise adjustment state, the image data is subjected to quantitative analysis and processing to obtain the first quantitative information of the image data. The first quantitative information is used to quantitatively describe the image data.

[0217] The first quantitative information, the first information, and multiple first strategy fragments are spliced ​​together in a preset order to generate target prompt words.

[0218] In one possible design, the splicing processing module 14 is specifically used for,

[0219] Obtain user commands and preset rule data, inject the user commands and preset rule data into the preset large model, so that the preset large model can perform analysis and processing according to the user commands and preset rule data, and determine the configuration state of the preset large model as the rule injection state;

[0220] When the number of analysis records of the preset large model is greater than or equal to the first threshold, the configuration state of the preset large model is determined to be the historical data injection state, the historical analysis records of the preset large model are obtained, and the preset large model is injected according to the user instructions, historical analysis records and preset rule data in accordance with the first preset ratio so that the preset large model can perform analysis and processing.

[0221] When the preset large model is in a stable running state, the configuration state of the preset large model is set to a precise adjustment state. The second quantitative information of the data to be analyzed is obtained. Based on the second quantitative information, user instructions and preset rule data, the data is injected into the preset large model according to the second preset ratio so that the preset large model can perform analysis and processing.

[0222] In one possible design, the first determining module 11 is specifically used for,

[0223] Based on the image analysis request, determine the analysis scenario of the image data and the initial quantity of the image data;

[0224] When the analysis scenario is a comparative analysis scenario and there are multiple first-order images, test images and reference images are identified in the image data, and the identifiers of the test images, the identifiers of the reference images, the number of reference images, and the relationship information between the test images and the reference images are added to the first information.

[0225] When an image analysis request indicates that it should be processed using the deep inference mode, a depth processing identifier is added to the first information;

[0226] When the image analysis request includes user instructions, add the user instructions to the first information.

[0227] In one possible design, the first determining module 11 is further used for,

[0228] Retrieve multiple preset strategy prompts and multiple prompt modules;

[0229] Based on multiple strategy scenarios, multiple strategy prompts are split and processed to obtain multiple strategy fragments;

[0230] Based on multiple prompt word modules and multiple strategy fragments, a preset mapping table is generated. The preset mapping table is used to indicate the mapping relationship between multiple prompt word modules and multiple strategy fragments.

[0231] Store the preset mapping table, multiple strategy fragments, and multiple prompt word modules in the preset storage space.

[0232] The image analysis device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0233] Figure 6 This is a schematic diagram of another image analysis device provided in an embodiment of this application. Figure 5 Based on this, please refer to Figure 6 The image analysis device 10 also includes a modification module 16.

[0234] The modification module 16 is used to determine the modification content of the prompt word module in response to the modification instruction for the prompt word module;

[0235] The modified content is validated.

[0236] When the verification process passes, the modified content is written to the preset storage space. The completeness of the updated prompt word module is verified. If there is a missing second prompt word module, the default prompt word module is obtained and added to the updated prompt word module. The version number and timestamp are also updated.

[0237] An error message is generated when the verification process fails.

[0238] The image analysis device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0239] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 20 may include: a transceiver 21, a processor 22, and a memory 23.

[0240] Processor 22 executes computer execution instructions stored in memory, causing processor 22 to perform the scheme in the above embodiments. Processor 22 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0241] The memory 23 is connected to the processor 22 via the system bus and completes communication between them. The memory 23 is used to store computer program instructions.

[0242] Transceiver 21 can be used to obtain the task to be run and the configuration information of the task to be run.

[0243] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.

[0244] The electronic device provided in this application embodiment can be the terminal device described in the above embodiments.

[0245] This application also provides a chip for executing instructions, which is used to execute the image analysis method described in the above embodiments.

[0246] This application also provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the image analysis method described in the above embodiments.

[0247] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the image analysis method in the above embodiments.

[0248] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0249] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.

[0250] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.

[0251] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.

[0252] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.

[0253] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.

[0254] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0255] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0256] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.

[0257] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0258] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. An image analysis method, characterized in that, include: In response to a user's image analysis request, determine the first information associated with the image data to be analyzed; Based on the first information, a first prompt word module is determined in the prompt word configuration library. The first prompt word module is a set of strategy fragments adapted to the analysis scenario of the image data. According to a preset mapping table, multiple first strategy fragments corresponding to the first prompt word module are determined. The preset mapping table is used to indicate the mapping relationship between the prompt word module and the strategy fragments. The multiple first strategy segments are spliced ​​together in a preset order to generate target prompt words; The target prompts and the image data are input into a preset large model for analysis and processing to obtain the analysis results of the image data. In response to a user's image analysis request, determine the first information associated with the image data to be analyzed, including: Based on the image analysis request, determine the analysis scenario of the image data and the first quantity of the image data; When the analysis scenario is a comparative analysis scenario and the first quantity is multiple, test images and reference images are determined in the image data, and the identifier of the test image, the identifier of the reference image, the quantity of the reference images, and the relationship information between the test image and the reference image are added to the first information; When the image analysis request indicates that it should be processed in depth inference mode, a depth processing identifier is added to the first information; When the image analysis request includes a user instruction, the user instruction is added to the first information.

2. The method according to claim 1, characterized in that, The process of concatenating the multiple first strategy fragments in a preset order to generate target prompt words also includes: Determine the configuration state of the preset large model, wherein the configuration state is used to indicate the knowledge injection state of the preset large model; When the configuration state is a rule injection state or a historical data injection state, the first information and the multiple first strategy fragments are spliced ​​together in the preset order to generate target prompt words; When the configuration state is in the precise adjustment state, the image data is subjected to quantitative analysis and processing to obtain the first quantitative information of the image data, which is used to quantitatively describe the image data. The first quantification information, the first information, and the plurality of first strategy fragments are spliced ​​together according to the preset order to generate target prompt words.

3. The method according to claim 2, characterized in that, Before determining the configuration state of the preset large model, the following steps are also included: Obtain user instructions and preset rule data, inject the user instructions and preset rule data into the preset large model, so that the preset large model can perform analysis and processing according to the user instructions and preset rule data, and determine the configuration state of the preset large model as the rule injection state; When the number of analysis records of the preset large model is greater than or equal to the first threshold, the configuration state of the preset large model is determined to be the historical data injection state, the historical analysis records of the preset large model are obtained, and the preset large model is injected according to the user instruction, the historical analysis records and the preset rule data in accordance with the first preset ratio so that the preset large model can perform analysis and processing. When the preset large model is in a stable running state, the configuration state of the preset large model is determined to be the precise adjustment state. The second quantitative information of the data to be analyzed is obtained. According to the second quantitative information, the user instruction and the preset rule data, the data is injected into the preset large model according to the second preset ratio so that the preset large model can perform analysis and processing.

4. The method according to any one of claims 1-3, characterized in that, Before responding to a user's image analysis request, it also includes: Retrieve multiple preset strategy prompts and multiple prompt modules; Based on multiple strategy scenarios, the multiple strategy prompts are split to obtain multiple strategy fragments; Based on the plurality of prompt word modules and the plurality of strategy fragments, a preset mapping table is generated, wherein the preset mapping table is used to indicate the mapping relationship between the plurality of prompt word modules and the plurality of strategy fragments; The preset mapping table, the multiple strategy fragments, and the multiple prompt word modules are stored in the preset storage space.

5. The method according to any one of claims 1-3, characterized in that, The method further includes: In response to a modification instruction for the prompt word module, determine the modification content for the prompt word module; The modified content is then verified. When the verification process results in a pass, the modified content is written into a preset storage space, and the completeness of the updated prompt word module is verified. If there is a missing second prompt word module, the default prompt word module is obtained, the default prompt word module is added to the updated prompt word module, and the version number and timestamp are updated. When the verification process results in a failure, an error message is generated.

6. An image analysis device, characterized in that, include: The system comprises a first determination module, a second determination module, a third determination module, a splicing processing module, and an analysis processing module, wherein... The first determining module is used to determine, in response to a user's image analysis request, first information associated with the image data to be analyzed; The second determining module is used to determine a first prompting word module in the prompting word configuration library based on the first information. The first prompting word module is a set of strategy fragments adapted to the analysis scenario of the image data. The third determining module is used to determine multiple first strategy fragments corresponding to the first prompt word module according to a preset mapping table, wherein the preset mapping table is used to indicate the mapping relationship between the prompt word module and the strategy fragments; The splicing processing module is used to splice the multiple first strategy segments in a preset order to generate target prompt words; The analysis and processing module is used to input the target prompt words and the image data into a preset large model for analysis and processing, and to obtain the analysis results of the image data. The first determining module is specifically used for: Based on the image analysis request, determine the analysis scenario of the image data and the first quantity of the image data; When the analysis scenario is a comparative analysis scenario and the first quantity is multiple, test images and reference images are determined in the image data, and the identifier of the test image, the identifier of the reference image, the quantity of the reference images, and the relationship information between the test image and the reference image are added to the first information; When the image analysis request indicates that it should be processed in depth inference mode, a depth processing identifier is added to the first information; When the image analysis request includes a user instruction, the user instruction is added to the first information.

7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 5.

9. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image generation method, system and device for public space and medium

    CN119559300A

  • Mock data intelligent generation method, system and device and medium

    CN121349553A