Multi-mode AIGC image-text matching question and answer verification code identification method

Through the multimodal AIGC graphic matching question-and-answer verification code recognition method, the problem of limited recognition capabilities and insufficient adaptability for specific types of verification codes in the prior art is solved, and the accuracy and robustness of verification code recognition is achieved, which reduces the error recognition rate and improves security and user experience.

CN119516551AInactive Publication Date: 2025-02-25SHANGHAI LIANYIN NETWORK TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411608027.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing verification code recognition methods rely on trained neural network models, resulting in limited recognition capabilities for specific types of verification codes, poor ability to adapt to complex or deformed verification codes, and difficult to deal with high noise or interference verification codes, affecting the recognition effect.

Method used

The multimodal AIGC graphic and text matching question-and-answer verification code recognition method is adopted. By collecting and extracting real-time image and text objects, combining preset scene library and image and text features, scene matching degree and image quality indicators are determined, the total training set images are formed, and the image and text models are trained separately, the image and text features of the verification code are extracted, and the recognition results are finally outputted through the image similar sequence.

Benefits of technology

It improves the matching accuracy between images and text, ensures higher quality and stronger adaptability, and the model has stronger robustness and accuracy when processing verification codes, reduces the misidentification rate, and improves security and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516551A_ABST
    Figure CN119516551A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of verification code identification, in particular to a multi-mode AIGC image-text matching question and answer verification code identification method, which comprises the following steps of: acquiring an image and a text; object extraction; determining a scene matching degree; determining training set images; adjusting the preset generation duration; and feature extraction and result output. According to the method, through a multi-level judgment and screening mechanism, the matching precision of the image and the text is improved, it is ensured that the generated training set is higher in quality and higher in adaptability, the model has higher robustness and accuracy when the verification code is processed through introduced comprehensive analysis of multiple image quality indexes and text features, and the method is suitable for popularization and application. Through an innovative multi-modal training strategy, the verification code recognition efficiency is improved, the false recognition rate can be effectively reduced in practical application, guarantee is provided for safety and user experience, and the problems of insufficient adaptability and low recognition accuracy caused by recognition dependence on specific types of verification codes are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of verification code recognition, and in particular to a multi-modal AIGC image-text matching question-answer verification code recognition method. Background Art

[0002] As the network environment becomes increasingly complex and security awareness continues to rise, verification codes, as a key security measure, have been widely deployed in various online services to defend against automated attacks and malware. Traditionally, character verification codes are the main target for cracking through optical character recognition (OCR) technology. However, in response to escalating security challenges, the design of verification codes tends to be more complex and diverse.

[0003] The patent document with Chinese patent application publication number CN111753281A discloses a verification code recognition method, which includes: using a trained neural network model to identify the type of an input verification code; the neural network model selects a corresponding verification code recognition module according to the type of the verification code; and using the verification code recognition module to recognize the verification code.

[0004] It can be seen that the verification code recognition method has the following problems: the method relies on a trained neural network model, resulting in limited recognition capabilities for specific types of verification codes; the selection of the recognition module is based on the recognized verification code type. If the model fails to accurately identify the type of verification code, the subsequent recognition process will be affected, resulting in recognition errors; the method has poor adaptability to complex or deformed verification codes, and it is difficult to handle verification codes with high noise or interference, which affects the recognition effect. Summary of the invention

[0005] To this end, the present invention provides a multimodal AIGC image-text matching question-answer verification code recognition method to overcome the problems of insufficient adaptability and low recognition accuracy in the prior art due to the recognition dependence on a specific type of verification code.

[0006] To achieve the above object, the present invention provides a multi-modal AIGC image-text matching question-answer verification code recognition method, comprising:

[0007] Collecting real-time images generated by a preset generation model within a preset generation time and real-time text corresponding to the real-time images;

[0008] Extracting the objects of each of the real-time images and each of the real-time texts respectively to obtain an image object and a text object;

[0009] Determine a scene matching degree according to a preset scene library, the image object and the text object, and determine a number of temporary images according to the scene matching degree;

[0010] Determine a plurality of first training set images according to the roughness, edge definition and color contrast of the temporary image;

[0011] Determine a plurality of second training set images according to the length and keyword richness of the real-time text corresponding to the temporary image;

[0012] Determine an overlap fluctuation value according to an overlap rate of the first training set image and the second training set image within a preset adjustment time, adjust the preset generation time according to the overlap fluctuation value and a preset standard overlap fluctuation value, until the overlap fluctuation value is less than or equal to the preset standard overlap fluctuation value, and obtain a plurality of total training set images;

[0013] According to the total training set images, a preset image model and a preset text model are trained respectively to obtain a training image model and a training text model;

[0014] Extracting image features of the verification code image according to the training image model to obtain a number of image features;

[0015] Extracting text features of the verification code image according to the training text model to obtain a plurality of text features;

[0016] Determine an image similarity sequence according to the image features and the text features;

[0017] Outputting a recognition result according to the image similarity sequence.

[0018] Furthermore, determining the overlap fluctuation value according to the overlap rate of the first training set image and the second training set image within the preset adjustment time includes:

[0019] The overlap rate of the first training set image and the second training set image is calculated, and when the overlap rate is greater than a preset standard overlap rate, the standard deviation of the overlap rate is calculated to form an overlap fluctuation value.

[0020] Further, adjusting the preset generation time according to the overlap fluctuation value and the preset standard overlap fluctuation value includes:

[0021] When the overlap fluctuation value is greater than the preset standard overlap fluctuation value, the preset generation duration is adjusted according to the relative deviation between the overlap fluctuation value and the preset standard overlap fluctuation value and the preset duration adjustment coefficient.

[0022] Further, the determining of the image similarity sequence according to the image features and the text features comprises:

[0023] The cosine similarities of the image features and the text features are calculated, and all the cosine similarities are sorted from large to small to form an image similarity sequence.

[0024] Furthermore, outputting the recognition result according to the image similarity sequence includes:

[0025] A preset number of images are obtained from the first position in the image similarity sequence, and a recognition result is formed and output.

[0026] Furthermore, the determining of the scene matching degree according to the preset scene library, the image object and the text object includes:

[0027] Extracting feature vectors of the image object and the text object respectively to obtain an image feature vector and a text feature vector;

[0028] Calculating the Euclidean distance according to the image feature vector and the text feature vector, and determining a consistent feature vector according to the Euclidean distance and a preset standard distance;

[0029] The scene matching degree is determined according to the consistent feature vector and the scene feature vector in the preset scene library.

[0030] Furthermore, determining a number of temporary images according to the scene matching degree includes:

[0031] When the scene matching degree is greater than a preset standard matching degree, the real-time image is determined to be a temporary image.

[0032] Further, when the roughness is greater than or equal to a preset standard roughness, and the edge clarity is greater than a preset standard clarity, the temporary image is determined to be a first training set image.

[0033] Furthermore, when the roughness is less than a preset standard roughness and the edge clarity is greater than a preset standard clarity, the color contrast is compared with the preset standard contrast, and when the color contrast is greater than the preset standard contrast, the temporary image is determined to be the first training set image.

[0034] Further, the determining of a plurality of second training set images according to the length and keyword richness of the real-time text corresponding to the temporary image comprises:

[0035] When the length is greater than a preset standard length and the keyword richness is greater than a preset standard richness, the temporary image is determined to be a second training set image.

[0036] Compared with the prior art, the beneficial effect of the present invention lies in that, through a multi-level judgment and screening mechanism, the matching accuracy of images and texts is improved, ensuring that the generated training set is of higher quality and stronger adaptability. The comprehensive analysis of multiple image quality indicators and text features introduced by the present invention enables the model to have stronger robustness and accuracy when processing verification codes. Through innovative multimodal training strategies, not only the efficiency of verification code recognition is improved, but also the misrecognition rate can be effectively reduced in practical applications, providing guarantees for security and user experience, and effectively solving the problems of insufficient adaptability and low recognition accuracy caused by the dependence on the recognition of specific types of verification codes.

[0037] Furthermore, by calculating the overlap rate of the first training set image and the second training set image and combining the standard deviation to judge the similarity fluctuation between the images, it is ensured that the selected training set images are highly consistent in content and features. When the overlap rate exceeds the preset standard, by calculating its standard deviation, the image combination with large overlap fluctuation can be effectively identified, which helps to adjust the training data set in time and eliminate irrelevant or low-quality images.

[0038] Furthermore, by monitoring the relationship between the overlap fluctuation value and the preset standard overlap fluctuation value, the generation process can be optimized in real time, the uncertainty of the generated data can be reduced, and the matching degree between the training set images and texts can be ensured to remain within a reasonable range.

[0039] Furthermore, by accurately calculating the similarity of image and text features, the accuracy of image-text matching can be effectively improved. By sorting, the most suitable results can be output first, the recognition effect of the verification code can be optimized, and the performance and reliability of the overall system can be improved.

[0040] Furthermore, by selecting the most matching image from the image similarity ranking, the system can determine the final recognition result more quickly and accurately, improve the accuracy of the verification code, and ensure that the output result is highly matched with the input image and text.

[0041] Furthermore, by accurately extracting and comparing feature vectors, the matching accuracy between images and texts can be effectively improved, thereby improving the reliability and accuracy of the overall verification code recognition system.

[0042] Furthermore, through the matching degree judgment mechanism, temporary images with higher relevance can be screened out, which not only improves the accuracy of image-text matching, but also enhances the robustness of the system when dealing with complex scenes.

[0043] Furthermore, by selecting high-quality images as training data, the training model can be made more generalizable, thereby improving the model's training effect and final recognition accuracy.

[0044] Furthermore, color contrast directly affects the visual clarity and information discernibility of an image. Images with high color contrast can effectively highlight the difference between text or objects and the background, thereby improving the accuracy of recognition algorithms in complex scenes.

[0045] Furthermore, through strict conditional screening, high-quality training data can be effectively filtered out, thereby improving the learning effect and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flow chart of the multi-modal AIGC image-text matching question-answer verification code recognition method of this embodiment;

[0047] Figure 2 A decision logic diagram for calculating the coincidence fluctuation value for this embodiment;

[0048] Figure 3 A decision logic diagram for adjusting the generation time for this embodiment;

[0049] Figure 4 The decision logic diagram for determining a temporary image for this embodiment. DETAILED DESCRIPTION

[0050] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0051] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0052] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.

[0053] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0054] See also Figure 1 As shown, it is a flow chart of the multimodal AIGC image-text matching question-answer verification code recognition method of this embodiment;

[0055] This embodiment provides a multi-modal AIGC image-text matching question-answer verification code recognition method, including:

[0056] Using an image acquisition module to acquire a real-time image generated by a preset generation model within a preset generation time and a real-time text corresponding to the real-time image;

[0057] Using an image processing algorithm and a text analysis algorithm to respectively extract objects of each of the real-time images and each of the real-time texts, to obtain image objects and text objects;

[0058] Determine a scene matching degree according to a preset scene library, the image object and the text object, and determine a number of temporary images according to the scene matching degree;

[0059] Determine a plurality of first training set images according to the roughness, edge clarity and color contrast of the temporary image, wherein the roughness is evaluated by analyzing the number and strength of edges in the image by using an edge detection algorithm, and the edge clarity is evaluated by calculating the gradient of the image by using a Sobel operator to obtain edge information;

[0060] Determine a plurality of second training set images according to the length and keyword richness of the real-time text corresponding to the temporary image;

[0061] Determine an overlap fluctuation value according to an overlap rate of the first training set image and the second training set image within a preset adjustment time, adjust the preset generation time according to the overlap fluctuation value and a preset standard overlap fluctuation value, until the overlap fluctuation value is less than or equal to the preset standard overlap fluctuation value, and obtain a plurality of total training set images;

[0062] According to the total training set images, a preset image model and a preset text model are trained respectively to obtain a training image model and a training text model;

[0063] Extracting image features of the verification code image according to the training image model to obtain a number of image features;

[0064] Extracting text features of the verification code image according to the training text model to obtain a plurality of text features;

[0065] Determine an image similarity sequence according to the image features and the text features;

[0066] Outputting a recognition result according to the image similarity sequence.

[0067] The preset generation model is a variant of the Stab le Diffus ion model, which is a generative deep learning model mainly used for image generation tasks. It is based on the concept of diffusion process, combines variational autoencoder (VAE) and denoising autoregressive model, and generates high-quality images by gradually adding noise and denoising.

[0068] The preset image model is the CLIP model, which is a multimodal deep learning model proposed by OpenAI. It aims to enhance the association between images and language by understanding images and texts at the same time. It uses contrastive learning and uses a large number of image and corresponding text pairs for training. The model maximizes the similarity between matching images and texts, while minimizing the similarity between mismatching images and texts.

[0069] The preset text model is the PPOCRV4 model, which is an efficient optical character recognition (OCR) model designed to extract text information from images. It is designed to achieve high accuracy and speed and is suitable for a variety of application scenarios, especially when dealing with multiple fonts and backgrounds.

[0070] The preset generation duration refers to the time limit for the generation model to create real-time images and corresponding text. It depends on the computing power of the model and the complexity of the generation task. It is usually set between 10 seconds and 30 seconds to balance the generation speed and quality. In this embodiment, it is set to 20 seconds, which can ensure that the generated images and text have sufficient diversity and quality to meet the needs of various scenarios.

[0071] The preset adjustment time refers to the time period used to monitor and adjust the generation time during the training data generation process. It depends on the system's feedback cycle for the generation results and the data processing capability. It is usually set between 5 seconds and 15 seconds. In this embodiment, it is set to 10 seconds, which can quickly respond to data changes, thereby optimizing the generation process and improving the quality of the training data.

[0072] The preset standard coincidence fluctuation value refers to the standard used to measure the degree of coincidence between the first training set image and the second training set image. It depends on the task requirements and the requirements for coincidence in the actual application scenario. It is usually set between 0.6 and 0.8. In this embodiment, it is set to 0.7, which can ensure that the generated training set images have appropriate correlation and improve the effectiveness of subsequent model training.

[0073] First, the real-time generated images and their corresponding texts are collected through the preset generation model, and the image objects and text objects are extracted respectively. Then, the scene matching degree is evaluated according to the preset scene library, and several temporary images are determined. Subsequently, the first training set images are screened out by analyzing the roughness, edge clarity and color contrast of the temporary images; at the same time, the second training set images are determined according to the length and keyword richness of the real-time text. According to the overlap rate of these two types of images, the generation time is adjusted to finally form the total training set images. Afterwards, the image model and text model are trained respectively using the training set to extract the image features and text features of the verification code. Finally, by analyzing the image features and text features, the image similarity sequence is determined, and the recognition results are output.

[0074] Through a multi-level judgment and screening mechanism, the matching accuracy of images and texts is improved, ensuring that the generated training set is of higher quality and stronger adaptability. The comprehensive analysis of multiple image quality indicators and text features introduced makes the model more robust and accurate when processing verification codes. Through innovative multimodal training strategies, not only the efficiency of verification code recognition is improved, but also the misrecognition rate can be effectively reduced in practical applications, providing guarantees for security and user experience, and effectively solving the problems of insufficient adaptability and low recognition accuracy caused by dependence on the recognition of specific types of verification codes.

[0075] Please continue reading Figure 2 As shown, it is a decision logic diagram for calculating the coincidence fluctuation value in this embodiment;

[0076] Specifically, determining the overlap fluctuation value according to the overlap rate of the first training set image and the second training set image within the preset adjustment time includes:

[0077] The overlap rate of the first training set image and the second training set image is calculated, and when the overlap rate is greater than a preset standard overlap rate, the standard deviation of the overlap rate is calculated to form an overlap fluctuation value.

[0078] The preset standard coincidence rate is a threshold used to evaluate the matching degree between the training set image and text, and is usually set according to project requirements and data characteristics. It depends on the training objectives, the diversity of the data set, and the requirements for recognition accuracy. Usually, the preset standard coincidence rate is set in the range of 0.7 to 0.9, and is set to 0.8 in this embodiment. It ensures that only those images that are highly consistent with the text description are included in the training set, thereby improving the model's ability to recognize verification codes.

[0079] Within the preset adjustment time, the overlap rate between the first training set image and the second training set image is first calculated to evaluate their similarity. If the overlap rate exceeds the preset standard overlap rate, the standard deviation of these overlap rates is further calculated to form an overlap fluctuation value. In this way, the overlap between images can be dynamically monitored to ensure the quality and relevance of the training data.

[0080] By calculating the overlap rate of the first training set image and the second training set image and combining the standard deviation to judge the similarity fluctuation between the images, it is ensured that the selected training set images are highly consistent in content and features. When the overlap rate exceeds the preset standard, by calculating its standard deviation, the image combination with large overlap fluctuation can be effectively identified, which helps to adjust the training data set in time and eliminate irrelevant or low-quality images.

[0081] Please continue reading Figure 3 As shown, it is a decision logic diagram for adjusting the generation time length in this embodiment;

[0082] Specifically, adjusting the preset generation time according to the overlap fluctuation value and the preset standard overlap fluctuation value includes:

[0083] When the overlap fluctuation value is greater than the preset standard overlap fluctuation value, the preset generation duration is adjusted according to the relative deviation between the overlap fluctuation value and the preset standard overlap fluctuation value and the preset duration adjustment coefficient, wherein the adjusted preset generation duration is adjusted based on the original preset generation duration. The adjustment factor is the product of the preset duration adjustment coefficient and the relative deviation and 1. Finally, the new preset generation duration is obtained by multiplying the original preset generation duration by the adjustment factor.

[0084] The preset time adjustment coefficient is a parameter used to dynamically adjust the preset generation time. It depends on the scene complexity, data quality and experimental requirements. It is usually set between 0.1-1. In this embodiment, it is set to 0.2, which can adjust the generation time more smoothly, thereby better adapting to data characteristics and improving the recognition accuracy of the verification code.

[0085] In the process of adjusting the preset generation time according to the overlap fluctuation value and the preset standard overlap fluctuation value, the relationship between the overlap fluctuation value and the preset standard overlap fluctuation value is first monitored. When it is found that the overlap fluctuation value exceeds the preset standard, the relative deviation between the two and the preset time adjustment coefficient are used for dynamic adjustment, thereby extending or shortening the generation time to ensure the consistency and stability between the generated image and text.

[0086] By monitoring the relationship between the overlap fluctuation value and the preset standard overlap fluctuation value, the generation process can be optimized in real time, the uncertainty of the generated data can be reduced, and the matching degree between the training set images and texts can be ensured to remain within a reasonable range.

[0087] Specifically, determining the image similarity sequence according to the image features and the text features includes:

[0088] The cosine similarities of the image features and the text features are calculated, and all the cosine similarities are sorted from large to small to form an image similarity sequence.

[0089] When determining the image similarity sequence, we first calculate the cosine similarity between the image features and the text features. We quantify their similarity by comparing the angle between the two feature vectors. Then, we sort all the calculated cosine similarities from large to small, and finally form an image similarity sequence, ensuring that the most matching image is at the front of the sequence.

[0090] By accurately calculating the similarity of image and text features, the accuracy of image-text matching can be effectively improved. By sorting, the most suitable results can be output first, the recognition effect of verification codes can be optimized, and the performance and reliability of the overall system can be improved.

[0091] Specifically, outputting the recognition result according to the image similarity sequence includes:

[0092] A preset number of images are obtained from the first position in the image similarity sequence, and a recognition result is formed and output.

[0093] The preset number is the number of images extracted by the system from the image similarity sequence, which is usually set according to the needs of a specific scenario. This number depends on the accuracy requirements of the application scenario and the limitations of computing resources. It is usually set between 3 and 5 to ensure that there are enough images for verification and comparison. In this embodiment, the preset number is set to 3, which can reduce the amount of calculation while ensuring recognition accuracy and improve processing efficiency.

[0094] After the image similarity sequence is generated, the system selects the image with the highest similarity from the sequence, that is, the image ranked first. According to the preset number, several images are extracted from the images with the highest similarity as recognition results, and finally these recognition results are output.

[0095] By selecting the most matching image from the image similarity ranking, the system can determine the final recognition result more quickly and accurately, improve the accuracy of the verification code, and ensure that the output result is highly matched with the input image and text.

[0096] Specifically, determining the scene matching degree according to the preset scene library, the image object and the text object includes:

[0097] Extracting feature vectors of the image object and the text object respectively to obtain an image feature vector and a text feature vector;

[0098] Calculating the Euclidean distance according to the image feature vector and the text feature vector, and determining a consistent feature vector according to the Euclidean distance and a preset standard distance;

[0099] The scene matching degree is determined according to the consistent feature vector and the scene feature vector in the preset scene library.

[0100] The preset standard distance is a threshold used to measure the similarity of feature vectors. Its main function is to provide a reference for judging the consistency of feature vectors when calculating the Euclidean distance between image feature vectors and text feature vectors. It is usually based on statistical analysis of the training data set to ensure that similar and dissimilar feature vectors can be effectively distinguished. It is usually set between 0.1-0.3, and is set to 0.2 in this embodiment to quickly identify and filter out mismatched images and texts.

[0101] First, the feature vectors of the image object and the text object are extracted respectively to obtain the image feature vector and the text feature vector; then, the Euclidean distance between the two feature vectors is calculated to determine their relationship with the preset standard distance, thereby determining the consistent feature vector; finally, the obtained consistent feature vector is compared with the scene feature vector in the preset scene library to calculate the scene matching degree.

[0102] By accurately extracting and comparing feature vectors, the matching accuracy between images and texts can be effectively improved, thereby improving the reliability and accuracy of the overall verification code recognition system.

[0103] Please continue reading Figure 4 As shown, it is a decision logic diagram for determining a temporary image in this embodiment;

[0104] Specifically, determining a number of temporary images according to the scene matching degree includes:

[0105] When the scene matching degree is greater than a preset standard matching degree, the real-time image is determined to be a temporary image.

[0106] The preset standard matching degree is a threshold used to evaluate the matching degree between the real-time image and the text object. Depending on the characteristics of the data set, the performance of the model and the actual application requirements, the preset standard matching degree is usually set between 0.7 and 0.9. In this embodiment, it is set to 0.8 to ensure that only when the real-time image has a strong correlation with the text object can it be selected as a temporary image, thereby improving the accuracy of subsequent image-text matching.

[0107] By calculating the scene matching degree between the real-time image and the text object and comparing it with the preset standard matching degree, when the scene matching degree exceeds this standard, the system determines the real-time image as a temporary image.

[0108] Through the matching degree judgment mechanism, temporary images with higher relevance can be screened out, which not only improves the accuracy of image-text matching, but also enhances the robustness of the system when dealing with complex scenes.

[0109] Specifically, when the roughness is greater than or equal to a preset standard roughness, and the edge definition is greater than a preset standard definition, it is determined that the temporary image is a first training set image.

[0110] The preset standard roughness is a threshold for evaluating image quality, which defines the texture details and roughness of the image surface. Images with higher roughness will affect the accuracy of feature extraction and subsequent processing. It depends on the application scenario and image type. Generally, the preset standard roughness may be set between 0.2 and 0.5. In this embodiment, the preset standard roughness is set to 0.3 to balance image quality and processing efficiency.

[0111] The preset standard definition is an indicator used to measure the clarity of image edges. It helps to judge the visual quality of the image. Images with lower definition may cause feature extraction failure. It depends on the specific requirements of the application and the type of image content. It is usually set between 60% and 80%. In this embodiment, it is set to 75%, which can ensure that the image has good readability and recognition.

[0112] First, the roughness and edge clarity of the temporary image are analyzed to ensure its quality. When the roughness of the temporary image is greater than or equal to the preset standard roughness and the edge clarity is greater than the preset standard clarity, the image is determined to be the first training set image. The key to this determination process is to improve the effectiveness and accuracy of the selected image in subsequent training by strictly controlling the image quality.

[0113] By selecting high-quality images as training data, the training model can be made more generalizable, thereby improving the model's training effect and final recognition accuracy.

[0114] Specifically, when the roughness is less than a preset standard roughness and the edge clarity is greater than a preset standard clarity, the color contrast is compared with the preset standard contrast, and when the color contrast is greater than the preset standard contrast, the temporary image is determined to be the first training set image.

[0115] The preset standard contrast is a threshold used to evaluate the color contrast of an image. It is mainly used to determine the visual effect and information clarity of an image. It depends on the needs and expected effects of the image application scenario. It is set according to the target image type and the standards of a specific application field. It is usually set between 0.4 and 0.8. In this embodiment, it is set to 0.6, which can ensure that when the visual effect of the image reaches a certain level, the image can better convey information and enhance recognition accuracy.

[0116] First, it is determined whether the roughness of the temporary image is less than the preset standard roughness, and whether the edge clarity is greater than the preset standard clarity. If both conditions are met, the color contrast of the image is further compared with the preset standard contrast. Only when the color contrast is greater than the preset standard contrast is the temporary image determined as the first training set image. This process ensures that an image is included in the training set only when all image quality standards are met, thereby ensuring the quality of the training data.

[0117] Color contrast directly affects the visual clarity and information discernibility of an image. Images with high color contrast can effectively highlight the difference between text or objects and the background, thereby improving the accuracy of recognition algorithms in complex scenes.

[0118] Specifically, determining a number of second training set images according to the length and keyword richness of the real-time text corresponding to the temporary image includes:

[0119] When the length is greater than a preset standard length and the keyword richness is greater than a preset standard richness, the temporary image is determined to be a second training set image, wherein the length is obtained by directly calculating the number of characters in the text, and the text is tagged with parts of speech using a natural language processing tool, and important words such as nouns, verbs, and adjectives are extracted to evaluate the keyword richness.

[0120] The preset standard length is a threshold for evaluating the number of characters in a text description. The length can reflect the level of detail of the text and usually depends on the requirements of a specific application. It is usually set between 6 and 12 characters. In this embodiment, it is set to 8 characters, which can effectively balance readability and security and reduce the possibility of machine recognition.

[0121] The preset standard richness is an indicator used to measure the diversity and quantity of keywords in the text description, reflecting the richness of the text information. Depending on the content requirements of the specific application, especially in tasks such as dialogue systems or image recognition, the diversity of keywords helps to improve the accuracy of recognition and understanding. It is usually set between 3 keywords and 5 keywords. This embodiment is set to 4 keywords, which can ensure that the text description contains not only basic information, but also covers relevant context, thereby improving the integrity of information transmission.

[0122] First, check whether the length of the real-time text exceeds the preset standard length to ensure that the text is detailed enough; secondly, evaluate the keyword richness in the text to determine whether it contains diverse keywords so that it can cover different scenes and objects. When both conditions are met, the temporary image is determined to be the second training set image. Such a judgment mechanism can ensure that the second training set images have sufficient diversity and representativeness in content and information, which is helpful for subsequent model training and optimization.

[0123] Through strict conditional screening, high-quality training data can be effectively filtered out, thereby improving the learning effect and generalization ability of the model.

[0124] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0125] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A multi-modal AIGC image-text matching question-answer verification code recognition method, characterized in that: include: Collecting real-time images generated by a preset generation model within a preset generation time and real-time text corresponding to the real-time images; Extracting the objects of each of the real-time images and each of the real-time texts respectively to obtain an image object and a text object; Determine a scene matching degree according to a preset scene library, the image object and the text object, and determine a number of temporary images according to the scene matching degree; Determine a plurality of first training set images according to the roughness, edge definition and color contrast of the temporary image; Determine a plurality of second training set images according to the length and keyword richness of the real-time text corresponding to the temporary image; Determine an overlap fluctuation value according to an overlap rate of the first training set image and the second training set image within a preset adjustment time, adjust the preset generation time according to the overlap fluctuation value and a preset standard overlap fluctuation value, until the overlap fluctuation value is less than or equal to the preset standard overlap fluctuation value, and obtain a plurality of total training set images; According to the total training set images, a preset image model and a preset text model are trained respectively to obtain a training image model and a training text model; Extracting image features of the verification code image according to the training image model to obtain a number of image features; Extracting text features of the verification code image according to the training text model to obtain a plurality of text features; Determine an image similarity sequence according to the image features and the text features; Outputting a recognition result according to the image similarity sequence.

2. The multimodal AIGC image-text matching question-answer verification code recognition method according to claim 1 is characterized in that: The determining of the overlap fluctuation value according to the overlap rate of the first training set image and the second training set image within the preset adjustment time period includes: The overlap rate of the first training set image and the second training set image is calculated, and when the overlap rate is greater than a preset standard overlap rate, the standard deviation of the overlap rate is calculated to form an overlap fluctuation value.

3. The multi-modal AIGC image-text matching question-answer verification code recognition method according to claim 2 is characterized in that: The adjusting the preset generation time according to the overlap fluctuation value and the preset standard overlap fluctuation value comprises: When the overlap fluctuation value is greater than the preset standard overlap fluctuation value, the preset generation duration is adjusted according to the relative deviation between the overlap fluctuation value and the preset standard overlap fluctuation value and the preset duration adjustment coefficient.

4. The multi-modal AIGC image-text matching question-answer verification code recognition method according to claim 3 is characterized in that: Determining the image similarity sequence according to the image features and the text features comprises: The cosine similarities of the image features and the text features are calculated, and all the cosine similarities are sorted from large to small to form an image similarity sequence.

5. The multi-modal AIGC image-text matching question-answer verification code recognition method according to claim 4 is characterized in that: Outputting the recognition result according to the image similarity sequence comprises: A preset number of images are obtained from the first position in the image similarity sequence, and a recognition result is formed and output.

6. The multi-modal AIGC image-text matching question-answer verification code recognition method according to claim 5, characterized in that: Determining the scene matching degree according to the preset scene library, the image object and the text object comprises: Extracting feature vectors of the image object and the text object respectively to obtain an image feature vector and a text feature vector; Calculating the Euclidean distance according to the image feature vector and the text feature vector, and determining a consistent feature vector according to the Euclidean distance and a preset standard distance; The scene matching degree is determined according to the consistent feature vector and the scene feature vector in the preset scene library.

7. The multi-modal AIGC image-text matching question-answer verification code recognition method according to claim 6, characterized in that: Determining a number of temporary images according to the scene matching degree includes: When the scene matching degree is greater than a preset standard matching degree, the real-time image is determined to be a temporary image.

8. The multi-modal AIGC image-text matching question-answer verification code recognition method according to claim 7, characterized in that: When the roughness is greater than or equal to a preset standard roughness, and the edge definition is greater than a preset standard definition, the temporary image is determined to be a first training set image.

9. The multi-modal AIGC image-text matching question-answer verification code recognition method according to claim 8, characterized in that: When the roughness is less than a preset standard roughness and the edge clarity is greater than a preset standard clarity, the color contrast is compared with the preset standard contrast, and when the color contrast is greater than the preset standard contrast, the temporary image is determined to be a first training set image.

10. The multi-modal AIGC image-text matching question-answer verification code recognition method according to claim 9, characterized in that: Determining a plurality of second training set images according to the length and keyword richness of the real-time text corresponding to the temporary image comprises: When the length is greater than a preset standard length and the keyword richness is greater than a preset standard richness, the temporary image is determined to be a second training set image.

Citation Information

Patent Citations

  • Verification code recognition method

    CN111753281A