Thermal hydraulic formula identification method, device and system

By segmenting and combining images of thermal hydraulic formulas, and using a preset library to identify characters and symbols in the thermal hydraulic formulas, the accuracy problem of OCR technology in recognizing thermal hydraulic formulas is solved, achieving highly accurate recognition and automatic code generation.

CN121884358APending Publication Date: 2026-04-17STATE POWER INVESTMENT CORPORATION RESEARCH INSTITUTE +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE POWER INVESTMENT CORPORATION RESEARCH INSTITUTE
Filing Date
2024-10-10
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing OCR technology has difficulty accurately recognizing mathematical and physical symbols in thermal hydraulic formulas, resulting in poor recognition accuracy and failing to meet practical needs.

Method used

By segmenting the image of thermal hydraulic formulas, identifying the characters in each sub-image, and combining them based on the location coordinates, width, and height values, and using a pre-set thermal hydraulic string library and symbol library, the operators are given corresponding computational meaning information to obtain accurate recognition results.

Benefits of technology

It improves the accuracy of thermal hydraulic formula identification, meets the requirements for accurate identification of mathematical formulas, and can generate numerical calculation code while reducing the cost of manual code writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121884358A_ABST
    Figure CN121884358A_ABST
Patent Text Reader

Abstract

The invention relates to a thermal hydraulic formula identification method, device and system, and relates to the technical field of image identification. The method comprises the following steps: carrying out segmentation processing on a thermal hydraulic formula image to be identified to obtain sub-images; identifying characters in each sub-image to obtain a first identification result corresponding to each sub-image; based on the position area coordinates, the width value and the height value, combining the first identification results with the incidence relation to obtain a first character string; selecting at least one first target symbol in the plurality of first recognition results; according to the position area coordinate of the first target symbol, performing area division on the thermal hydraulic formula image to obtain at least one subarea; and according to the first target symbol and the partition corresponding to the first target symbol, endowing the first target symbol and at least one partition corresponding to the first target symbol with corresponding operation significance information, and obtaining a thermal hydraulic formula identification result. According to the scheme, the accuracy of a formula identification result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image recognition technology, and in particular to a method, apparatus and system for recognizing thermal hydraulic formulas. Background Technology

[0002] In related technologies, in order to convert theoretical formulas and numerical calculation formulas in manuals and documents in the field of thermal hydraulics into an editable form, it is usually necessary to use OCR (Optical Character Recognition) technology to recognize the images and obtain recognition results. However, since thermal hydraulic formulas contain a large number of mathematical and physical symbols, and the information implied in the formulas, such as numerators and denominators, cannot be reflected in the OCR recognition results, the recognition accuracy of the above-mentioned recognition methods is poor and it is difficult to meet practical needs. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides a method, apparatus and system for identifying thermal hydraulic formulas.

[0004] According to a first aspect of the present disclosure, a method for identifying thermal hydraulic formulas is provided, comprising:

[0005] The thermal hydraulic formula image to be identified is segmented to obtain sub-images including individual characters, and attribute information of each sub-image in the thermal hydraulic formula image; the attribute information includes the position coordinates, width value, and height value of the sub-image.

[0006] Identify the characters in each sub-image and obtain the first identification result for each sub-image;

[0007] Based on the location region coordinates, width value, and height value, the first recognition results that have a correlation are combined to obtain multiple combinations of their respective first strings; the first strings exist in a preset thermal hydraulic string library; the thermal hydraulic string library includes strings related to formulas in the field of thermal hydraulics; the sub-images corresponding to the multiple first recognition results are adjacent in position;

[0008] Select at least one first target symbol from a plurality of first recognition results; the first target symbol is an operator or a relation symbol.

[0009] For each first target symbol, the thermal-hydraulic formula image is divided into regions according to the location region coordinates of the first target symbol to obtain at least one partition; each partition includes at least one first string;

[0010] For each first target symbol, based on the first target symbol and the partition corresponding to the first target symbol, corresponding operational meaning information is assigned to the first target symbol and at least one partition corresponding to the first target symbol, thereby obtaining the thermal hydraulic formula recognition result.

[0011] In some embodiments of this disclosure, the step of identifying characters in each sub-image to obtain a first identification result corresponding to each sub-image includes:

[0012] For each sub-image, the characters in the sub-image are identified, resulting in multiple candidate recognition results;

[0013] For each of the multiple candidate recognition results, the recognition result is matched with the metacharacters in the preset thermal hydraulic metacharacter library to obtain a similarity value;

[0014] The recognition result corresponding to the maximum value among multiple similarity values ​​is selected as the first recognition result.

[0015] In some embodiments of this disclosure, the first identification results that have a correlation are combined based on location region coordinates, width value, and height value to obtain multiple first strings corresponding to each combination, including:

[0016] For the i-th sub-image, if the (i+1)-th sub-image satisfies the first preset condition and i+1 is less than or equal to N, the character corresponding to the i-th sub-image is combined with the character corresponding to the (i+1)-th sub-image to obtain a combined string; i is any integer greater than 0 and less than N; N is the total number of sub-images;

[0017] Determine whether a second string matching the combined string exists in a preset thermal hydraulic string library;

[0018] If the second string does not exist in the thermal hydraulic string library, the i-th sub-image is concatenated with the (i+1)-th sub-image to obtain a new i-th sub-image. The combined string is used as the new i-th sub-image. The process then returns to the step of combining the characters corresponding to the i-th sub-image with the characters corresponding to the (i+1)-th sub-image to obtain the first string when the (i+1)-th sub-image satisfies the first preset condition and i+1 is less than or equal to N. This process continues until it is determined that the second string exists in the thermal hydraulic string library.

[0019] If the second string exists in the thermal hydraulic string library, the combined string is used as the first string, and it is determined whether i+1 is less than N. If i+1 is less than N, i is assigned the value i+2, and the process returns to the step of combining the character corresponding to the i-th sub-image with the character corresponding to the i+1 sub-image to obtain the combined string when the i+1 sub-image satisfies the first preset condition and i+1 is less than or equal to N, until it is determined that i+1 is equal to N.

[0020] In some embodiments of this disclosure, the method further includes:

[0021] Determine whether the (i+1)th sub-image satisfies a first preset condition; the first preset condition includes that the positional region coordinates of the i-th sub-image and the (i+1)-th sub-image are adjacent, and the difference between the height value of the i-th sub-image and the height value of the (i+1)-th sub-image is less than a preset threshold.

[0022] In some embodiments of this disclosure, the step of dividing the thermo-hydraulic formula image into multiple partitions according to the positional region coordinates of the first target symbol for each first target symbol includes:

[0023] Determine the partition level corresponding to each first target symbol;

[0024] The first sorting is determined based on the partition level;

[0025] According to the first sorting, the current symbol is determined from the at least one first target symbol. Using a partitioning method that matches the partitioning level corresponding to the current symbol, the image region within the neighborhood of the current symbol is divided into regions to obtain at least one partition corresponding to the current symbol, until the neighborhood of each first target symbol has been divided into regions.

[0026] In some embodiments of this disclosure, the method further includes:

[0027] Using the location region coordinates of each sub-image, determine whether there are at least two sub-images with overlapping location region coordinates;

[0028] In the case of at least two sub-images with overlapping location coordinates, the at least two sub-images are merged to obtain a new sub-image.

[0029] In some embodiments of this disclosure, assigning corresponding computational meaning information to the first target symbol and at least one partition corresponding to the first target symbol based on the first target symbol and the partition corresponding to the first target symbol includes:

[0030] In cases where the first target symbol has multiple meanings, at least one target region associated with the first target symbol is determined based on the first target symbol and its attribute information.

[0031] For each target region in at least one target region, determine the positional relationship between the target region and the positional region coordinates of the first target symbol to obtain at least one positional relationship;

[0032] For each target region in at least one target region, identify whether a second target character exists within the target region to obtain a second identification result;

[0033] Based on the at least one positional relationship and the second identification result, the meaning of the first target symbol is determined;

[0034] Based on the meaning of the first target symbol and the partition corresponding to the first target symbol, assign corresponding operational meaning information to the first target symbol and at least one partition corresponding to the first target symbol.

[0035] According to a second aspect of the present disclosure, a thermal hydraulic formula identification device is provided, comprising:

[0036] The segmentation unit is used to segment the image of the thermal hydraulic formula to be identified, and obtain sub-images including a single character, and attribute information of each sub-image in the thermal hydraulic formula image; the attribute information includes the position region coordinates, width value and height value of the sub-image;

[0037] The recognition unit is used to recognize the characters in each sub-image and obtain the first recognition result corresponding to each sub-image;

[0038] A combination unit is used to combine first recognition results that have a correlation based on location region coordinates, width value, and height value to obtain multiple first strings corresponding to each combination; the first strings exist in a preset thermal hydraulic string library; the thermal hydraulic string library includes strings related to formulas in the field of thermal hydraulics; the sub-images corresponding to the multiple first recognition results are adjacent in position;

[0039] A selection unit is used to select at least one first target symbol from a plurality of first recognition results; the first target symbol is an operator or a relation symbol.

[0040] A partitioning unit is used to divide the thermal-hydraulic formula image into regions according to the positional region coordinates of the first target symbol for each first target symbol, thereby obtaining at least one partition; each partition includes at least one first string;

[0041] The assignment unit is used to assign corresponding operational meaning information to each first target symbol and at least one partition corresponding to the first target symbol, based on the first target symbol and the partition corresponding to the first target symbol, to obtain the thermal hydraulic formula recognition result.

[0042] According to a third aspect of the present disclosure, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of the first aspects.

[0043] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of the first aspects.

[0044] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method as described in any one of the first aspects.

[0045] The technical solution provided by the embodiments of this disclosure can include the following beneficial effects: By segmenting the image of the thermal hydraulic formula to be identified, sub-images including single characters and attribute information of each sub-image in the thermal hydraulic formula image are obtained; characters in each sub-image are identified to obtain a first identification result corresponding to each sub-image; based on positional region coordinates, width value, and height value, the first identification results with correlation are combined to obtain multiple combinations of corresponding first strings; the first strings exist in a preset thermal hydraulic string library; at least one first target symbol is selected from the multiple first identification results; for each first target symbol, the thermal hydraulic formula image is divided into regions according to the positional region coordinates of the first target symbol to obtain at least one partition; for each first target symbol, based on the first target symbol and the partition corresponding to the first target symbol, corresponding computational meaning information is assigned to the first target symbol and the at least one partition corresponding to the first target symbol to obtain the thermal hydraulic formula identification result. By using a preset thermal hydraulic string library to identify characters involved in thermal hydraulic formulas, characters related to the thermal hydraulic field can be accurately identified, improving the accuracy of formula identification results and meeting the need for accurate identification of mathematical formulas in thermal hydraulic formula images.

[0046] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

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

[0048] Figure 1 This is a flowchart illustrating a method for identifying thermal hydraulic formulas according to an exemplary embodiment.

[0049] Figure 2 This is a schematic diagram of a typical thermal-hydraulic formula shown in an embodiment of this disclosure.

[0050] Figure 3 This is a block diagram illustrating a thermal hydraulic formula identification device according to an exemplary embodiment.

[0051] Figure 4 This is a block diagram illustrating an apparatus for a thermal hydraulic formula identification method according to an exemplary embodiment. Detailed Implementation

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

[0053] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. The singular forms “a” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0054] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of embodiments of this disclosure, and similarly, second information may also be referred to as first information. Depending on the context, the words “if” and “suppose” as used herein may be interpreted as “when”, “when”, or “in response to a determination”.

[0055] Furthermore, various forms of processes shown in the embodiments of this disclosure can be used to reorder, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and no limitation is imposed herein.

[0056] In related technologies, in order to convert theoretical formulas and numerical calculation formulas in manuals and documents in the field of thermal hydraulics into an editable form, it is usually necessary to use OCR (Optical Character Recognition) technology to recognize the images and obtain recognition results. However, since thermal hydraulic formulas contain a large number of mathematical and physical symbols, and the information implied in the formulas, such as numerators and denominators, cannot be reflected in the OCR recognition results, the recognition accuracy of the above-mentioned recognition methods is poor and it is difficult to meet practical needs.

[0057] To address the aforementioned problems, this disclosure provides a method, apparatus, and system for recognizing thermal hydraulic formulas. The method involves segmenting an image of a thermal hydraulic formula to be recognized, obtaining sub-images including individual characters and attribute information for each sub-image within the thermal hydraulic formula image; recognizing characters in each sub-image to obtain a first recognition result corresponding to each sub-image; combining related first recognition results based on location coordinates, width, and height to obtain multiple combinations of corresponding first strings; the first strings are stored in a preset thermal hydraulic string library; selecting at least one first target symbol from the multiple first recognition results; for each first target symbol, dividing the thermal hydraulic formula image into regions according to its location coordinates to obtain at least one partition; and assigning corresponding computational meaning information to each first target symbol and its corresponding partition, thereby obtaining the thermal hydraulic formula recognition result. By utilizing a pre-defined thermal hydraulic string library to identify characters involved in thermal hydraulic formulas, relevant characters in the field of thermal hydraulics can be accurately identified, improving the accuracy of formula recognition results and meeting the need for accurate recognition of mathematical formulas in thermal hydraulic formula images.

[0058] Figure 1 This is a flowchart illustrating a method for identifying thermal hydraulic formulas according to an exemplary embodiment, such as... Figure 1 As shown, it should be noted that the thermal hydraulic formula recognition method of this disclosure is applied in a thermal hydraulic formula recognition device. For example... Figure 1 As shown, the method may include the following steps:

[0059] Step 101: The thermal hydraulic formula image to be identified is segmented to obtain sub-images including individual characters and attribute information of each sub-image in the thermal hydraulic formula image.

[0060] The attribute information includes the location coordinates of the sub-image region, its width value, and its height value.

[0061] As an example, images containing thermal hydraulic formulas, i.e., images of the thermal hydraulic formulas to be identified, can be obtained in advance. These images can be obtained by photographing or scanning manuals or documents in the field of thermal hydraulics. For example, common thermal hydraulic formulas include... Figure 2 As shown.

[0062] In some embodiments of this disclosure, the thermal hydraulic formula image can be converted into a grayscale image, the entire grayscale image can be scanned, and a region containing a continuous stroke can be identified based on the continuity of the grayscale values ​​of the image. The region containing the continuous stroke is divided into a rectangular region, thereby obtaining a sub-image containing only a single character, as well as the position region coordinates of the sub-image in the thermal hydraulic formula image, and the height value of the sub-image.

[0063] In one embodiment, the width value of the sub-image can also be obtained based on the coordinates of the location region.

[0064] For example, the attribute information may include (x, y, w, h), where x is the x-coordinate of the top-left corner of the sub-image, y is the y-coordinate of the top-left corner of the sub-image, w is the width of the sub-image, and h is the height of the sub-image.

[0065] Step 102: Identify the characters in each sub-image to obtain the first identification result corresponding to each sub-image.

[0066] In one embodiment, optical character recognition (OCR) technology can be used to identify characters in each sub-image.

[0067] In some embodiments of this disclosure, step 102 may specifically include the following steps:

[0068] Step a1: For each sub-image, identify the characters in the sub-image to obtain multiple candidate recognition results.

[0069] Understandably, because the results of OCR technology are not accurate enough, it may not be able to accurately identify special characters in the field of thermal hydraulics. Therefore, multiple possible candidate recognition results can be identified.

[0070] Step a2: For each candidate recognition result among multiple candidate recognition results, perform similarity matching between the recognition result and the metacharacters in the preset thermal hydraulic metacharacter library to obtain a similarity value.

[0071] In one embodiment, OCR technology can be used to perform similarity matching between multiple candidate recognition results and metacharacters in a preset thermal hydraulic metacharacter library to obtain similarity values.

[0072] As an example, a thermal hydraulic metacharacter library may include the following types of characters:

[0073] All uppercase and lowercase English letters, numbers from 0 to 9;

[0074] Lowercase Greek letters π, α, δ, ε, θ, ρ, σ, φ, λ, μ, ξ, τ;

[0075] Uppercase Greek letters Γ, Δ, Σ;

[0076] Common Chinese characters in thermohydraulic formulas: water, force, liquid, gas, phase, droplet;

[0077] Common operators and relational operators such as +, -, *, ·, / , -, =, etc.;

[0078] Special operators: absolute value symbol |, partial differential symbol Gradient operation etc.;

[0079] Special characters: (, ), [, ], {,}, ’, etc.

[0080] In one embodiment, new characters can be added to the thermohydraulic character library according to actual needs.

[0081] Step a3, select the recognition result corresponding to the maximum value among multiple similarity values as the first recognition result.

[0082] It can be understood that selecting the recognition result with the highest degree of similarity as the first recognition result, that is, as the recognition result of the above sub-image, can effectively improve the accuracy of the recognition result.

[0083] In some embodiments of the present disclosure, before step 102, the following steps may further be included:

[0084] Step b1, use the position area coordinates of each sub-image to determine whether there are at least two sub-images with overlapping position area coordinates.

[0085] It can be understood that since the segmentation process identifies the area of a continuous stroke based on the continuity of the grayscale values of the image, for some Chinese characters in the formulas in the thermohydraulic field, parts of the same character that are not continuous may be segmented into different sub-images. For example, for the character "phase", it may be segmented into two rectangular sub-images on the left and right. However, since the distances between multiple parts of the same character in this case are relatively close, the position area coordinates of the segmented sub-images will overlap.

[0086] Therefore, it can be identified whether there are at least two sub-images with overlapping position area coordinates to determine whether there is a segmentation error.

[0087] Step b2: In the case of at least two sub-images with overlapping location coordinates, merge the at least two sub-images to obtain a new sub-image.

[0088] In one embodiment, if there are at least two sub-images with overlapping location region coordinates, the at least two sub-images are merged according to their location region coordinates to obtain a new sub-image.

[0089] Step 103: Based on the location region coordinates, width value, and height value, combine the first identification results that have a correlation to obtain the first string corresponding to each of the multiple combinations.

[0090] The first string exists in a preset thermal hydraulic string library; the thermal hydraulic string library includes strings associated with formulas in the field of thermal hydraulics; and the sub-images corresponding to multiple first recognition results are located adjacent to each other.

[0091] In one embodiment, the thermal hydraulic string library may include the following types of strings:

[0092] Mathematical operation strings such as abs, cos, cot, exp, ln, max, min, sin, tan, etc.;

[0093] CHF, CV, DNB, DNBR, Nu, Pr, Re, clad, fuel, gap, ht, htc, hyd, im, in, ip, jm, jp, jun, nb, sat, surf, turb, etc. are proprietary English strings related to thermal hydraulics.

[0094] Common Chinese terms used in thermal hydraulic formulas include: hydraulic, liquid phase, gas phase, and droplet.

[0095] Combinations of special characters such as "".

[0096] In one embodiment, new strings can be added to the thermal hydraulic string library according to actual needs.

[0097] In some embodiments of this disclosure, step 103 may specifically include the following steps:

[0098] Step c1: For the i-th sub-image, if the (i+1)-th sub-image satisfies the first preset condition and i+1 is less than or equal to N, combine the character corresponding to the i-th sub-image with the character corresponding to the (i+1)-th sub-image to obtain a combined string.

[0099] Where i is any integer greater than 0 and less than N; N is the total number of sub-images.

[0100] It should be noted that the sub-images can be ordered from left to right and from top to bottom.

[0101] In one embodiment, starting from the first sub-image, it is determined whether the second sub-image adjacent to the first sub-image satisfies a first preset condition. The first preset condition is used to determine whether the characters in the second sub-image belong to the same string as the characters in the first sub-image. If the first preset condition is satisfied, the characters corresponding to the first sub-image are combined with the characters corresponding to the second sub-image to obtain a combined string.

[0102] It is understandable that since there are multiple strings in the thermal hydraulic formula graph, and the first character of each string can be i, i can be 1 or the i-th sub-graph is preceded by a complete string.

[0103] In some embodiments of this disclosure, the following steps may be included prior to step c1:

[0104] Determine whether the (i+1)th sub-image satisfies the first preset condition; the first preset condition includes that the positional region coordinates of the i-th sub-image and the (i+1)th sub-image are adjacent, and the difference between the height value of the i-th sub-image and the height value of the (i+1)th sub-image is less than a preset threshold.

[0105] For example, when the sub-image is rectangular, the right boundary of the i-th sub-image is adjacent to the left boundary of the (i+1)-th sub-image. In addition, since there may be some errors in the segmentation process, or the height of the characters in the sub-images may be slightly different, the difference between the height value of the i-th sub-image and the height value of the (i+1)-th sub-image is required to be less than a preset threshold.

[0106] Step c2: Determine whether a second string that matches the combined string exists in the preset thermal hydraulic string library.

[0107] In one embodiment, the second string can be compared with each string in the thermal hydraulic string library to calculate the similarity. The maximum similarity value is compared with a preset threshold. If the maximum similarity value is greater than or equal to the preset threshold, it is determined that there is a second string in the preset thermal hydraulic string library that matches the combined string.

[0108] Step c3: If the second string does not exist in the thermal hydraulic string library, concatenate the i-th sub-image with the (i+1)-th sub-image to obtain a new i-th sub-image. Use the combined string as the new i-th sub-image. Return to the step of combining the characters corresponding to the i-th sub-image with the characters corresponding to the (i+1)-th sub-image to obtain the first string if the (i+1)-th sub-image satisfies the first preset condition and i+1 is less than or equal to N. Continue until it is determined that the second string exists in the thermal hydraulic string library.

[0109] Step c4: If a second string exists in the thermal hydraulic string library, use the combined string as the first string, and determine whether i+1 is less than N. If i+1 is less than N, assign i to i+2, and return to execute step c1 until it is determined that i+1 equals N.

[0110] If a second string exists in the thermal hydraulic string library, it means that all characters of the current string have already been combined. Therefore, this combined string is used as the first string. At this point, it needs to be determined whether i+1 is less than N. If i+1 is less than N, it means there are still characters that need to be combined. Therefore, the (i+2)th character is used as the new i-th character, i.e., i is assigned the value i+2, and the process returns to step c1. This continues until i+1 is determined to equal N, completing the combination of all characters.

[0111] Step 104: Select at least one first target symbol from multiple first recognition results.

[0112] The first target symbol is an operator or a relation symbol.

[0113] It is understandable that mathematical symbols include quantitative symbols, operational symbols, or relational symbols. Operational symbols and relational symbols can be used to divide the region of the thermal hydraulic formula image (i.e., multiple sub-images).

[0114] For example, quantity symbols include i, a, x, the base of the natural logarithm e, pi π, etc.; operation symbols include +, -, ×, ÷, ratio :, differential dx, etc.; relational symbols include =, ≈, >, <, etc.

[0115] Step 105: For each first target symbol, divide the thermal-hydraulic formula image into regions according to the location coordinates of the first target symbol to obtain at least one partition.

[0116] Each partition includes at least one first string.

[0117] In some embodiments of this disclosure, step 105 may specifically include the following steps:

[0118] Step d1: Determine the partition level corresponding to each first target symbol.

[0119] Step d2: Determine the first sort based on the partition level.

[0120] Step d3: Determine the current symbol from at least one first target symbol according to the first sorting, and use the partitioning method matching the partitioning level corresponding to the current symbol to partition the image area within the neighborhood range of the current symbol to obtain at least one partition corresponding to the current symbol until the area partitioning of the neighborhood range of each first target symbol is completed.

[0121] For example, the attribute information of the sub-image is (text, x, y, w, h), where text is the character in the sub-image, x is the abscissa of the upper left fixed point of the sub-image, y is the ordinate of the upper left fixed point of the sub-image, w is the width of the sub-image, and h is the height of the sub-image. The partitioning methods corresponding to the partitioning levels may include the following five types:

[0122] Partitioning of the first-level area: For all elements composed of rectangles (i.e., characters), search whether the "=" character exists in its text attribute; for the case where the search result is true, use the x attribute value x0 corresponding to the found "=" character as the dividing line, and divide all characters except "=" into two first-level areas of x>x0 and x<x0;

[0123] Partitioning of the second-level area: Use the above method for partitioning the first-level area to search whether the "+" or "-" character exists in the text attribute of the elements composed of rectangles in the first-level area respectively to obtain candidates for the second-level area; for each candidate for the second-level area, search whether the single parentheses "( )", "[", or "]", "{ " or "}" characters exist in its text attribute, and classify those without parentheses or with parentheses in pairs as the second-level area;

[0124] Partitioning of the third-level area: Use the above method for partitioning the first-level area to search whether the " / " or "-" character exists in the text attribute of the elements composed of rectangles in the first-level area respectively, and classify the numerator and denominator of the division sign as the third-level area;

[0125] Partitioning of the fourth-level area: For all elements composed of rectangles, compare the x attributes of adjacent rectangles. If the x attribute value of the latter element shows a significant increase or decrease relative to the x attribute value of the current element, after excluding the reasons caused by case sensitivity, classify the subsequent elements as the superscript or subscript of the current element.

[0126] In one embodiment, the partitioning levels corresponding to the following symbols can also be determined as strongly classified areas:

[0127] For characters such as parentheses "( )", "[", or "]", "{ " or "}", absolute value character "|", etc., the paired symbols and all elements in the middle form a separate strongly classified area;

[0128] For the differential symbol d or The characters form a strongly hierarchical region as a whole;

[0129] For strings combined into mathematical operation strings (e.g.)

[0130] Elements of abs, cos, cot, exp, ln, max, min, sin, tan are divided into a strongly hierarchical region.

[0131] As an example of a possible implementation, the first target symbols can be sorted according to their partition level to obtain a first sort. Then, for the corresponding first target symbols, partitioning can be performed according to the partitioning method corresponding to their partition level.

[0132] Step 106: For each first target symbol, based on the first target symbol and the partition corresponding to the first target symbol, assign corresponding operational meaning information to the first target symbol and at least one partition corresponding to the first target symbol to obtain the thermal hydraulic formula recognition result.

[0133] It should be noted that there are two ways to divide the image: horizontal and vertical. For example, for symbols like "=", "+", "-", or "|", as well as mathematical operation strings, the image needs to be divided horizontally, that is, the regions on the left and right sides of the character. For symbols like " / ", "-", "d", or "|", the image needs to be divided horizontally, that is, the regions on the left and right sides of the character. For images that are determined to be superscripts or subscripts, the image needs to be divided vertically. The first target symbol of the horizontal division method and at least one partition corresponding to the first target symbol can be assigned corresponding horizontal operation meaning information, and the first target symbol of the vertical division method and at least one partition corresponding to the first target symbol can be assigned corresponding vertical operation meaning information.

[0134] In some embodiments of this application, step 106 may specifically include the following steps:

[0135] Step e1: In the case that the first target symbol has multiple meanings, determine at least one target region associated with the first target symbol based on the first target symbol and its attribute information.

[0136] It is understandable that some symbols have multiple meanings. For example, "-" can mean a minus sign, a division sign, or an average sign. The positional relationship of "-" with other adjacent characters in the formula is different depending on the meaning of "-". For example, there are no characters above or below the minus sign, while there are characters in the adjacent areas above and below the division sign, and there are characters in the adjacent area below the average sign.

[0137] Therefore, based on the first symbol and its attribute information, at least one target region associated with the first target symbol can be determined, and the actual meaning of the first target symbol can be judged through the target region.

[0138] Step e2: For each target region in at least one target region, determine the positional relationship between the target region and the positional region coordinates of the first target symbol, and obtain at least one positional relationship.

[0139] In one embodiment, the positional relationship between each target region and the positional coordinates of the first target symbol is determined to obtain the positional relationship corresponding to each target region.

[0140] Step e3: For each target region in at least one target region, identify whether a second target character exists within the target region to obtain a second identification result.

[0141] Step e4: Determine the meaning of the first target symbol based on at least one positional relationship and the second identification result.

[0142] Understandably, in order to accurately determine the actual meaning of the first target character, it is necessary not only to determine the relative positional relationship between the first target character and the target area, but also to identify which characters are in the neighboring domain, and to comprehensively determine the actual meaning of the first target character by combining the characters and their relative positional relationships.

[0143] For example, the symbol "d" can be an English character or a differentiation symbol. When "d" is the numerator and the first character of the denominator is also "d", or when "d" is the denominator and the first character of the numerator is also "d", it can be determined that the actual meaning of "d" is a differentiation symbol. In other cases, "d" is an English character.

[0144] Step e5: Based on the meaning of the first target symbol and the partition corresponding to the first target symbol, assign corresponding operational meaning information to the first target symbol and at least one partition corresponding to the first target symbol.

[0145] In one example, the text attribute of an element with the value "*" can be interpreted as either an asterisk or a multiplication sign: the character corresponding to "*" is the i-th element, and the index of the next element is i+1. If the i+1 element is empty, then "*" is considered an asterisk; otherwise, it is a multiplication sign.

[0146] In one example, the text attribute of an element with "'" can be interpreted as a comma, a single quote, or an apostrophe: the element corresponding to "'" is the i-th element, and the index of the next element is i+1. If the i+1 element is empty, it is interpreted as an asterisk; otherwise, it is interpreted as a multiplication sign.

[0147] In one example, the text attribute of an element being "." can be resolved to a decimal point or a multiplication sign: the element corresponding to "." is the i-th element, and the index of the previous element is i-1. If there are... Then it is considered the decimal point; otherwise, it is a multiplication sign. Here, y i-1 and y i The ordinates of the (i-1)th and ith elements are h, respectively. i-1 The height value of the rectangle corresponding to the (i-1)th element, and the set threshold of 0.6, can be adjusted according to the actual situation.

[0148] In one example, the text attribute "-" for an element can be interpreted as a minus sign, a division sign, or an averaging symbol: taking the element corresponding to "-" as the i-th element, we examine whether the rectangular regions (x,y-nw,w,nw) and (x,y+nw,w,nw) intersect with the rectangle corresponding to the i-th element. If both intersect with the i-th rectangle, it is considered a division sign; if only (x,y+nw,w,nw) intersects with the i-th rectangle, it is considered an averaging symbol; if neither intersects with the i-th rectangle, it is considered a minus sign. Here, x and y are the x and y coordinates of the i-th element, respectively, and nw is n times the width of the rectangle corresponding to the i-th element. The coefficient n set here can be adjusted according to the actual situation.

[0149] In one example, the attribute "d" for an element can be interpreted as a lowercase letter "d" or a derivative symbol: Taking the element corresponding to "d" as the i-th element, determine if the rectangular regions of the (x,y-nw,w,h) and (x,y+nw,w,h) regions intersect with the rectangle corresponding to the i-th element; if only the (x,y-nw,nw,h) region intersects with the i-th rectangle, and the metacharacter at the bottom of the (x,y-nw,w,h) region is "-", revert to the division sign region processing. Here, the i-th element corresponds to the first element in the denominator. The element "d" is identified by region division. If the first character of the numerator is "d", it is interpreted as the derivative symbol; otherwise, it is interpreted as the lowercase English letter "d". If only the region (x,y+nw,w,h) intersects with the i-th rectangle, and the top metacharacter of the region (x,y+nw,w,h) is identified as "-", we revert to the region division process for the division sign. Here, the i-th element corresponds to the first element "d" in the numerator. If the first character of the denominator is "d", it is interpreted as the derivative symbol; otherwise, it is interpreted as the lowercase English letter "d".

[0150] In some embodiments of this disclosure, the thermal hydraulic formula recognition results can be output and displayed on the display module of the terminal device.

[0151] In some embodiments of this disclosure, if the thermal hydraulic formula identification result displayed by the user through the terminal device is incorrect, the identification result can be revised through the terminal device.

[0152] In some embodiments of this disclosure, after obtaining the thermal hydraulic formula identification result, the numerical calculation code of the thermal hydraulic formula can be generated according to certain preset rules, thereby establishing an automatic implementation process from formula (including initial conditions) to code, reducing the personnel cost and heavy workload of manual code writing, and also avoiding code errors caused by human factors.

[0153] Understandably, the results of thermal hydraulic formula recognition can be imported into symbol interpretation software such as Mathematica, Matlab, and Sympy for symbolic computation, allowing computers to derive thermal hydraulic formulas, perform integration, differentiation, and solve systems of equations.

[0154] According to the thermal hydraulic formula recognition method proposed in this embodiment, the thermal hydraulic formula image to be recognized is segmented to obtain sub-images including single characters and attribute information of each sub-image in the thermal hydraulic formula image; the characters in each sub-image are recognized to obtain a first recognition result corresponding to each sub-image; based on the position region coordinates, width value, and height value, the first recognition results with correlation are combined to obtain multiple combinations of first strings corresponding to each combination; the first strings exist in a preset thermal hydraulic string library; at least one first target symbol is selected from the multiple first recognition results; for each first target symbol, the thermal hydraulic formula image is divided into regions according to the position region coordinates of the first target symbol to obtain at least one partition; for each first target symbol, according to the first target symbol and the partition corresponding to the first target symbol, corresponding computational meaning information is assigned to the first target symbol and the at least one partition corresponding to the first target symbol to obtain the thermal hydraulic formula recognition result. By utilizing a pre-defined thermal hydraulic string library to identify characters involved in thermal hydraulic formulas, relevant characters in the field of thermal hydraulics can be accurately identified, improving the accuracy of formula recognition results and meeting the need for accurate recognition of mathematical formulas in thermal hydraulic formula images.

[0155] Figure 3 This is a block diagram illustrating a thermal hydraulic formula identification device according to an exemplary embodiment. (Refer to...) Figure 3 The device includes a segmentation unit 301, an identification unit 302, a combination unit 303, a selection unit 304, a division unit 305, and an assignment unit 306.

[0156] The segmentation unit 301 is used to segment the thermal hydraulic formula image to be identified, and obtain sub-images including a single character, as well as attribute information of each sub-image in the thermal hydraulic formula image; the attribute information includes the location coordinates, width value and height value of the sub-image.

[0157] The recognition unit 302 is used to recognize the characters in each sub-image and obtain the first recognition result corresponding to each sub-image;

[0158] The combination unit 303 is used to identify characters in each sub-image and obtain a first recognition result corresponding to each sub-image; it is used to combine the first recognition results that have a relationship based on the location region coordinates, width value and height value to obtain a first string corresponding to each combination; the first string exists in a preset thermal hydraulic string library; the thermal hydraulic string library includes strings related to formulas in the field of thermal hydraulics; the sub-images corresponding to multiple first recognition results are adjacent in position;

[0159] The selection unit 304 is used to select at least one first target symbol from a plurality of first recognition results; the first target symbol is an operator or a relation symbol.

[0160] The partitioning unit 305 is used to divide the thermal-hydraulic formula image into regions according to the position region coordinates of the first target symbol for each first target symbol, thereby obtaining at least one partition; each partition includes at least one first string;

[0161] The assignment unit 306 is used to assign corresponding operational meaning information to each first target symbol and at least one partition corresponding to the first target symbol, based on the first target symbol and the partition corresponding to the first target symbol, to obtain the thermal hydraulic formula recognition result.

[0162] In some embodiments of this disclosure, the identification unit 302 may specifically be used for:

[0163] For each sub-image, the characters in the sub-image are identified, resulting in multiple candidate recognition results;

[0164] For each candidate recognition result among multiple candidate recognition results, the recognition result is matched with the metacharacters in the preset thermal hydraulic metacharacter library to obtain a similarity value;

[0165] The recognition result corresponding to the maximum value among multiple similarity values ​​is selected as the first recognition result.

[0166] For the i-th sub-image, if the (i+1)-th sub-image satisfies the first preset condition and i+1 is less than or equal to N, the character corresponding to the i-th sub-image is combined with the character corresponding to the (i+1)-th sub-image to obtain a combined string; i is any integer greater than 0 and less than N; N is the total number of sub-images;

[0167] Determine whether a second string matching the combined string exists in the preset thermal hydraulic string library;

[0168] If the second string does not exist in the thermal hydraulic string library, concatenate the i-th sub-image with the (i+1)-th sub-image to obtain a new i-th sub-image. Use the combined string as the new i-th sub-image. Return to the step of combining the characters corresponding to the i-th sub-image with the characters corresponding to the (i+1)-th sub-image to obtain the first string if the (i+1)-th sub-image satisfies the first preset condition and i+1 is less than or equal to N. Continue until it is determined that the second string exists in the thermal hydraulic string library.

[0169] If a second string exists in the thermal hydraulic string library, the combined string is used as the first string, and it is determined whether i+1 is less than N. If i+1 is less than N, i is assigned the value i+2, and the process is repeated for the i-th sub-image. If the i+1-th sub-image satisfies the first preset condition and i+1 is less than or equal to N, the character corresponding to the i-th sub-image is combined with the character corresponding to the i+1-th sub-image to obtain the combined string, until it is determined that i+1 is equal to N.

[0170] In some embodiments of this disclosure, the combining unit 303 may specifically be used for:

[0171] In some embodiments of this disclosure, the apparatus may further include:

[0172] The first determining unit is used to determine whether the (i+1)th sub-image satisfies the first preset condition; the first preset condition includes that the positional region coordinates of the i-th sub-image and the (i+1)th sub-image are adjacent, and the difference between the height value of the i-th sub-image and the height value of the (i+1)th sub-image is less than a preset threshold.

[0173] In some embodiments of this disclosure, the partitioning unit 305 may specifically be used for:

[0174] In some embodiments of this disclosure, the apparatus may further include:

[0175] The second determining unit is used to determine whether there are at least two sub-images with overlapping location region coordinates by using the location region coordinates of each sub-image.

[0176] The merging unit is used to merge at least two sub-images to obtain a new sub-image when there are at least two sub-images with overlapping location coordinates.

[0177] In some embodiments of this disclosure, the assigning unit 306 may specifically be used for:

[0178] In cases where the first target symbol has multiple meanings, at least one target region associated with the first target symbol is determined based on the first target symbol and its attribute information.

[0179] For each target region in at least one target region, determine the positional relationship between the target region and the positional region coordinates of the first target symbol, and obtain at least one positional relationship;

[0180] For each target region in at least one target region, identify whether a second target character exists within the target region to obtain a second identification result;

[0181] The meaning of the first target symbol is determined based on at least one positional relationship and the second identification result;

[0182] Based on the meaning of the first target symbol and the partition corresponding to the first target symbol, assign corresponding operational meaning information to the first target symbol and at least one partition corresponding to the first target symbol.

[0183] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0184] According to the thermal hydraulic formula recognition device proposed in this embodiment, the thermal hydraulic formula image to be recognized is segmented to obtain sub-images including single characters and attribute information of each sub-image in the thermal hydraulic formula image; the characters in each sub-image are recognized to obtain a first recognition result corresponding to each sub-image; based on the position region coordinates, width value, and height value, the first recognition results with correlation are combined to obtain multiple combinations of first strings corresponding to each combination; the first strings exist in a preset thermal hydraulic string library; at least one first target symbol is selected from the multiple first recognition results; for each first target symbol, the thermal hydraulic formula image is divided into regions according to the position region coordinates of the first target symbol to obtain at least one partition; for each first target symbol, according to the first target symbol and the partition corresponding to the first target symbol, corresponding computational meaning information is assigned to the first target symbol and the at least one partition corresponding to the first target symbol to obtain the thermal hydraulic formula recognition result. By utilizing a pre-defined thermal hydraulic string library to identify characters involved in thermal hydraulic formulas, relevant characters in the field of thermal hydraulics can be accurately identified, improving the accuracy of formula recognition results and meeting the need for accurate recognition of mathematical formulas in thermal hydraulic formula images.

[0185] Figure 4 This is a block diagram illustrating an apparatus for a method of identifying thermal hydraulic formulas according to an exemplary embodiment. For example, apparatus 400 may be an electronic device, such as a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0186] Reference Figure 4 The device 400 may include one or more of the following components: a processing component 402, a memory 404, a power component 406, a multimedia component 408, an audio component 410, an input / output (I / O) interface 412, a sensor component 414, and a communication component 416.

[0187] Processing component 402 typically controls the overall operation of device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.

[0188] Memory 404 is configured to store various types of data to support the operation of device 400. Examples of this data include instructions for any application or method operating on device 400, contact data, phonebook data, messages, pictures, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0189] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 400.

[0190] Multimedia component 408 includes a screen that provides an output interface between device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera and / or a rear-facing camera. When device 400 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0191] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.

[0192] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0193] Sensor assembly 414 includes one or more sensors for providing state assessments of various aspects of device 400. For example, sensor assembly 414 may detect the on / off state of device 400, the relative positioning of components such as the display and keypad of device 400, changes in the position of device 400 or a component of device 400, the presence or absence of user contact with device 400, the orientation or acceleration / deceleration of device 400, and temperature changes of device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0194] Communication component 416 is configured to facilitate wired or wireless communication between device 400 and other devices. Device 400 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0195] In an exemplary embodiment, the apparatus 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0196] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by a processor 420 of the device 400 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0197] In an exemplary embodiment, a computer program product is also provided, including a computer program that implements the above-described method when executed by the processor 420 of the device 400.

[0198] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0199] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A thermal hydraulic formula identification method, characterized by, include: The thermal hydraulic formula image to be identified is segmented to obtain sub-images including individual characters, and attribute information of each sub-image in the thermal hydraulic formula image; The attribute information includes the location region coordinates, width value, and height value of the sub-image; Identify the characters in each sub-image and obtain the first identification result for each sub-image; Based on the location region coordinates, width value, and height value, the first identification results that have a relationship are combined to obtain the first string corresponding to each combination; The first string exists in a preset thermal hydraulic string library; The thermal hydraulic string library includes strings associated with formulas in the field of thermal hydraulics; the sub-images corresponding to the multiple first recognition results are located adjacent to each other; Select at least one first target symbol from multiple first recognition results; The first target symbol is an operator or a relation symbol; For each first target symbol, the thermal-hydraulic formula image is divided into regions according to the location region coordinates of the first target symbol to obtain at least one partition; each partition includes at least one first string; For each first target symbol, based on the first target symbol and the partition corresponding to the first target symbol, corresponding operational meaning information is assigned to the first target symbol and at least one partition corresponding to the first target symbol, thereby obtaining the thermal hydraulic formula recognition result.

2. The method for identifying thermal hydraulic formulas according to claim 1, characterized in that, The process of identifying characters in each sub-image to obtain a first recognition result for each sub-image includes: For each sub-image, the characters in the sub-image are identified, resulting in multiple candidate recognition results; For each of the multiple candidate recognition results, the recognition result is matched with the metacharacters in the preset thermal hydraulic metacharacter library to obtain a similarity value; The recognition result corresponding to the maximum value among multiple similarity values ​​is selected as the first recognition result.

3. The method for identifying thermal hydraulic formulas according to claim 1, characterized in that, The first identification results, which are related, are combined based on the location region coordinates, width value, and height value to obtain multiple first strings corresponding to each combination, including: For the i-th sub-image, if the (i+1)-th sub-image satisfies the first preset condition and i+1 is less than or equal to N, the character corresponding to the i-th sub-image is combined with the character corresponding to the (i+1)-th sub-image to obtain a combined string; i is any integer greater than 0 and less than N; N is the total number of sub-images; Determine whether a second string matching the combined string exists in a preset thermal hydraulic string library; If the second string does not exist in the thermal hydraulic string library, the i-th sub-image is concatenated with the (i+1)-th sub-image to obtain a new i-th sub-image. The combined string is used as the new i-th sub-image. The process then returns to the step of combining the characters corresponding to the i-th sub-image with the characters corresponding to the (i+1)-th sub-image to obtain the first string when the (i+1)-th sub-image satisfies the first preset condition and i+1 is less than or equal to N. This process continues until it is determined that the second string exists in the thermal hydraulic string library. If the second string exists in the thermal hydraulic string library, the combined string is used as the first string, and it is determined whether i+1 is less than N. If i+1 is less than N, i is assigned the value i+2, and the process returns to the step of combining the character corresponding to the i-th sub-image with the character corresponding to the i+1 sub-image to obtain the combined string when the i+1 sub-image satisfies the first preset condition and i+1 is less than or equal to N, until it is determined that i+1 is equal to N.

4. The method for identifying thermal hydraulic formulas according to claim 3, characterized in that, Before combining the character corresponding to the i-th sub-image with the character corresponding to the (i+1)-th sub-image, the method further includes: Determine whether the (i+1)th sub-image satisfies a first preset condition; the first preset condition includes that the positional region coordinates of the i-th sub-image and the (i+1)-th sub-image are adjacent, and the difference between the height value of the i-th sub-image and the height value of the (i+1)-th sub-image is less than a preset threshold.

5. The method for identifying thermal hydraulic formulas according to claim 1, characterized in that, For each first target symbol, the thermal-hydraulic formula image is divided into multiple regions according to the positional coordinates of the first target symbol, including: Determine the partition level corresponding to each first target symbol; The first sorting is determined based on the partition level; According to the first sorting, the current symbol is determined from the at least one first target symbol. Using a partitioning method that matches the partitioning level corresponding to the current symbol, the image region within the neighborhood of the current symbol is divided into regions to obtain at least one partition corresponding to the current symbol, until the neighborhood of each first target symbol has been divided into regions.

6. The method for identifying thermal hydraulic formulas according to claim 1, characterized in that, The step of assigning corresponding computational meaning information to the first target symbol and at least one partition corresponding to the first target symbol based on the first target symbol and the partition corresponding to the first target symbol includes: In cases where the first target symbol has multiple meanings, at least one target region associated with the first target symbol is determined based on the first target symbol and its attribute information. For each target region in at least one target region, determine the positional relationship between the target region and the positional region coordinates of the first target symbol to obtain at least one positional relationship; For each target region in at least one target region, identify whether a second target character exists within the target region to obtain a second identification result; Based on the at least one positional relationship and the second identification result, the meaning of the first target symbol is determined; Based on the meaning of the first target symbol and the partition corresponding to the first target symbol, assign corresponding operational meaning information to the first target symbol and at least one partition corresponding to the first target symbol.

7. A thermal hydraulic formula identification device, characterized in that, include: The segmentation unit is used to segment the image of the thermal hydraulic formula to be identified, and obtain sub-images including a single character, as well as attribute information of each sub-image in the thermal hydraulic formula image. The attribute information includes the location region coordinates, width value, and height value of the sub-image; The recognition unit is used to recognize the characters in each sub-image and obtain the first recognition result corresponding to each sub-image; The combination unit is used to combine the first identification results that have a relationship based on the location region coordinates, width value and height value to obtain the first string corresponding to each combination; The first string exists in a preset thermal hydraulic string library; The thermal hydraulic string library includes strings associated with formulas in the field of thermal hydraulics; the sub-images corresponding to the multiple first recognition results are located adjacent to each other; A selection unit is used to select at least one first target symbol from a plurality of first recognition results; The first target symbol is an operator or a relation symbol; A partitioning unit is used to divide the thermal-hydraulic formula image into regions according to the positional region coordinates of the first target symbol for each first target symbol, thereby obtaining at least one partition; each partition includes at least one first string; The assignment unit is used to assign corresponding operational meaning information to each first target symbol and at least one partition corresponding to the first target symbol, based on the first target symbol and the partition corresponding to the first target symbol, to obtain the thermal hydraulic formula recognition result.

8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the method as described in any one of claims 1 to 6.