CN111597393A - Theorem search method, device, equipment and storage medium - Google Patents

Theorem search method, device, equipment and storage medium Download PDF

Info

Publication number
CN111597393A
CN111597393A CN202010291305.8A CN202010291305A CN111597393A CN 111597393 A CN111597393 A CN 111597393A CN 202010291305 A CN202010291305 A CN 202010291305A CN 111597393 A CN111597393 A CN 111597393A
Authority
CN
China
Prior art keywords
theorem
type
user
search information
information
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.)
Pending
Application number
CN202010291305.8A
Other languages
Chinese (zh)
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010291305.8A priority Critical patent/CN111597393A/en
Publication of CN111597393A publication Critical patent/CN111597393A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models

Abstract

The embodiment discloses a theorem searching method, a theorem searching device, theorem searching equipment and a storage medium, and relates to the field of cloud computing. The method comprises the following steps: acquiring theorem type retrieval information currently input by a user, acquiring a theorem type set corresponding to the theorem type retrieval information according to the theorem type retrieval information, and displaying the theorem type set to the user so that the user can determine a required theorem type. By the method, when the user starts to input theorem type retrieval information, theorem retrieval is performed, and the retrieved theorem type set is fed back to the user, so that the user can directly adjust the input theorem type in time according to the fed theorem type set, a large amount of time is not wasted for constructing retrieval words, the theorem retrieval time is effectively saved, and the retrieval efficiency is improved.

Description

Theorem search method, device, equipment and storage medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a theorem search method, a theorem search device, a theorem search apparatus, and a computer storage medium.
Background
With the continuous development of computer technology, the functional applications which can be realized by computers are more and more, and great convenience is brought to people.
At present, in order to reduce the workload of people to reason or prove the mathematical theorem, a formalized mathematical theorem is generally automatically reasoned or proved by using a computer, that is, the mathematical theorem is expressed as a theorem type in a programming language, and the mathematical theorem is automatically reasoned or proved by referring to an auxiliary theorem type or a theorem type.
In practical applications, since the auxiliary theorem types or lemma types are referred to in a displayed manner, that is, the names of the referred auxiliary theorem types or lemma types need to be known, the names of the proved auxiliary theorem types or lemma types need to be retrieved by the theorem prover.
In the prior art, it is mainly necessary to input a complete auxiliary theorem type or lemma type to retrieve the name of the auxiliary theorem type or lemma type.
However, in the prior art, a situation that a user does not clearly remember a complete auxiliary theorem type or lemma type occurs, so that a great amount of time is wasted for the user to construct a search term during searching, and if a proper search term is not constructed, a desired name of the auxiliary theorem type or lemma type is not searched, thereby causing low searching efficiency.
Disclosure of Invention
It is an object of embodiments of the present disclosure to provide a new solution for theorem searching.
According to a first aspect of embodiments of the present disclosure, there is provided a theorem searching method including:
acquiring theorem type retrieval information currently input by a user;
acquiring a theorem type set corresponding to the theorem type retrieval information according to the theorem type retrieval information;
and displaying the theorem type set to the user so that the user can determine the required theorem type.
Optionally, the obtaining of theorem-type search information currently input by the user includes:
and acquiring theorem type retrieval information currently input by the user before the input operation is completed.
Optionally, before obtaining the theorem-type search information currently input by the user, the method further includes:
and judging that the input operation of the user meets a preset condition.
Optionally, the preset conditions include: the time interval for the user to stop inputting currently exceeds a preset time threshold; or the preset conditions include: and the theorem type retrieval information currently input by the user exceeds a preset length threshold.
Optionally, obtaining a theorem type set corresponding to the theorem type search information according to the theorem type search information includes:
judging whether the theorem type retrieval information is legal or not;
and if so, acquiring a theorem type set corresponding to the theorem type retrieval information from a back-end server according to the theorem type retrieval information.
Optionally, wherein the method further comprises:
and if not, acquiring a theorem type set corresponding to the theorem type retrieval information from a local cache according to the theorem type retrieval information.
Optionally, the determining whether the theorem-type search information is legal includes:
converting the theorem type search information into tree-structured theorem type search information through an abstract syntax tree algorithm;
and judging whether the theorem type retrieval information is legal or not according to the tree-structured theorem type retrieval information and a preset grammar structure.
Optionally, obtaining, according to the theorem type search information, a theorem type set corresponding to the theorem type search information from a back-end server includes:
sending the theorem type search information to a back-end server, enabling the back-end server to carry out word segmentation processing on the theorem type search information, determining a theorem type search keyword according to the theorem type search information after word segmentation, and determining a theorem type set corresponding to the theorem type search information according to the theorem type search keyword;
and acquiring a theorem type set corresponding to the theorem type retrieval information sent by the back-end server.
Optionally, before presenting the theorem types to the user, the method further includes:
selecting a specified number of theorem types from the obtained theorem type set;
and according to the selected theorem types, reconstructing a theorem type set.
According to a second aspect of embodiments of the present disclosure, there is provided a theorem searching apparatus including:
the first acquisition module is used for acquiring theorem type retrieval information currently input by a user;
the second acquisition module is used for acquiring a theorem type set corresponding to the theorem type retrieval information according to the theorem type retrieval information;
and the display module is used for displaying the theorem type set to the user so that the user can determine the required theorem type.
According to a third aspect of embodiments of the present disclosure, there is provided a theorem searching apparatus including a theorem searching device; alternatively, the first and second electrodes may be,
the apparatus comprises: a processor and a memory;
the memory is for storing executable instructions for controlling the processor to perform the method according to any one of the first aspects.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer storage medium storing computer instructions which, when executed by a processor, implement the method according to any one of the first aspect.
In the embodiment, when the user starts to input theorem type retrieval information, theorem retrieval is performed, and the retrieved theorem type set is fed back to the user, so that the user can directly adjust the input theorem type in time according to the fed theorem type set, a large amount of time is not wasted for constructing retrieval words, the theorem retrieval time is effectively saved, and the retrieval efficiency is improved.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the embodiments of the disclosure.
Fig. 1 is a block diagram of a hardware configuration of a theorem searching apparatus provided by an embodiment of the present disclosure;
FIG. 2 is a flow chart of a theorem searching method provided by an embodiment of the disclosure;
fig. 3 is a schematic structural diagram of a theorem searching apparatus according to an embodiment of the disclosure;
fig. 4 is a schematic structural diagram of another theorem searching apparatus provided in the embodiment of the disclosure;
fig. 5 is a schematic structural diagram of a theorem searching apparatus according to an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< hardware configuration >
Fig. 1 is a block diagram of a hardware configuration of a theorem searching device provided in an embodiment of the present disclosure.
The theorem indexing device 1000 can be a virtual machine or a physical machine. The theorem retrieving apparatus 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. The processor 1100 may be a central processing unit CPU, a microprocessor MCU, or the like. The memory 1200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a headphone interface, and the like. Communication device 1400 is capable of wired or wireless communication, for example. The display device 1500 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 1600 may include, for example, a touch screen, a keyboard, and the like. A user can input/output voice information through the speaker 1700 and the microphone 1800.
As applied to this embodiment, the memory 1200 is used to store computer program instructions for controlling the processor 1100 to operate to perform a retrieval method according to any embodiment of the present disclosure. The skilled person can design the instructions according to the solution disclosed in the embodiments of the present disclosure. How the instructions control the operation of the processor 1100 is well known in the art and will not be described in detail herein.
Although a plurality of devices are shown for the theorem searching apparatus 1000 in fig. 1, embodiments of the disclosure may refer to only some of the devices therein, for example, the theorem searching apparatus 1000 refers to only the memory 1200 and the processor 1100.
In the above description, a skilled person can design instructions according to the disclosed solutions of the embodiments of the present disclosure. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
< method examples >
An embodiment of the present disclosure provides a theorem search method, as shown in fig. 2, including the following steps:
s201: acquiring theorem type retrieval information currently input by a user.
In practical applications, in order to reduce the workload of people to reason or prove the mathematical theorem, a computer is generally used to automatically make a formalized mathematical theorem, that is, express the mathematical theorem as a theorem type in a programming language, and automatically make an inference or prove the mathematical theorem by referring to an auxiliary theorem type or a theorem type.
Further, since the auxiliary theorem types or lemma types are referred to and need to be applied in a display manner, that is, the names of the referred auxiliary theorem types or lemma types need to be known, the names of the proved auxiliary theorem types or lemma types need to be retrieved through the theorem prover.
Further, in the process of retrieving the proven names of the auxiliary theorem types or the theorem types through the theorem prover, the embodiment of the disclosure first needs to obtain the theorem type retrieval information currently input by the user.
It should be noted that the obtained currently-input theorem-type search information may be the current theorem-type search information before the user input operation is completed, or may be the current theorem-type search information after the user input operation is completed.
In addition, before the input operation is completed, it means that the user has not input the search information to be input, for example, the theorem-type search information that the user wants to input is "S <? "the user inputs only" S ", which is a case where the user has not input the search information to be input, that is, a case before the user input operation is completed. After the user input operation is completed, the user inputs the search information to be input, for example, the theorem-type search information that the user wants to input is "S <? ", the user enters" S <? "this case pertains to a case where the user has already input the retrieval information to be input for completion, that is, after the user input operation is completed.
It should be further noted that the theorem types described in the embodiments of the present disclosure refer to a mathematical theorem, which can be expressed as a programming language, that is, the theorem types belong to a way of expressing the mathematical theorem in a computer programming language, for example, a computer programming language a2Function + b2Function ═ c2The function expresses the pythagorean theorem, that is, the theorem type corresponding to the pythagorean theorem is: a is2Function + b2Function ═ c2A function.
Further, in order to reduce the operation load of the device, in the embodiment of the present disclosure, before acquiring the theorem-type search information currently input by the user, it is further necessary to know at which time the theorem-type search information currently input by the user needs to be acquired, that is, the embodiment of the present disclosure is triggered to acquire the theorem-type search information currently input by the user only under specific conditions.
Based on this, the embodiment of the present disclosure may determine whether the input operation of the user satisfies the preset condition in real time before acquiring the theorem-type search information currently input by the user, if the input operation satisfies the preset condition, step S201 is executed to acquire the theorem-type search information currently input by the user, and if the input operation does not satisfy the preset condition, step S201 is not executed.
It should be noted that, the embodiments of the present disclosure provide two preset conditions, which are as follows:
first preset condition: and if the time interval of the current input stop of the user exceeds a preset time threshold, if the preset time threshold is 200ms, the time interval of the current input stop of the user exceeds 200ms, the step S201 is started, otherwise, the step S201 is not executed.
Second preset condition: s201, if the theorem type search information currently input by the user exceeds a preset length threshold, if the preset length threshold is 2 characters, the theorem type search information currently input by the user exceeds 2 characters, the step is started, otherwise, the step S201 is not executed.
S202: and acquiring a theorem type set corresponding to the theorem type retrieval information according to the theorem type retrieval information.
Further, since the theorem type corresponding to the currently input theorem type search information by the user needs to be displayed to the user, in the embodiment of the present disclosure, after obtaining the currently input theorem type search information by the user, the theorem type set corresponding to the theorem type search information needs to be obtained according to the theorem type search information.
Further, because the computer can only recognize and input legal theorem-type search information, that is, the computer can only recognize the theorem-type search information conforming to the grammatical structure of the computer, and in practical applications, the theorem-type search information input by the user may have a situation that does not conform to the grammatical structure of the computer, in the process of acquiring the theorem-type set corresponding to the theorem-type search information according to the theorem-type search information, it may be determined whether the theorem-type search information is legal first, and then different manners are adopted according to the legality to acquire the theorem-type set corresponding to the theorem-type search information according to the theorem-type search information.
It should be noted that, since the theorem-type searching information currently input by the user is composed according to a certain syntactic structure, and according to the theorem type search information, obtaining the theorem type set corresponding to the theorem type search information requires judging whether the theorem type search information input by the user conforms to the computer syntax structure, therefore, in an embodiment of the present disclosure, the theorem-type search information may be converted into tree-structured theorem-type search information by an abstract syntax tree algorithm, the tree-structured theorem type retrieving information refers to a syntax structure of a programming language corresponding to the theorem type retrieving information expressed in a tree structure mode, each node on the tree structure represents one syntax structure in source codes, and whether the theorem type retrieving information is legal or not is judged according to the tree-structured theorem type retrieving information and a preset syntax structure.
Further, in the embodiment of the present disclosure, after determining whether the theorem-type search information is legal, different manners are adopted according to the legality to search the information according to the theorem-type, and a theorem-type set corresponding to the theorem-type search information is obtained, which is specifically as follows:
if the theorem type retrieval information is judged to be legal, acquiring a theorem type set corresponding to the theorem type retrieval information from a back-end server according to the theorem type retrieval information;
and if the theorem type retrieval information is judged to be illegal, acquiring a theorem type set corresponding to the theorem type retrieval information from a local cache according to the theorem type retrieval information.
It should be noted that, because the theorem-type search information does not conform to the syntax structure, the computer cannot perform a search according to the illegal theorem-type search information, and therefore, the theorem-type set corresponding to the theorem-type search information can be directly obtained from the local cache.
In addition, an embodiment of the present disclosure further provides an implementation manner for acquiring, from a backend server, a theorem type set corresponding to the theorem type search information according to the theorem type search information, which is specifically as follows:
sending the theorem type search information to a back-end server, enabling the back-end server to perform word segmentation on the theorem type search information, determining a theorem type search keyword according to the theorem type search information after word segmentation, determining a theorem type set corresponding to the theorem type search information according to the theorem type search keyword, and acquiring the theorem type set corresponding to the theorem type search information sent by the back-end server.
It should be noted that the word segmentation processing performed on the theorem-type search information may be performed according to a syntax structure, or may be performed according to a preset splitting rule, or may be performed according to a character type, which is not described in detail herein.
According to the theorem type search information after the word segmentation, the theorem type search keyword is determined, each word segmentation can be used as an independent theorem type search keyword, and a plurality of words can be recombined into a new theorem type search keyword according to a preset search expression.
And determining a theorem type set corresponding to the theorem type retrieval information according to the theorem type retrieval keywords, determining a sub-theorem type set corresponding to each theorem type retrieval keyword according to each theorem type retrieval keyword, and then taking the intersection of the sub-theorem type sets corresponding to each theorem type retrieval keyword so as to determine the theorem type set corresponding to the theorem type retrieval information.
S203: and showing the theorem type set to the user.
Further, after determining the theorem type set corresponding to the theorem type retrieval information, the embodiment of the disclosure can display the theorem type set to the user, so that the user can determine the required theorem type from the theorem type set, thereby adjusting the input theorem type in time.
It should be noted that, in order to adapt to the display area of the screen and improve the display effect, in the embodiment of the present disclosure, important theorem types in the theorem type set may be displayed to the user, specifically, a specified number of theorem types are selected from the obtained theorem type set, and the theorem type set is rebuilt according to the selected theorem types.
It should be noted that, the selection of the specified number of theorem types from the obtained set of theorem types can be set according to actual situations, for example, the specified number of theorem types can be selected continuously from the beginning, or the specified number of theorem types can be selected from the beginning.
By the method, when the user starts to input theorem type retrieval information, theorem retrieval is performed, and the retrieved theorem type set is fed back to the user, so that the user can directly adjust the input theorem type in time according to the fed theorem type set, a large amount of time is not wasted for constructing retrieval words, the theorem retrieval time is effectively saved, and the retrieval efficiency is improved.
< apparatus embodiment >
As shown in fig. 3, an embodiment of the present disclosure further provides a theorem searching apparatus, including:
a first obtaining module 301, configured to obtain theorem-type search information currently input by a user;
a second obtaining module 302, configured to obtain, according to the theorem-type search information, a theorem-type set corresponding to the theorem-type search information;
a presentation module 303, configured to present the theorem type sets to the user, so that the user determines a required theorem type.
The first obtaining module 301 is specifically configured to obtain theorem-type search information currently input by the user before the input operation is completed.
The device further comprises:
a monitoring module 304, configured to determine that an input operation of the user meets a preset condition before the first obtaining module 301 obtains the theorem-type search information currently input by the user.
The preset conditions include: the time interval for the user to stop inputting currently exceeds a preset time threshold; or the preset conditions include: and the theorem type retrieval information currently input by the user exceeds a preset length threshold.
The second obtaining module 302 is specifically configured to determine whether the theorem-type search information is legal; and if so, acquiring a theorem type set corresponding to the theorem type retrieval information from a back-end server according to the theorem type retrieval information.
The second obtaining module 302 is further configured to, if not, obtain, according to the theorem-type search information, a theorem-type set corresponding to the theorem-type search information from a local cache.
The second obtaining module 302 is further configured to convert the theorem-type search information into tree-structured theorem-type search information through an abstract syntax tree algorithm; and judging whether the theorem type retrieval information is legal or not according to the tree-structured theorem type retrieval information and a preset grammar structure.
The second obtaining module 302 is further configured to send the theorem-type search information to a back-end server, so that the back-end server performs word segmentation on the theorem-type search information, determine a theorem-type search keyword according to the theorem-type search information after word segmentation, and determine a theorem-type set corresponding to the theorem-type search information according to the theorem-type search keyword; and acquiring a theorem type set corresponding to the theorem type retrieval information sent by the back-end server.
The device further comprises:
a selecting module 305, configured to select a specified number of theorem types from the obtained theorem type sets before the presenting module 303 presents the theorem type sets to the user; and according to the selected theorem types, reconstructing a theorem type set.
It should be noted that the apparatus establishes a communication connection with a backend server to implement data transmission, and the backend server runs a backend language process, and can perform word segmentation processing on the theorem-type search information through the backend language process, determine a theorem-type search keyword according to the theorem-type search information after word segmentation, and determine a theorem-type set corresponding to the theorem-type search information according to the theorem-type search keyword.
In addition, in the implementation process of the embodiment of the present disclosure, a theorem searching apparatus as shown in fig. 4 may also be employed, where the apparatus includes:
an editor 401, configured to obtain theorem-type search information currently input by a user;
a retrieving plug-in 402, configured to obtain a theorem type set corresponding to the theorem type retrieving information according to the theorem type retrieving information, and further configured to display the theorem type set to the user, so that the user determines a required theorem type.
The editor 401 is configured to obtain theorem-type search information currently input by the user before the input operation is completed.
The editor 401 is configured to determine that an input operation of a user meets a preset condition before acquiring theorem-type search information currently input by the user.
The preset conditions include: the time interval for the user to stop inputting currently exceeds a preset time threshold; or the preset conditions include: and the theorem type retrieval information currently input by the user exceeds a preset length threshold.
The search plug-in 402 is specifically configured to determine whether the theorem-type search information is legal; if yes, acquiring a theorem type set corresponding to the theorem type retrieval information from a back-end server according to the theorem type retrieval information; and if not, acquiring a theorem type set corresponding to the theorem type retrieval information from a local cache according to the theorem type retrieval information.
The search plug-in 402 is further configured to convert the theorem-type search information into tree-structured theorem-type search information through an abstract syntax tree algorithm; and judging whether the theorem type retrieval information is legal or not according to the tree-structured theorem type retrieval information and a preset grammar structure.
The retrieval plug-in 402 is further configured to send the theorem-type retrieval information to a back-end server, so that the back-end server performs word segmentation on the theorem-type retrieval information, determine a theorem-type retrieval keyword according to the theorem-type retrieval information after word segmentation, and determine a theorem-type set corresponding to the theorem-type retrieval information according to the theorem-type retrieval keyword; and acquiring a theorem type set corresponding to the theorem type retrieval information sent by the back-end server.
The retrieval plug-in 402 is configured to select a specified number of theorem types from the obtained theorem type sets before the theorem type sets are presented to the user; and according to the selected theorem types, reconstructing a theorem type set.
It should be noted here that the editor 401 may support a third-party plug-in system, such as Vim, emails, VSCode, etc., and the editor may support the third-party plug-in system, the search plug-in 402 may implement file event driving, when a user opens a file suffix of a related theorem proving language through the editor 401, a plug-in process of the search plug-in 402 is triggered to be started, the plug-in process of the search plug-in 402 establishes a communication connection with a back-end server to implement data transmission, subsequently, the user may call a theorem search command through the editor 401, the editor 401 may pop up a search box and a theorem type display window, the user may input theorem type search information in the search box, the editor 401 obtains the theorem type search information currently input by the user and transmits the theorem type search information to the search plug-in 402, the search plug-in 402 transmits the theorem type search information to the back-end server according to the theorem type search information, the back-end server runs a back-end language process, word segmentation processing can be carried out on the theorem type retrieval information through the back-end language process, a theorem type retrieval keyword is determined according to the theorem type retrieval information after word segmentation, and a theorem type set corresponding to the theorem type retrieval information is determined according to the theorem type retrieval keyword.
It is also noted herein that type checking and static analysis can be implemented in the search plug-in 402 process if the corresponding theorem proving language does not have the capability of corresponding interactive type checking or static analysis.
< apparatus embodiment >
An embodiment of the present disclosure further provides theorem searching equipment, as shown in fig. 5, where the theorem searching equipment includes a theorem searching device in the above-described device embodiment.
Alternatively, the theorem retrieving apparatus includes a memory 501 and a processor 502. Wherein the memory is configured to store executable instructions for controlling the processor to perform the method according to any of the above method embodiments.
< computer storage Medium >
Embodiments of the present disclosure also provide a computer storage medium storing computer instructions that, when executed by a processor, implement the method as in any one of the above method embodiments.
Embodiments of the present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement aspects of embodiments of the disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations for embodiments of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry may execute computer-readable program instructions to implement aspects of embodiments of the present disclosure by utilizing state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of embodiments of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (20)

1. A theorem searching method includes:
acquiring theorem type retrieval information currently input by a user;
acquiring a theorem type set corresponding to the theorem type retrieval information according to the theorem type retrieval information;
and displaying the theorem type set to the user so that the user can determine the required theorem type.
2. The method of claim 1, wherein obtaining theorem-type search information currently input by a user comprises:
and acquiring theorem type retrieval information currently input by the user before the input operation is completed.
3. The method of claim 1, prior to obtaining theorem-type search information currently entered by a user, the method further comprising:
and judging that the input operation of the user meets a preset condition.
4. The method of claim 3, the preset conditions comprising: the time interval for the user to stop inputting currently exceeds a preset time threshold; or
The preset conditions include: and the theorem type retrieval information currently input by the user exceeds a preset length threshold.
5. The method according to claim 1, wherein obtaining a theorem-type set corresponding to the theorem-type search information according to the theorem-type search information comprises:
judging whether the theorem type retrieval information is legal or not;
and if so, acquiring a theorem type set corresponding to the theorem type retrieval information from a back-end server according to the theorem type retrieval information.
6. The method of claim 5, further comprising:
and if not, acquiring a theorem type set corresponding to the theorem type retrieval information from a local cache according to the theorem type retrieval information.
7. The method of claim 5, determining whether the theorem-type search information is legal, comprising:
converting the theorem type search information into tree-structured theorem type search information through an abstract syntax tree algorithm;
and judging whether the theorem type retrieval information is legal or not according to the tree-structured theorem type retrieval information and a preset grammar structure.
8. The method according to claim 5, wherein obtaining a theorem type set corresponding to the theorem type search information from a backend server according to the theorem type search information comprises:
sending the theorem type search information to a back-end server, enabling the back-end server to carry out word segmentation processing on the theorem type search information, determining a theorem type search keyword according to the theorem type search information after word segmentation, and determining a theorem type set corresponding to the theorem type search information according to the theorem type search keyword;
and acquiring a theorem type set corresponding to the theorem type retrieval information sent by the back-end server.
9. The method of claim 1, prior to presenting the set of theorem types to the user, the method further comprising:
selecting a specified number of theorem types from the obtained theorem type set;
and according to the selected theorem types, reconstructing a theorem type set.
10. A theorem searching device comprising:
the first acquisition module is used for acquiring theorem type retrieval information currently input by a user;
the second acquisition module is used for acquiring a theorem type set corresponding to the theorem type retrieval information according to the theorem type retrieval information;
and the display module is used for displaying the theorem type set to the user so that the user can determine the required theorem type.
11. The apparatus according to claim 10, wherein the first obtaining module is specifically configured to obtain theorem-type search information currently input by the user before the input operation is completed.
12. The apparatus of claim 10, the apparatus further comprising:
and the monitoring module is used for judging that the input operation of the user meets the preset condition before the first acquisition module acquires the theorem type retrieval information currently input by the user.
13. The apparatus of claim 12, the preset conditions comprising: the time interval for the user to stop inputting currently exceeds a preset time threshold; or the preset conditions include: and the theorem type retrieval information currently input by the user exceeds a preset length threshold.
14. The apparatus according to claim 10, wherein the second obtaining module is specifically configured to determine whether the theorem-type search information is legal; and if so, acquiring a theorem type set corresponding to the theorem type retrieval information from a back-end server according to the theorem type retrieval information.
15. The apparatus according to claim 14, wherein the second obtaining module is further configured to, if not, obtain, according to the theorem-type search information, a theorem-type set corresponding to the theorem-type search information from a local cache.
16. The apparatus according to claim 14, wherein the second obtaining module is further configured to convert the theorem-type search information into tree-structured theorem-type search information through an abstract syntax tree algorithm; and judging whether the theorem type retrieval information is legal or not according to the tree-structured theorem type retrieval information and a preset grammar structure.
17. The apparatus according to claim 14, wherein the second obtaining module is further configured to send the theorem-type search information to a back-end server, so that the back-end server performs word segmentation on the theorem-type search information, determine a theorem-type search keyword according to the theorem-type search information after word segmentation, and determine a theorem-type set corresponding to the theorem-type search information according to the theorem-type search keyword; and acquiring a theorem type set corresponding to the theorem type retrieval information sent by the back-end server.
18. The apparatus of claim 10, the apparatus further comprising:
the selecting module is used for selecting a specified number of theorem types from the obtained theorem type sets before the displaying module displays the theorem type sets to the user; and according to the selected theorem types, reconstructing a theorem type set.
19. A theorem searching apparatus comprising: a processor and a memory;
the memory is to store executable instructions to control the processor to perform the method of any one of claims 1-9.
20. A computer storage medium storing computer instructions which, when executed by a processor, implement the method of any one of claims 1-9.
CN202010291305.8A 2020-04-14 2020-04-14 Theorem search method, device, equipment and storage medium Pending CN111597393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010291305.8A CN111597393A (en) 2020-04-14 2020-04-14 Theorem search method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010291305.8A CN111597393A (en) 2020-04-14 2020-04-14 Theorem search method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111597393A true CN111597393A (en) 2020-08-28

Family

ID=72187499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010291305.8A Pending CN111597393A (en) 2020-04-14 2020-04-14 Theorem search method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111597393A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110082828A1 (en) * 2009-10-06 2011-04-07 International Business Machines Corporation Large Scale Probabilistic Ontology Reasoning
CN105468673A (en) * 2015-11-10 2016-04-06 河南师范大学 Mathematical formula search method and system
CN105868177A (en) * 2016-03-24 2016-08-17 河北师范大学 Universal formula search method
CN106372073A (en) * 2015-07-21 2017-02-01 北京大学 Mathematical formula retrieval method and apparatus
CN107145510A (en) * 2017-03-31 2017-09-08 西安科技大学 A kind of mathematical formulae searching method and device
CN108133168A (en) * 2016-12-01 2018-06-08 北京新唐思创教育科技有限公司 Formula searching method and its device in a kind of text identification
CN110414319A (en) * 2019-06-13 2019-11-05 中国软件与技术服务股份有限公司 It is a kind of based on the formula similarity calculating method and scientific document search method that are effectively matched subtree and device
CN110795526A (en) * 2019-10-29 2020-02-14 北京林业大学 Mathematical formula index creating method and system for retrieval system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110082828A1 (en) * 2009-10-06 2011-04-07 International Business Machines Corporation Large Scale Probabilistic Ontology Reasoning
CN106372073A (en) * 2015-07-21 2017-02-01 北京大学 Mathematical formula retrieval method and apparatus
CN105468673A (en) * 2015-11-10 2016-04-06 河南师范大学 Mathematical formula search method and system
CN105868177A (en) * 2016-03-24 2016-08-17 河北师范大学 Universal formula search method
CN108133168A (en) * 2016-12-01 2018-06-08 北京新唐思创教育科技有限公司 Formula searching method and its device in a kind of text identification
CN107145510A (en) * 2017-03-31 2017-09-08 西安科技大学 A kind of mathematical formulae searching method and device
CN110414319A (en) * 2019-06-13 2019-11-05 中国软件与技术服务股份有限公司 It is a kind of based on the formula similarity calculating method and scientific document search method that are effectively matched subtree and device
CN110795526A (en) * 2019-10-29 2020-02-14 北京林业大学 Mathematical formula index creating method and system for retrieval system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
宋婷禹: "中学数学公式及定理检索系统的研究与设计" *
宋婷禹: "中学数学公式及定理检索系统的研究与设计", 《万方数据知识服务平台》 *

Similar Documents

Publication Publication Date Title
CN109886326B (en) Cross-modal information retrieval method and device and storage medium
US20210232847A1 (en) Method and apparatus for recognizing text sequence, and storage medium
US10366160B2 (en) Automatic generation and display of context, missing attributes and suggestions for context dependent questions in response to a mouse hover on a displayed term
US10776082B2 (en) Programming environment augment with automated dialog system assistance
US20170017639A1 (en) User based text prediction
KR20210132578A (en) Method, apparatus, device and storage medium for constructing knowledge graph
CN103678704A (en) Picture recognition method, system, equipment and device based on picture information
EP3832492A1 (en) Method and apparatus for recommending voice packet, electronic device, and storage medium
US10592304B2 (en) Suggesting application programming interfaces based on feature and context analysis
CN108449255B (en) Comment interaction method and equipment, client device and electronic equipment
CN111881339B (en) Method and device for pushing and notifying resource information, electronic equipment and storage medium
CN113407850A (en) Method and device for determining and acquiring virtual image and electronic equipment
JP7241122B2 (en) Smart response method and device, electronic device, storage medium and computer program
CN113742332A (en) Data storage method, device, equipment and storage medium
CN111597393A (en) Theorem search method, device, equipment and storage medium
WO2023115831A1 (en) Application testing method and apparatus, electronic device and storage medium
JP2023012541A (en) Question answering method, device, and electronic apparatus based on table
US11966562B2 (en) Generating natural languages interface from graphic user interfaces
US10891437B2 (en) Script modification
CN111078989B (en) Application program recommendation method and device and electronic equipment
US20200042104A1 (en) System and Method for Cognitive User-Behavior Driven Messaging or Chat Applications
CN113919373A (en) Neural machine translation method, training method and device of model thereof, and electronic device
CN111598137A (en) Method and device for providing reasoning service and electronic equipment
CN111191795A (en) Method, device and system for training machine learning model
CN111339241B (en) Problem duplicate checking method and device and electronic equipment

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