CN112308946A - Topic generation method and device, electronic equipment and readable storage medium - Google Patents

Topic generation method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112308946A
CN112308946A CN202011242841.5A CN202011242841A CN112308946A CN 112308946 A CN112308946 A CN 112308946A CN 202011242841 A CN202011242841 A CN 202011242841A CN 112308946 A CN112308946 A CN 112308946A
Authority
CN
China
Prior art keywords
geometric
information
description information
text
description
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011242841.5A
Other languages
Chinese (zh)
Other versions
CN112308946B (en
Inventor
宋丹
董帅
文琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China Zhongshan Institute
Original Assignee
University of Electronic Science and Technology of China Zhongshan Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China Zhongshan Institute filed Critical University of Electronic Science and Technology of China Zhongshan Institute
Priority to CN202011242841.5A priority Critical patent/CN112308946B/en
Publication of CN112308946A publication Critical patent/CN112308946A/en
Application granted granted Critical
Publication of CN112308946B publication Critical patent/CN112308946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30176Document

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Processing Or Creating Images (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a question generation method, a question generation device, electronic equipment and a readable storage medium, and relates to the technical field of data processing. The method comprises the following steps: acquiring a text description part and a geometric figure part of a target geometric title; acquiring first geometric description information of the word narration part and second geometric description information of the geometric figure part; fusing the first geometric description information and the second geometric description information to obtain final geometric description information; and generating a new geometric title based on the final geometric description information. According to the scheme, manual question setting or corresponding question bank pre-construction is not needed, so that the question generation efficiency can be effectively improved.

Description

Topic generation method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a topic generation method and apparatus, an electronic device, and a readable storage medium.
Background
With the development of computer technology and internet, the work, study and life style of people are greatly changed, for example, people increasingly obtain local or online questions through terminals such as computers, mobile phones and tablet computers to do questions and examinations.
The current question setting mode generally sets questions manually or selects questions of corresponding knowledge points from a pre-established question bank, and all the modes need manual participation (for example, the latter mode also needs manual work to construct the question bank), so that the workload is large, and the efficiency is low.
Disclosure of Invention
An object of an embodiment of the present application is to provide a topic generation method, an apparatus, an electronic device, and a readable storage medium, so as to solve the problems in the prior art that a topic generation method needs manual participation, and has a large workload and a low efficiency.
In a first aspect, an embodiment of the present application provides a title generation method, where the method includes: acquiring a text description part and a geometric figure part of a target geometric title; acquiring first geometric description information of the word narration part and second geometric description information of the geometric figure part; fusing the first geometric description information and the second geometric description information to obtain final geometric description information; and generating a new geometric title based on the final geometric description information.
In the implementation process, the geometric description information of the text narration part and the geometric figure part of the target geometric title is respectively obtained, then the two geometric description information are fused, and a new geometric title is automatically generated based on the final geometric description information obtained by fusion, so that manual question setting or corresponding question bank pre-construction is not needed, and the question generation efficiency can be effectively improved.
Optionally, the first geometric description information includes geometric object information and geometric object constraint information, where the geometric object constraint information is used to describe relationship information between geometric objects; the acquiring of the first geometric description information of the narration text includes:
extracting geometric object information in the text narration part; and matching the word description part by using a regular expression to obtain the geometric object constraint information in the word description part.
In the implementation process, the regular expression is used for matching the word description part, so that the geometric object constraint information in the word description part can be effectively extracted.
Optionally, the obtaining a narrative part and a geometric figure part of the target geometric title includes:
acquiring an image containing the target geometric theme;
segmenting a text narration part and a geometric figure part of the target geometric title in the image;
the extracting geometric object information in the narration part comprises:
recognizing text information in the word narration part through a trained text recognition model;
and performing semantic understanding on the text information, and extracting geometric object information in the text information.
In the implementation process, the image is segmented, and then the text information of the word narration part is identified by using the text identification model, so that the geometric object information in the text information can be extracted more conveniently and effectively.
Optionally, the segmenting a narration part and a geometric figure part of the target geometric title in the image includes:
calibrating each character of the target geometric question in the image by utilizing a character sliding window with a preset size to obtain M windows, wherein M is an integer greater than or equal to 1;
combining the M windows to obtain at least one rectangular area;
segmenting the at least one rectangular area from the image to obtain the narration part;
the geometric figure portion is determined from the remaining image portions in the image.
In the implementation process, the characters are calibrated by utilizing the character sliding window, so that each character in the character narration part can be effectively identified, and the character narration part and the geometric figure part can be effectively segmented.
Optionally, the second geometric description information includes geometric object information and geometric object constraint information, where the geometric object constraint information is used to describe relationship information between geometric objects; the acquiring of the second geometric description information of the geometric figure part includes:
acquiring a text label and a graph of the geometric graph part;
extracting geometric object information in the graph, wherein the geometric object information comprises parameter information of geometric objects;
determining an incidence relation between the text label and the corresponding geometric object information;
determining identification information of the geometric objects in the geometric object information according to the incidence relation;
and acquiring geometric object constraint information among the geometric objects according to the identification information and the parameter information of the geometric objects.
In the implementation process, the text label and the graph of the geometric graph part are identified, so that the influence of the text label on the graph can be eliminated, and the geometric object constraint information in the geometric graph part can be more accurately obtained.
Optionally, the obtaining the text label and the graphic of the geometric graphic part includes:
calibrating the text labels of the geometric figure part by utilizing a trapezoidal sliding window with a preset size to obtain the area where each text label is located;
and filling background colors in the areas where the text labels are positioned, and taking the geometric figure part obtained after the background colors are filled as the figure.
In the implementation process, the text label in the geometric figure part is calibrated by utilizing the trapezoidal sliding window, and compared with a method for calibrating the rectangular sliding window, the text label in the geometric figure part can be adapted to avoid the problem that the text label cannot be calibrated due to interference between the text label and the figure. And after the background color filling is carried out on the region where the text label is located, the geometric object information can be conveniently and accurately extracted from the graph in the follow-up process.
Optionally, the extracting geometric object information in the graph includes:
carrying out smoothing treatment on the graph;
recognizing a circle in the graph after the smoothing treatment by utilizing gradient Hough transform, and determining the circle center and the radius of the circle; and/or
Thinning the graph;
recognizing lines in the graph after thinning processing by utilizing probabilistic Hough transform, and determining end point coordinates of the lines; and/or
Various points in the graph are determined.
Optionally, the determining an association relationship between the text label and the corresponding geometric object information includes:
acquiring the center point coordinates of the area where each text label is located in the graph and the center point coordinates of the area where the geometric object corresponding to each geometric object information is located;
calculating the distance between each text label and each geometric object according to the center point coordinate of the area where the text label is located and the center point coordinate of the area where each geometric object is located;
and establishing an association relation between the text label with the shortest distance and the corresponding geometric object information.
In the implementation process, the association relationship between the text label in the medium geometric figure part and each geometric object can be effectively identified by acquiring the distance between the text label and each geometric object, and further the geometric description information of the geometric figure part can be accurately acquired.
Optionally, the geometric object constraint information includes constraint information between a point and a line, and the constraint information between the point and the line is obtained by using the following formula:
Figure BDA0002766924640000041
if the above formula is true, determining that constraint information between the point and the line is true;
where (x ', y') represents the coordinates of a point, and Ax '+ By' + C represents a line, where A, B, C is a constant and τ is a predefined error.
Optionally, the method further comprises:
removing the unrealized geometric object constraint information from the second geometric description information;
the fusing the first geometric description information and the second geometric description information to obtain final geometric description information includes:
and fusing the first geometric description information and the second geometric description information of which the unrealistic geometric object constraint information is removed to obtain final geometric description information.
In the implementation process, the unrealized geometric object constraint information is removed from the second geometric description information, so that the obtained final geometric description information is accurate geometric description information, and the accuracy of the subsequently generated geometric problem is ensured.
Optionally, the fusing the first geometric description information and the second geometric description information to obtain final geometric description information includes:
acquiring different target geometric description information in the first geometric description information and the second geometric description information;
judging whether the geometric object constraint information in the target geometric description information is true or not;
and if the geometric object constraint information in the target geometric description information is established, taking the first geometric description information and the target geometric description information as the final geometric description information.
In the implementation process, whether the geometric object constraint information in the redundant target geometric description information obtained from the geometric figure part is established or not is judged, so that the accuracy of the final geometric description information can be ensured, and the accuracy of the subsequently generated geometric question can be further ensured.
Optionally, the generating a new geometric title based on the final geometric description information includes:
determining geometric condition description information and geometric conclusion description information from the first geometric description information, wherein the geometric conclusion description information is geometric object constraint information to be solved, and the geometric object constraint information is used for describing relationship information among all geometric objects;
replacing the geometric conclusion description information with the established target geometric conclusion description information to obtain new geometric conclusion description information;
and generating a new first geometric subject according to the geometric condition description information and the new geometric conclusion description information.
In the implementation process, the geometric conclusion description information in the target geometric topic is replaced to change the geometric conclusion description information in the target geometric topic, so that a new first geometric topic can be generated based on the target geometric topic.
Optionally, after the generating the new first geometric theme, the method further includes:
determining geometric condition description information and geometric conclusion description information from each first geometric topic, wherein the geometric condition description information comprises a plurality of pieces of geometric condition information;
selecting target geometry information from the plurality of geometry information;
adding the geometric conclusion description information into the geometric condition description information to obtain new geometric condition description information;
taking the target geometric condition information as new geometric conclusion description information;
and generating a new second geometric subject according to the new geometric condition description information and the new geometric conclusion description information.
In the implementation process, more second geometric topics can be generated quickly by changing the geometric condition description information and the geometric conclusion description information.
Optionally, after generating a new geometric title based on the final geometric description information, the method further includes:
and carrying out accuracy verification on the new geometric questions, and storing the geometric questions passing the verification as final geometric questions, thereby ensuring the accuracy of the finally generated geometric questions.
In a second aspect, an embodiment of the present application provides a title generating device, where the title generating device includes:
the title information acquisition module is used for acquiring a text description part and a geometric figure part of a target geometric title;
the description information acquisition module is used for acquiring first geometric description information of the word narration part and second geometric description information of the geometric figure part;
the information fusion module is used for fusing the first geometric description information and the second geometric description information to obtain final geometric description information;
and the title generation module is used for generating a new geometric title based on the final geometric description information.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method as provided in the first aspect are executed.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the steps in the method as provided in the first aspect.
Additional features and advantages of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of an electronic device for executing a topic generation method according to an embodiment of the present application;
FIG. 2 is a flowchart of a topic generation method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a narrative part and a geometric figure part in a partitioned geometric title according to an embodiment of the present application;
fig. 4 is a block diagram of a title generation apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The embodiment of the application provides a topic generation method, which includes the steps of respectively obtaining geometric description information of a text description part and a geometric figure part of a target geometric topic, then fusing the two geometric description information, and generating a new geometric topic based on final geometric description information obtained through fusion, so that manual topic generation does not need to be participated in or a corresponding topic library is not constructed in advance, the topic generation efficiency can be effectively improved, and the labor cost can be effectively saved.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device for executing a title generation method according to an embodiment of the present application, where the electronic device may include: at least one processor 110, such as a CPU, at least one communication interface 120, at least one memory 130, and at least one communication bus 140. Wherein the communication bus 140 is used for realizing direct connection communication of these components. The communication interface 120 of the device in the embodiment of the present application is used for performing signaling or data communication with other node devices. The memory 130 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). Memory 130 may optionally be at least one memory device located remotely from the aforementioned processor. The memory 130 stores computer readable instructions, and when the computer readable instructions are executed by the processor 110, the electronic device executes the following method shown in fig. 2, for example, the memory 130 may be used to store a plurality of geometric subjects, and when a new geometric subject needs to be generated, the processor 110 performs corresponding processing on the target geometric subject based on the obtained target geometric subject, for example, extracting geometric description information from a text description part and a geometric figure part of the target geometric subject, respectively, then fusing the two geometric description information, and then generating the new geometric subject based on the final geometric description information obtained by fusing.
It will be appreciated that the configuration shown in fig. 1 is merely illustrative and that the electronic device may also include more or fewer components than shown in fig. 1 or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, fig. 2 is a flowchart of a title generation method according to an embodiment of the present application, where the method includes the following steps:
step S110: and acquiring a text description part and a geometric figure part of the target geometric title.
The geometric theme is a theme comprising a text description part and a geometric figure part, wherein the text description part is used for describing the relationship between related geometric objects in the geometric figure and the numerical value of the geometric objects or the relationship of the geometric objects of a required solution and the like. In some cases, the target geometric topic may be a certification topic including a condition portion and a conclusion portion, i.e., the narrative portion includes a condition description portion and a conclusion description portion; in other cases, the target geometry problem may be a solution problem including only a condition portion and a solution portion, i.e., the narrative portion includes a condition description portion and a problem description portion.
In some embodiments, the user can input the narration portion and the geometric portion of the target geometric title into the electronic device separately, for example, the narration portion can be input into the electronic device in the form of text, and the geometric portion can be input into the electronic device in the form of image.
In other embodiments, the user may also directly input an image containing the target geometric topic into the electronic device, or the electronic device scans the target geometric topic in text form, and then the electronic device may identify the narrative part and the geometric figure part of the target geometric topic based on the image or the scanned information.
Step S120: and acquiring first geometric description information of the word narration part and second geometric description information of the geometric figure part.
The geometric description information may refer to a language for describing each geometric object and a relationship between each geometric object, and may be a logical expression, such as o: (a, B, C), which represents a circle o formed by three points A, B, C; l represents a segment with an end point of A, C; triangle (A, B, C) denotes Triangle ABC; line (Q, R) represents a straight Line passing through Q, R; incident (D, l) indicates that point D is on line segment l, etc.
In the embodiment of the present application, in order to facilitate generating the title, the relationship between the geometric object and each geometric object in the narration part may be extracted and then expressed by the first geometric description information, and the relationship between the geometric object of the geometric figure part and each geometric object may be extracted and then expressed by the second geometric description information.
Step S130: and fusing the first geometric description information and the second geometric description information to obtain final geometric description information.
After the first geometric description information and the second geometric description information are obtained respectively, the two pieces of geometric description information can be fused, so that more geometric description information can be obtained.
In some embodiments, the two geometric description information may be fused by merging the two geometric description information, that is, a union of the two geometric description information may be used as the final geometric description information.
Step S140: and generating a new geometric title based on the final geometric description information.
After the final geometric description information is obtained, new geometric topics can be generated based on the final geometric description information, for example, the geometric description information in the final geometric description information is randomly combined to form a condition part and a conclusion part (or a solution part) of the topic, so that a plurality of new geometric topics can be generated.
In the implementation process, the geometric description information of the text narration part and the geometric figure part of the target geometric title is respectively obtained, then the two geometric description information are fused, and a new geometric title is automatically generated based on the final geometric description information obtained by fusion, so that manual question setting or corresponding question bank pre-construction is not needed, and the question generation efficiency can be effectively improved.
In some embodiments, the first geometric description information includes geometric object information and geometric object constraint information, i.e., information for describing a relationship between respective geometric objects. The process of obtaining the first geometric description information of the narration part can be as follows: extracting the geometric object information in the word description part, and matching the word description part by using a regular expression to obtain the geometric object constraint information in the word description part.
The geometric object information refers to description information of geometric objects such as lines, points, circles, triangles, rectangles, squares, and the like, and includes identification information of each geometric object, and the geometric object constraint information is as described above by way of example: and incident (D, l) represents that a point D is on the line segment l and is used for describing description information of the relationship among the geometric objects.
The regular expression in the embodiment of the application refers to a regular expression for matching the constraint information of the geometric object, and because the description language of the constraint information of the geometric object generally has a certain rule, the constraint information of the geometric object in the narration part can be quickly and effectively matched by using the regular expression.
In some embodiments, in order to reduce the workload of manually inputting the target geometric topic, the text description part and the geometric figure part of the target geometric topic may be identified through an image, for example, an image including the target geometric topic may be acquired, then the text description part and the geometric figure part of the target geometric topic in the image are segmented, then text information in the text description part may be identified through a trained text identification model, and then semantic understanding is performed on the text information, so that geometric object information in the text information may be extracted.
For example, a target geometric title of an initial paper print can be scanned or photographed as an image. In order to facilitate the segmentation of the image, the image may be subjected to some pre-processing, such as tilt correction, graying, or binarization. It should be understood that in practical applications, the obtained image may be subjected to some corresponding processing in consideration of practical situations, which includes not only the above-exemplified processing, but also sharpening if the obtained image is not sharp.
Of course, the step of processing the image may not be executed by the electronic device, or may be performed by inputting the image into the electronic device after performing corresponding processing on the image by another image processing device, so that the workload of the electronic device may be reduced, and the efficiency of generating a new geometric theme by the electronic device may be improved.
Since the divided narration part and geometric figure part are also images, the text information in the narration part can be identified by a text identification model in order to facilitate the identification of the text information in the narration part. The method comprises the steps of collecting geometric exercise text data, pre-training a text recognition model on the basis of open source Tesseract-OCR resources, and recognizing Chinese and English labels and attribute symbols of a character narration part through the trained text recognition model.
The text recognition model may be a neural network model, such as a convolutional neural network model, a cyclic neural network model, a deep residual error network model, and the like.
After the text information in the word narration part is obtained through the recognition of the text recognition model, the semantic understanding can be carried out on the text information, the semantic understanding mode can be that the text information is subjected to common word segmentation and part of speech tagging, and then the geometric object information can be extracted from the processed text information.
For example, geometric terms are identified in the text message, and these geometric terms are used as geometric objects (e.g. a certain point, an arbitrary straight line, etc.), and english labels in the text message are identified, which can be used as unique identifiers of corresponding geometric objects, such as a point a, a point B, a line d1, etc. If there is a geometric object in the text message without a corresponding english tag, the corresponding geometric object may be assigned with other english tags except the english tag in the text message.
For example, the narrative part in the target geometric title is: if A, B, C is any three different points, D is a point on the circumcircle of triangle ABC, F is the foot of line AC and line DF, G is the foot of line BC and line DG, and E is the foot of line BA and line DE, F is proved to be on line EG.
The geometric objects extracted from the narration portion include: point A, B, C, D, F, G, E, triangle ABC, circle, line AC, line DF, line BC, line DG, line BA, line DE, line EG. At this time, if the circle has no corresponding english label, other english labels, such as circle O, may be assigned to the circle.
The geometric object information and the geometric object constraint information are both formally represented by a geometric description language, for example, the representation rule of the geometric object information is "label" (par1, par2, …), where label is unique identification information (such as an english tag) of the object, type is a category key (i.e., a point, a line, a circle, a triangle, or other categories) of the geometric object, and par1, par2, or the like are related parameters (such as a line segment length, a line segment endpoint, coordinates of a point, and the like), as shown in the following examples:
point (152,280), which represents the coordinate of point a as (152, 280); segment (A, C) representing segment l with end point A, C; o ═ circle (a, B, C), representing circle o formed by A, B, C three points; triangle (A, B, C), representing triangle ABC.
The representation rule of the constraint information of the geometric objects is as follows: type (par1, par2, …), where type is the relationship between two geometric objects (e.g., parallel, plumb, etc.), and par1, par2, … are geometric objects, as shown for example:
incident (D, l), representing point D on line l; parallel (l1, l2), indicating that l1 and l2 are parallel; pointonc (a, o), indicating that point a is on circle o; line (Q, R) represents a straight line passing through points Q and R.
It is to be understood that the above listed examples of the geometric object information and the geometric object constraint information are only partial, and in practical applications, different geometric object information and geometric object constraint information may be described using a geometric description language of corresponding rules, such as a Similar (Triangle (a, B, C), Triangle (E, F, G)) meaning that the Triangle ABC is Similar to the Triangle EFG, and so on.
In the implementation process, the image is segmented, and then the text information of the word narration part is identified by using the text identification model, so that the geometric object information in the text information can be extracted more conveniently and effectively.
In some embodiments, the manner of dividing the narration portion and the geometric figure portion in the above embodiments may adopt a corresponding image division method. Or, each character of the target geometric subject in the image can be calibrated by using a character sliding window with a preset size to obtain M windows, wherein M is an integer greater than or equal to 1, then the M windows are combined to obtain at least one rectangular region, then one rectangular region is divided from the image, the divided image part is used as a character narration part, and then a geometric figure part can be determined from the rest image part in the image.
The size of the character sliding window is matched with the size of characters in a character narration part, so that each character can be calibrated by the character sliding window, and the character sliding window comprises Chinese characters, English characters, numerical symbols and the like of the character narration part. And calibrating one character for each window in the obtained M windows.
Then, according to the feature that the text typesetting usually uses rectangular areas, the M windows can be merged into at least one rectangular area, as shown in fig. 3 (it should be understood that all the M windows are not shown in fig. 3), and then the at least one rectangular area is divided to be used as the text narrative part.
It should be noted that, the windows for merging to obtain the rectangular region include at least two windows, so if the geometric portion includes english tags, the geometric portion is also marked in M windows, and since the english tags in the geometric portion are relatively scattered, it is difficult to merge at least two windows into one rectangular region. In this case, the divided narration portion may not include the text portion in the geometric figure portion, but only the stem portion in the target geometric subject, which may be beneficial to accurately obtain the first geometric description information of the narration portion subsequently.
After the text narration portion is divided, the remaining image portion in the image may be directly used as the geometric figure portion, or if the remaining image portion is relatively large, the remaining image portion may be cut out to cut out the geometric figure portion.
In the implementation process, the characters are calibrated by utilizing the character sliding window, so that each character in the character narration part can be effectively identified, and the character narration part and the geometric figure part can be effectively segmented.
The following is a description of the acquisition process of the second geometric description information.
The second geometric description information may also include geometric object information and geometric object constraint information, where the geometric object constraint information is also used to describe relationship information between geometric objects, and the process of acquiring the second geometric description information may be: the method comprises the steps of obtaining a text label and a graph of a geometric graph part, then extracting geometric object information in the graph, wherein the geometric object information comprises parameter information of geometric objects, determining an association relation between the text label and the corresponding geometric object information, then determining identification information of the geometric objects in the geometric object information according to the association relation, and then obtaining geometric object constraint information among the geometric objects according to the identification information and the parameter information of the geometric objects.
The geometric figure part in this embodiment may refer to the image that is divided and contains the geometric figure part, and the manner of identifying the text label of the geometric figure part may be to calibrate each character through the character sliding window, so that the english label in the geometric figure part is calibrated by using the window, and then the region of the english label calibrated by using the window is erased or filled with a background color, thereby generating a figure, that is, the figure does not have any character, so that the geometric object information can be accurately obtained.
Or, in some embodiments, considering that the printing ink is discontinuous and the distance between the letter and the other part of the image is small horizontally or vertically, the text labels of the geometric figure part may be calibrated by using a trapezoidal sliding window with a preset size to obtain the area where each text label is located, then the area where each text label is located is filled with a background color, and the geometric figure part obtained after the background color is filled is used as a figure.
For example, the sliding trapezoid window consists of 6 tuples (x, y, w, h, Δ x)1,Δx2),w>0,h>0,|Δxi|<h, i is 1,2, where (x, y) is the coordinate of the midpoint of the top bottom of the trapezoidal sliding window, w is the width of the top bottom, h is the height of the trapezoid, Δ x1,Δx2The coordinates of two top points of the lower bottom are respectively equivalent to the offset of X, so that the coordinates of the top point of the upper right corner are (X + w, y), and the coordinates of the top point of the lower left corner are (X + delta X)1Y + h), the lower right corner vertex coordinate is (x + Δ x)2Y + h), where w, h, Δ x1,Δx2The value of (A) is determined according to the actual situation. In the case of the calibration of the text label,and (x.y) traversing each point in the image, determining a text label, filling background colors in the area where the text label is positioned, and then processing all the text labels to obtain the graph without the text labels.
In the implementation process, the text label in the geometric figure part is calibrated by utilizing the trapezoidal sliding window, and compared with a method for calibrating the rectangular sliding window, the text label in the geometric figure part can be adapted to avoid the problem that the text label cannot be calibrated due to interference between the text label and the figure. And after the background color filling is carried out on the region where the text label is located, the geometric object information can be conveniently and accurately extracted from the graph in the follow-up process.
When extracting the geometric object information in the graph, the method adopted by the method can be as follows:
carrying out smoothing treatment on the graph, identifying a circle in the smoothed graph by utilizing gradient Hough transform, and determining the circle center and the radius of the circle;
and/or thinning the graph, identifying lines in the thinned graph by utilizing probabilistic Hough transform, and determining end point coordinates of the lines;
and/or determining individual points in the graph.
The circle identification can be realized by using gradient hough transform, and the specific implementation manner of the circle identification can refer to related processes in the prior art, which are not described in detail herein. The recognition of geometric objects such as straight lines, line segments, rays and the like in the graph can be recognized by adopting probabilistic hough transform, and the specific implementation manner of the method can also refer to related processes in the prior art, which are not described in detail herein. The points such as the end point of the line, the center of the circle, the intersection point of the line and the line, the intersection point of the line and the circle, the intersection point of the circle and the like can be identified by adopting a pixel identification mode, so that the identification of each point can be realized.
The parameter information of the geometric objects is the center coordinates and radius of the circle, the length of the line, the end point coordinates, the coordinates of the point and the like, of course, not every geometric object can acquire the parameter information, and possible geometric objects do not mark related parameter information in the graph, so that for the geometric objects, the identification information of the geometric objects can be acquired, and the geometric objects can be subsequently used for being supplemented to the geometric object information extracted from the first geometric description information.
In some embodiments, the manner of determining the association between a text label and corresponding geometric object information may be as follows:
obtaining the center point coordinates of the region where each text label is located and the center point coordinates of the region where each geometric object corresponding to each geometric object information is located in the graph, then calculating the distance between each text label and each geometric object according to the center point coordinates of the region where the text label is located and the center point coordinates of each geometric object, and then establishing the association relationship between the text label with the shortest distance and the corresponding geometric object information.
For example, as shown in fig. 3, the text labels of the geometric figure part include A, B, C, D, E, F, G, that is, the identification information of the geometric objects, and these text labels are mainly pointing labels, so the distance between the coordinates of each point and the coordinates of the center point of each text label can be mainly calculated, which facilitates to associate each point with the corresponding text label, and then the identification information of each geometric object can be determined.
In the implementation process, the association relationship between the text label in the medium geometric figure part and each geometric object can be effectively identified by acquiring the distance between the text label and each geometric object, and further the geometric description information of the geometric figure part can be accurately acquired.
In some embodiments, to obtain geometric object constraint information from the geometric portion, the geometric object constraint information may be obtained by:
an algebraic equation which is required to be satisfied by the parameters of each geometric object constrained by each type of geometric object constraint information can be established for each type of geometric object constraint information, then an establishment condition with stable numerical value is deduced from the algebraic equation, and whether the corresponding geometric object constraint information is established or not is judged according to the establishment condition.
For example, for constraint information between a point and a line, if the point P (x ', y') is on a straight line l: Ax + By + C is 0, an algebraic equation Ax '+ By' + C is true, but this equation is not numerically stable, and is not true as long as there is a slight deviation of (x ', y'). Therefore, in the embodiment of the present application, whether constraint information between a point and a line is established is determined by using the following formula:
Figure BDA0002766924640000171
if the above formula is established, determining that constraint information between the points and the lines is established;
where (x ', y') represents the coordinates of a point, and Ax '+ By' + C represents a line, where A, B, C is a constant and τ is a predefined error.
It should be understood that geometric constraint information assumed between geometric objects may be constructed in advance, and then whether the geometric constraint information is satisfied may be determined by the above method, so that satisfied geometric constraint information may be obtained as geometric constraint information extracted from a graph, and whether geometric constraint information is satisfied may be determined by using a satisfied condition similar to the above setting for other types of geometric constraint information, which is not listed here.
In order to obtain accurate final geometric description information, the above-mentioned unrealized geometric object constraint information may be removed from the second geometric description information, and then when the first geometric description information is fused with the second geometric description information, the first geometric description information is fused with the second geometric description information from which the unrealized geometric object constraint information has been removed, so as to obtain final geometric description information.
For example, the first geometric description information includes: point D, F, G, E, triangle ABC, line AC, line DF, D being a point on the circumcircle of triangle ABC, F being the foot of line AC and line DF, the second geometric description information comprising: point D, F, G, E, triangle ABC, line AC, line DF, D is a point on the circumcircle of triangle ABC, F is the foot of line AC and line DF, circle O, point F is on circle O.
Wherein, after judgment, if the geometric object constraint information 'point F on the circle O' is found not to be true, the geometric object constraint information is removed from the second geometric description information, and the finally obtained final geometric description information includes: point D, F, G, E, triangle ABC, line AC, line DF, D is a point on the circumscribed circle of triangle ABC, and F is the foot of line AC and line DF, circle O. In this way, more geometric description information can be obtained by fusing the first geometric description information and the second geometric description information.
In the implementation process, the unrealized geometric object constraint information is removed from the second geometric description information, so that the obtained final geometric description information is accurate geometric description information, and the accuracy of the subsequently generated geometric problem is ensured.
In some embodiments, in order to ensure the accuracy of the final geometry description information after fusion, when the geometry description information is fused, different target geometry description information in the first geometry description information and the second geometry description information may be obtained first, and then it is determined whether the geometry object constraint information in the target geometry description information is satisfied, and if the geometry object constraint information in the target geometry description information is satisfied, the first geometry description information and the target geometry description information are used as the final geometry description information.
In the above example, the different target geometric description information in the first geometric description information and the second geometric description information is: the circle O, on which the point F is located, is judged whether or not to be established in a manner similar to that described above, and a description thereof will not be repeated.
After the final geometric description information is obtained, the accuracy of the final geometric description information can be verified, the verification mainly includes whether the final geometric description information can derive the target geometric description information from the first geometric description information, that is, whether the condition can derive a conclusion, and the verification process can be as follows:
assuming that the first geometric description information is ITThe second geometric description information is IGIf the final geometric description information is F, F is initializedITLet V equal IG-ITThat is, V is the geometric description information of the target, for any t ∈ V, if
Figure BDA0002766924640000181
And if yes, enabling F to be F ═ F @ (U) (t) until all t is traversed, and outputting F.
In this process, verification is performed
Figure BDA0002766924640000182
The method of whether to be true may be: setting the coordinates of the free point as xi,yiN, n is the number of free points, and these 2n parameters are used as independent variables, for ITEstablishing an algebraic equation by constraint information of each geometric object, and recording the obtained algebraic equation as:
Figure BDA0002766924640000183
t is then also converted to an algebraic equation:
Figure BDA0002766924640000184
at this time, it is verified
Figure BDA0002766924640000191
Whether it is true is equivalent to judging the equation
Figure BDA0002766924640000192
Whether the solution space (null set) of (a) is contained in the equation
Figure BDA0002766924640000193
In the case of a polynomial equation, the solution space (null set) of (1) is usually determined by the Wu method or
Figure BDA0002766924640000194
Solving this problem by a basis method or a knot method (wherein these solving methods can refer to prior art implementations and are not described in detail here), thus accomplishing generality
Figure BDA0002766924640000195
And (4) verifying whether the geometric question is established, so that the logic correctness of the generated new geometric question is ensured.
The redundant geometric description information caused by the image recognition error can be removed through the verification mode, so that the advantage of more information in the geometric figure can be fully utilized, and the defect of redundant information caused by the image recognition can be avoided.
After obtaining the final geometric description information, generating a new geometric topic based on the final geometric description information may include: determining geometric condition description information and geometric conclusion description information from the first geometric description information, wherein the geometric conclusion description information is geometric object constraint information to be solved, the geometric object constraint information is used for describing relationship information among all geometric objects, then replacing the geometric conclusion description information with the established target geometric description information to obtain new geometric conclusion description information, and then generating a new first geometric subject according to the geometric condition description information and the new geometric conclusion description information.
For example, let the first geometric description information IT=(HT,CT),
Figure BDA0002766924640000196
Wherein HTFor describing information for geometric conditions, GTDescribing information for geometric conclusions and then constructing topic Ek=(HT,Ck),
Figure BDA0002766924640000197
k=1,...,m,m=|F-ITI where F-ITNamely the target geometric description information, in the constructed topics, the target geometric description information is geometric conclusion description information, and the set of the new first geometric topics generated in the way is E1={IT}∪{EkAnd k is more than or equal to 1 and less than or equal to m, wherein m is the number of the target geometric description information.
It can be understood that, if the target geometric description information includes geometric object information and geometric object constraint information (the geometric object constraint information is satisfied geometric object constraint information), replacing the geometric conclusion description information with the target geometric description information means replacing the geometric conclusion description information with the geometric object constraint information of the target geometric description information china.
In the foregoing manner, the geometric description information in the generated new first geometric question may be consistent with the geometric description information in the target geometric question, except that the geometric conclusion information thereof becomes the geometric object constraint information in the target geometric description information, and if the target geometric description information includes a plurality of pieces of geometric object constraint information, a plurality of new first geometric questions may be generated.
In order to expand more geometric items, geometric condition description information and geometric conclusion description information can be determined from each first geometric item, the geometric condition description information comprises a plurality of pieces of geometric condition information, target geometric condition information is selected from the plurality of pieces of geometric condition information, the geometric conclusion description information is added into the geometric condition description information to obtain new geometric condition description information, the target geometric condition information is used as new geometric conclusion description information, and finally a new second geometric item is generated according to the new geometric condition description information and the new geometric conclusion description information.
For example, for an arbitrary first geometric topic E ═ (H, C) ∈ E1For any geometric condition information H belongs to H, a conclusion part C is used for converting H to obtain a second geometric subject E2(H utouc- { H }, H), thus a plurality of second geometric items can be generated.
Therefore, the new geometric topic set generated in the above manner is E ═ E1∪E2. In addition, more new geometric topics can be generated based on each geometric topic by the method in the embodiment of the application, so that the expansion of the geometric topics is realized.
In addition, in order to ensure the accuracy of the generated new geometric topic, the accuracy of the new geometric topic can be verified, and the geometric topic passing the verification is stored as the final geometric topic.
The process of verification can be similar to the above verification
Figure BDA0002766924640000201
If the process is true, the specific process may refer to the above embodiments, and for brevity of description, the description is not repeated here.
In other embodiments, if the generated new geometric theme contains a free variable, the geometric theme contains: and a is 2, b is 2a, c is 3, wherein a and c are free variables, the free variables can be randomly assigned N times within a preset value range, and the values of other constraint variables and the geometric quantity involved in the theme are calculated, for example, if a and c are randomly assigned to 1,2,3,4, … …, the values of other variables can be calculated to ensure the accuracy of the conclusion, and thus, more geometric themes can be generated.
It should be understood that, in the case where the generated geometric theme is expressed by geometric description information, the geometric theme may also be converted into a natural language in order to facilitate output of the geometric theme. The fixed conversion format can be set for each type of geometric object constraint information in advance, so that the geometric object constraint information can be converted into natural language, and then the converted geometric subjects can be stored according to the natural language description mode.
Referring to fig. 4, fig. 4 is a block diagram of a title generation apparatus 200 according to an embodiment of the present application, where the apparatus 200 may be a module, a program segment, or a code on an electronic device. It should be understood that the apparatus 200 corresponds to the above-mentioned embodiment of the method of fig. 2, and can perform various steps related to the embodiment of the method of fig. 2, and the specific functions of the apparatus 200 can be referred to the above description, and the detailed description is appropriately omitted here to avoid redundancy.
Optionally, the apparatus 200 comprises:
a topic information obtaining module 210, configured to obtain a text description part and a geometric figure part of a target geometric topic;
a description information obtaining module 220, configured to obtain first geometric description information of the narration part and second geometric description information of the geometric figure part;
an information fusion module 230, configured to fuse the first geometric description information and the second geometric description information to obtain final geometric description information;
and a topic generating module 240, configured to generate a new geometric topic based on the final geometric description information.
Optionally, the first geometric description information includes geometric object information and geometric object constraint information, where the geometric object constraint information is used to describe relationship information between geometric objects; the description information obtaining module 220 is configured to extract geometric object information in the narration part; and matching the word description part by using a regular expression to obtain the geometric object constraint information in the word description part.
Optionally, the topic information obtaining module 210 is configured to obtain an image including the target geometric topic; segmenting a text narration part and a geometric figure part of the target geometric title in the image;
the description information obtaining module 220 is configured to identify text information in the word narration part through a trained text recognition model; and performing semantic understanding on the text information, and extracting geometric object information in the text information.
Optionally, the title information obtaining module 210 is configured to:
calibrating each character of the target geometric question in the image by utilizing a character sliding window with a preset size to obtain M windows, wherein M is an integer greater than or equal to 1;
combining the M windows to obtain at least one rectangular area;
segmenting the at least one rectangular area from the image to obtain the narration part;
the geometric figure portion is determined from the remaining image portions in the image.
Optionally, the second geometric description information includes geometric object information and geometric object constraint information, where the geometric object constraint information is used to describe relationship information between geometric objects; the description information obtaining module 220 is configured to obtain a text label and a graphic of the geometric figure part; extracting geometric object information in the graph, wherein the geometric object information comprises parameter information of geometric objects; determining an incidence relation between the text label and the corresponding geometric object information; determining identification information of the geometric objects in the geometric object information according to the incidence relation; and acquiring geometric object constraint information among the geometric objects according to the identification information and the parameter information of the geometric objects.
Optionally, the description information obtaining module 220 is configured to calibrate the text labels of the geometric figure portion by using a trapezoidal sliding window with a preset size, so as to obtain an area where each text label is located; and filling background colors in the areas where the text labels are positioned, and taking the geometric figure part obtained after the background colors are filled as the figure.
Optionally, the description information obtaining module 220 is configured to perform smoothing processing on the graph; recognizing a circle in the graph after the smoothing treatment by utilizing gradient Hough transform, and determining the circle center and the radius of the circle; and/or thinning the graph; recognizing lines in the graph after thinning processing by utilizing probabilistic Hough transform, and determining end point coordinates of the lines; and/or determining individual points in the graph.
Optionally, the description information obtaining module 220 is configured to obtain a center point coordinate of an area where each text label in the graph is located and a center point coordinate of an area where a geometric object corresponding to each geometric object information is located; calculating the distance between each text label and each geometric object according to the center point coordinate of the area where the text label is located and the center point coordinate of the area where each geometric object is located; and establishing an association relation between the text label with the shortest distance and the corresponding geometric object information.
Optionally, the geometric object constraint information includes constraint information between a point and a line, and the constraint information between the point and the line is obtained by using the following formula:
Figure BDA0002766924640000231
if the above formula is true, determining that constraint information between the point and the line is true;
where (x ', y') represents the coordinates of a point, and Ax '+ By' + C represents a line, where A, B, C is a constant and τ is a predefined error.
Optionally, the apparatus 200 further comprises:
the information deleting module is used for removing the unrealized geometric object constraint information from the second geometric description information;
the information fusion module 230 is configured to fuse the first geometric description information with the second geometric description information from which the unrealistic geometric object constraint information has been removed, so as to obtain final geometric description information.
Optionally, the information fusion module 230 is configured to obtain different target geometric description information in the first geometric description information and the second geometric description information; judging whether the geometric object constraint information in the target geometric description information is true or not; and if the geometric object constraint information in the target geometric description information is established, taking the first geometric description information and the target geometric description information as the final geometric description information.
Optionally, the topic generating module 240 is configured to determine geometric description information and geometric conclusion description information from the first geometric description information, where the geometric conclusion description information is geometric object constraint information to be solved, and the geometric object constraint information is used to describe relationship information between geometric objects; replacing the geometric conclusion description information with the established target geometric conclusion description information to obtain new geometric conclusion description information; and generating a new first geometric subject according to the geometric condition description information and the new geometric conclusion description information.
Optionally, the topic generating module 240 is further configured to determine geometric condition description information and geometric conclusion description information from each of the first geometric topics, where the geometric condition description information includes a plurality of geometric condition information; selecting target geometry information from the plurality of geometry information; adding the geometric conclusion description information into the geometric condition description information to obtain new geometric condition description information; taking the target geometric condition information as new geometric conclusion description information; and generating a new second geometric subject according to the new geometric condition description information and the new geometric conclusion description information.
Optionally, the apparatus 200 further comprises:
and the question verification module is used for verifying the accuracy of the new geometric question and storing the geometric question passing the verification as a final geometric question.
The embodiment of the present application provides a readable storage medium, and when being executed by a processor, the computer program performs the method process performed by the electronic device in the method embodiment shown in fig. 2.
The present embodiments disclose a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the methods provided by the above-described method embodiments, for example, comprising: acquiring a text description part and a geometric figure part of a target geometric title; acquiring first geometric description information of the word narration part and second geometric description information of the geometric figure part; fusing the first geometric description information and the second geometric description information to obtain final geometric description information; and generating a new geometric title based on the final geometric description information.
In summary, embodiments of the present application provide a topic generation method, an apparatus, an electronic device, and a readable storage medium, where geometric description information of a text description part and a geometric figure part of a target geometric topic is respectively obtained, then the two geometric description information are fused, and a new geometric topic is automatically generated based on final geometric description information obtained by the fusion, so that manual topic generation or pre-construction of a corresponding topic library is not required, and thus efficiency of topic generation can be effectively improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (17)

1. A method for generating a topic, the method comprising:
acquiring a text description part and a geometric figure part of a target geometric title;
acquiring first geometric description information of the word narration part and second geometric description information of the geometric figure part;
fusing the first geometric description information and the second geometric description information to obtain final geometric description information;
and generating a new geometric title based on the final geometric description information.
2. The method according to claim 1, wherein the first geometric description information includes geometric object information and geometric object constraint information, and the geometric object constraint information is used for describing relationship information between geometric objects; the acquiring of the first geometric description information of the narration text includes:
extracting geometric object information in the text narration part; and
and matching the word description part by using a regular expression to obtain the geometric object constraint information in the word description part.
3. The method of claim 2, wherein the obtaining the narrative portion and the geometric portion of the target geometric title comprises:
acquiring an image containing the target geometric theme;
segmenting a text narration part and a geometric figure part of the target geometric title in the image;
the extracting geometric object information in the narration part comprises:
recognizing text information in the word narration part through a trained text recognition model;
and performing semantic understanding on the text information, and extracting geometric object information in the text information.
4. The method of claim 3, wherein the segmenting a narrative portion and a geometric portion of the target geometric title in the image comprises:
calibrating each character of the target geometric question in the image by utilizing a character sliding window with a preset size to obtain M windows, wherein M is an integer greater than or equal to 1;
combining the M windows to obtain at least one rectangular area;
segmenting the at least one rectangular area from the image to obtain the narration part;
the geometric figure portion is determined from the remaining image portions in the image.
5. The method according to claim 1, wherein the second geometric description information includes geometric object information and geometric object constraint information, the geometric object constraint information being used for describing relationship information between respective geometric objects; the acquiring of the second geometric description information of the geometric figure part includes:
acquiring a text label and a graph of the geometric graph part;
extracting geometric object information in the graph, wherein the geometric object information comprises parameter information of geometric objects;
determining an incidence relation between the text label and the corresponding geometric object information;
determining identification information of the geometric objects in the geometric object information according to the incidence relation;
and acquiring geometric object constraint information among the geometric objects according to the identification information and the parameter information of the geometric objects.
6. The method of claim 5, wherein the obtaining the text labels and graphics of the geometric portion comprises:
calibrating the text labels of the geometric figure part by utilizing a trapezoidal sliding window with a preset size to obtain the area where each text label is located;
and filling background colors in the areas where the text labels are positioned, and taking the geometric figure part obtained after the background colors are filled as the figure.
7. The method of claim 5, wherein the extracting geometric object information in the graph comprises:
carrying out smoothing treatment on the graph;
recognizing a circle in the graph after the smoothing treatment by utilizing gradient Hough transform, and determining the circle center and the radius of the circle; and/or
Thinning the graph;
recognizing lines in the graph after thinning processing by utilizing probabilistic Hough transform, and determining end point coordinates of the lines; and/or
Various points in the graph are determined.
8. The method of claim 5, wherein the determining the association between the text label and the corresponding geometric object information comprises:
acquiring the center point coordinates of the area where each text label is located in the graph and the center point coordinates of the area where the geometric object corresponding to each geometric object information is located;
calculating the distance between each text label and each geometric object according to the center point coordinate of the area where the text label is located and the center point coordinate of the area where each geometric object is located;
and establishing an association relation between the text label with the shortest distance and the corresponding geometric object information.
9. The method of claim 5, wherein the geometric object constraint information comprises constraint information between points and lines, and wherein the constraint information between the points and the lines is obtained by using the following formula:
Figure FDA0002766924630000031
if the above formula is true, determining that constraint information between the point and the line is true;
where (x ', y') represents the coordinates of a point, and Ax '+ By' + C represents a line, where A, B, C is a constant and τ is a predefined error.
10. The method of claim 9, further comprising:
removing the unrealized geometric object constraint information from the second geometric description information;
the fusing the first geometric description information and the second geometric description information to obtain final geometric description information includes:
and fusing the first geometric description information and the second geometric description information of which the unrealistic geometric object constraint information is removed to obtain final geometric description information.
11. The method according to claim 1, wherein the fusing the first geometric description information and the second geometric description information to obtain final geometric description information comprises:
acquiring different target geometric description information in the first geometric description information and the second geometric description information;
judging whether the geometric object constraint information in the target geometric description information is true or not;
and if the geometric object constraint information in the target geometric description information is established, taking the first geometric description information and the target geometric description information as the final geometric description information.
12. The method of claim 11, wherein generating a new geometric topic based on the final geometric description information comprises:
determining geometric condition description information and geometric conclusion description information from the first geometric description information, wherein the geometric conclusion description information is geometric object constraint information to be solved, and the geometric object constraint information is used for describing relationship information among all geometric objects;
replacing the geometric conclusion description information with the established target geometric conclusion description information to obtain new geometric conclusion description information;
and generating a new first geometric subject according to the geometric condition description information and the new geometric conclusion description information.
13. The method of claim 12, wherein after generating the new first geometric title, further comprising:
determining geometric condition description information and geometric conclusion description information from each first geometric topic, wherein the geometric condition description information comprises a plurality of pieces of geometric condition information;
selecting target geometry information from the plurality of geometry information;
adding the geometric conclusion description information into the geometric condition description information to obtain new geometric condition description information;
taking the target geometric condition information as new geometric conclusion description information;
and generating a new second geometric subject according to the new geometric condition description information and the new geometric conclusion description information.
14. The method according to any one of claims 1-13, wherein after generating a new geometric title based on the final geometric description information, further comprising:
and carrying out accuracy verification on the new geometric questions, and storing the geometric questions passing the verification as final geometric questions.
15. An apparatus for generating a title, the apparatus comprising:
the title information acquisition module is used for acquiring a text description part and a geometric figure part of a target geometric title;
the description information acquisition module is used for acquiring first geometric description information of the word narration part and second geometric description information of the geometric figure part;
the information fusion module is used for fusing the first geometric description information and the second geometric description information to obtain final geometric description information;
and the title generation module is used for generating a new geometric title based on the final geometric description information.
16. An electronic device comprising a processor and a memory, the memory storing computer readable instructions that, when executed by the processor, perform the method of any of claims 1-14.
17. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-14.
CN202011242841.5A 2020-11-09 2020-11-09 Question generation method and device, electronic equipment and readable storage medium Active CN112308946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011242841.5A CN112308946B (en) 2020-11-09 2020-11-09 Question generation method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011242841.5A CN112308946B (en) 2020-11-09 2020-11-09 Question generation method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112308946A true CN112308946A (en) 2021-02-02
CN112308946B CN112308946B (en) 2023-08-18

Family

ID=74325528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011242841.5A Active CN112308946B (en) 2020-11-09 2020-11-09 Question generation method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112308946B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905860A (en) * 2021-02-09 2021-06-04 柳州智视科技有限公司 Method for replacing question condition
CN113778281A (en) * 2021-09-16 2021-12-10 联想(北京)有限公司 Auxiliary information generation method and device, electronic equipment and storage medium
CN114596353A (en) * 2022-03-04 2022-06-07 腾讯科技(深圳)有限公司 Topic processing method, device and equipment and computer readable storage medium
CN117494674A (en) * 2023-11-15 2024-02-02 华中师范大学 Automatic geometric proof question generation method and system based on existing problem adaptation

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894486A (en) * 2009-05-18 2010-11-24 国立云林科技大学 Interactive digital learning system and method for multiple-representation assisted geometric proof
CN105047029A (en) * 2015-07-20 2015-11-11 北京大学 Courseware generating method used for automatically demonstrating geometry problem solving process
CN107203514A (en) * 2017-07-18 2017-09-26 湖南光海教育科技有限公司 Intelligent tutoring exercise generation method, device and computer-readable recording medium
CN107463553A (en) * 2017-09-12 2017-12-12 复旦大学 For the text semantic extraction, expression and modeling method and system of elementary mathematics topic
CN107578659A (en) * 2017-09-27 2018-01-12 广东小天才科技有限公司 Generation method, generating means and the terminal of electronics topic
CN108133039A (en) * 2018-01-10 2018-06-08 广州视源电子科技股份有限公司 Processing method, device, electronic equipment and the storage medium of image data
CN110297963A (en) * 2019-07-02 2019-10-01 海尔优家智能科技(北京)有限公司 Test question purpose generation method and device, storage medium, electronic equipment
CN111242900A (en) * 2019-12-31 2020-06-05 电子科技大学中山学院 Product qualification determination method and device, electronic equipment and storage medium
CN111353037A (en) * 2020-02-27 2020-06-30 北京字节跳动网络技术有限公司 Topic generation method and device and computer readable storage medium
WO2020136523A1 (en) * 2018-12-28 2020-07-02 Ecomagic Ltd System and method for the recognition of geometric shapes
CN111507330A (en) * 2020-04-15 2020-08-07 腾讯科技(深圳)有限公司 Exercise recognition method and device, electronic equipment and storage medium
CN111564072A (en) * 2020-06-09 2020-08-21 暗物智能科技(广州)有限公司 Automatic question setting method and system for plane geometry
CN111626249A (en) * 2020-06-01 2020-09-04 北京易真学思教育科技有限公司 Method and device for identifying geometric figure in topic image and computer storage medium
CN111666924A (en) * 2020-07-02 2020-09-15 暗物智能科技(广州)有限公司 Automatic problem solving method and system for plane geometry

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894486A (en) * 2009-05-18 2010-11-24 国立云林科技大学 Interactive digital learning system and method for multiple-representation assisted geometric proof
CN105047029A (en) * 2015-07-20 2015-11-11 北京大学 Courseware generating method used for automatically demonstrating geometry problem solving process
CN107203514A (en) * 2017-07-18 2017-09-26 湖南光海教育科技有限公司 Intelligent tutoring exercise generation method, device and computer-readable recording medium
CN107463553A (en) * 2017-09-12 2017-12-12 复旦大学 For the text semantic extraction, expression and modeling method and system of elementary mathematics topic
CN107578659A (en) * 2017-09-27 2018-01-12 广东小天才科技有限公司 Generation method, generating means and the terminal of electronics topic
CN108133039A (en) * 2018-01-10 2018-06-08 广州视源电子科技股份有限公司 Processing method, device, electronic equipment and the storage medium of image data
WO2020136523A1 (en) * 2018-12-28 2020-07-02 Ecomagic Ltd System and method for the recognition of geometric shapes
CN110297963A (en) * 2019-07-02 2019-10-01 海尔优家智能科技(北京)有限公司 Test question purpose generation method and device, storage medium, electronic equipment
CN111242900A (en) * 2019-12-31 2020-06-05 电子科技大学中山学院 Product qualification determination method and device, electronic equipment and storage medium
CN111353037A (en) * 2020-02-27 2020-06-30 北京字节跳动网络技术有限公司 Topic generation method and device and computer readable storage medium
CN111507330A (en) * 2020-04-15 2020-08-07 腾讯科技(深圳)有限公司 Exercise recognition method and device, electronic equipment and storage medium
CN111626249A (en) * 2020-06-01 2020-09-04 北京易真学思教育科技有限公司 Method and device for identifying geometric figure in topic image and computer storage medium
CN111564072A (en) * 2020-06-09 2020-08-21 暗物智能科技(广州)有限公司 Automatic question setting method and system for plane geometry
CN111666924A (en) * 2020-07-02 2020-09-15 暗物智能科技(广州)有限公司 Automatic problem solving method and system for plane geometry

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DAN SONG等: ""Retrieving geometric information from images: the case of hand-drawn diagrams"", DATA MINING KNOWLEDGE DISCOVERY, pages 934 - 971 *
曹琦等: ""综合性大学公共数学题库的研究与设计"", 网络安全技术与应用, pages 193 - 195 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905860A (en) * 2021-02-09 2021-06-04 柳州智视科技有限公司 Method for replacing question condition
CN113778281A (en) * 2021-09-16 2021-12-10 联想(北京)有限公司 Auxiliary information generation method and device, electronic equipment and storage medium
CN114596353A (en) * 2022-03-04 2022-06-07 腾讯科技(深圳)有限公司 Topic processing method, device and equipment and computer readable storage medium
CN114596353B (en) * 2022-03-04 2024-05-21 腾讯科技(深圳)有限公司 Question processing method, device, equipment and computer readable storage medium
CN117494674A (en) * 2023-11-15 2024-02-02 华中师范大学 Automatic geometric proof question generation method and system based on existing problem adaptation

Also Published As

Publication number Publication date
CN112308946B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN112308946B (en) Question generation method and device, electronic equipment and readable storage medium
CN111723807B (en) End-to-end deep learning recognition machine for typing characters and handwriting characters
WO2019238063A1 (en) Text detection and analysis method and apparatus, and device
CN103488711B (en) A kind of method and system of quick Fabrication vector font library
CN112185520B (en) Text structuring processing system and method for medical pathology report picture
JP7289047B2 (en) Method, computer program and system for block-based document metadata extraction
CN113343740B (en) Table detection method, device, equipment and storage medium
JPH08305803A (en) Operating method of learning machine of character template set
CN112396049A (en) Text error correction method and device, computer equipment and storage medium
CN113221743A (en) Table analysis method and device, electronic equipment and storage medium
CN112949476B (en) Text relation detection method, device and storage medium based on graph convolution neural network
CN113255583B (en) Data annotation method and device, computer equipment and storage medium
CN115546809A (en) Table structure identification method based on cell constraint and application thereof
JP2019079347A (en) Character estimation system, character estimation method, and character estimation program
CN115393872B (en) Method, device and equipment for training text classification model and storage medium
CN113657274A (en) Table generation method and device, electronic equipment, storage medium and product
CN113723270A (en) File processing method and device based on RPA and AI
CN111263943A (en) Semantic normalization in document digitization
CN115131803A (en) Document word size identification method and device, computer equipment and storage medium
CN117496521A (en) Method, system and device for extracting key information of table and readable storage medium
CN115797955A (en) Table structure identification method based on cell constraint and application thereof
CN115775386A (en) User interface component identification method and device, computer equipment and storage medium
CN115512340A (en) Intention detection method and device based on picture
CN114663886A (en) Text recognition method, model training method and device
CN113449734A (en) Thinking guide image recognition and analysis reconstruction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant