Cloud-computing-based eye vision and optometry service platform and service method thereof
By using a cloud-based optometry service platform, a rule engine and Transformer model are employed to identify and calibrate optometry data deviations, solving the data deviation problems caused by equipment aging and insufficient maintenance, and achieving high-precision data identification and calibration.
Patent Information
- Application Number
- CN202511056085.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-07-30
AI Technical Summary
Existing optometry equipment suffers from outdated hardware, insufficient maintenance, and non-standard manual operation, leading to data deviations that make accurate identification and integration difficult and fail to meet the requirements for data reliability.
An eye care service platform based on cloud computing is adopted. It quickly identifies obvious deviations through a rule engine, captures fine-grained deviations by combining a Transformer model, and dynamically adjusts attention weights to calibrate data, thereby achieving targeted error correction.
It improves the accuracy of identifying deviations in optometry data, reduces batch errors caused by equipment aging and insufficient maintenance, and enhances the accuracy and efficiency of data calibration.
Smart Images

Figure CN120565088B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud-based optometry services, specifically to a cloud-based optometry service platform, method, electronic device, medium, and computer program product. Background Technology
[0002] In the field of optometry, examination equipment (such as optometers and biometers) often deviates from actual values due to outdated hardware (e.g., decreased sensor accuracy), inadequate maintenance (e.g., extended calibration cycles) or improper human operation (e.g., deviations in testing procedures or incorrect parameter entry).
[0003] However, local devices are limited by hardware computing power (such as insufficient CPU performance and limited memory capacity), making it difficult to support complex deviation identification calculations; and they lack the ability to integrate historical data across time and devices; their ability to identify nonlinear anomalies between multiple parameters is weak, resulting in low deviation identification efficiency and insufficient accuracy, making it difficult to meet the requirements for data reliability.
[0004] Therefore, there is an urgent need for a method that can accurately identify deviations in optometric diagnosis and treatment data. Summary of the Invention
[0005] In response, the present invention provides a cloud computing-based optometry service platform, method, electronic device, medium, and computer program product to at least partially solve the above-mentioned technical problems.
[0006] This invention provides a cloud-based method for providing optometry services, comprising the following steps: in response to receiving input conditions, parsing the input conditions to obtain key-value pairs, operators, and weights; based on preset conversion logic, converting and mapping the key-value pairs and operators, including reversing the operators to obtain a reversal operator, a mapping field type, and generating SQL conditions; generating a rule configuration table, the rule configuration table including the mapping field type field, a weight field, and a rule ID field; and generating a final SQL template based on the reversal operator, field type, SQL conditions, and weights.
[0007] In another aspect, this application also provides a cloud-based optometry service platform, comprising: a parsing module, configured to parse the input conditions in response to receiving input conditions, and obtain key-value pairs, operators, and weights; a conversion and mapping module, configured to convert and map the key-value pairs and operators based on preset conversion logic, including inverting the operators to obtain inverted operators, mapped field types, and generated SQL conditions; a first generation module, configured to generate a rule configuration table, the rule configuration table including the mapped field type field, weight field, and rule ID field; and a second generation module, configured to generate a final SQL template based on the inverted operator, field type, SQL conditions, and weights.
[0008] In another aspect, this application also provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the cloud-based optometry service method described above.
[0009] In another aspect, this application provides a computer-readable storage medium having computer program instructions stored thereon, which can be executed by a processor to implement the cloud-based optometry service method described above.
[0010] Another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the cloud-based optometry service method described above.
[0011] The solution provided in this application addresses devices with high historical deviations by using a rule engine that quickly intercepts significant deviations (such as axial length exceeding a threshold or systematic device errors) through parameter thresholds, logical associations, and device characteristic rules. For devices with low deviations, the Transformer model, combined with dynamic attention weights, captures fine-grained deviations. Device characteristic rules enable targeted error correction, calibrate and remind accuracy, and reduce batch errors caused by device aging or insufficient maintenance. The dynamic attention mechanism generates weights through MLP combined with Sigmoid, enhancing the model's attention to complex associations. This improves the accuracy of identifying deviations in optometry data from multiple perspectives. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0013] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0014] Figure 1 This is a schematic diagram of a cloud-based optometry service method provided in an embodiment of the present invention.
[0015] Figure 2 This is a schematic diagram of the structure of a cloud-based optometry service platform provided in an embodiment of the present invention.
[0016] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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 some embodiments of this application, 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 scope of protection of this application.
[0018] In a typical configuration of this application, the terminal and the service network devices each include one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0019] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, for example, read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0020] Computer-readable media include permanent and non-permanent, removable and non-removable media, which can store information by any method or technology. Information can be computer program instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only optical disc (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0021] like Figure 1 As shown in the figure, an embodiment of the present invention discloses a cloud computing-based ophthalmic diagnosis and treatment service method, which includes the following method steps: Step S101, obtaining first data from the requesting end in real time, the first data including the requesting end ID and first ophthalmic data related to ophthalmic diagnosis and treatment.
[0022] In some embodiments, a real-time communication link is established with the first requesting end (such as a hardware terminal like an optometer, biometer, or vision testing device, or a software terminal like a hospital information system) through the API interface or data transmission protocol (e.g., HTTP, WebSocket) of the cloud computing platform. After the requesting end completes the optometry test, the test data is instantly transmitted to the cloud server via a network (e.g., a local area network, the Internet).
[0023] The first request terminal ID is a unique code that identifies the device or institution. It is usually generated by combining information such as device serial number, medical institution code, and testing terminal number (for example, "EYE-001-HOSP-2025" represents the 001 optometry device of a certain hospital).
[0024] First-hand optometry data is raw test data that has not been identified by the cloud platform for bias. It can be divided into three categories according to medical dimensions, each containing several key parameters: 1. Refractive state parameters: reflecting the ability of light to refract, including: Sphere (S): the degree of correction for myopia or hyperopia, "+" for hyperopia (e.g., +2.00D) and "-" for myopia (e.g., -3.00D).
[0025] Cylinder (C): The power of correction for astigmatism, for example, -1.50D means 150 degrees of astigmatism.
[0026] Axis: The direction of astigmatism (0°~180°), for example, an axis of 90° represents horizontal astigmatism.
[0027] Equivalent spherical power (SE): The algebraic sum of the spherical power and half of the cylindrical power (SE=S+C / 2), used to assess the overall degree of refractive error.
[0028] These parameters affect the accuracy of eyeglass prescriptions. If there is a deviation (such as an overestimation of the spherical power), it may cause blurred vision or eye strain for the patient after wearing glasses.
[0029] 2. Visual function parameters: assess binocular coordination and visual quality, including: uncorrected visual acuity: visual acuity without glasses (e.g., 1.0 or 0.8 on the international standard visual acuity chart).
[0030] Corrected visual acuity: The best visual acuity after wearing glasses, reflecting the effect of refractive correction.
[0031] Pupillary distance (PD): The horizontal distance (mm) between the centers of the pupils of both eyes is a key parameter for aligning the optical center of the lenses when fitting glasses.
[0032] Accommodation amplitude: The eye's ability to focus on near objects (for example, a 20-year-old's accommodation amplitude is about 10D, which means they can see objects 10cm away clearly).
[0033] The difference between uncorrected and corrected visual acuity can help determine whether amblyopia exists or if there is a testing error; interpupillary distance deviation can cause the optical center of the lens to be misaligned with the pupil, leading to discomfort when wearing the lens.
[0034] 3. Ocular biometric parameters: reflecting the anatomical structure of the eyeball, including: uncorrected visual acuity: visual acuity without glasses (e.g., 1.0 or 0.8 on the international standard visual acuity chart).
[0035] Corrected visual acuity: The best visual acuity after wearing glasses, reflecting the effect of refractive correction.
[0036] Pupillary distance (PD): The horizontal distance (mm) between the centers of the pupils of both eyes is a key parameter for aligning the optical center of the lenses when fitting glasses.
[0037] Accommodation amplitude: The eye's ability to focus on near objects (for example, a 20-year-old's accommodation amplitude is about 10D, which means they can see objects 10cm away clearly).
[0038] Deviations in axial length measurement can cause myopia control programs to fail (e.g., misjudging the rate of myopia progression); deviations in intraocular pressure data may lead to missed or misdiagnosed glaucoma.
[0039] It is understandable that the data obtained from the requesting end may also include user data (such as patient ID, age, medical records, etc.).
[0040] Step S102: Based on the first requester ID, obtain the historical deviation degree of the historical optometry data corresponding to the first requester. In some embodiments, the cloud server can locate the optometry data previously submitted by the requester from the historical database using the first requester ID, as well as the deviation parameters and the calculated deviation degree of each submitted optometry data. As an example, the table below is a sample table of relevant optometry data and deviation degrees submitted sequentially by the requester with ID EYE-001 within a certain period of time, stored in the historical database of the cloud server, showing the historically submitted data and deviation situation.
[0041]
[0042] For example, the level of deviation and the corresponding threshold are set according to the following rules: High: ≥3 parameters exceed the threshold in a single deviation, or the deviation value of key parameters (such as axial length and intraocular pressure) exceeds the standard value by 10%.
[0043] Medium: 1-2 parameters exceed the threshold, or the deviation of non-critical parameters is between 5% and 10%.
[0044] Low: No parameter exceeds the threshold, or the deviation value is ≤5%.
[0045] The overall historical deviation level can be obtained by statistically analyzing the deviation levels of each historical instance. For example, the historical deviation level of the requesting end can be determined by counting the number of times the deviation level is high, medium, or low. Taking the above example of statistically analyzing the frequency of deviation level of the five data submissions of the requesting end, the historical deviation level can be determined according to the following rules: if the "high" level appears ≥ 2 times, the historical deviation level is judged as "high".
[0046] If the "Medium" level appears ≥3 times and the "High" level appears <1 time, it is judged as "Medium".
[0047] If the "low" level appears ≥ 4 times, it is judged as "low".
[0048] It is understood that the level frequency can be dynamically adjusted based on the number of requests to obtain the final historical deviation level, and this embodiment does not impose any restrictions; whereby a high historical deviation level can be considered as a historical deviation level greater than or equal to the first preset threshold, and vice versa, a low historical deviation level can be considered as a historical deviation level less than the first preset threshold.
[0049] Step S103: In response to the historical deviation being greater than or equal to a first preset threshold, a first identification result is obtained. The first identification result includes identification based on a first rule engine to determine whether there is a deviation in the first eye optometry data and the degree of deviation.
[0050] In some embodiments, when the historical deviation level calculated by the cloud server based on the first requester ID is greater than or equal to a first preset threshold (e.g., "high" level), it indicates that the data submitted by the requester has a relatively obvious or frequent deviation. At this time, the first rule engine is enabled to identify the deviation in order to quickly locate and quantify the data problem.
[0051] Optionally, the first rule engine includes parameter threshold verification rules, parameter logical association rules, and device characteristic rules. The step of identifying whether the first optometry data has a deviation and the degree of deviation based on the first rule engine includes: inputting the real-time acquired first optometry data into the rule engine; the parameter threshold verification rules are used to compare each parameter in the optometry data with its corresponding normal value range; when a parameter exceeds its corresponding normal value range, it is determined that the parameter has a deviation; the parameter logical association rules are used to determine whether the association between each parameter conforms to a preset logic based on the medical logical relationship between optometry parameters; if it does not conform, it is determined that the relevant parameter has a deviation; the device characteristic rules are used to perform targeted verification on the optometry data corresponding to the requesting device based on the detection accuracy and common error types of the requesting device; if the verification fails, it is determined that a deviation exists; and determining the parameters with deviations, the magnitude of the deviation values, and the number of deviation parameters according to the triggered rules.
[0052] Specifically, the parameter threshold verification rule, also known as single-parameter validity screening, sets a medical standard range for each parameter, and any deviation is considered a deviation. For example, if the currently obtained axial length is 24.8mm (normal adult ≤24.2mm) and intraocular pressure is 22mmHg (normal 10-21mmHg), the verification process could be as follows: if the axial length exceeds the standard value by 0.6mm, the threshold rule is triggered, and it is determined that "the axial length has a deviation, deviation value +0.6mm"; if the intraocular pressure exceeds the standard value by 1mmHg, the threshold rule is triggered, and it is determined that "the intraocular pressure has a deviation, deviation value +1mmHg".
[0053] The parameter logic association rule, or multi-parameter collaborative verification, establishes verification logic based on the medical correlation between parameters (such as the relationship between axial length and refractive power, and uncorrected visual acuity and corrected visual acuity). For example, given an axial length of 25.2mm, spherical power -2.00D, uncorrected visual acuity of 0.6, and corrected visual acuity of 0.5, the verification process could be as follows: Axial length-refractive power correlation: The axial length is 1.0mm longer than normal (normal value is 24.2mm). According to medical logic, the myopia should increase by -3.00D (i.e., spherical power ≤ -3.00D), but the actual measurement is -2.00D, triggering the logic rule and determining "the spherical power and axial length logically contradict each other, deviation value +1.00D"; Uncorrected visual acuity-corrected visual acuity correlation: Corrected visual acuity of 0.5 is not better than uncorrected visual acuity of 0.6, triggering the logic rule and determining "corrected visual acuity is abnormal, and the refraction data needs to be reviewed".
[0054] Equipment characteristic rules refer to specific rules established based on the historical deviation patterns of equipment (e.g., a device frequently exhibits systematic errors). For example, historical data from the optometry instrument with request ID "EYE-001" shows that its cylinder power measurement is often +0.50D higher than the actual value, and its axial length measurement is generally 0.3mm longer. Currently, the cylinder power is -1.50D, and the axial length is 24.5mm. The verification process could be as follows: according to the equipment characteristic rules, the cylinder power is automatically subtracted by +0.50D, resulting in -2.00D. This is then compared logically with other parameters (such as whether the axis matches). If the correction still exceeds the reasonable range, a deviation is determined; the axial length is automatically subtracted by 0.3mm, resulting in 24.2mm (equal to the upper limit of the standard value), thus determining that "the axial length is normal after equipment characteristic correction."
[0055] Preferably, device characteristic rules take precedence over logical association rules and threshold rules. Specifically, for example, the axial length data of "EYE-001" is first corrected according to device characteristics (reduced by 0.3mm), and then a threshold comparison is performed (24.2mm≤24.2mm, normal), to avoid misjudgment due to systematic errors in the device.
[0056] For example, the deviation parameter and degree quantification process includes: obtaining the current parameters: axial length 24.8mm (before device characteristic correction), spherical power -2.00D, cylindrical power -1.50D (before device characteristic correction), intraocular pressure 22mmHg, uncorrected visual acuity 0.6, and corrected visual acuity 0.5.
[0057] Triggering rules and results: Device characteristic rules: Cylinder power correction to -2.00D (-1.50D-0.50D), axial length correction to 24.5mm (24.8mm-0.3mm).
[0058] Parameter threshold rule: The corrected axial length of 24.5mm still exceeds the standard value by 0.3mm (24.2mm), and the intraocular pressure of 22mmHg exceeds the threshold. These two parameters are judged to be in deviation.
[0059] Parameter logic rule: After correction, the axial length is 24.5mm (an increase of 0.3mm), and the corresponding spherical power should increase by -0.90D (i.e., the original power -3.00D + (-0.90D) = -3.90D). However, the actual measurement is -2.00D (the corrected cylindrical power does not affect the spherical power logic), which triggers a logic contradiction and determines that the spherical power is deviated.
[0060] The final result showed three deviation parameters (axial length, intraocular pressure, and spherical power), with deviation values of +0.3mm, +1mmHg, and +1.90D, respectively, and the degree of deviation was judged as "high".
[0061] Step S104: In response to the historical deviation being less than a first preset threshold, a second identification result is obtained. The second identification result includes identification based on a first deep learning model to determine whether there is a deviation in the first eye optometry data and the degree of deviation.
[0062] In some embodiments, when the historical deviation is less than a first preset threshold, it indicates that the overall reliability of the requesting data is high. At this time, the first deep learning model (e.g., the Transformer model) is activated to perform fine-grained deviation identification, which can capture subtle anomalies that are difficult to detect by traditional rules. For example, subtle parameter correlation anomalies, where a single parameter does not exceed the threshold, but the combination of multiple parameters deviates from medical norms (e.g., axial length increases by 0.1 mm but the spherical power does not change synchronously); gradual errors in the device, such as slight wear on the optometry lens causing power drift, have not yet reached the threshold triggering condition of the rule engine.
[0063] Preferably, the real-time acquired first-eye refraction data is preprocessed, including grouping and organizing the data by category and normalizing it; a Transformer model is constructed, and the Transformer model is dynamically adjusted based on the parameter correlation complexity between parameters in the first-eye refraction data, and then trained; the preprocessed first-eye refraction data is input into the trained Transformer model to obtain the probability and degree of deviation of each parameter; a probability threshold is set, and when the deviation probability of a certain parameter exceeds the probability threshold, it is determined that the parameter has a slight deviation, and the direction and degree of deviation are determined by combining the estimated value.
[0064] In some embodiments, the acquired first-eye optometry data, including multi-dimensional parameters such as spherical power and axial length, are grouped and organized according to parameter categories (refractive parameters, biometric parameters, etc.). The parameters are grouped according to their medical attributes and functional associations. For example, the parameters can be divided into three groups: refractive parameter group: spherical power (S), cylindrical power (C), axis (Axis), and equivalent spherical power (SE=S+C / 2).
[0065] Biometrics group: axial length (AL), corneal curvature (K1 / K2), and corneal thickness (CCT).
[0066] Visual function group: uncorrected visual acuity (UCVA), corrected visual acuity (BCVA), and accommodative amplitude (AMP).
[0067] Z-score standardization was performed on parameters with different dimensions (e.g., diopter D, length mm, visual acuity). ,in The mean of the training set, The standard deviation is denoted as .
[0068] Preferably, the step of dynamically adjusting the Transformer model based on the parameter association complexity between parameters in the first eye optometry data includes: the parameter association complexity being positively correlated with the number of attention heads in the Transformer model; when there are long-distance dependencies and / or causal temporal relationships between the parameters, future information is masked through causal masks and / or attention to neighboring parameter associations is forced through locality-sensitive masks; when the spatial and / or temporal associations between the parameters are non-uniform, sine and cosine encoding and / or learnable encoding are selected as positional encoding methods according to the association characteristics; when the associations between the parameters are highly nonlinear, the hidden layer dimension of the feedforward neural network is increased, and GELU or Swish is selected as the activation function.
[0069] In some embodiments, the parameter association complexity is quantified based on indicators such as association length (the number of paths for passing associations between parameters), association strength (correlation coefficient), and association dynamics (association fluctuations over time). An exemplary method for calculating parameter association complexity is shown in the table below:
[0070]
[0071] Specifically, the Pearson correlation coefficient measures the degree of linear correlation between two continuous variables, ranging from -1 to 1. A value closer to 1 indicates a stronger positive linear correlation (if one increases, the other is likely to increase as well, such as axial length and myopia degree; generally, a longer axial length corresponds to a higher degree of myopia). A value closer to -1 indicates a stronger negative linear correlation (if one increases, the other is likely to decrease, such as outdoor activity time and the rate of myopia progression; theoretically, longer outdoor activity time may lead to slower myopia progression). A value close to 0 indicates a weak linear correlation (such as intraocular pressure and corneal astigmatism axis, which usually have no significant linear correlation). The coefficient is obtained by dividing the covariance by the product of the standard deviations of the two variables. The simplified formula is: ;in, These are sample values of the variable. It is the sample mean.
[0072] Mutual information is an index that measures the degree of non-linear correlation between two variables (continuous or discrete). It reflects how much "information" one variable contains about the other; the larger the value, the stronger the correlation (value ≥ 0). For example, mutual information can capture the non-linear dependency between axial length (continuous) and corneal topography feature patterns (discrete classification, such as regular astigmatism and irregular astigmatism). The calculation logic is derived based on information entropy (an index that measures the uncertainty of variables), which will not be elaborated in this embodiment.
[0073] The standard deviation of the correlation coefficient within a sliding window is used to measure the stability of the correlation. Within a sliding window (a continuous, movable data interval, such as 10 consecutive refraction data points forming a window), multiple Pearson correlation coefficients (or other correlation coefficients) are calculated, and then the standard deviation of these coefficients is calculated. A smaller standard deviation indicates less fluctuation in the correlation between variables within the window, indicating a stable relationship; a larger standard deviation indicates greater fluctuation in the correlation, potentially influenced by interfering factors (such as equipment errors or changes in the testing environment).
[0074] Calculation logic: ① Set the sliding window size (e.g., the window contains n sets of data); ② Within the window, calculate the Pearson correlation coefficient (n-1) times for the target variable pair (e.g., axial length and refractive power) (recalculate after each window slide); ③ Calculate the dispersion of these (n-1) correlation coefficients using the standard deviation formula: ,in, It is the correlation coefficient calculated each time. It is the mean of the correlation coefficient.
[0075] For example, monitor the stability of parameter correlations in long-term data, such as tracking monthly refraction data of the same patient and using a sliding window (window size set to 6 months of data) to calculate the standard deviation of the axial length-refractive error correlation coefficient. If the standard deviation suddenly increases, it may indicate detection error (e.g., refractometer calibration problem) or changes in the patient's eye habits / eye physiological structure (e.g., myopia prevention and control intervention taking effect, or pathological myopia progression).
[0076] Depending on the complexity of the association, in some implementations, the number of multi-head attention heads, attention mask, positional encoding function type, and positional encoding dimension can be dynamically adjusted. Hidden layer dimension Or one or more parameters in the activation function type.
[0077] The complexity of parameter association is positively correlated with the number of attention heads in the Transformer model. Specifically, when there are complex, multi-dimensional, cross-domain associations between parameters (e.g., non-linear associations between axial length and corneal curvature, or intraocular pressure and lens thickness), the number of attention heads can be increased. Each attention head independently learns association patterns in different subspaces; the more heads, the richer the types of associations the model can capture in parallel. An exemplary formula for an attention head is: .
[0078] By using a "multi-head parallel computation of attention, followed by splicing and fusion" approach, the model can simultaneously capture the relationships between Q, K, and V from multiple perspectives, and finally output the fused attention result, allowing the model to have a more comprehensive understanding of complex relationships.
[0079] In this model, Q (Query) is the query vector, which can be the "currently acquired axial length data." The model uses it to "query" the correlation with other data. K (Key) is the key vector, equivalent to the "index label of the queried content," such as the "axial length-refractive power correlation feature" in historical data. K is the "reference key" used to perform matching calculations with Q, helping the model determine which information is related to Q. V (Value) is the value vector, which is the "actual content" bound to K. When Q and K match, V is the effective information that the model ultimately extracts and integrates. For example, if K is the "axial length-refractive power correlation label," then V is the specific "correlation pattern data (such as statistical values like the change in refractive power - 3D for every 1mm increase in axial length)."
[0080] For the output of the i-th attention head, the model will be split into n "attention heads" in parallel, and each head will independently calculate the correlation between Q, K, and V. It refers to the "local correlation result" calculated by the i-th head. For example, one head focuses on the "linear correlation between axial length and refractive power", while another head focuses on the "non-linear correlation between axial length and corneal curvature".
[0081] Concat is a concatenation operation that combines the results of n attention points ( arrive By piecing them together in order, the related information from different perspectives can be "converged," preserving multi-dimensional details of the connections. The output weight matrix performs a "linear transformation" on the concatenated result, compressing and adjusting the multi-dimensional concatenated features into the final required output dimensions, so that the result can be adapted to subsequent model calculations.
[0082] Specifically, when there are long-distance dependencies or causal temporal relationships between parameters, customized masks can be designed. For example, a causal mask can be used to shield future information, or a local-sensitive mask can be used to force the model to focus on the correlation between neighboring parameters.
[0083] The causal mask simulates "temporal causality," ensuring that when processing time-series data (such as historical data from multiple refraction tests or time-varying axial length / refractive error sequences), the model can only "see" current and past data, masking future data and preventing model "cheating" (using future information to predict the present, violating the temporal logic of actual clinical scenarios). For example, this can be achieved through the `causal_mask` function:
[0084] defcausal_mask(size):
[0085] ① Generate a lower triangular matrix of all 1s (including the diagonal), and initialize the upper triangular matrix to 0.
[0086] #For example, when size=3, it generates [[1,0,0],[1,1,0],[1,1,1]] (torch.triu will process it as an upper triangle, and here we combine it with diagonal=1 to reverse the implementation of the lower triangle mask)
[0087] mask=torch.triu(torch.ones(size,size),diagonal=1)
[0088] returnmask.bool()
[0089] Among them, torch.ones(size,size): creates a size×size matrix of all 1s (representing "visible");
[0090] torch.triu(...,diagonal=1): Preserves the upper triangle (above the diagonal, diagonal=1 means starting from the first diagonal), in this case the upper triangle is 1 and the lower triangle is 0;
[0091] mask.bool(): Converts to a boolean value, ultimately generating a mask with the upper triangle set to True (to be masked) and the lower triangle set to False (to be monitored).
[0092] When the model processes time-series data (such as a sequence of length size), the mask ensures that each element can only "see" itself and the elements at previous positions (lower triangle), while future positions (upper triangle) are masked, thus guaranteeing causality.
[0093] For example, the dynamic data continuously collected by the optometry instrument (e.g., corneal topography data collected frame by frame during a single optometry test) is processed to ensure that the model is analyzed in the order of collection and to avoid using subsequent frame data to interfere with the deviation judgment of the current frame.
[0094] Among them, the Local-Sensitive Mask forces the model to focus on the correlation of "neighboring parameters" when processing data, weakening the interference of distant parameters. It is suitable for scenarios where local structures are closely related in optometric data (such as local region parameters in corneal topography, diopters / axis values in adjacent columns of an optometry prescription).
[0095] Assuming we are processing a parameter sequence of length N (e.g., spherical, cylindrical, axis, pupillary distance, etc. parameters from an optometry report), the local sensitivity mask can be designed as follows: for each parameter position i, the model is only allowed to focus on parameters within the range [ik, i+k] (k is the "nearest window size"); in the mask matrix, the region corresponding to [ik, i+k] is False (can be focused on), and the region outside is True (must be masked).
[0096] For example, by analyzing local parameters of corneal topography (such as corneal curvature at a point, curvature and thickness of adjacent points), a locality-sensitive mask is used to limit the model to focus on a small area around that point (such as a 5×5 pixel range) to uncover subtle correlations in local lesions.
[0097] Preferably, in some embodiments, two types of masks can be superimposed simultaneously—a causal mask to ensure temporal order (the model can only use past / current frame data), and a locality-sensitive mask to focus on local regions within a frame (the model only analyzes parameters surrounding lesions in the current frame), making the model more closely resemble the actual "spatiotemporal correlation" analysis logic.
[0098] When the spatial / temporal correlation between parameters is non-uniform, an appropriate positional encoding method needs to be selected. Learnable encoding and sinusoidal encoding can be used in combination to capture dynamic and periodic correlations. The core is to use a fixed trigonometric function to assign a unique "positional feature" to each position in the sequence (e.g., the parameter order of refraction data, the order of patient testing time), allowing the model to perceive the sequential relationship of the data.
[0099] The simplified formula for sine and cosine encoding is: ;in, Meaning: Position index, representing the "sequential position" of an element in a sequence (counting from 0).
[0100] For example, the parameter sequence of the optometry prescription (spherical lens, cylindrical lens, axis, pupillary distance, etc.) is analyzed. The values 0 (spherical), 1 (cylindrical), 2 (axial), etc., represent the position of the parameter in the sequence.
[0101] This represents the dimension index, indicating the "dimension number" of the positional encoding vector (by traversing the dimensions of the encoding vector and generating trigonometric functions of different frequencies). Iterates from 0 to... (Since each pair of dimensions uses a set of sine + cosine), different frequencies of trigonometric functions are generated through different values of i, allowing the position encoding of each dimension to capture "position information of different periods" (low i corresponds to low frequency, high i corresponds to high frequency), simulating the "long distance / short distance" association of position.
[0102] Learnable encoding: Suitable for unstructured, dynamically changing associations (e.g., parameter association variations due to individual differences). Generated through training. , where L is the length of the parameter sequence (i.e., the total number of positions in the sequence). Without relying on a fixed formula, the model directly "learns" the optimal encoding for each position during training, allowing positional features to adapt to specific tasks.
[0103] in, Represents the position encoding matrix, The dimension directly stores the encoded vector for each position. The training logic initializes a random matrix, which, during model training, is backpropagated and updated along with other parameters (such as attention weights and feedforward network parameters) to adapt the encoding to the positional relationships in the data.
[0104] Whether it's sine and cosine encoding with a fixed formula or learnable encoding for model learning, the core is to enable the model to perceive the "order / positional relationship" of the data.
[0105] In some embodiments, when there are multi-level relationships between parameters, the positional encoding dimension can be increased. It should be noted that increasing... It can enhance the ability of location information to represent the feature space, but it needs to be combined with the model dimensionality. Matching (usually) ).
[0106] In some embodiments, when the correlation between parameters is highly nonlinear (e.g., a complex mapping between corneal thickness and laser surgery results), the nonlinear expressive power of the feedforward neural network (FFN) can be enhanced, and non-saturating activation functions such as GELU or Swish can be selected as activation functions. The feedforward neural network (FFN) can be decomposed into "linear transformation → nonlinear activation → linear transformation," and adjusting the FNN's formula can simplify it to: ;in, This represents the input vector of FFN, corresponding to the "parametric features" (such as a vector composed of parameters like corneal thickness, refractive power, and intraocular pressure) in the optometry scenario. First pass Mapping to hidden layer (dimension) Add bias Use later Introducing nonlinearity, finally By mapping back to the output dimension (usually with) Consistent), plus The final result is obtained.
[0107] This represents the weight matrix from the hidden layer to the output, with dimension _____. (Hidden layer) dimensional feature mapping back The hidden layer captures "complex interaction features" and compresses / transforms them back to the output dimension required by the model, ensuring that FFN can be integrated into the overall Transformer architecture.
[0108] The bias vector of the output layer has a dimension of Add an offset to the output. Fine-tune the overall distribution of the output features to make the model output more suitable for subsequent tasks (e.g., in bias identification, make the output probability easier to distinguish between "normal" and "abnormal").
[0109] The activation function introduces non-linearity into the network, allowing the model to capture complex parameter relationships (such as the "non-linear" relationship between corneal thickness and surgical outcome). Without the activation function, FFN degenerates into a simple linear transformation (unable to handle non-linear scenarios).
[0110] Optionally, the default ReLU can be replaced with GELU or Swish to enhance the smoothness and nonlinearity of the function. The simplified formulas are as follows:
[0111] GELU: , is the Gaussian cumulative distribution function.
[0112] Swish: , This is the Sigmoid function.
[0113] Optionally, based on the inspection device ID, historical detection data deviation records, and a preset second rule, a parameter association complexity score for the current optometry data is calculated; the parameter association complexity score is input into a multilayer perceptron for nonlinear transformation to obtain initial weight values; the initial weight values are processed using a sigmoid function to generate final dynamic attention weights; the dynamic attention weights are multiplied by the attention score of each head in the Transformer model's multi-head attention mechanism to calculate a weighted attention score, increasing the weight of the attention head corresponding to parameters with high association strength and decreasing the weight of the attention head corresponding to parameters with low association strength; a weighted sum is performed based on the weighted attention scores to complete the attention calculation for the optometry data, thereby adjusting the Transformer model's attention level to different parameters in the optometry data.
[0114] In some embodiments, the complexity of the associations between different parameters varies when processing optometric data. To make the model more focused on key associations, the weights of the attention heads need to be dynamically adjusted—the more complex and important the association, the higher the weight of the corresponding attention head, allowing the model to prioritize analyzing these associations.
[0115] "Score" is the model's quantification of the complexity of the current parameter association. For example, in the optometry scenario, when analyzing the relationship between "axial length (AL) and equivalent spherical lens (SE)," if historical data shows that the two fluctuate greatly (e.g., AL increases by 0.1mm but SE changes by 0.5D), the model will calculate a "high complexity score."
[0116] As an example, the scoring process for correlation complexity involves combining the device ID with historical data. For instance, in the historical data for device ID "EYE-002", the correlation standard deviation between axial length AL and equivalent spherical lens SE is 0.2D (D represents diopter). In the current test, the fluctuation range of these two values reaches 0.5D. The scoring formula is as follows: .
[0117] It is understood that other scoring formulas can be used based on the correlation logic between parameters, and this embodiment does not impose any restrictions.
[0118] The input to the MLP (Multilayer Perceptron) is the aforementioned "complexity score" (which can be understood as a numerical value representing the degree of association complexity); the output is the initial weight value. Through multilayer linear transformation and nonlinear activation (such as ReLU), the "complexity score" is mapped to a range suitable for Sigmoid processing, making weight adjustment more flexible.
[0119] The formula for the Sigmoid function is: ,in It is the output value of MLP, which compresses any real number into the (0,1) range to facilitate its use as "weight" (the weight needs to be a value between 0 and 1); the non-linear transformation makes the weight's response to the "complexity score" smoother (small changes in the score will not cause the weight to fluctuate drastically).
[0120] The score is mapped to weights by combining MLP with Sigmoid: Assuming the initial output value of the MLP is 3.2 (the specific calculation process will not be detailed in this embodiment), after Sigmoid processing... This means that the attention head weight is increased from the default to 0.96.
[0121] By multiplying the "dynamic attention weight" with the "attention score" originally calculated by the Transformer, the attention of strongly correlated parameters is strengthened, while the weak correlation is weakened.
[0122] For example, Transformer originally calculated the scores of 4 attention heads (which can be understood as the model’s “raw attention” to different parameters): Head 1 (attention axis-equivalent spherical lens association): raw score = 0.6.
[0123] First 2 (focus on intraocular pressure-astigmatism axis correlation): raw score = 0.2.
[0124] First 3 (Focus on corneal curvature-degree correlation): Raw score = 0.5.
[0125] First 4 (Focus on interpupillary distance-axis correlation): Original score = 0.3.
[0126] The current "axial length-equivalent spherical lens" correlation is complex (corresponding to head 1), with a dynamic weight of 0.96. Other heads use the default weight of 0.5. After adjustment: Head 1 weighted score = 0.6 × 0.96 = 0.576.
[0127] The weighted score for the first two points is 0.2 × 0.5 = 0.1.
[0128] The weighted score for the first 3 points is 0.5 × 0.5 = 0.25.
[0129] The weighted score for the first 4 points is 0.3 × 0.5 = 0.15.
[0130] As you can see, the first weight of a strong association is amplified, and the model focuses more on it.
[0131] The weighted scores of all attention heads are summed to obtain the final attention distribution, allowing the model to clearly define which parameters to focus on. For example, the four weighted scores are added together (simplified version, actually a dimensional weighted summation): Total attention score = 0.576 + 0.1 + 0.25 + 0.15 = 1.076 (in practice, normalization is performed to ensure the sum is reasonable).
[0132] In this way, based on this result, Transformer will focus on abnormal correlations between "axial length and equivalent spherical lens" to help identify "refraction errors" or "special changes in the patient's eyes" (such as myopia regression or axial length measurement errors).
[0133] Step S105: Based on the first identification result or the second identification result, output prompt information to the first requesting terminal.
[0134] In some embodiments, the information provided based on the first identification result can clearly identify the deviation parameters, causes, and operational suggestions. For example, the parameters triggering the rule can be directly labeled (e.g., "axial length 24.8mm, exceeding the normal range by 0.6mm"), and the correction logic can be explained in conjunction with the device characteristic rules (e.g., "This device has historically been 0.3mm longer, and after correction, it still exceeds the threshold by 0.3mm"). The trigger type of the associated rule provides the cause (e.g., "parameter exceeds threshold," "systematic device error," "parameter logic contradiction"), for example: "Intraocular pressure of 22mmHg exceeds the upper limit of normal, and the intraocular pressure was abnormal in 2 out of the last 3 tests conducted by this device, which may be due to sensor malfunction." For operational suggestions, it can include, when there is a deviation in key parameters (e.g., intraocular pressure > 21mmHg), prompting "data abnormal, it is recommended to immediately retest with another device to rule out the risk of glaucoma"; when the device characteristic rules are triggered continuously, prompting "the cylindrical power of this optometer is consistently 0.50D higher, it is recommended to schedule a professional calibration."
[0135] Based on the second identification result, when the Transformer model captures subtle correlation anomalies, the prompt information can focus on implicit contradictions and potential risks between parameters. For example, the confidence level of the deviation can be presented in the form of probability (e.g., "The probability of deviation in axial length is 0.68, which may be overestimated by 0.1mm"). This can highlight nonlinear contradictions that the rule engine cannot identify, such as: "Uncorrected visual acuity is 0.8, and corrected visual acuity is 0.8. Although the individual parameters are normal, the correlation probability between the accommodative amplitude and the pupil diameter is only 0.32 (normal > 0.6), indicating an abnormality in implicit accommodative function. It is recommended to have a follow-up refraction test for foggy vision." Alternatively, dynamic warnings can be given by combining time-series data (e.g., "In the last 3 tests, the correlation probability between axial length and refractive error has been consistently > 0.6. Although it has not exceeded the threshold, the increasing trend is abnormal. It is recommended to shorten the follow-up examination cycle").
[0136] Through the above embodiments, the first data is transmitted to a cloud platform (e.g., a server) for deviation identification. The cloud has clustered computing power and dynamic resource allocation capabilities, which can efficiently process complex calculations of optometric data (e.g., deep learning model operations, multi-rule verification), avoiding recognition delays caused by insufficient hardware performance of local devices. It centrally stores historical data across time and devices, and combines the requester ID to achieve global historical deviation analysis and multi-source data cross-validation. It uniformly manages model iteration and rule updates (e.g., adding device error rules, optimizing parameter thresholds), ensuring that all requesters synchronously apply the latest logic. Through centralized computing, global data integration, and dynamic optimization, it solves the bottlenecks of local devices in terms of computing power, data association, and model updates, achieving more efficient and accurate optometric data deviation identification.
[0137] Figure 2 An ophthalmic optometry service platform 200 based on cloud computing is shown. This platform embodiment is similar to... Figure 1 Corresponding to the method embodiments shown, this platform can be specifically applied to various electronic devices.
[0138] like Figure 2 As shown in the embodiment of this application, the cloud-based optometry service platform 200 includes: a first acquisition module 201, used to acquire first data from a first requesting end in real time, the first data including a first requesting end ID and first optometry data related to optometry, wherein the first optometry data includes at least one of refractive state parameters, visual function parameters or ocular biometric parameters.
[0139] The second acquisition module 202 is used to acquire the historical deviation degree of the historical optometry data corresponding to the first requesting terminal based on the first requesting terminal ID.
[0140] The first identification module 203 is used to obtain a first identification result in response to the historical deviation degree being greater than or equal to a first preset threshold. The first identification result includes identification based on a first rule engine to determine whether there is a deviation in the first eye optometry data and the degree of deviation.
[0141] The second identification module 204 is used to obtain a second identification result in response to the historical deviation degree being less than a first preset threshold. The second identification result includes identification based on a first deep learning model to determine whether there is a deviation in the first eye optometry data and the degree of deviation.
[0142] The prompting module 205 is used to output prompting information to the first requesting terminal based on the first identification result or the second identification result.
[0143] Based on the same inventive concept, this application also provides an electronic device. The method corresponding to the electronic device can be the method in the foregoing embodiments, and its problem-solving principle is similar to that method. The electronic device provided in this application includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the methods and / or technical solutions of the foregoing embodiments of this application.
[0144] The electronic device can be a user device, or a device formed by integrating user devices and network devices through a network, or it can be an application running on the aforementioned devices. The user device includes, but is not limited to, various terminal devices such as computers, mobile phones, tablets, smartwatches, and wristbands. The network device includes, but is not limited to, network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, and can be used to implement some processing functions when setting an alarm clock. Here, the cloud consists of a large number of hosts or network servers based on cloud computing. Cloud computing is a type of distributed computing, consisting of a virtual computer composed of a group of loosely coupled computer sets.
[0145] Figure 3The diagram illustrates the structure of an apparatus suitable for implementing the methods and / or technical solutions in the embodiments of this application. The apparatus 300 includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes based on a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage portion 308 into a Random Access Memory (RAM) 303. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.
[0146] The following components are connected to I / O interface 305: an input section 306 including a keyboard, mouse, touchscreen, microphone, infrared sensor, etc.; an output section 307 including a cathode ray tube (CRT), liquid crystal display (LCD), LED display, OLED display, etc., and speakers, etc.; a storage section 308 including one or more computer-readable media such as hard disk, optical disk, magnetic disk, semiconductor memory, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 309 performs communication processing via a network such as the Internet.
[0147] In particular, the methods and / or embodiments in this application can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 301, it performs the functions defined in the methods of this application.
[0148] Another embodiment of this application provides a computer-readable storage medium having computer program instructions stored thereon, which can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of this application described above.
[0149] Specifically, this embodiment may employ any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0150] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0151] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0152] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0153] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0154] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0155] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or page components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0156] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0157] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0158] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
[0160] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
Claims
1. A cloud computing-based method for providing optometry services, characterized in that, include: First data is acquired in real time from a first requesting end, the first data including a first requesting end ID and first optometric data related to optometry diagnosis and treatment, wherein the first optometric data includes at least one of refractive state parameters, visual function parameters, or ocular biometric parameters; based on the first requesting end ID, the historical deviation degree of historical optometric data corresponding to the first requesting end is obtained; in response to the historical deviation degree being greater than or equal to a first preset threshold, a first identification result is obtained, the first identification result including identification based on a first rule engine to determine whether the first optometric data has a deviation and the degree of deviation; in response to the historical deviation degree being less than the first preset threshold, a second identification result is obtained, the second identification result including identification based on a first deep learning model to determine whether the first optometric data has a deviation and the degree of deviation; Based on the first identification result or the second identification result, output a prompt message to the first requesting terminal; The first rule engine includes parameter threshold verification rules, parameter logical association rules, and device characteristic rules; the step of identifying whether there is a deviation and the degree of deviation in the first eye optometry data based on the first rule engine includes inputting the real-time acquired first eye optometry data into the first rule engine; The parameter threshold verification rule is used to compare each parameter in the optometry data with its corresponding normal value range. When a parameter exceeds its corresponding normal value range, it is determined that the parameter has a deviation. The parameter logical association rule is used to determine whether the association between each parameter conforms to the preset logic based on the medical logical relationship between optometry parameters. If it does not conform, it is determined that the relevant parameter has a deviation. The device characteristic rule is used to perform targeted verification on the optometry data corresponding to the device based on the detection accuracy and common error types of the requesting device. If the verification fails, it is determined that there is a deviation. According to the triggered rule, the parameter with deviation, the magnitude of the deviation value, and the number of deviation parameters are determined. The step of identifying whether there is a deviation and the degree of deviation in the first eye optometry data based on the first deep learning model includes preprocessing the real-time acquired first eye optometry data, including grouping and organizing the data by category and normalizing the data. A Transformer model is constructed, and the Transformer model is dynamically adjusted based on the parameter correlation complexity between parameters in the first eye optometry data and trained. The preprocessed first eye optometry data is input into the trained Transformer model to obtain the probability and degree of deviation of each parameter. A probability threshold is set. When the probability of a parameter deviation exceeds the probability threshold, it is determined that the parameter has a slight deviation. The direction and degree of deviation are then determined by combining the estimated value.
2. The method for providing optometry services based on cloud computing according to claim 1, characterized in that, The step of dynamically adjusting the Transformer model based on the parameter association complexity between parameters in the first eye optometry data includes: the parameter association complexity is positively correlated with the number of attention heads of the Transformer model; when there are long-distance dependencies and / or causal temporal relationships between the parameters, future information is masked by causal masking and / or attention to neighboring parameter associations is forced by local sensitivity masking. When the spatial and / or temporal correlation between the parameters is non-uniform, sine and cosine coding and / or learnable coding are selected as the positional coding method according to the correlation characteristics; when the correlation between the parameters is highly nonlinear, the hidden layer dimension of the feedforward neural network is increased, and GELU or Swish is selected as the activation function.
3. The method for providing optometry services based on cloud computing according to claim 1, characterized in that, Also includes: Based on the inspection device ID, historical test data deviation records, and preset second rule, calculate the parameter correlation complexity score of the current optometry data; The parameter association complexity score is input into a multilayer perceptron for nonlinear transformation to obtain initial weight values; the initial weight values are then processed by a sigmoid function to generate the final dynamic attention weights. The dynamic attention weights are multiplied by the attention scores of each head in the multi-head attention mechanism of the Transformer model to calculate the weighted attention score. The weights of the attention heads corresponding to parameters with high correlation strength are increased, and the weights of the attention heads corresponding to parameters with low correlation strength are decreased. The attention scores are then summed to complete the attention calculation of the optometry data, so as to adjust the degree of attention of the Transformer model to different parameters in the optometry data.
4. A cloud-based optometry service platform, characterized in that, include: The first acquisition module is used to acquire first data from the first requesting terminal in real time. The first data includes the first requesting terminal ID and first optometry data related to optometry diagnosis and treatment. The first optometry data includes at least one of refractive state parameters, visual function parameters, or ocular biometric parameters. The second acquisition module is used to acquire the historical deviation degree of the historical optometry data corresponding to the first requesting terminal based on the first requesting terminal ID. The first identification module is used to obtain a first identification result in response to the historical deviation degree being greater than or equal to a first preset threshold. The first identification result includes identification based on a first rule engine to determine whether there is a deviation in the first eye optometry data and the degree of deviation. The second identification module is used to obtain a second identification result in response to the historical deviation degree being less than a first preset threshold. The second identification result includes identification based on a first deep learning model to determine whether there is a deviation in the first eye optometry data and the degree of deviation. The prompting module is used to output prompting information to the first requesting terminal based on the first identification result or the second identification result; The first rule engine includes parameter threshold verification rules, parameter logical association rules, and device characteristic rules; the step of identifying whether there is a deviation and the degree of deviation in the first eye optometry data based on the first rule engine includes inputting the real-time acquired first eye optometry data into the first rule engine; The parameter threshold verification rule is used to compare each parameter in the optometry data with its corresponding normal value range. When a parameter exceeds its corresponding normal value range, it is determined that the parameter has a deviation. The parameter logical association rule is used to determine whether the association between each parameter conforms to the preset logic based on the medical logical relationship between optometry parameters. If it does not conform, it is determined that the relevant parameter has a deviation. The device characteristic rule is used to perform targeted verification on the optometry data corresponding to the device based on the detection accuracy and common error types of the requesting device. If the verification fails, it is determined that there is a deviation. According to the triggered rule, the parameter with deviation, the magnitude of the deviation value, and the number of deviation parameters are determined. The step of identifying whether there is a deviation and the degree of deviation in the first eye optometry data based on the first deep learning model includes preprocessing the real-time acquired first eye optometry data, including grouping and organizing the data by category and normalizing the data. A Transformer model is constructed, and the Transformer model is dynamically adjusted based on the parameter correlation complexity between parameters in the first eye optometry data and trained. The preprocessed first eye optometry data is input into the trained Transformer model to obtain the probability and degree of deviation of each parameter. A probability threshold is set. When the probability of a parameter deviation exceeds the probability threshold, it is determined that the parameter has a slight deviation. The direction and degree of deviation are then determined by combining the estimated value.
5. An electronic device, the electronic device comprising: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, characterized in that: the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3.
6. A computer-readable medium storing computer program instructions thereon, characterized in that: The computer program instructions can be executed by a processor to implement the method as described in any one of claims 1-3.
7. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, it implements the method as described in any one of claims 1-3.
Citation Information
Patent Citations
Deep learning-based teenager myopia prediction method and model
CN117059269A
Ophthalmology information extraction system based on electronic medical record
CN119626573A