Preparation for pregnancy guidance method and system based on deep learning image recognition

By acquiring and processing environmental data of test strip image acquisition in the pre-pregnancy guidance system, performing image preprocessing and dynamic threshold adjustment, the problems of insufficient environmental control and fixed detection threshold in existing technologies are solved, achieving efficient and accurate pre-pregnancy guidance.

CN121505367BActive Publication Date: 2026-03-31GUANGZHOU WONDFO HEALTH TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies for preconception health management suffer from insufficient control over the image acquisition environment, inadequate image preprocessing solutions, and fixed detection thresholds, resulting in low efficiency in preconception guidance and high costs for users to repeatedly collect images.

Method used

The system acquires environmental data through a pre-set test strip acquisition module, determines the environmental status, collects and uploads test strip images to a cloud server for preprocessing, extracts quantitative parameters of the test strip, and dynamically adjusts the threshold based on user periodic data to achieve test strip detection status assessment.

Benefits of technology

It improves the accuracy of test strip status assessment, reduces the need for users to submit repeated samples, and enhances the efficiency and precision of pre-pregnancy guidance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505367B_ABST
    Figure CN121505367B_ABST
Patent Text Reader

Abstract

The application provides a method and system for fertility guidance based on deep learning image recognition. The method comprises: obtaining environmental data by a pre-set test paper collection module, determining whether the environment is qualified, starting the focusing auxiliary function, obtaining test paper image data and uploading to the cloud after obtaining the test paper image data, and obtaining effective test paper image data after the cloud server processes the test paper image data; obtaining a test paper result quantitative value by weighting calculation according to a test paper quantitative parameter; obtaining a test paper detection state by threshold comparison of the test paper result quantitative value; thereby improving the accuracy of test paper detection state evaluation through the judgment of the collection environment state, the calculation of the test paper result quantitative value and the threshold comparison.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition, and more specifically, to a method and system for providing guidance on preparing for pregnancy based on deep learning image recognition. Background Technology

[0002] With the digital development of pre-pregnancy health management, users often take pictures of fertility test strips using their mobile phones and other devices and send them to fertility specialists for remote interpretation. This method is widely used due to its convenience, but existing technologies have many shortcomings in practical applications, making it difficult to meet the needs of personalized and precise pre-pregnancy guidance: First, the test strip collection environment lacks effective control. Environmental factors such as light intensity, light uniformity, and image tilt vary greatly when users take pictures, and existing collection tools do not predict or correct for environmental conditions, directly leading to common problems with the collected test strip images, which seriously interferes with subsequent interpretation. Second, image preprocessing solutions are not targeted enough. Existing technologies mostly use general image processing algorithms and do not design dedicated preprocessing processes for the structural characteristics of fertility test strips, resulting in inaccurate extraction of the effective area of ​​the test strip, which in turn affects the accuracy of quantitative parameter extraction. Third, the detection threshold is set in a fixed way and does not take into account the characteristics of the pre-pregnancy cycle. Existing interpretation methods mostly use a uniform threshold for evaluating test results, ignoring the differences in hormone levels of users at different stages of pre-pregnancy. These factors lead to low efficiency of guidance from fertility specialists and high costs for users to repeatedly collect samples.

[0003] Effective technical solutions are urgently needed to address the above problems. Summary of the Invention

[0004] The purpose of this application is to provide a method and system for pre-pregnancy guidance based on deep learning image recognition. By collecting environmental status data, calculating the quantitative value of test strip results, and comparing thresholds, the technology aims to improve the accuracy of test strip detection status assessment.

[0005] This application also provides a method for providing guidance on preparing for pregnancy based on deep learning image recognition, including the following steps:

[0006] The system obtains environmental data through a preset test strip acquisition module and determines the environmental status of the image acquisition.

[0007] Based on the image acquisition environment, collect test strip image data and upload it to the cloud server;

[0008] The cloud server preprocesses the test strip image data to obtain valid test strip image data;

[0009] Extract test strip quantification parameters from valid test strip image data, and process the test strip quantification parameters to obtain the quantification value of the test strip result;

[0010] The quantitative value of the test strip result is compared with the preset test strip detection result evaluation threshold to obtain the test strip detection status and display it on the client.

[0011] Optionally, in the method for providing pre-pregnancy guidance based on deep learning image recognition described in this application, the step of obtaining collection environment data through a preset test strip collection module and determining the state of the image collection environment specifically includes:

[0012] The data collected by the preset test strip acquisition module includes light intensity data, light uniformity data, and image levelness data.

[0013] The illumination intensity data, light brightness uniformity data, and image levelness data are compared with their respective thresholds to obtain illumination intensity state data, light brightness uniformity state data, and image levelness state data.

[0014] The image acquisition environment status is obtained by performing a bitwise AND operation on the illumination intensity status data, the light uniformity status data, and the image horizontal status data, including whether the environment is qualified or unqualified.

[0015] Optionally, in the method for guiding fertility based on deep learning image recognition described in this application, the step of collecting test strip image data and uploading it to a cloud server according to the image acquisition environment status specifically includes:

[0016] If the image acquisition environment is in an unqualified state, the problematic acquisition environment data will be obtained by matching according to preset rules.

[0017] The difference value is obtained by comparing the value corresponding to the environmental data of the problem collection with the preset threshold and then displaying it on the user's end.

[0018] If the image acquisition environment is in a qualified state, the user terminal will enable the focus assist function, and after determining that the clarity meets the standard, the test strip image data will be acquired.

[0019] The test strip image data is uploaded to the cloud server.

[0020] Optionally, in the method for pre-pregnancy guidance based on deep learning image recognition described in this application, the cloud server preprocesses the test strip image data to obtain valid test strip image data, specifically including:

[0021] The test strip image data is segmented at the pixel level and the background is removed by using the preset U-Net semantic segmentation model to obtain the test strip area image;

[0022] After performing local illumination compensation and horizontal correction on the test strip area image using a preset deep learning brightness equalization algorithm and perspective transformation matrix, valid test strip image data is obtained.

[0023] Optionally, in the method for pre-pregnancy guidance based on deep learning image recognition described in this application, the step of extracting test strip quantification parameters from valid test strip image data and processing the test strip quantification parameters to obtain the quantification value of the test strip result specifically includes:

[0024] Based on the valid test strip image data, quantitative parameters of the test strip are extracted, including C-line continuity data, T-line continuity data, line color density data, and line width data;

[0025] The validity of the test strip is determined by comparing the C-line continuity data with the preset C-line continuity threshold, including whether the test strip is valid or invalid.

[0026] If the test strip is invalid, an invalid test strip message will be displayed on the client side;

[0027] If the test strip is effective, the quantitative value of the test strip result is obtained by weighted calculation based on the preset weighting coefficient, T-line continuity data, line color concentration data, and line width data.

[0028] Optionally, in the method for providing pre-pregnancy guidance based on deep learning image recognition described in this application, the step of comparing the quantitative value of the test strip result with a preset test strip detection result evaluation threshold to obtain the test strip detection status and display it on the client specifically includes:

[0029] The test strip's quantitative result is compared with a preset test result evaluation threshold to obtain the test strip's test status;

[0030] The first threshold and the second threshold are extracted based on the preset detection results, and the first threshold is greater than the second threshold.

[0031] If the quantitative value of the test strip result is greater than or equal to the first threshold, the test strip detection status is positive;

[0032] If the quantitative value of the test strip result is greater than or equal to the second threshold and less than the first threshold, the test strip detection status is weakly positive.

[0033] If the quantitative value of the test strip result is less than the second threshold, the test strip test status is negative.

[0034] Optionally, in the method for guiding conception based on deep learning image recognition described in this application, before comparing the quantitative value of the test strip result with a preset test strip detection result evaluation threshold, the method further includes:

[0035] Obtain user data on their fertility preparation cycle, including the date of last menstrual period, ovulation monitoring records, or basal body temperature data;

[0036] The system verifies the validity of data from the preconception period and obtains the data status, including whether the data is valid or invalid.

[0037] If the data is invalid, the general threshold will be used as the preset threshold for evaluating the test strip results;

[0038] If the data is valid, the preset threshold is obtained by querying the current time and the preparation period data, and the dynamic threshold is obtained by dynamically adjusting the rule base. The dynamic threshold is then used as the preset threshold for evaluating the test results of the test strip.

[0039] Optionally, the method for providing pre-pregnancy guidance based on deep learning image recognition described in this application further includes:

[0040] If the test strip shows a weak positive result, the preliminary retest time and corresponding preliminary retest collection guidelines can be obtained by querying the preset retest time rule library based on the current time and the data of the pregnancy preparation period.

[0041] Send the initial retest time and initial retest collection guidelines to your dedicated fertility consultant;

[0042] After the dedicated fertility specialist reviews and improves the initial retest time and the initial retest collection guidelines, a recommended retest time and recommended retest guidelines are obtained.

[0043] Send the recommended retest time and recommended retest data collection guidelines to the client and set a retest reminder.

[0044] Secondly, this application provides a pregnancy preparation guidance system based on deep learning image recognition. The system includes a memory and a processor. The memory stores a program for a pregnancy preparation guidance method based on deep learning image recognition. When the program for the pregnancy preparation guidance method based on deep learning image recognition is executed by the processor, it performs the following steps:

[0045] The system obtains environmental data through a preset test strip acquisition module and determines the environmental status of the image acquisition.

[0046] Based on the image acquisition environment, collect test strip image data and upload it to the cloud server;

[0047] The cloud server preprocesses the test strip image data to obtain valid test strip image data;

[0048] Extract test strip quantification parameters from valid test strip image data, and process the test strip quantification parameters to obtain the quantification value of the test strip result;

[0049] The quantitative value of the test strip result is compared with the preset test strip detection result evaluation threshold to obtain the test strip detection status and display it on the client.

[0050] Optionally, in the deep learning-based image recognition-based pregnancy guidance system described in this application, the step of obtaining the acquisition environment data through the preset test strip acquisition module and determining the image acquisition environment status specifically includes:

[0051] The data collected by the preset test strip acquisition module includes light intensity data, light uniformity data, and image levelness data.

[0052] The illumination intensity data, light brightness uniformity data, and image levelness data are compared with their respective thresholds to obtain illumination intensity state data, light brightness uniformity state data, and image levelness state data.

[0053] The image acquisition environment status is obtained by performing a bitwise AND operation on the illumination intensity status data, the light uniformity status data, and the image horizontal status data, including whether the environment is qualified or unqualified.

[0054] As described above, this application provides a method and system for pre-pregnancy guidance based on deep learning image recognition. This method acquires environmental data through a pre-set test strip acquisition module. After determining that the environment is suitable, the focus assist function is activated to obtain test strip image data and upload it to the cloud. The cloud server processes the test strip image data to obtain valid test strip image data. Based on the test strip quantification parameters, a weighted calculation is performed to obtain the quantified value of the test strip result. The quantified value of the test strip result is compared with a threshold to obtain the test strip detection status. Thus, by judging the environmental status, calculating the quantified value of the test strip result, and comparing thresholds, the method improves the accuracy of test strip detection status assessment.

[0055] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description

[0056] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 A flowchart of a method for providing pre-pregnancy guidance based on deep learning image recognition, provided in an embodiment of this application;

[0058] Figure 2 A flowchart illustrating the process of obtaining the image acquisition environment state in the deep learning-based image recognition-based method for providing guidance on pregnancy preparation, as provided in this application embodiment.

[0059] Figure 3 A flowchart illustrating the method for obtaining test strip image data in the pre-pregnancy guidance method based on deep learning image recognition provided in this application embodiment;

[0060] Figure 4 This is a schematic diagram of a pre-pregnancy guidance system based on deep learning image recognition provided in an embodiment of this application. Detailed Implementation

[0061] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0062] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0063] Please refer to Figure 1 , Figure 1 This is a flowchart of a method for providing fertility guidance based on deep learning image recognition, as described in some embodiments of this application. This method is used in terminal devices such as computers and mobile phones. The method includes the following steps:

[0064] S11. Obtain environmental data through the preset test strip acquisition module and determine the environmental status of the image acquisition.

[0065] S12. Based on the image acquisition environment, acquire test strip image data and upload it to the cloud server;

[0066] S13. The cloud server preprocesses the test strip image data to obtain valid test strip image data.

[0067] S14. Extract the test strip quantification parameters based on the valid test strip image data, and process the test strip quantification parameters to obtain the test strip result quantification value;

[0068] S15. Compare the quantitative value of the test strip result with the preset test strip detection result evaluation threshold to obtain the test strip detection status and display it on the client.

[0069] Understandably, the first step in image recognition is to obtain images of acceptable quality. Therefore, in this embodiment, the image acquisition environment is first assessed. Only when the image acquisition environment is acceptable can high-quality images be acquired. To facilitate subsequent queries and reduce the operational burden on the user end, the acquired images are uploaded to a cloud server for analysis. The cloud server has a pre-set image preprocessing algorithm that can further optimize high-quality images and obtain valid test strip image data. After extracting parameters that can quantify the test strip results from the valid test strip image data, the quantitative value of the test strip result is obtained through weighted calculation. The test strip detection result can be evaluated through threshold comparison to obtain the test strip detection status.

[0070] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the process of obtaining the image acquisition environment status in the pre-pregnancy guidance method based on deep learning image recognition provided in this application embodiment. According to this embodiment, the step of obtaining acquisition environment data through a preset test strip acquisition module and determining the obtained image acquisition environment status specifically includes:

[0071] S21. Obtain environmental data through the preset test strip acquisition module, including light intensity data, light brightness uniformity data, and image levelness data;

[0072] S22. Compare the light intensity data, light brightness uniformity data, and image levelness data with the corresponding thresholds to obtain the light intensity state data, light brightness uniformity state data, and image levelness state data.

[0073] S23. Perform an AND operation on the illumination intensity status data, the light brightness uniformity status data, and the image horizontal status data to obtain the image acquisition environment status, including whether the environment is qualified or unqualified.

[0074] Understandably, the preset test strip acquisition module is a program module set on the mobile phone or device, which can collect environmental data. In this example, the environmental data are all normalized data. The light intensity data refers to the quantitative data of the intensity of light illuminating the image area in the environment during the acquisition of the fertility test strip image. The light uniformity data refers to the quantitative data of the degree of difference in light intensity distribution at different sampling points in the acquired image area of ​​the fertility test strip image. Its core is to measure whether the light is "uniformly covered" on the surface of the test strip, rather than the intensity of a single light source. The calculation method is the variance of the light intensity of a preset number of sampling points within the image area. The image levelness data refers to the quantitative data of the degree of inclination between the reference edge of the test strip and the horizontal baseline of the image in the image collected by the fertility test strip. The thresholds corresponding to the light intensity data, light brightness uniformity data, and image levelness data are the light intensity threshold, light brightness uniformity threshold, and image levelness threshold, respectively. The light intensity state data, light brightness uniformity state data, and image levelness state data all have two states, including qualified or unqualified. In this embodiment, qualified is recorded as 1 and unqualified is recorded as 0. After performing a bitwise AND operation by the computer, the image acquisition environment state can be obtained.

[0075] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating the acquisition of test strip image data in the pre-pregnancy guidance method based on deep learning image recognition provided in this application embodiment. According to this embodiment, the step of acquiring test strip image data and uploading it to a cloud server based on the image acquisition environment specifically includes:

[0076] S31. If the image acquisition environment is in an unqualified state, the problem acquisition environment data is obtained by matching according to preset rules.

[0077] S32. Compare the value corresponding to the problem collection environment data with the preset threshold to obtain the difference value and display it on the user terminal;

[0078] S33. If the image acquisition environment is in a qualified state, the user terminal will enable the focus assist function and acquire the test strip image data after determining that the clarity meets the standard.

[0079] S34. Upload the test strip image data to the cloud server.

[0080] It is understandable that if the image acquisition environment is in an unqualified state, it means that at least one of the data points of light intensity, uniformity of light intensity, and horizontal image is unqualified. The preset rule is to select data points of 0 from the data points of light intensity, uniformity of light intensity, and horizontal image, that is, to select unqualified data points and record them as problematic acquisition environment data. The environmental data corresponding to the problematic environmental data is compared with the corresponding preset threshold. For example, if the problematic environmental data is light intensity data, the difference value is obtained by subtracting the corresponding light intensity data from the preset light intensity data threshold.

[0081] According to an embodiment of the present invention, the cloud server preprocesses the test strip image data to obtain valid test strip image data, specifically including:

[0082] The test strip image data is segmented at the pixel level and the background is removed by using the preset U-Net semantic segmentation model to obtain the test strip area image;

[0083] After performing local illumination compensation and horizontal correction on the test strip area image using a preset deep learning brightness equalization algorithm and perspective transformation matrix, valid test strip image data is obtained.

[0084] It is understood that in this embodiment, the preset U-Net semantic segmentation model, the preset deep learning brightness equalization algorithm, and the perspective transformation matrix are all obtained after training with historical data, and can achieve the corresponding functions. The test strip area image is an image obtained by performing pixel-level segmentation and background removal on the test strip image data.

[0085] According to an embodiment of the present invention, the step of extracting test strip quantification parameters from valid test strip image data and processing the test strip quantification parameters to obtain the test strip result quantification value specifically includes:

[0086] Based on the valid test strip image data, quantitative parameters of the test strip are extracted, including C-line continuity data, T-line continuity data, line color density data, and line width data;

[0087] The validity of the test strip is determined by comparing the C-line continuity data with the preset C-line continuity threshold, including whether the test strip is valid or invalid.

[0088] If the test strip is invalid, an invalid test strip message will be displayed on the client side;

[0089] If the test strip is effective, the quantitative value of the test strip result is obtained by weighted calculation based on the preset weighting coefficient, T-line continuity data, line color concentration data, and line width data.

[0090] It is understandable that the quantitative parameters of the test strip refer to the parameters that affect the evaluation of the test strip results. The C-line continuity data, T-line continuity data, line color intensity data, and line width data are all normalized data. The C-line continuity data is a quantitative measure of the integrity and unbrokenness of the C-line on the pregnancy test strip, which can be expressed as the total length of the continuous line divided by the total designed line length. The T-line continuity data is a quantitative measure of the integrity and unbrokenness of the T-line on the pregnancy test strip. The line color intensity data quantifies the color depth of the C / T lines on the pregnancy test strip, reflecting the signal intensity of the lines after the chemical reaction. The line width data quantifies the thickness of the C / T lines on the pregnancy test strip in the direction perpendicular to the line direction, reflecting the "signal coverage range" of the lines. In this embodiment, the weighted calculation formula is:

[0091] ;

[0092] in, Here, T represents the quantitative value of the test strip result, N represents the continuity data of the T-line, and K represents the line width data. The preset weighting coefficients (preset feature coefficients are obtained by querying a pre-pregnancy guidance platform based on deep learning image recognition) are used. In this embodiment, the C-line continuity data, T-line continuity data, line color density data, and line width data can eliminate the influence of shooting distance on the detection results through a dual mechanism to ensure data stability. First, distance adaptation during the acquisition stage: the preset test strip acquisition module has built-in automatic distance measurement and focus assistance functions. When the user takes a picture, the system detects the distance between the lens and the test strip in real time and automatically adjusts the focal length and shooting parameters (such as exposure and sharpness threshold) through an algorithm to ensure that standard test strip images can be acquired at different distances. Second, scale normalization during the preprocessing stage: when the cloud server preprocesses the acquired test strip images, it will automatically perform scale calibration based on the test strip region features extracted by the U-Net semantic segmentation model. Using the inherent size of the test strip as a reference, the images taken at different distances are scaled to a uniform pixel scale, completely eliminating the interference of image size differences caused by distance on subsequent parameter extraction. The C-line continuity data and T-line continuity data are based on the preprocessed effective test strip images and use a pixel connected component analysis algorithm to automatically identify C-line continuity data. For the pixel distribution areas of the C and T lines, the ratio of the total length of continuous pixels to the standard length of the test strip is used to obtain the continuity data. The line color concentration data uses a grayscale quantization model—the test strip image is converted into a grayscale image, and the average grayscale value of the C and T line areas is extracted (normalized to the 0-1 range). The lower the grayscale value (the darker the color), the higher the concentration data. This process is automatically completed by a preset deep learning algorithm without manual intervention. The line width data is obtained by identifying the two sides of the C and T lines through an edge detection algorithm, calculating the pixel span perpendicular to the line direction, and then combining it with the pixel-actual size mapping relationship after scale normalization to convert it into standardized line width data.

[0093] According to an embodiment of the present invention, the step of comparing the quantitative value of the test strip result with a preset test strip detection result evaluation threshold to obtain the test strip detection status and display it on the client specifically includes:

[0094] The test strip's quantitative result is compared with a preset test result evaluation threshold to obtain the test strip's test status;

[0095] The first threshold and the second threshold are extracted based on the preset detection results, and the first threshold is greater than the second threshold.

[0096] If the quantitative value of the test strip result is greater than or equal to the first threshold, the test strip detection status is positive;

[0097] If the quantitative value of the test strip result is greater than or equal to the second threshold and less than the first threshold, the test strip detection status is weakly positive.

[0098] If the quantitative value of the test strip result is less than the second threshold, the test strip test status is negative.

[0099] Understandably, the preset test result evaluation threshold is obtained through the summary and analysis of a large amount of historical data. Different situations will have different differences, so the threshold is also dynamic and can be adjusted according to the user's actual situation. The test strip test status is the test strip test result.

[0100] According to an embodiment of the present invention, before comparing the quantitative value of the test strip result with a preset test strip detection result evaluation threshold, the method further includes:

[0101] Obtain user data on their fertility preparation cycle, including the date of last menstrual period, ovulation monitoring records, or basal body temperature data;

[0102] The system verifies the validity of data from the preconception period and obtains the data status, including whether the data is valid or invalid.

[0103] If the data is invalid, the general threshold will be used as the preset threshold for evaluating the test strip results;

[0104] If the data is valid, the preset threshold is obtained by querying the current time and the preparation period data, and the dynamic threshold is obtained by dynamically adjusting the rule base. The dynamic threshold is then used as the preset threshold for evaluating the test results of the test strip.

[0105] Understandably, the last menstrual period date is used to calculate the number of days remaining until the last menstrual period and to estimate whether menstruation is delayed; ovulation monitoring records, i.e., the precise ovulation date or number of days after ovulation, can be obtained through manual recording by the user or by linking ovulation test strip results; basal body temperature data is used to help verify the ovulation stage, such as a sustained increase in basal body temperature for ≥14 days suggesting that the woman may be in the post-conception stage; due to the special nature of a woman's pregnancy preparation cycle, the preset threshold values ​​for evaluating test results differ at different stages, which will affect the test results. Therefore, dynamic adjustments are needed based on the user's situation. In this embodiment, the preset threshold dynamic adjustment rule base is shown in Table 1 below:

[0106] Table 1. Preset Threshold Dynamic Adjustment Rule Base

[0107]

[0108] The preset threshold dynamic adjustment rule base was established by combining a large amount of historical data with the analysis of female characteristics.

[0109] According to an embodiment of the present invention, it further includes:

[0110] If the test strip shows a weak positive result, the preliminary retest time and corresponding preliminary retest collection guidelines can be obtained by querying the preset retest time rule library based on the current time and the data of the pregnancy preparation period.

[0111] Send the initial retest time and initial retest collection guidelines to your dedicated fertility consultant;

[0112] After the dedicated fertility specialist reviews and improves the initial retest time and the initial retest collection guidelines, a recommended retest time and recommended retest guidelines are obtained.

[0113] Send the recommended retest time and recommended retest data collection guidelines to the client and set a retest reminder.

[0114] Understandably, based on the real-time time of obtaining the test results, and combined with data from the user's last menstrual period, accurate ovulation monitoring records, basal body temperature curves, and other data from the pre-conception cycle, a pre-defined retesting time rule base is consulted. This rule base is built upon clinical HCG hormone secretion patterns and common knowledge about pre-conception, including suggested retesting intervals and timeframes for different cycle stages. For example, for a weak positive result 7-10 days after ovulation, a retest with morning urine is recommended 48-72 hours later; for a weak positive result more than 3 days after a missed period, a retest is recommended within 12-24 hours. A preliminary retesting collection guide is also provided. The system provides requirements for urine collection, such as "no water for 2 hours before collection, midstream urine," and generates a preliminary retest time and preliminary retest collection guidelines. The system then synchronizes this preliminary information to the user's dedicated fertility consultant, who reviews and refines the information based on the user's individual circumstances (such as lifestyle habits and underlying medical history) to create a recommended retest time and guidelines. Finally, the system sends the recommendations to the client via a "pop-up reminder + structured page" format, with default settings for push notifications and SMS reminders "24 hours, 2 hours, and 30 minutes before retest" (users can customize these settings).

[0115] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a fertility preparation guidance system based on deep learning image recognition provided in an embodiment of this application.

[0116] This invention also discloses a fertility preparation guidance system 4 based on deep learning image recognition, including a memory 401 and a processor 402. The memory stores a fertility preparation guidance method program based on deep learning image recognition. When the processor executes the fertility preparation guidance method program based on deep learning image recognition, it performs the following steps:

[0117] The system obtains environmental data through a preset test strip acquisition module and determines the environmental status of the image acquisition.

[0118] Based on the image acquisition environment, collect test strip image data and upload it to the cloud server;

[0119] The cloud server preprocesses the test strip image data to obtain valid test strip image data;

[0120] Extract test strip quantification parameters from valid test strip image data, and process the test strip quantification parameters to obtain the quantification value of the test strip result;

[0121] The quantitative value of the test strip result is compared with the preset test strip detection result evaluation threshold to obtain the test strip detection status and display it on the client.

[0122] Understandably, the first step in image recognition is to obtain images of acceptable quality. Therefore, in this embodiment, the image acquisition environment is first assessed. Only when the image acquisition environment is acceptable can high-quality images be acquired. To facilitate subsequent queries and reduce the operational burden on the user end, the acquired images are uploaded to a cloud server for analysis. The cloud server has a pre-set image preprocessing algorithm that can further optimize high-quality images and obtain valid test strip image data. After extracting parameters that can quantify the test strip results from the valid test strip image data, the quantitative value of the test strip result is obtained through weighted calculation. The test strip detection result can be evaluated through threshold comparison to obtain the test strip detection status.

[0123] According to an embodiment of the present invention, the step of obtaining the acquisition environment data through the preset test strip acquisition module and determining the acquisition environment status of the image specifically includes:

[0124] The data collected by the preset test strip acquisition module includes light intensity data, light uniformity data, and image levelness data.

[0125] The illumination intensity data, light brightness uniformity data, and image levelness data are compared with their respective thresholds to obtain illumination intensity state data, light brightness uniformity state data, and image levelness state data.

[0126] The image acquisition environment status is obtained by performing a bitwise AND operation on the illumination intensity status data, the light uniformity status data, and the image horizontal status data, including whether the environment is qualified or unqualified.

[0127] Understandably, the preset test strip acquisition module is a program module set on the mobile phone or device, which can collect environmental data. In this example, the environmental data are all normalized data. The light intensity data refers to the quantitative data of the intensity of light illuminating the image area in the environment during the acquisition of the fertility test strip image. The light uniformity data refers to the quantitative data of the degree of difference in light intensity distribution at different sampling points in the acquired image area of ​​the fertility test strip image. Its core is to measure whether the light is "uniformly covered" on the surface of the test strip, rather than the intensity of a single light source. The calculation method is the variance of the light intensity of a preset number of sampling points within the image area. The image levelness data refers to the quantitative data of the degree of inclination between the reference edge of the test strip and the horizontal baseline of the image in the image collected by the fertility test strip. The thresholds corresponding to the light intensity data, light brightness uniformity data, and image levelness data are the light intensity threshold, light brightness uniformity threshold, and image levelness threshold, respectively. The light intensity state data, light brightness uniformity state data, and image levelness state data all have two states, including qualified or unqualified. In this embodiment, qualified is recorded as 1 and unqualified is recorded as 0. After performing a bitwise AND operation by the computer, the image acquisition environment state can be obtained.

[0128] According to an embodiment of the present invention, the step of acquiring test strip image data and uploading it to a cloud server based on the image acquisition environment specifically includes:

[0129] If the image acquisition environment is in an unqualified state, the problematic acquisition environment data will be obtained by matching according to preset rules.

[0130] The difference value is obtained by comparing the value corresponding to the environmental data of the problem collection with the preset threshold and then displaying it on the user's end.

[0131] If the image acquisition environment is in a qualified state, the user terminal will enable the focus assist function, and after determining that the clarity meets the standard, the test strip image data will be acquired.

[0132] The test strip image data is uploaded to the cloud server.

[0133] It is understandable that if the image acquisition environment is in an unqualified state, it means that at least one of the data points of light intensity, uniformity of light intensity, and horizontal image is unqualified. The preset rule is to select data points of 0 from the data points of light intensity, uniformity of light intensity, and horizontal image, that is, to select unqualified data points and record them as problematic acquisition environment data. The environmental data corresponding to the problematic environmental data is compared with the corresponding preset threshold. For example, if the problematic environmental data is light intensity data, the difference value is obtained by subtracting the corresponding light intensity data from the preset light intensity data threshold.

[0134] According to an embodiment of the present invention, the cloud server preprocesses the test strip image data to obtain valid test strip image data, specifically including:

[0135] The test strip image data is segmented at the pixel level and the background is removed by using the preset U-Net semantic segmentation model to obtain the test strip area image;

[0136] After performing local illumination compensation and horizontal correction on the test strip area image using a preset deep learning brightness equalization algorithm and perspective transformation matrix, valid test strip image data is obtained.

[0137] It is understood that in this embodiment, the preset U-Net semantic segmentation model, the preset deep learning brightness equalization algorithm, and the perspective transformation matrix are all obtained after training with historical data, and can achieve the corresponding functions. The test strip area image is an image obtained by performing pixel-level segmentation and background removal on the test strip image data.

[0138] According to an embodiment of the present invention, the step of extracting test strip quantification parameters from valid test strip image data and processing the test strip quantification parameters to obtain the test strip result quantification value specifically includes:

[0139] Based on the valid test strip image data, quantitative parameters of the test strip are extracted, including C-line continuity data, T-line continuity data, line color density data, and line width data;

[0140] The validity of the test strip is determined by comparing the C-line continuity data with the preset C-line continuity threshold, including whether the test strip is valid or invalid.

[0141] If the test strip is invalid, an invalid test strip message will be displayed on the client side;

[0142] If the test strip is effective, the quantitative value of the test strip result is obtained by weighted calculation based on the preset weighting coefficient, T-line continuity data, line color concentration data, and line width data.

[0143] It is understandable that the quantitative parameters of the test strip refer to the parameters that affect the evaluation of the test strip results. The C-line continuity data, T-line continuity data, line color intensity data, and line width data are all normalized data. The C-line continuity data is a quantitative measure of the integrity and unbrokenness of the C-line on the pregnancy test strip, which can be expressed as the total length of the continuous line divided by the total designed line length. The T-line continuity data is a quantitative measure of the integrity and unbrokenness of the T-line on the pregnancy test strip. The line color intensity data quantifies the color depth of the C / T lines on the pregnancy test strip, reflecting the signal intensity of the lines after the chemical reaction. The line width data quantifies the thickness of the C / T lines on the pregnancy test strip in the direction perpendicular to the line direction, reflecting the "signal coverage range" of the lines. In this embodiment, the weighted calculation formula is:

[0144] ;

[0145] in, Here, T represents the quantitative value of the test strip result, N represents the continuity data of the T-line, and K represents the line width data. The preset weighting coefficients (preset feature coefficients are obtained by querying a pre-pregnancy guidance platform based on deep learning image recognition) are used. In this embodiment, the C-line continuity data, T-line continuity data, line color density data, and line width data can eliminate the influence of shooting distance on the detection results through a dual mechanism to ensure data stability. First, distance adaptation during the acquisition stage: the preset test strip acquisition module has built-in automatic distance measurement and focus assistance functions. When the user takes a picture, the system detects the distance between the lens and the test strip in real time and automatically adjusts the focal length and shooting parameters (such as exposure and sharpness threshold) through an algorithm to ensure that standard test strip images can be acquired at different distances. Second, scale normalization during the preprocessing stage: when the cloud server preprocesses the acquired test strip images, it will automatically perform scale calibration based on the test strip region features extracted by the U-Net semantic segmentation model. Using the inherent size of the test strip as a reference, the images taken at different distances are scaled to a uniform pixel scale, completely eliminating the interference of image size differences caused by distance on subsequent parameter extraction. The C-line continuity data and T-line continuity data are based on the preprocessed effective test strip images and use a pixel connected component analysis algorithm to automatically identify C-line continuity data. For the pixel distribution areas of the C and T lines, the ratio of the total length of continuous pixels to the standard length of the test strip is used to obtain the continuity data. The line color concentration data uses a grayscale quantization model—the test strip image is converted into a grayscale image, and the average grayscale value of the C and T line areas is extracted (normalized to the 0-1 range). The lower the grayscale value (the darker the color), the higher the concentration data. This process is automatically completed by a preset deep learning algorithm without manual intervention. The line width data is obtained by identifying the two sides of the C and T lines through an edge detection algorithm, calculating the pixel span perpendicular to the line direction, and then combining it with the pixel-actual size mapping relationship after scale normalization to convert it into standardized line width data.

[0146] According to an embodiment of the present invention, the step of comparing the quantitative value of the test strip result with a preset test strip detection result evaluation threshold to obtain the test strip detection status and display it on the client specifically includes:

[0147] The test strip's quantitative result is compared with a preset test result evaluation threshold to obtain the test strip's test status;

[0148] The first threshold and the second threshold are extracted based on the preset detection results, and the first threshold is greater than the second threshold.

[0149] If the quantitative value of the test strip result is greater than or equal to the first threshold, the test strip detection status is positive;

[0150] If the quantitative value of the test strip result is greater than or equal to the second threshold and less than the first threshold, the test strip detection status is weakly positive.

[0151] If the quantitative value of the test strip result is less than the second threshold, the test strip test status is negative.

[0152] Understandably, the preset test result evaluation threshold is obtained through the summary and analysis of a large amount of historical data. Different situations will have different differences, so the threshold is also dynamic and can be adjusted according to the user's actual situation. The test strip test status is the test strip test result.

[0153] According to an embodiment of the present invention, before comparing the quantitative value of the test strip result with a preset test strip detection result evaluation threshold, the method further includes:

[0154] Obtain user data on their fertility preparation cycle, including the date of last menstrual period, ovulation monitoring records, or basal body temperature data;

[0155] The system verifies the validity of data from the preconception period and obtains the data status, including whether the data is valid or invalid.

[0156] If the data is invalid, the general threshold will be used as the preset threshold for evaluating the test strip results;

[0157] If the data is valid, the preset threshold is obtained by querying the current time and the preparation period data, and the dynamic threshold is obtained by dynamically adjusting the rule base. The dynamic threshold is then used as the preset threshold for evaluating the test results of the test strip.

[0158] Understandably, the last menstrual period date is used to calculate the number of days remaining until the last menstrual period and to estimate whether menstruation is delayed; ovulation monitoring records, i.e., the precise ovulation date or number of days after ovulation, can be obtained through manual recording by the user or by linking ovulation test strip results; basal body temperature data is used to help verify the ovulation stage, such as a sustained increase in basal body temperature for ≥14 days, indicating that the woman may be in the post-conception stage; due to the special nature of a woman's pregnancy preparation cycle, the preset test result evaluation threshold values ​​are different at different stages, which will affect the test results. Therefore, dynamic adjustments are needed based on the user's situation. In this embodiment, the preset threshold dynamic adjustment rule library is shown in Table 1.

[0159] The preset threshold dynamic adjustment rule base was established by combining a large amount of historical data with the analysis of female characteristics.

[0160] According to an embodiment of the present invention, it further includes:

[0161] If the test strip shows a weak positive result, the preliminary retest time and corresponding preliminary retest collection guidelines can be obtained by querying the preset retest time rule library based on the current time and the data of the pregnancy preparation period.

[0162] Send the initial retest time and initial retest collection guidelines to your dedicated fertility consultant;

[0163] After the dedicated fertility specialist reviews and improves the initial retest time and the initial retest collection guidelines, a recommended retest time and recommended retest guidelines are obtained.

[0164] Send the recommended retest time and recommended retest data collection guidelines to the client and set a retest reminder.

[0165] Understandably, based on the real-time time of obtaining the test results, and combined with data from the user's last menstrual period, accurate ovulation monitoring records, basal body temperature curves, and other data from the pre-conception cycle, a pre-defined retesting time rule base is consulted. This rule base is built upon clinical HCG hormone secretion patterns and common knowledge about pre-conception, including suggested retesting intervals and timeframes for different cycle stages. For example, for a weak positive result 7-10 days after ovulation, a retest with morning urine is recommended 48-72 hours later; for a weak positive result more than 3 days after a missed period, a retest is recommended within 12-24 hours. A preliminary retesting collection guide is also provided. The system provides requirements for urine collection, such as "no water for 2 hours before collection, midstream urine," and generates a preliminary retest time and preliminary retest collection guidelines. The system then synchronizes this preliminary information to the user's dedicated fertility consultant, who reviews and refines the information based on the user's individual circumstances (such as lifestyle habits and underlying medical history) to create a recommended retest time and guidelines. Finally, the system sends the recommendations to the client via a "pop-up reminder + structured page" format, with default settings for push notifications and SMS reminders "24 hours, 2 hours, and 30 minutes before retest" (users can customize these settings).

[0166] This invention discloses a method and system for pre-pregnancy guidance based on deep learning image recognition. It acquires environmental data through a pre-set test strip acquisition module. After determining the environment is suitable, it activates the focus assist function to obtain test strip image data and uploads it to the cloud. The cloud server processes the test strip image data to obtain valid test strip image data. Based on the test strip's quantitative parameters, a weighted calculation is performed to obtain the quantitative value of the test strip result. The quantitative value of the test strip result is then compared with a threshold to obtain the test strip's detection status. Thus, by judging the environmental status, calculating the quantitative value of the test strip result, and comparing thresholds, the accuracy of test strip detection status assessment is improved.

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

[0168] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0169] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0170] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0171] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

Claims

1. A method for pre-pregnancy guidance based on deep learning image recognition, characterized in that, The application comprises the following steps: Obtaining the collection environment data through the preset test paper collection module, and judging the image collection environment state, specifically including: obtaining the collection environment data through the preset test paper collection module, including the light intensity data, the light and shade uniformity data, and the image level data; comparing the light intensity data, the light and shade uniformity data, and the image level data with the corresponding threshold values respectively to obtain the light intensity state data, the light and shade uniformity state data, and the image level state data; performing the AND operation on the light intensity state data, the light and shade uniformity state data, and the image level state data to obtain the image collection environment state, including the environment qualified state or the environment unqualified state; According to the image collection environment state, collecting the test paper image data and uploading it to the cloud server; The cloud server pre-processes the test paper image data to obtain the effective test paper image data; According to the effective test paper image data, extracting the test paper quantitative parameters, and processing the test paper quantitative parameters to obtain the test paper result quantitative value, specifically including: extracting the test paper quantitative parameters according to the effective test paper image data, including the C-line continuity data, the T-line continuity data, the line color concentration data, and the line width data; comparing the C-line continuity data with the preset C-line continuity threshold value to obtain the test paper effectiveness, including the test paper validity or the test paper invalidity; if the test paper is invalid, the test paper invalidity prompt is given on the client; if the test paper is valid, the test paper result quantitative value is obtained by weighted calculation according to the preset weight coefficient, the T-line continuity data, the line color concentration data, and the line width data; Comparing the test paper result quantitative value with the preset test paper detection result evaluation threshold value to obtain the test paper detection state and display it on the client. 2.The deep learning-based image recognition-based fertility guidance method of claim 1, wherein, According to the image collection environment state, collecting the test paper image data and uploading it to the cloud server, specifically including: If the image collection environment state is the environment unqualified state, the problem collection environment data is obtained by matching the preset rules; Comparing the value corresponding to the problem collection environment data with the preset threshold value to obtain the gap value and display it on the user end; If the image collection environment state is the environment qualified state, the user end starts the focusing auxiliary function, collects the test paper image data after judging that the definition meets the requirements; Uploading the test paper image data to the cloud server. 3.The deep learning image recognition based pre-pregnancy guidance method of claim 2, wherein, The cloud server pre-processes the test paper image data to obtain the effective test paper image data, specifically including: Performing pixel-level segmentation and background removal on the test paper image data through the preset U-Net semantic segmentation model to obtain the test paper region image; Performing local light compensation and horizontal correction on the test paper region image through the preset deep learning brightness equalization algorithm and perspective transformation matrix to obtain the effective test paper image data. 4.The deep learning-based image recognition-based fertility guidance method of claim 1, wherein, Comparing the test paper result quantitative value with the preset test paper detection result evaluation threshold value to obtain the test paper detection state and display it on the client, specifically including: Comparing the test paper result quantitative value with the preset detection result evaluation threshold value to obtain the test paper detection state; Extracting the first threshold value and the second threshold value according to the preset detection result evaluation threshold value, and the first threshold value is greater than the second threshold value; If the test paper result quantitative value is greater than or equal to the first threshold value, the test paper detection state is positive. If the test paper result quantization value is greater than or equal to the second threshold value and less than the first threshold value, the test paper detection state is weak positive; If the test paper result quantization value is less than the second threshold value, the test paper detection state is negative. 5.The deep learning-based image recognition-based fertility guidance method of claim 4, wherein, Before comparing the test paper result quantization value with the preset test paper detection result evaluation threshold value, the method further comprises: Obtaining the user's preparation period data, including the last menstrual period time, ovulation monitoring records or basal body temperature data; The system performs validity check on the preparation period data to obtain the data state, including data validity or data invalidity; If the data is invalid, the general threshold value is used as the preset test paper detection result evaluation threshold value; If the data is valid, the dynamic threshold value is obtained according to the preset threshold value dynamic adjustment rule library queried according to the current time and the preparation period data, and the dynamic threshold value is used as the preset test paper detection result evaluation threshold value. 6.The deep learning-based image recognition-based fertility guidance method of claim 5, wherein, Further comprising: If the test paper detection state is weak positive, the preliminary retest time and the corresponding preliminary retest collection guide are obtained according to the preset retest time rule library queried according to the current time and the preparation period data; The preliminary retest time and the preliminary retest collection guide are sent to the exclusive preparation instructor; The recommended retest time and the recommended retest collection guide are obtained after the exclusive preparation instructor audits and perfects the preliminary retest time and the preliminary retest collection guide; The recommended retest time and the recommended retest collection guide are sent to the client and a retest reminder is set. 7.A pre-pregnancy guidance system based on deep learning image recognition, characterized in that, The memory and the processor, the memory includes the preparation guidance method based on deep learning image recognition program, the preparation guidance method based on deep learning image recognition program is executed by the processor to realize the following steps: Obtain the collection environment data through the preset test paper collection module, and judge the image collection environment state, specifically including: obtaining the collection environment data through the preset test paper collection module, including the light intensity data, the light and shade uniformity data and the image level data; comparing the light intensity data, the light and shade uniformity data and the image level data with the corresponding threshold values respectively to obtain the light intensity state data, the light and shade uniformity state data and the image level state data; obtaining the image collection environment state by performing and operation on the light intensity state data, the light and shade uniformity state data and the image level state data, including the environment qualified state or the environment unqualified state; According to the image collection environment state, collect the test paper image data and upload it to the cloud server; The cloud server pre-processes the test paper image data to obtain valid test paper image data; According to the valid test paper image data, the test paper quantization parameters are extracted, and the test paper result quantization value is obtained by processing according to the test paper quantization parameters, specifically including: extracting the test paper quantization parameters according to the valid test paper image data, including the C-line continuity data, the T-line continuity data, the line color concentration data and the line width data; comparing the C-line continuity data with the preset C-line continuity threshold value to obtain the test paper validity, including test paper validity or test paper invalidity; if the test paper is invalid, the test paper invalidity prompt is given on the client; if the test paper is valid, the test paper result quantization value is obtained by weighted calculation according to the preset weight coefficient, the T-line continuity data, the line color concentration data and the line width data; The test paper result quantitative value is compared with a preset test paper detection result evaluation threshold, a test paper detection state is obtained, and the test paper detection state is displayed on the client.

Citation Information

Patent Citations

  • Test paper color uniformity detection method based on dynamic illumination correction algorithm

    CN111179362A

  • Immunochromatography concentration detection method and system based on machine learning

    CN112071423A

  • Colloidal gold detection method and system based on image recognition and storage medium

    CN116433671A