A scalp image assisted analysis method, apparatus and device

By using scalp image-assisted analysis, scalp images are acquired and standardized, the scope type is determined, and differential sample matching and multimodal analysis are performed. This solves the problems of analytical bias and unstable results in existing technologies, and achieves high-precision and interpretable scalp sign-assisted analysis.

CN123160508APending Publication Date: 2026-11-24MILLI-ANALYSIS OPTICAL DOMAIN (HANGZHOU) MEDICAL EQUIPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611371994.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-05
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies lack long-term contextual support, leading to analytical biases. They fail to employ differentiated matching strategies for different types of scalp images, thus hindering continuous follow-up and accuracy improvement.

Method used

A scalp image-assisted analysis method is constructed. This method acquires the current scalp image and its metadata, performs standardization processing, determines the image scope type, adopts a differential sample matching strategy, retrieves reference samples from the long-term memory, and constructs a multimodal context in the multimodal analysis model for adaptive analysis and state updates.

Benefits of technology

It improves the accuracy and stability of scalp image analysis, reduces the risk of model hallucinations, enables continuous learning and performance evolution, and provides reliable continuous monitoring of scalp health.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160508A_ABST
    Figure CN123160508A_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, and device for scalp image-assisted analysis, comprising: acquiring a current scalp image and associated metadata and performing standardization processing to obtain an image to be analyzed; determining the image scope type based on the image to be analyzed and determining a sample matching strategy accordingly; extracting feature data and retrieving reference samples from a long-term memory based on the sample matching strategy; constructing a multimodal context input multimodal analysis model using the image to be analyzed, reference samples, and metadata to obtain scalp sign analysis results; and performing a state update operation on the long-term memory based on the analysis result evaluation index. This application solves the problem of image retrieval failure at different scales through adaptive image scope determination and differentiated sample matching; reduces the risk of model illusion by isolating external knowledge interference through staged reasoning; and achieves continuous system evolution through dynamic memory updates, improving analysis accuracy without model retraining.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and medical image analysis technology, and in particular to a method, device and equipment for assisted analysis of scalp images. Background Technology

[0002] Currently, image recognition technology has become an important tool for analyzing scalp features in the field of scalp health assessment and follow-up monitoring. However, existing solutions typically suffer from the following shortcomings: Firstly, while some solutions introduce multimodal large models, they often employ static prompts or one-time inference methods, lacking historical cases and long-term contextual support highly relevant to the current subject. This leads to analytical biases or illusory outputs when faced with complex individual differences. Secondly, scalp images exhibit significant differences in actual acquisition, such as panoramic overviews and close-up details. Existing solutions generally do not employ differentiated processing and matching strategies for these different image types, resulting in inaccurate reference sample retrieval and insufficient stability of analysis results. Furthermore, many systems only provide single analysis results, failing to unify historical records and acquired metadata into a sustainable long-term memory, making continuous follow-up and gradual improvement in accuracy difficult. Therefore, there is an urgent need for a scalp image-assisted analysis method that combines long-term memory with adaptive inference mechanisms. Summary of the Invention

[0003] The technical problems this application aims to solve are: the lack of long-term contextual support in existing technologies leads to analytical bias; the failure to employ differentiated matching strategies for different types of images results in unstable results; and the inability to achieve continuous follow-up and gradual improvement in accuracy. To address these shortcomings, this application provides a scalp image-assisted analysis method, apparatus, and device that achieves high-precision, interpretable, and continuously evolving scalp sign-assisted analysis based on a multimodal large model and retrieval-enhanced long-term memory.

[0004] To solve the above-mentioned technical problems, the technical solution adopted in this application is: Construct a scalp image-assisted analysis method, including: Obtain the current scalp image of the object to be analyzed and the metadata associated with the current scalp image; The current scalp image is standardized to obtain the image to be analyzed; The image scope type is determined based on the image to be analyzed, and the corresponding sample matching strategy is determined based on the image scope type; Extract feature data from the image to be analyzed and retrieve reference samples from the long-term memory based on a sample matching strategy; The image to be analyzed, the reference sample, and the metadata are constructed into a multimodal context and input into the multimodal analysis model to obtain the scalp sign analysis results. Evaluation metrics based on scalp sign analysis results are used to perform state update operations on the long-term memory bank.

[0005] Preferably, the image scope type includes a first scope type and a second scope type; The process of determining the corresponding sample matching strategy based on the image scope type includes: When the image scope type is the first scope type, the target local region is located in the image to be analyzed, and the target local region is used as the matching object of the retrieval reference sample; When the image scope type is the second scope type, the entire image to be analyzed is used as the matching object of the retrieval reference sample.

[0006] Preferably, the process of determining the image scope type based on the image to be analyzed includes: The image scope type is determined based on at least one of the following: hair coverage, sign point distribution characteristics, local focus degree, and image complexity of the image to be analyzed. The process of locating the target local region in the image to be analyzed includes: The target detection model is used to identify regions in the image to be analyzed, and at least one candidate region is obtained. The region in the candidate region that meets the preset screening conditions is determined as the target local region.

[0007] Preferably, the process of constructing a multimodal context from the image to be analyzed, reference samples, and metadata, and inputting it into a multimodal analysis model to obtain scalp sign analysis results includes: The image to be analyzed and the metadata are constructed into a first context, which is then input into a multimodal analysis model for independent analysis to obtain the analysis results. The image to be analyzed, the reference sample, the metadata, and the preliminary analysis results are constructed into a second context, which is then input into the multimodal analysis model for auxiliary comparative analysis to obtain the scalp sign analysis results.

[0008] Preferably, the scalp sign analysis results include structured output data, which includes at least one of the following: image scope field, reference sample association field, sign label field, candidate region selection coordinate field, confidence field, summary field, and suggestion field; The coordinate field of the candidate region selection box adopts a normalized coordinate expression method, and the calculation process of the normalized coordinate expression method includes: Obtain the image width and image height of the image to be analyzed; Divide the original x-coordinate corresponding to the candidate region selection coordinate field by the image width, and divide the original y-coordinate by the image height to obtain the normalized selection coordinates.

[0009] Preferably, the process of performing a state update operation on the long-term memory bank based on the evaluation index of scalp sign analysis results includes: The write-back score is calculated based on the model confidence of the multimodal analysis model, the consistency between the scalp sign analysis results and the reference sample, and the received external review feedback signals. When the write-back score is greater than or equal to the preset threshold, the current scalp image or structured data derived from the scalp sign analysis results is written into the long-term memory. When the score written back is less than the preset threshold, the current scalp image is retained as a temporary record or a manual review process is triggered.

[0010] Preferably, the process of calculating the write-back score based on the model confidence level of the multimodal analysis model, the consistency between the scalp symptom analysis results and the reference sample, and the received external review feedback signals includes: The write-back score is obtained by weighting and fusing the fusion confidence level, consistency level, and audit factors corresponding to external audit feedback signals. The fusion confidence score is calculated by fusing the model confidence score and the comprehensive retrieval score of the reference sample. The method further includes: The results of scalp sign analysis are compared with the historical structured data of the subjects to be analyzed, and at least one trend indicator is output from the changes in sign area, density, inflammation degree, and suggested change.

[0011] Preferably, the process of extracting feature data from the image to be analyzed and retrieving reference samples from the long-term memory based on a sample matching strategy includes: The similarity is calculated based on the visual features of the image to be analyzed and the visual features of historical samples in the long-term memory. By combining the matching degree between metadata and historical samples, time decay factor, and sample quality factor, the similarity is weighted and ranked to obtain a comprehensive retrieval score. Based on the comprehensive retrieval score, a predetermined number of historical samples with the highest ranking are recalled from the long-term memory as reference samples.

[0012] This application also provides a scalp image auxiliary analysis device, the device comprising: The image acquisition module is used to acquire the current scalp image of the object to be analyzed and the metadata associated with the current scalp image; The image processing module is used to standardize the current scalp image to obtain the image to be analyzed; The scope determination module is used to determine the image scope type based on the image to be analyzed, and to determine the corresponding sample matching strategy according to the image scope type; The sample retrieval module is used to extract feature data from the image to be analyzed and retrieve reference samples from the long-term memory based on the sample matching strategy. The model inference module is used to construct a multimodal context from the image to be analyzed, reference samples, and metadata, and input it into the multimodal analysis model to obtain the scalp sign analysis results. The memory update module is used to perform a state update operation on the long-term memory bank based on the evaluation indicators of the scalp sign analysis results.

[0013] This application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements a scalp image-assisted analysis method as described above.

[0014] The beneficial effects of this application are as follows: By determining the image scope type based on the image to be analyzed and executing a differentiated sample matching strategy accordingly, the system can adaptively handle different types of scalp images, such as panoramic overviews and local close-ups, avoiding the failure of a single matching logic in complex scenarios and improving the targeting and accuracy of reference sample retrieval. Simultaneously, by constructing a multimodal context input model from the image to be analyzed, retrieved reference samples, and metadata, and introducing a hierarchical mechanism of independent analysis followed by auxiliary comparison during inference, the potential interference of external reference information on the original image features is effectively isolated, reducing the risk of model illusion and enhancing the interpretability and robustness of the analysis results. Dynamic state updates of the long-term memory are performed based on multi-dimensional evaluation indicators such as model confidence, result consistency, and external review feedback. This allows the system to achieve continuous learning and performance evolution through incremental accumulation of high-quality samples without retraining the model. Combined with normalized coordinates and trend comparison mechanisms, reliable data support is provided for long-term continuous monitoring of scalp health. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the present application will be further described below in conjunction with the accompanying drawings and embodiments. The drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Figure 1 This is a schematic diagram of a scalp image-assisted analysis method according to a preferred embodiment of this application; Figure 2 This is a schematic diagram of the scalp image auxiliary analysis device according to a preferred embodiment of this application. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, a clear and complete description will be provided below in conjunction with the technical solutions in the embodiments of this application. Obviously, the described embodiments are some embodiments of this application, but not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this application.

[0017] A preferred embodiment of this application provides a scalp image-assisted analysis method; this method constructs a complete runtime closed loop from data acquisition to memory update, so as to achieve high-precision assisted analysis of scalp features through the collaboration of dynamic context and long-term memory. For example... Figure 1 As shown, it includes the following steps: Step S101: Obtain the current scalp image of the object to be analyzed and the metadata associated with the current scalp image.

[0018] Specifically, current scalp images can be acquired using a dermatoscope, high-definition camera, or dedicated scalp detection equipment, and metadata associated with these images can be obtained to understand the semantic context of the images. Meta-information may include the acquisition site (e.g., top of the head, forehead, or back of the head), acquisition time, device model, magnification, lighting conditions, user symptom descriptions, or historical data. This metadata is not only used for subsequent retrieval enhancement but also serves as a data identifier throughout the entire scalp image-assisted analysis process, ensuring that the analysis results are traceable and linked to the specific acquisition scenario.

[0019] Step S102: Perform standardization processing on the current scalp image to obtain the image to be analyzed.

[0020] Specifically, images acquired by different acquisition devices or even the same device under different settings may exhibit significant differences in resolution, color space, orientation, and illumination. Directly inputting these images into the model could lead to analytical biases. Therefore, standardization is necessary to eliminate these non-semantic differences. Standardization can include operations such as orientation correction based on EXIF ​​information, scaling the long side to a preset baseline, uniform color space conversion, and noise reduction enhancement. The standardized images obtained have a uniform specification and quality baseline, providing a stable data foundation for subsequent feature extraction and scope determination.

[0021] Step S103: Determine the image scope type based on the image to be analyzed, and determine the corresponding sample matching strategy according to the image scope type.

[0022] Specifically, in practical applications, scalp images can be either panoramic overviews covering large areas or close-up images focusing on a single lesion or hair follicle area. The information density and analytical logic of these two types are drastically different. To achieve adaptive analysis, this application distinguishes between panoramic overviews and close-up images by identifying the type of image scope, and dynamically adjusts the sample matching strategy accordingly. For example, when a panoramic scope is identified, the system prioritizes locating suspicious local areas before performing targeted matching; while when a close-up scope is identified, the entire image is directly used as the matching object. Through this adaptive mechanism, the system avoids the failure of a single matching logic in complex scenarios, significantly improving the targeting of reference sample retrieval.

[0023] Furthermore, the image scope type includes a first scope type and a second scope type. The system determines the corresponding sample matching strategy based on the image scope type. The first scope type typically corresponds to panoramic overview images, which have a wide field of view but a small proportion of individual features. The second scope type typically corresponds to close-up images, which focus on a specific area and have rich feature details. When the image scope type is the first scope type, the system locates the target local area in the image to be analyzed and uses this target local area as the matching object of the retrieval reference sample. When the image scope type is the second scope type, the system directly uses the entire image to be analyzed as the matching object of the retrieval reference sample. Through differentiated matching strategy design, the system addresses the problem of information density differences caused by different shooting distances and purposes in scalp image acquisition scenarios, avoiding the retrieval bias caused by using a uniform matching logic for all images.

[0024] Furthermore, the process of determining the image scope type based on the image to be analyzed can be achieved based on at least one of the following: hair coverage area, sign point distribution characteristics, local focus degree, and image complexity. The system calculates the pixel proportion of the effective hair region in the image. If this proportion exceeds a preset first threshold (e.g., 80%) and no obvious edge blurring or center sharpness peak is detected, it tends to be classified as the first scope type. Conversely, if there is a significant region of interest in the image and the background region exhibits Gaussian blur characteristics, or if the image complexity is lower than a preset second threshold indicating a single subject, it tends to be classified as the second scope type. It should be noted that the above-mentioned judgment dimensions are not used in isolation. In practical applications, a multi-factor weighted scoring model can be constructed to comprehensively consider the contribution of each dimension to output the final type judgment result, thereby improving the robustness of the judgment.

[0025] Furthermore, for the image to be analyzed that is determined to be of the first scope type, the target local region is located in the image to be analyzed. A target detection model is used to identify regions in the image to be analyzed, obtaining at least one candidate region. Regions within the candidate region that meet preset screening criteria are then identified as the target local region. The target detection model can be a deep learning network fine-tuned with scalp feature data, capable of quickly responding to and selecting suspected anomalies or local patches with analytical value in panoramic images. Preset screening criteria may include a confidence score for the candidate region exceeding a safety threshold, a region area within a reasonable range, and a distance between the region center and the image center conforming to compositional rules. Through this screening, the system can accurately extract local slices that truly carry semantic information from a complex panoramic background, serving as the benchmark unit for subsequent feature extraction and retrieval.

[0026] By introducing a scope-adaptive determination mechanism, the retrieval failure problem caused by image scale mismatch in traditional schemes is effectively overcome. If whole-image retrieval is used without distinguishing image types, for panoramic images, a large amount of background noise will dilute the feature expression of key features, resulting in extremely low relevance of the recalled reference samples. On the other hand, if local cropping retrieval is used for all images, especially close-up images, complete lesions may be incorrectly cut out or contextual information may be lost. Therefore, the strategy of determining the type first and then performing differential matching not only ensures the semantic purity of the retrieval input, but also provides a high-quality data foundation for subsequent inference of multimodal large models, significantly improving the accuracy and stability of the auxiliary analysis results.

[0027] Step S104: Extract feature data from the image to be analyzed and retrieve reference samples from the long-term memory based on the sample matching strategy.

[0028] Specifically, after determining the matching strategy, the system performs feature encoding on the image to be analyzed or its specific regions, generating feature vectors for retrieval. Subsequently, these feature vectors are used to search the long-term memory, recalling historical cases that are highly visually and semantically related to the current image as reference samples. It should be noted that this retrieval process is not a static similarity comparison, but rather controlled by the sample matching strategy determined in step S103, ensuring that the recalled samples match the analytical granularity of the current image. The long-term memory stores a massive amount of verified historical samples and their associated structured annotations and meta-information, providing rich external knowledge support for the current auxiliary analysis.

[0029] Furthermore, when performing reference sample retrieval, the system does not rely solely on a single visual feature comparison, but instead employs a multi-dimensional weighted retrieval ranking mechanism. Specifically, it first calculates the similarity between the visual features of the image to be analyzed and the visual features of historical samples in the long-term memory; then, it combines the matching degree of metadata with the metadata of historical samples, the time decay factor, and the sample quality factor to weight and rank the similarity, obtaining a comprehensive retrieval score; and finally, based on the comprehensive retrieval score, it recalls a predetermined number of top-ranked historical samples from the long-term memory as reference samples.

[0030] Furthermore, when extracting feature data from the image to be analyzed, the system encodes the image or its target local region using a pre-trained feature extraction network to generate a fixed-dimensional feature vector. When the sample matching strategy determined in step S103 indicates that the entire image is used as the matching object, the system inputs the complete image to be analyzed into the feature extraction network, and outputs a feature vector representing the semantics of the entire image after global pooling. When the sample matching strategy indicates that the target local region is used as the matching object, the system first crops the corresponding region from the image to be analyzed according to the coordinate parameters of the target local region, and then inputs the cropped region image into the feature extraction network for encoding. The feature extraction network can adopt deep learning architectures such as convolutional neural networks or visual Transformers. Through multi-layer feature extraction and aggregation operations, it maps the input image to a high-dimensional feature space and outputs a compact feature representation that can represent visual semantic information such as scalp texture, color, and hair follicle morphology. Before outputting the feature vector, the system also performs L2 normalization processing on it, so that the feature vectors generated by images from different sources and at different resolutions are all located on a unified unit hypersphere, thereby ensuring the numerical stability and comparability of subsequent similarity calculations.

[0031] Furthermore, a multi-dimensional weighting mechanism is employed to address the semantic drift problem caused by relying solely on visual similarity for retrieval in scalp image analysis. In reality, two visually highly similar scalp images may correspond to completely different pathological conditions or acquisition backgrounds. For example, a high-resolution dermatoscope image of seborrheic dermatitis may have local textural similarities to a low-resolution image of normal scalp erythema, but their clinical significance is entirely different. If only visual features are used as the retrieval basis, it is easy to recall such interfering samples that are "similar in form but not in essence," thereby misleading subsequent multimodal analysis models and creating illusions. Therefore, by introducing correction factors in three dimensions—meta-information, time, and quality—a three-dimensional evaluation system that can comprehensively reflect the relevance, timeliness, and reliability of samples is constructed.

[0032] Furthermore, the calculation of the comprehensive retrieval score Score(i) can be expressed using formula ①: ① in, Indicates the image to be analyzed With the Visual similarity between historical samples can usually be calculated using methods such as cosine similarity, Euclidean distance, or dot product, which are used to measure how close the two are in the feature space. The metadata matching degree is used to quantify the consistency between the current collection scene and historical samples in non-visual dimensions such as collection site, magnification, device model or user symptom description. For example, when both collection sites are "top of the head" and the magnification is "50x", a higher weight is given, and vice versa, so as to ensure that the recalled samples are comparable to the current image in terms of physical collection conditions. The time decay factor is a variable whose value decreases monotonically as the historical samples are stored. It is designed to prioritize the recall of recent samples to adapt to the dynamic changes in scalp condition and prevent outdated cases from several years ago from dominating the current analysis results. This represents the sample quality factor, which is determined based on the completeness of the structured annotations of historical samples, the status of manual review and confirmation, or the frequency of historical citations. It is used to filter out low-quality samples that are missing annotations, unverified, or have been marked as incorrect, ensuring that the reference samples entering the inference process have sufficient credibility. , , and These are the preset weighting coefficients for the four dimensions mentioned above. In practical applications, these can be dynamically adjusted according to actual needs; for example, they can be appropriately increased during the system cold start period. and The weight is used to strengthen rule constraints, and can be gradually increased as more data is accumulated. The weights are used to unleash the representational power of visual features.

[0033] Furthermore, based on the calculated comprehensive retrieval score, the system recalls a predetermined number (Top-K) of historical samples ranked at the top of the long-term memory as reference samples. The K value here is not fixed but can be adaptively set according to the current image's scope type or the distribution of retrieval scores. For example, when determined to be a first scope type (panoramic overview), since the image contains multiple potential sign areas, the K value can be appropriately increased to provide a broader contextual reference; while when determined to be a second scope type (close-up), since the target is clear and focused, the K value can be decreased to improve inference efficiency and reduce interference from irrelevant information. In addition, a score truncation threshold can be set, and only when the comprehensive retrieval score of a candidate sample is higher than this threshold will it be included in the reference set, avoiding forced inclusion of low-relevance samples. Through a retrieval strategy combining multi-dimensional weighting and dynamic filtering, the alignment accuracy between the reference samples and the current image to be analyzed is effectively improved in terms of semantics, spatiotemporal dimensions, and quality. This lays a solid data foundation for the effective operation of the subsequent phased inference mechanism and significantly enhances the accuracy and robustness of the scalp sign auxiliary analysis results.

[0034] Step S105: Construct a multimodal context from the image to be analyzed, the reference sample, and the metadata, and input it into the multimodal analysis model to obtain the scalp sign analysis results.

[0035] Specifically, the system organically combines the original image to be analyzed, the recalled reference sample images and their text descriptions, and the metadata obtained in step S101 to construct a multimodal context containing rich semantic clues. This context is input into a pre-deployed multimodal analysis model. The model comprehensively understands the current image features, historical similar cases, and the collection background, thereby generating scalp sign analysis results including sign labels, location bounding boxes, confidence levels, and state assessment suggestions. This demonstrates the application of retrieval-enhanced generation technology in the field of scalp image analysis. It should be noted that the inference process here is executed online. The model uses the retrieved dynamic context to compensate for its own static knowledge deficiencies, effectively reducing the risk of hallucinations and enhancing the interpretability of the results.

[0036] Furthermore, to address the potential interference from external reference information, a phased reasoning approach is adopted. This application constructs the image to be analyzed and metadata as the first context, which is input into a multimodal analysis model for independent analysis. The resulting preliminary analysis constitutes the first stage of the phased reasoning, forcing the model to establish its cognitive baseline entirely based on the currently acquired original visual evidence and background metadata, without being influenced by any external historical cases. In the first stage, the first context only contains the image to be analyzed itself and its associated acquisition location, magnification, and other metadata, without any reference samples from long-term memory. The preliminary analysis results output by the model under this constraint reflect its original judgment ability regarding the current scalp state. Even if this judgment may contain omissions or uncertainties in details, it represents uncontaminated first-hand visual perception, providing an indispensable independent anchor point for subsequent analysis. The preliminary analysis results include at least one of the following: preliminary sign recognition results, sign location annotation, preliminary confidence assessment, and state description. The preliminary sign recognition results record the scalp condition features identified by the model based on pure visual perception, such as suspected erythema, scaling, and abnormal hair follicles. Sign location annotations indicate the spatial distribution of each sign in the image using coordinates or region descriptions. The preliminary confidence assessment quantifies the model's degree of certainty regarding each recognition result; this value can serve as a benchmark for model self-verification in the second stage. The state description summarizes the model's preliminary judgment on the current scalp health status in natural language. It should be noted that since no external reference samples were introduced in the first stage, the preliminary analysis results do not contain reference sample association information; the conclusions are entirely derived from the model's independent interpretation of the original image.

[0037] Furthermore, the image to be analyzed, reference samples, metadata, and preliminary analysis results are constructed into a second context, which is input into a multimodal analysis model for auxiliary comparative analysis. The scalp sign analysis results constitute the second stage of phased reasoning, which is also a key step in knowledge enhancement and verification. Unlike traditional single-step reasoning, this application explicitly injects the preliminary analysis results generated in the first stage as new contextual elements into the input of the second stage. This ensures that when the model performs auxiliary comparison, it does not start from scratch to re-examine all images, but is guided to use reference samples for verification, supplementation, or correction based on existing preliminary knowledge. For example, if the preliminary analysis results identify a suspected seborrheic dermatitis erythematous area with low confidence, and the recalled reference samples contain highly similar cases confirmed by experts, the model can combine the information from both in the second stage to increase its judgment confidence. Conversely, if there is a significant conflict between the reference samples and the preliminary results, the model will be triggered to perform a more careful feature comparison, rather than blindly accepting the reference samples. By constructing a context-based logic, the potential overlay effect of external knowledge on the original perception is isolated from the mechanism, effectively reducing the risk of model illusion caused by inaccurate retrieval samples.

[0038] Furthermore, although the two-stage reasoning described above is logically divided into independent analysis steps, it has several equivalent forms in actual engineering implementation. For example, the system can physically isolate the two stages through two serial API calls or Prompt concatenation. The first request only sends the original image and metadata, obtains the initial text or structured tags, and then concatenates them into the prompt word template of the second request, sending it along with the reference image. This facilitates debugging and attribution analysis, clearly recording the model's thought process evolution path. Alternatively, by utilizing a multimodal model that supports long context windows, special instruction markers or thought chain prompts can force the model to execute a task flow of independent thinking followed by reference comparison in the same reasoning session. Regardless of the underlying implementation, as long as the model has generated an intermediate cognitive representation based on the original image before processing the reference sample, it is acceptable. This phased reasoning mechanism not only improves the accuracy and robustness of scalp symptom analysis but also makes the final output analysis results more interpretable, as users can trace the complete logical chain of how the model progresses from initial observation to the final conclusion.

[0039] Furthermore, when the system generates scalp sign analysis results, the results do not only contain unstructured natural language descriptions, but also include structured output data. The structured output data includes at least one of the following: image scope field, reference sample association field, sign label field, candidate region selection coordinate field, confidence score field, summary field, and suggestion field. This structured design allows the analysis results to be directly parsed and utilized by downstream modules, rather than merely presented as text information to the user. For example, the image scope field records whether the current analysis is based on a panoramic or close-up mode, providing a scenario benchmark for subsequent trend analysis; the reference sample association field stores the historical case IDs or feature indexes upon which this analysis is based, ensuring the traceability and interpretability of the analysis conclusions; the sign label field describes the identified scalp condition features using standardized terminology, such as erythema, scaling, or follicular abnormalities; the confidence score field quantifies the model's degree of certainty regarding the current judgment, and this value can directly serve as one of the triggering bases for the subsequent memory update operation in step S106; the summary field and suggestion field provide summary conclusions and care tips for users or professionals, respectively.

[0040] Furthermore, regarding the generation mechanism of structured output data, a structured prompt template is used to constrain the output format of the multimodal analysis model, enabling it to directly produce structured text that conforms to predefined field specifications. When constructing the second context, the system injects the structured prompt template as an instruction into the input sequence. This template explicitly defines the field names, data types, value ranges, and format constraints that the output results should include. For example, the template can specify "Please output the analysis results in JSON format, which must include the fields domain_type, label, bbox_normalized, confidence, summary, and suggestion," thereby guiding the model to follow the preset structured framework when generating text. After receiving complete input including the image to be analyzed, reference samples, metadata, preliminary analysis results, and structured prompt word templates, the multimodal analysis model, based on its pre-trained visual understanding and language generation capabilities, fills in the content of each field one by one: For the sign label field, the model selects the matching sign type from a predefined standardized terminology library; for the candidate region selection coordinate field, the model outputs the coordinate values ​​of the region where the sign is located based on its visual positioning capabilities, and the system automatically performs normalization transformation; for the confidence field, the model calculates the confidence level value based on its internal attention distribution or output probability distribution; for the summary and suggestion fields, the model generates a user-oriented natural language description based on the comprehensive analysis of the aforementioned fields. After the model outputs structured text, the system parses and validates it through a format parser, checking whether each field is complete, whether the data type is correct, and whether the coordinate values ​​are within the valid range. If the validation passes, the parsed structured data is written to the long-term memory or returned to the user; if the validation fails, a retry mechanism is triggered or the output template is downgraded. By employing a three-stage generation mechanism—from prompt word constraints to model generation and post-processing verification—the system fully leverages the flexible generation capabilities of large multimodal models while ensuring the standardization and parsability of the output results through format constraints.

[0041] Furthermore, in the structured output data described above, the candidate region bounding box coordinate field uses a normalized coordinate representation. The normalized coordinate representation involves first obtaining the image width and height of the image to be analyzed; then dividing the original x-coordinate corresponding to the candidate region bounding box coordinate field by the image width, and dividing the original y-coordinate by the image height to obtain the normalized bounding box coordinates. For example, assuming the resolution of the image to be analyzed is 1920 pixels wide multiplied by 1080 pixels high, the original bounding box coordinates of a suspected inflammatory region identified by the model are the top left corner (384, 216) and the bottom right corner (768, 540). The system first reads the image's width and height metadata, then performs a division operation: for the top-left corner, the normalized x-coordinate is 384 divided by 1920, equal to 0.2, and the normalized y-coordinate is 216 divided by 1080, equal to 0.2; for the bottom-right corner, the normalized x-coordinate is 768 divided by 1920, equal to 0.4, and the normalized y-coordinate is 540 divided by 1080, equal to 0.5. Finally, the normalized bounding box coordinates of the candidate region are represented as [0.2, 0.2, 0.4, 0.5]. This set of floating-point numbers in the range [0, 1] precisely describes the relative position and size proportion of the target region in the image. Regardless of the image's subsequent scaling size for display, or if the user photographs the same area three months later with a different resolution device, the system can use a simple inverse multiplication operation to restore the normalized coordinates to the actual pixel position in the current view, thus achieving accurate visualization overlay and historical state comparison.

[0042] Furthermore, to more intuitively demonstrate the organization of the aforementioned structured data, this application employs a JSON-based serialization example. In this example, a complete scalp symptom analysis result can be encapsulated into an object containing multiple key-value pairs, where the "bbox_normalized" key corresponds to the aforementioned normalized coordinate array, the "domain_type" key corresponds to the image scope type, the "ref_sample_ids" key corresponds to the reference sample association list, and the "confidence" key corresponds to the confidence score, etc. This standardized data output specification not only improves the machine readability of single analysis results but also lays a solid data foundation for constructing long-term, quantifiable digital scalp health profiles.

[0043] Step S106: Based on the evaluation indicators of the scalp sign analysis results, perform a state update operation on the long-term memory bank.

[0044] Specifically, to achieve continuous system evolution, this application establishes a closed-loop mechanism for feeding analysis results back to the long-term memory. The system comprehensively judges the quality of the current analysis results based on multi-dimensional evaluation indicators such as the confidence level of the model output, the consistency between the results and reference samples, and potential external review feedback. For high-quality results, they are transformed into new reference samples or structured knowledge and written into the long-term memory, enabling the system to accumulate new experience. For low-quality or questionable results, they are marked as temporary records or trigger manual review to prevent erroneous knowledge from contaminating the long-term memory. This dynamic update mechanism allows the system to continuously improve its analytical accuracy over time without retraining the model, achieving true lifelong learning.

[0045] Furthermore, to achieve quantitative control and adaptive evolution, this application refines the specific implementation logic of the update mechanism. The write-back score is calculated based on the model confidence of the multimodal analysis model, the consistency between the scalp symptom analysis results and the reference samples, and the received external review feedback signals. This calculation process constitutes the core of the "evaluation-decision-feedback" closed loop for memory bank updates, enabling the screening of high-value samples through multi-dimensional quality assessment and preventing low-quality or erroneous data from polluting the long-term knowledge base. Specifically, model confidence reflects the multimodal analysis model's inherent confidence in the current output results; consistency measures the degree of agreement between the current analysis results and the recalled reference samples in terms of semantic labels, symptom descriptions, etc.; a high degree of consistency indicates that the current results are supported by historical experience; and external review feedback signals represent the confirmation, correction, or rejection opinions of professionals or users regarding the analysis results, serving as a key source of truth for correcting model bias. Through the integration of these three dimensions, the system can comprehensively perceive the credibility level of the current analysis results, rather than solely relying on the model's own output probability.

[0046] Furthermore, in order to transform the above multidimensional evaluation indicators into actionable decision-making criteria, the write-back score is calculated using the following formula ②: ② in, This indicates that the score has been written back. Indicates the fusion confidence level. Indicates the degree of consistency. This indicates the audit factor corresponding to the external audit feedback signal. , and For preset weighting coefficients, , and The values ​​of these three factors are typically set between 0 and 1, and their sum should be normalized to 1 to balance the contribution of each factor. For example, during the cold start phase of a system, when the model's capabilities are still unstable, the values ​​can be appropriately increased. and The weighting of the input relies more on the consistency of historical samples and human feedback to ensure the quality of input; however, as the system matures and the model accuracy improves, the weighting can be gradually increased. The weight is used to improve the efficiency of automated updates. The factor can be mapped using discrete numerical values. For example, it can be assigned a value of 1.0 when a "confirmation" signal is received, a value of 0.5 when a "correction" signal is received, and a value of 0 or a negative value when a "negation" signal is received, thereby mathematically blocking the writing path of erroneous samples.

[0047] Furthermore, in the calculation of the write-back score, the confidence level is incorporated. It is itself a composite indicator, which is calculated using formula ③: ③ in, Indicates the model confidence level. Indicates the first The comprehensive retrieval score of each reference sample, To incorporate weights, formula ③ is used to avoid blindly trusting the model's self-scoring score. In practical applications, even if the model gives a high score for a particular analysis... However, if the comprehensive retrieval score of the recalled reference samples... The generally low values ​​indicate that the current image lacks similar cases to support it in the long-term memory, and the model may be in a state of "confidently talking nonsense." At this point, This will lower the overall integration confidence level. This reduces the write-back score. This effectively suppressed the risk of including hallucination samples in the database. As a fusion weight, it can be flexibly adjusted according to the business scenario. For example, in scenarios where expert review resources are scarce, it can be appropriately reduced. To enhance the influence of search quality on the decision-making process for database entry.

[0048] Furthermore, based on the calculated write-back score, the system executes a differentiated state update strategy. When the write-back score is greater than or equal to a preset threshold, the current scalp image or structured data derived from the scalp sign analysis results is written to the long-term memory. This action signifies that the sample has passed quality verification and becomes a reliable knowledge source for subsequent retrieval enhancement. When the write-back score is less than the preset threshold, the current scalp image is retained as a temporary record or a manual review process is triggered. The branching processing mechanism reflects a defensive design philosophy: the "temporary record" acts as a buffer, allowing samples in a gray area to be temporarily stored without polluting the main database, pending the accumulation of more supporting information or batch cleaning before deciding whether to make them official; while the "triggering a manual review process" proactively pushes low-confidence samples to the expert end, utilizing human-machine collaboration to uncover the value of difficult samples. It should be noted that the preset threshold is not fixed; the system can dynamically and adaptively adjust it based on the current capacity saturation of the long-term memory, sample quality distribution statistics, or historical review pass rates to maintain a balance between the health of the memory and the update rate.

[0049] Furthermore, in addition to incremental updates to the memory database itself, this application fully utilizes long-term accumulated structured data to achieve personalized trend tracking. For example, by comparing the scalp sign analysis results with the historical structured data of the subject being analyzed, at least one trend indicator is output, including changes in sign area, density, inflammation severity, and suggested changes, to achieve normalized coordinates and standardized fields defined in the aforementioned steps. For instance, the system can retrieve all structured records of the same user for the same sampling site from the long-term memory database within the past three months, extract sign labels and normalized bounding box coordinates, and quantify the trend indicator "inflammation area decreased by 15% compared to last month" by calculating the difference between the current erythema area percentage and the historical average; or by comparing the scale density levels in multiple consecutive analyses, a status assessment of "scalp dryness showing a continuous improvement trend" is generated. This allows trend analysis to be entirely based on the structured data stream generated during runtime, without the need for additional offline modeling processes. This makes the auxiliary analysis results no longer limited to a single static snapshot, but can reflect the dynamic evolution trajectory of scalp health, providing users and professionals with more time-series-valued decision-making references. It should be noted that all the above calculations, judgments, and comparisons are completed in real time while the system is running online. This is fundamentally different from traditional offline model training or dataset cleaning, ensuring that the system can respond to every detection request from the user in an instant and synchronously achieve the self-evolution of knowledge.

[0050] Through the methods described above, the coordinated execution of these steps constructs a closed-loop scalp image-assisted analysis system with adaptive perception, dynamic knowledge retrieval, multimodal fusion reasoning, and continuous evolution capabilities. This process is strictly limited to non-diagnostic auxiliary analysis, providing reliable technical support for scalp health management through objective processing and status assessment of image data.

[0051] A preferred embodiment of this application provides a scalp image-assisted analysis device. This device serves as a virtual device mapping of the aforementioned method embodiments, and through a modular architecture design, it achieves a complete technical closed loop from image acquisition to memory update. Figure 2 As shown, it includes an image acquisition module 200, an image processing module 201, a scope determination module 202, a sample retrieval module 203, a model inference module 204, and a memory update module 205.

[0052] The image acquisition module 200 is used to acquire the current scalp image of the object to be analyzed and the metadata associated with the current scalp image.

[0053] Specifically, the image acquisition module 200 is not only responsible for connecting to external acquisition devices such as dermatoscopes and high-definition cameras to receive raw image data streams, but also for the synchronous acquisition and binding of metadata. For example, this module can encapsulate metadata such as acquisition location, timestamp, and device model into structured tags by reading the EXIF ​​header information of the image file or receiving notes manually entered by the user terminal, and establish an index association with the image pixel data. The output of the image acquisition module 200 is connected to the image processing module 201, ensuring that the raw data can enter the preprocessing pipeline and improving the overall processing efficiency of the system.

[0054] Image processing module 201 is used to perform standardization processing on the current scalp image to obtain the image to be analyzed.

[0055] Specifically, the image processing module receives raw data from the image acquisition module and eliminates noise interference caused by differences in acquisition conditions through its built-in image enhancement algorithm. The image processing module can integrate an orientation correction unit, a color space conversion unit, and a size normalization unit to uniformly convert heterogeneous images from different sources into a standard format that meets the requirements of subsequent analysis. The processed image to be analyzed is then transmitted to the scope determination module as the baseline input for adaptive strategy selection.

[0056] The scope determination module 202 is used to determine the image scope type based on the image to be analyzed, and to determine the corresponding sample matching strategy according to the image scope type.

[0057] Specifically, the scope determination module is a key module for achieving intelligent data splitting in this device. At the data interaction level, the scope determination module outputs not only the image data itself to the sample retrieval module, but more importantly, an explicit "scope type identifier" or "matching strategy instruction." For example, when the determination result is the first scope type, the module will simultaneously output the coordinate parameters of the target local region; when the determination result is the second scope type, it will output a full-image matching flag. This interface design allows the downstream sample retrieval module to directly call the corresponding retrieval logic based on the upstream instructions without having to repeatedly perform image semantic understanding, significantly reducing the computational redundancy of the system.

[0058] The sample retrieval module 203 is used to extract feature data of the image to be analyzed and retrieve reference samples from the long-term memory based on the sample matching strategy.

[0059] Specifically, the sample retrieval module is typically physically tightly coupled with a vector database or indexing engine. It receives strategy guidance from the scope determination module and extracts feature vectors from the image to be analyzed through its internal feature encoding unit, performing a multi-dimensional weighted search in long-term memory. The sample retrieval module can be configured with feature encoding units, similarity calculation units, and ranking and filtering units. It can dynamically select the Top-K most relevant historical cases based on the comprehensive retrieval score and package these reference samples and their associated text descriptions for transmission to the model inference module 108, providing accurate external knowledge support for subsequent model inference.

[0060] The model inference module 204 is used to construct a multimodal context from the image to be analyzed, the reference sample, and the metadata, and input it into the multimodal analysis model to obtain the scalp sign analysis results.

[0061] Specifically, the model inference module is the intelligent core of the device, encapsulating a multimodal large-scale model inference engine. In actual operation, the model inference module does not directly process the original retrieval request. Instead, it assembles the image to be analyzed, reference samples, and metadata into a standardized Prompt or tensor input through its internal context building unit. This module supports a phased inference mechanism, first calling the model to generate preliminary analysis results, and then fusing them with the reference samples for secondary verification. The model inference module also uses its internal structured result generation unit to transform unstructured model-generated content into standard data objects containing fields such as feature labels, normalized coordinates, and confidence scores.

[0062] The memory update module 205 is used to perform state update operations on the long-term memory bank based on the evaluation indicators of the scalp sign analysis results.

[0063] Specifically, the memory update module constitutes a feedback loop for the device's self-evolution. It obtains analysis results and evaluation indicators from the model inference module and, in conjunction with any external review feedback signals it may receive, calculates the write-back score. When the score meets preset conditions, the memory update module writes new samples or structured knowledge into the long-term memory; otherwise, it temporarily stores them or marks them as pending review. Furthermore, the memory update module can use newly added data to trigger individualized trend comparisons, thereby continuously improving the device's auxiliary analysis accuracy without changing the model parameters.

[0064] A preferred embodiment of this application provides an electronic device comprising a processor and a memory. The memory stores a computer program, which, when executed by the processor, implements the scalp image-assisted analysis method described above. This electronic device constitutes the physical implementation carrier of the technical solution of this application, enabling the aforementioned abstract software process to run based on specific hardware resources. In terms of hardware architecture, the processor can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), or other application-specific integrated circuits (ASICs), responsible for executing instructions in the memory to complete computationally intensive tasks such as image acquisition, scope determination, feature retrieval, multimodal reasoning, and memory updates. The memory includes volatile memory (such as random access memory, RAM) and non-volatile memory (such as read-only memory, flash memory, hard disk drive, or solid-state drive). The non-volatile memory is used to persistently store the computer program code implementing the above method and historical sample data in the long-term memory, while the volatile memory serves as a cache and data exchange space for the processor during operation. In addition, the electronic device typically includes a bus system and input / output interfaces. The bus system is used to connect the processor, memory and other peripheral components to realize the transmission of data and control signals; the input / output interfaces are used to connect to image acquisition devices such as dermatoscopes and cameras, as well as user interaction terminals such as displays and touch screens, to ensure the smooth flow of data.

[0065] It should be understood that this application has been described through some embodiments, and those skilled in the art will recognize that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of this application. Furthermore, based on the teachings of this application, these features and embodiments can be modified to suit specific circumstances and materials without departing from the spirit and scope of this application. Therefore, this application is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of this application.

Claims

1. A scalp image-assisted analysis method, characterized in that, include: Obtain the current scalp image of the object to be analyzed and the metadata associated with the current scalp image; The current scalp image is standardized to obtain the image to be analyzed; The image scope type is determined based on the image to be analyzed, and the corresponding sample matching strategy is determined based on the image scope type; Extract feature data from the image to be analyzed and retrieve reference samples from the long-term memory based on a sample matching strategy; The image to be analyzed, the reference sample, and the metadata are constructed into a multimodal context and input into the multimodal analysis model to obtain the scalp sign analysis results. Evaluation metrics based on scalp sign analysis results are used to perform state update operations on the long-term memory bank.

2. The method according to claim 1, characterized in that: The image scope type includes a first scope type and a second scope type; The process of determining the corresponding sample matching strategy based on the image scope type includes: When the image scope type is the first scope type, the target local region is located in the image to be analyzed, and the target local region is used as the matching object of the retrieval reference sample; When the image scope type is the second scope type, the entire image to be analyzed is used as the matching object of the retrieval reference sample.

3. The method according to claim 2, characterized in that: The process of determining the image scope type based on the image to be analyzed includes: The image scope type is determined based on at least one of the following: hair coverage, sign point distribution characteristics, local focus degree, and image complexity of the image to be analyzed. The process of locating the target local region in the image to be analyzed includes: The target detection model is used to identify regions in the image to be analyzed, and at least one candidate region is obtained. The region in the candidate region that meets the preset screening conditions is determined as the target local region.

4. The method according to claim 1, characterized in that: The process of constructing a multimodal context from the image to be analyzed, reference samples, and metadata, and inputting it into a multimodal analysis model to obtain scalp feature analysis results includes: The image to be analyzed and the metadata are constructed into a first context, which is then input into a multimodal analysis model for independent analysis to obtain the analysis results. The image to be analyzed, the reference sample, the metadata, and the preliminary analysis results are constructed into a second context, which is then input into the multimodal analysis model for auxiliary comparative analysis to obtain the scalp sign analysis results.

5. The method according to claim 4, characterized in that: The scalp sign analysis results include structured output data, which includes at least one of the following: image scope field, reference sample association field, sign label field, candidate region selection coordinate field, confidence field, summary field, and suggestion field. The coordinate field of the candidate region selection box adopts a normalized coordinate expression method, and the calculation process of the normalized coordinate expression method includes: Obtain the image width and image height of the image to be analyzed; Divide the original x-coordinate corresponding to the candidate region selection coordinate field by the image width, and divide the original y-coordinate by the image height to obtain the normalized selection coordinates.

6. The method according to claim 1, characterized in that: The evaluation metrics based on scalp sign analysis results, during the process of performing state update operations on the long-term memory bank, include: The write-back score is calculated based on the model confidence of the multimodal analysis model, the consistency between the scalp sign analysis results and the reference sample, and the received external review feedback signals. When the write-back score is greater than or equal to the preset threshold, the current scalp image or structured data derived from the scalp sign analysis results is written into the long-term memory. When the score written back is less than the preset threshold, the current scalp image is retained as a temporary record or a manual review process is triggered.

7. The method according to claim 6, characterized in that: The process of calculating the write-back score, based on the model confidence level of the multimodal analysis model, the degree of consistency between the scalp symptom analysis results and the reference sample, and the received external review feedback signals, includes: The write-back score is obtained by weighting and fusing the fusion confidence level, consistency level, and audit factors corresponding to external audit feedback signals. The fusion confidence score is calculated by fusing the model confidence score and the comprehensive retrieval score of the reference sample. The method further includes: The results of scalp sign analysis are compared with the historical structured data of the subjects to be analyzed, and at least one trend indicator is output from the changes in sign area, density, inflammation degree, and suggested change.

8. The method according to claim 1, characterized in that: The process of extracting feature data from the image to be analyzed and retrieving reference samples from the long-term memory based on a sample matching strategy includes: The similarity is calculated based on the visual features of the image to be analyzed and the visual features of historical samples in the long-term memory. By combining the matching degree between metadata and historical samples, time decay factor, and sample quality factor, the similarity is weighted and ranked to obtain a comprehensive retrieval score. Based on the comprehensive retrieval score, a predetermined number of historical samples with the highest ranking are recalled from the long-term memory as reference samples.

9. A scalp image-assisted analysis device, characterized in that, The device includes: The image acquisition module is used to acquire the current scalp image of the object to be analyzed and the metadata associated with the current scalp image; The image processing module is used to standardize the current scalp image to obtain the image to be analyzed; The scope determination module is used to determine the image scope type based on the image to be analyzed, and to determine the corresponding sample matching strategy according to the image scope type; The sample retrieval module is used to extract feature data from the image to be analyzed and retrieve reference samples from the long-term memory based on the sample matching strategy. The model inference module is used to construct a multimodal context from the image to be analyzed, reference samples, and metadata, and input it into the multimodal analysis model to obtain the scalp sign analysis results. The memory update module is used to perform a state update operation on the long-term memory bank based on the evaluation indicators of the scalp sign analysis results.

10. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements a scalp image-assisted analysis method according to any one of claims 1 to 8.