CN109656942B - Method, device, computer equipment and storage medium for storing SQL (structured query language) sentences - Google Patents

Method, device, computer equipment and storage medium for storing SQL (structured query language) sentences Download PDF

Info

Publication number
CN109656942B
CN109656942B CN201811349074.0A CN201811349074A CN109656942B CN 109656942 B CN109656942 B CN 109656942B CN 201811349074 A CN201811349074 A CN 201811349074A CN 109656942 B CN109656942 B CN 109656942B
Authority
CN
China
Prior art keywords
query language
structured query
keywords
catalog
storing
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.)
Active
Application number
CN201811349074.0A
Other languages
Chinese (zh)
Other versions
CN109656942A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811349074.0A priority Critical patent/CN109656942B/en
Publication of CN109656942A publication Critical patent/CN109656942A/en
Application granted granted Critical
Publication of CN109656942B publication Critical patent/CN109656942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a method, a device, computer equipment and a storage medium for storing SQL sentences, which comprise the following steps: acquiring a stored structured query language statement; selecting target keywords matched with keywords of the structured query language sentence from a preset catalog keyword list; and storing the structured query language sentence into a catalog where the target keyword is located. The terminal acquires the stored SQL sentences, selects target keywords matched with keywords of the SQL sentences from a preset catalog keyword list, and stores the SQL sentences into the catalog of the target keywords. By the method, the instant developer can store the SQL statement in the matched catalogue at will, and the SQL statement can be searched according to the catalogue in the later inquiry, so that the process is convenient, the storage flow of the developer is simplified, and the storage efficiency is improved.

Description

Method, device, computer equipment and storage medium for storing SQL (structured query language) sentences
Technical Field
The embodiment of the invention relates to the field of finance, in particular to a method, a device, computer equipment and a storage medium for storing SQL sentences.
Background
The structured query language (Structured Query Language) is SQL for short, is a special purpose programming language, is a database query and programming language, and is used for accessing data and querying, updating and managing a relational database system; and is also an extension of the database script file.
The structured query language allows the user to work on a high-level data structure, does not require the user to specify a storage method for data, does not require the user to know a specific data storage mode, has different database systems with completely different underlying structures, and can use the same structured query language as an interface for data input and management.
At present, when a developer programs, some commonly used SQL sentences are often stored, so that the SQL sentences can be conveniently and directly called at the future time. However, in general, since many SQL statements are stored, it is very difficult to perform a post-query, and even if a directory of related SQL statements is provided, it is necessary to select an appropriate directory location from a plurality of directory information during storage, which is troublesome in operation.
Disclosure of Invention
In order to solve the technical problems, the embodiment of the invention adopts the following technical scheme: there is provided a method of storing SQL statements, comprising the steps of:
acquiring a stored structured query language statement;
selecting target keywords matched with keywords of the structured query language sentence from a preset catalog keyword list;
and storing the structured query language sentence into a catalog where the target keyword is located.
Optionally, the selecting, from a preset directory keyword list, a target keyword that matches with the keyword of the structured query language sentence further includes:
comparing the keywords in the catalog keyword list with the keywords of the structured query language sentence;
and when the keywords in the catalog keyword list have the same phrase as the keywords of the structured query language sentence, taking the same phrase as the target keyword.
Optionally, before comparing the keywords in the catalog keyword list with the keywords of the structured query language sentence, the method further includes:
extracting preset marking information of the structured query language sentence, wherein the marking information is used for representing the name of the problem solved by the structured query language sentence;
and taking the phrase in the marking information as a keyword of the structured query language sentence.
Optionally, the storing the sentence in a directory where the target keyword is located includes:
the method comprises the steps of obtaining marking information of a structured query language sentence, wherein the marking information is also used for representing the priority of the structured query language sentence for solving the same problem;
and sequencing the structured query language sentences according to the priority.
Optionally, before selecting the target keyword matched with the keyword of the structured query language sentence from the preset catalog keyword list, the method further includes:
acquiring catalog information of an item where the structured query language statement is located, wherein the catalog information comprises hierarchical catalog information;
keywords are extracted from the hierarchical directory information of the items and added to the directory keyword list.
Optionally, the selecting, from a preset directory keyword list, a target keyword matched with the keyword of the structured query language sentence includes:
obtaining hierarchical directory information of the structured query language sentence in the item;
comparing the hierarchical directory information with keywords in the directory keyword list;
and when the comparison is consistent, taking the keywords which are consistent in comparison as the target keywords.
Optionally, after the statement is stored in the directory where the target keyword is located, the method further includes:
acquiring the times of the user calling the structured query language statement;
and selecting the structured query language sentences with calling times larger than preset times from the structured query language sentences, and displaying the keywords of the structured query language sentences in preset positions.
In order to solve the above technical problem, an embodiment of the present invention further provides a device for storing an SQL statement, including:
the acquisition module is used for acquiring the stored structured query language statement;
the processing module is used for selecting target keywords matched with the keywords of the structured query language sentence from a preset catalog keyword list;
and the execution module is used for storing the structured query language statement into a catalog where the target keyword is located.
Optionally, the processing module includes:
the first processing sub-module is used for comparing the keywords in the catalog keyword list with the keywords of the structured query language sentence;
and the first execution sub-module is used for taking the same phrase as the target keyword when the phrase which is the same as the keyword of the structured query language sentence exists in the keywords in the catalog keyword list.
Optionally, the method further comprises:
the first acquisition sub-module is used for extracting the preset marking information of the structured query language statement, wherein the marking information is used for representing the names of the problems solved by the structured query language statement;
and the second execution sub-module is used for taking the phrase in the marking information as the keyword of the structured query language sentence.
Optionally, the execution module includes:
the second acquisition sub-module is used for acquiring the marking information of the structured query language statement, wherein the marking information is also used for representing the priority of the structured query language statement for solving the same problem;
and the third execution module is used for sequencing the structured query language sentences according to the priority.
Optionally, the method further comprises:
a third obtaining sub-module, configured to obtain catalog information of an item where the structured query language sentence is located, where the catalog information includes hierarchical catalog information;
and the second processing sub-module is used for extracting keywords from the hierarchical directory information of the items and adding the keywords into the directory keyword list.
Optionally, the processing module further includes:
a fourth obtaining sub-module, configured to obtain hierarchical directory information where the structured query language sentence is located in the item;
the third processing sub-module is used for comparing the hierarchical directory information with keywords in the directory keyword list;
and the fourth execution sub-module is used for taking the keywords which are consistent in comparison as the target keywords when the comparison is consistent.
Optionally, the method further comprises:
a fifth obtaining sub-module, configured to obtain the number of times the user invokes the structured query language sentence;
and the fourth processing sub-module is used for selecting the structured query language sentences with calling times larger than preset times from the structured query language sentences, and displaying the keywords of the structured query language sentences in preset positions.
In order to solve the above technical problem, an embodiment of the present invention further provides a computer device, including a memory and a processor, where the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the processor is caused to execute the steps of the method for storing SQL statements.
To solve the above technical problem, the embodiments of the present invention further provide a storage medium storing computer readable instructions, where the computer readable instructions when executed by one or more processors cause the one or more processors to execute the steps of the method for storing SQL statements described above.
The embodiment of the invention has the beneficial effects that: the terminal acquires the stored SQL sentences, selects target keywords matched with keywords of the SQL sentences from a preset catalog keyword list, and stores the SQL sentences into the catalog of the target keywords. By the method, the instant developer can store the SQL statement in the matched catalogue at will, and the SQL statement can be searched according to the catalogue in the later inquiry, so that the process is convenient, the storage flow of the developer is simplified, and the storage efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a basic flow diagram of a method for storing SQL statements according to an embodiment of the invention;
FIG. 2 is a basic flow chart of a method for selecting a target keyword matching with a keyword of an SQL sentence from a preset list of directory keywords according to an embodiment of the present invention;
FIG. 3 is a basic flow chart of a method for determining keywords of an SQL sentence according to an embodiment of the present invention;
FIG. 4 is a basic flow diagram of a method for storing SQL statements in a directory with target keywords according to an embodiment of the invention;
fig. 5 is a basic flow diagram of a method for obtaining a list of directory keywords according to an embodiment of the present invention;
FIG. 6 is a basic flow chart of another method for selecting a target keyword matching with a keyword of an SQL sentence from a preset list of directory keywords according to an embodiment of the present invention;
FIG. 7 is a basic flow chart of a method for storing SQL statements according to an embodiment of the invention;
FIG. 8 is a basic block diagram of a device for storing SQL statements according to an embodiment of the invention;
fig. 9 is a basic structural block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to enable those skilled in the art to better understand the present invention, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present invention with reference to the accompanying drawings.
In some of the flows described in the specification and claims of the present invention and in the foregoing figures, a plurality of operations occurring in a particular order are included, but it should be understood that the operations may be performed out of order or performed in parallel, with the order of operations such as 101, 102, etc., being merely used to distinguish between the various operations, the order of the operations themselves not representing any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
Examples
As used herein, a "terminal" includes both a device of a wireless signal receiver having no transmitting capability and a device of receiving and transmitting hardware having receiving and transmitting hardware capable of performing bi-directional communications over a bi-directional communication link, as will be appreciated by those skilled in the art. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; a PCS (Personal Communications Service, personal communication system) that may combine voice, data processing, facsimile and/or data communication capabilities; a PDA (Personal Digital Assistant ) that can include a radio frequency receiver, pager, internet/intranet access, web browser, notepad, calendar and/or GPS (Global Positioning System ) receiver; a conventional laptop and/or palmtop computer or other appliance that has and/or includes a radio frequency receiver. As used herein, "terminal," "terminal device" may be portable, transportable, installed in a vehicle (aeronautical, maritime, and/or land-based), or adapted and/or configured to operate locally and/or in a distributed fashion, to operate at any other location(s) on earth and/or in space. The "terminal" and "terminal device" used herein may also be a communication terminal, a network access terminal, and a music/video playing terminal, for example, may be a PDA, a MID (Mobile Internet Device ), and/or a mobile phone with a music/video playing function, and may also be a smart tv, a set top box, and other devices.
The client terminal in this embodiment is the above-described terminal.
Specifically, referring to fig. 1, fig. 1 is a basic flow chart of a method for storing SQL statements in this embodiment.
As shown in fig. 1, the method for storing the SQL statement comprises the following steps:
s1100, acquiring a stored SQL sentence;
the structured query language (Structured Query Language, SQL) is a database query and programming language for storing data and querying, updating and managing relational database systems. The structured query language is a high-level, non-procedural programming language that allows users to work on high-level data structures. The method does not require the user to specify a data storage method or the user to know a specific data storage mode, so that different database systems with completely different substructures can use the same structured query language as an interface for data input and management. The structured query language can be nested, which gives it great flexibility and powerful functionality.
In the embodiment of the invention, SQL sentences are generally sentences which can be repeatedly used by a user in the programming process. In practical application, a user encounters a repeatedly written SQL sentence in the programming process, and in order to improve the writing efficiency, such a commonly used sentence is usually stored. It should be noted that the stored location may be in a programmed target browser.
S1200, selecting a target keyword matched with a keyword of an SQL sentence from a preset catalog keyword list;
the preset list of directory keywords is a list including a plurality of keyword directories, for example, the keywords may be a certain keyword extracted from an SQL statement, may also be a keyword of a certain development project progress preset by a user, may also be a keyword of a solution for a certain problem, and the like. In practical application, when the user stores the SQL sentence, the terminal can extract the keyword from the title displayed on the current page and automatically add the keyword as the directory keyword into the directory keyword list.
In the embodiment of the invention, a user stores SQL sentences to be stored in a programming process, after a terminal obtains the stored SQL sentences, the SQL sentences are matched with preset directory keywords, in the matching process, the terminal compares the SQL sentences with the directory keywords, when the SQL sentences contain the directory keywords, the comparison is consistent, and the terminal selects the keywords with consistent comparison as target keywords.
In some embodiments, in order to implement storing the SQL statement under a specific directory, the user may set a keyword according to personal requirements during the storing process, for example, to record the process of developing a certain project, may set a keyword of the project name stage, and to mark the problem solved by the SQL, may set a keyword of the problem.
S1300, storing the SQL sentence into a catalog where the target keyword is located.
In practical applications, the same SQL statement may be matched with multiple keywords, in which case the SQL statement is stored in the directory where the multiple keywords reside, respectively.
In the method for storing the SQL sentence, the terminal acquires the stored SQL sentence, selects the target keyword matched with the keyword of the SQL sentence from the preset catalog keyword list, and stores the SQL sentence into the catalog of the target keyword. By the method, the instant developer can store the SQL statement in the matched catalogue at will, and the SQL statement can be searched according to the catalogue in the later inquiry, so that the process is convenient, the storage flow of the developer is simplified, and the storage efficiency is improved.
In practical application, when selecting a target keyword, the terminal needs to match the keyword of the SQL sentence with a preset directory keyword, and takes the keyword successfully matched as the target keyword. The embodiment of the invention provides a method for selecting target keywords matched with keywords of SQL sentences from a preset catalog keyword list, as shown in FIG. 2, and FIG. 2 is a basic flow diagram of a method for selecting target keywords matched with keywords of SQL sentences from a preset catalog keyword list.
Specifically, as shown in fig. 2, step S1200 includes the steps of:
s1210, comparing keywords in the catalog keyword list with keywords of SQL sentences;
in the embodiment of the invention, the keywords of the SQL sentence can be the phrase of the SQL sentence, for example, the phrase at the first position, the name of the script and the project related to the SQL sentence, the name of the problem solved by the SQL sentence and the like.
In practical application, since the SQL statement is only a programming statement, the expressed, solved and expanded scheme cannot be intuitively obtained from the statement, so when the SQL statement is stored in a specific keyword catalog to solve a specific problem of a user, the embodiment of the invention provides a method for determining keywords of the SQL statement, as shown in fig. 3, and fig. 3 is a basic flow diagram of the method for determining keywords of the SQL statement provided by the embodiment of the invention.
Specifically, as shown in fig. 3, step S1210 includes the steps of:
s1211, extracting mark information preset for SQL sentences;
the markup information is used to represent the names of the problems solved by the SQL statement. In some embodiments, the markup information is also used to represent other specific purposes, such as notes of the SQL statement, development processes, specific processes for solving problems, matters, or merits of solutions.
S1212, using the phrase in the mark information as the key word of SQL sentence.
In the embodiment of the invention, the phrase in the extracted marking information is used as the key word of the SQL sentence, wherein the key word of the SQL sentence can be all information in the marking information, or can be part of characters, letters and the like.
S1220, when the keywords in the catalog keyword list have the same phrases as the keywords of the SQL sentence, the same phrases are used as target keywords.
When the keywords in the list of the directory keywords have the same phrases as the keywords of the SQL sentences, the keywords of the SQL sentences are successfully matched with the keywords in the list of the directory keywords, and the phrases with consistent comparison, namely the same phrases, are extracted and used as target keywords.
In the embodiment of the invention, the problem solved by the SQL statement is set in the marking information, and the SQL statement is stored under the directory where the problem is located, so that a user can conveniently find the required SQL statement according to the directory keywords, and the searching efficiency is improved. However, in practical application, when a plurality of SQL sentences are stored in a same directory, the user may interfere with the SQL sentences due to excessive numbers in the process of calling the SQL sentences, so in order to solve the problem, an embodiment of the present invention provides a method for storing the SQL sentences in a directory where the SQL sentences and the target keywords are located, as shown in fig. 4, and fig. 4 is a basic flow diagram of a method for storing the SQL sentences in a directory where the SQL sentences and the target keywords are located according to an embodiment of the present invention.
Specifically, as shown in fig. 4, step S1300 includes the steps of:
s1311, acquiring marking information of an SQL sentence, wherein the marking information is used for representing the priority of the SQL sentence for solving the same problem;
the priority is used to represent a preference level at which SQL statements can solve the same problem. With the update of technology, a plurality of solutions can appear for the same problem, and when a user stores SQL sentences, the user can mark priority levels for the SQL sentences used in different periods according to subjective feelings in the problem solving process. For example, when using the first SQL statement, the problem can be solved barely, but many holes are left at the same time, level 3 can be set, when using the second SQL statement, the problem can be solved well, level 4 can be set, when using the third SQL statement, not only the problem can be solved, but also many holes can be made up, and level 5 can be set.
S1312, ordering the SQL sentences according to the priority.
The terminal sorts the obtained SQL sentences according to the priority, for example, from the highest level to the lowest level, so that a user can conveniently select the optimal SQL sentences under the catalogue where the keywords are located, and the efficiency is improved.
In practical application, when a certain project is developed, a plurality of stages appear according to the development of the project, so in order to record important SQL statements in each stage, an embodiment of the present invention provides a method for obtaining a directory keyword list, as shown in fig. 5, fig. 5 is a basic flow diagram of a method for obtaining a directory keyword list provided in the embodiment of the present invention.
Specifically, as shown in fig. 5, the following steps are further included before step S1200:
s1201, acquiring catalog information of an item where the SQL statement is located, wherein the catalog information comprises hierarchical catalog information;
the catalog information is used to represent information for staged work tasks of the project, wherein the catalog information includes a plurality of staged tasks, each staged task in turn including a sub-division task. And when the terminal stores the SQL sentence, acquiring the catalog information of the whole project. In this way, the terminal can acquire a plurality of directories according to the staged tasks of the items.
S1202, extracting keywords from hierarchical directory information of the items, and adding the keywords into a directory keyword list.
When the terminal extracts the keywords, the terminal can directly extract all the information in the hierarchical directory, or select the keywords for extraction, and add the extracted keywords into a preset directory keyword list.
In the embodiment of the invention, in the process of adding the hierarchical directory information to the directory keyword list, the hierarchical directory information can be added according to the sequence of the original hierarchical directory, so that SQL sentences can be displayed according to the progress sequence of the items, and a directory system is established.
In order to effectively record and develop the business script related to the project, backtracking of the problem is facilitated. The embodiment of the invention provides a method for selecting a target keyword matched with a keyword of an SQL sentence from a preset catalog keyword list, as shown in fig. 6, fig. 6 is a basic flow diagram of another method for selecting a target keyword matched with a keyword of an SQL sentence from a preset catalog keyword list.
Specifically, as shown in fig. 6, step S1300 further includes the steps of:
s1321, acquiring hierarchical directory information of SQL sentences in the project;
in the embodiment of the invention, the terminal acquires hierarchical directory information of the SQL sentence in the project in the process of storing the SQL sentence, namely the position of the SQL sentence in the project.
S1322, comparing the hierarchical directory information with keywords in a directory keyword list;
s1323, when the comparison is consistent, the keywords which are consistent in comparison are taken as target keywords.
In the embodiment of the invention, all characters in the hierarchical directory information are compared with keywords in the directory keyword list, and the keywords with the same comparison are used as target keywords. The comparison process in the embodiment of the present invention is shown in fig. 2, and will not be described herein.
In an application scenario of the embodiment of the invention, when a user programs and designs an item, a terminal automatically acquires titles and the like of SQL sentences as keywords and automatically adds the keywords into a catalog keyword list, so that after the user stores the SQL sentences, the terminal compares the SQL sentences with keywords in the catalog keyword list.
In practical application, a situation that some SQL statements are used more times may occur, and in order to facilitate user acquisition, an embodiment of the present invention provides a method for storing SQL statements, as shown in fig. 7, fig. 7 is a basic flow diagram of the method for storing SQL statements provided in the embodiment of the present invention.
Specifically, as shown in fig. 7, step S1300 further includes the following steps:
s1331, acquiring the times of invoking SQL sentences by a user;
in the embodiment of the invention, the terminal records the number of times that the user clicks the catalog where the target keyword is located as the coefficient of the SQL sentence called by the user, wherein the more the number of times of calling is, the higher the index of the SQL sentence is.
S1332, selecting sentences with calling times larger than preset times from the SQL sentences, and displaying keywords of the SQL sentences in preset positions.
The preset times are set for distinguishing common SQL sentences and non-common SQL sentences, and when the calling times are larger than the preset times, the SQL sentences are determined to be common. The preset position is usually a commonly used and more obvious position, so that the user can conveniently select the position, and the terminal can select the most commonly used SQL sentence to be displayed in the preset position.
In the embodiment of the invention, the SQL sentences can be sequenced according to at least the times of calling and then displayed in the preset position.
In order to solve the technical problems, the embodiment of the invention also provides a device for storing SQL sentences. Referring specifically to fig. 8, fig. 8 is a basic structural block diagram of an apparatus for storing SQL statements according to this embodiment.
As shown in fig. 8, an apparatus for storing SQL statements includes: an acquisition module 2100, a processing module 2200, and an execution module 2300. Wherein, the obtaining module 2100 is configured to obtain a stored structured query language sentence; the processing module 2200 is configured to select, from a preset directory keyword list, a target keyword that matches the keyword of the structured query language sentence; and the execution module 2300 is used for storing the structured query language statement into a catalog where the target keyword is located.
The device for storing the SQL sentences comprises a terminal, wherein the terminal acquires the stored SQL sentences, selects target keywords matched with keywords of the SQL sentences from a preset list of directory keywords, and stores the SQL sentences into a directory of the target keywords. By the method, the instant developer can store the SQL statement in the matched catalogue at will, and the SQL statement can be searched according to the catalogue in the later inquiry, so that the process is convenient, the storage flow of the developer is simplified, and the storage efficiency is improved.
In some embodiments, the processing module comprises: the first processing sub-module is used for comparing the keywords in the catalog keyword list with the keywords of the structured query language sentence; and the first execution sub-module is used for taking the same phrase as the target keyword when the phrase which is the same as the keyword of the structured query language sentence exists in the keywords in the catalog keyword list.
In some embodiments, further comprising: the first acquisition sub-module is used for extracting the preset marking information of the structured query language statement, wherein the marking information is used for representing the names of the problems solved by the structured query language statement; and the second execution sub-module is used for taking the phrase in the marking information as the keyword of the structured query language sentence.
In some embodiments, the execution module comprises: the second acquisition sub-module is used for acquiring the marking information of the structured query language statement, wherein the marking information is also used for representing the priority of the structured query language statement for solving the same problem; and the third execution module is used for sequencing the structured query language sentences according to the priority.
In some embodiments, further comprising: a third obtaining sub-module, configured to obtain catalog information of an item where the structured query language sentence is located, where the catalog information includes hierarchical catalog information; and the second processing sub-module is used for extracting keywords from the hierarchical directory information of the items and adding the keywords into the directory keyword list.
In some embodiments, the processing module further comprises: a fourth obtaining sub-module, configured to obtain hierarchical directory information where the structured query language sentence is located in the item; the third processing sub-module is used for comparing the hierarchical directory information with keywords in the directory keyword list; and the fourth execution sub-module is used for taking the keywords which are consistent in comparison as the target keywords when the comparison is consistent.
In some embodiments, further comprising: a fifth obtaining sub-module, configured to obtain the number of times the user invokes the structured query language sentence; and the fourth processing sub-module is used for selecting the structured query language sentences with calling times larger than preset times from the structured query language sentences, and displaying the keywords of the structured query language sentences in preset positions.
In order to solve the technical problems, the embodiment of the invention also provides computer equipment. Referring specifically to fig. 9, fig. 9 is a basic structural block diagram of a computer device according to the present embodiment.
As shown in fig. 9, the internal structure of the computer device is schematically shown. As shown in fig. 9, the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus. The nonvolatile storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store a control information sequence, and the computer readable instructions can enable the processor to realize a method for storing SQL sentences when the computer readable instructions are executed by the processor. The processor of the computer device is used to provide computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, cause the processor to perform a method of storing SQL statements. The network interface of the computer device is for communicating with a terminal connection. It will be appreciated by those skilled in the art that the structure shown in fig. 9 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The processor in this embodiment is configured to execute the specific contents of the acquisition module 2100, the processing module 2200, and the execution module 2300 in fig. 8, and the memory stores program codes and various types of data required for executing the above modules. The network interface is used for data transmission between the user terminal or the server. The memory in this embodiment stores program codes and data required for executing all the sub-modules in the method of storing the SQL statement, and the server can call the program codes and data of the server to execute the functions of all the sub-modules.
And the computer equipment is used for acquiring the stored SQL sentences by the terminal, selecting target keywords matched with the keywords of the SQL sentences from a preset catalog keyword list, and storing the SQL sentences into the catalog of the target keywords. By the method, the instant developer can store the SQL statement in the matched catalogue at will, and the SQL statement can be searched according to the catalogue in the later inquiry, so that the process is convenient, the storage flow of the developer is simplified, and the storage efficiency is improved.
The invention also provides a storage medium storing computer readable instructions that when executed by one or more processors cause the one or more processors to perform the steps of a method of storing an SQL statement as described in any of the embodiments above.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (8)

1. A method of storing structured query language statements, comprising the steps of:
acquiring a stored structured query language statement;
selecting target keywords matched with keywords of the structured query language sentence from a preset catalog keyword list, wherein the target keywords comprise: extracting preset marking information of the structured query language sentence, wherein the marking information is used for representing the name of the problem solved by the structured query language sentence; taking the phrase in the marking information as a keyword of the structured query language sentence; comparing the keywords in the catalog keyword list with the keywords of the structured query language sentence; when the keywords in the catalog keyword list have the same phrase as the keywords of the structured query language sentence, taking the same phrase as the target keyword;
and storing the structured query language sentence into a catalog where the target keyword is located.
2. The method of storing structured query language statements of claim 1, wherein said storing said structured query language statements in a directory with said target keywords comprises:
the method comprises the steps of obtaining marking information of a structured query language sentence, wherein the marking information is also used for representing the priority of the structured query language sentence for solving the same problem;
and sequencing the structured query language sentences according to the priority.
3. A method of storing structured query language statements, comprising the steps of:
acquiring a stored structured query language statement;
acquiring catalog information of an item where the structured query language statement is located, wherein the catalog information comprises hierarchical catalog information;
extracting keywords from the hierarchical directory information of the item, and adding the keywords into a preset directory keyword list;
selecting target keywords matched with keywords of the structured query language sentence from a preset catalog keyword list, wherein the target keywords comprise: obtaining hierarchical directory information of the structured query language sentence in the item; comparing the hierarchical directory information with keywords in the directory keyword list; when the comparison is consistent, the keywords which are consistent in comparison are used as the target keywords;
and storing the structured query language sentence into a catalog where the target keyword is located.
4. The method of storing structured query language statements of claim 3, further comprising, after storing the structured query language statements in a directory in which the target keywords reside:
acquiring the times of the user calling the structured query language statement;
and selecting the structured query language sentences with calling times larger than preset times from the structured query language sentences, and displaying the keywords of the structured query language sentences in preset positions.
5. An apparatus for storing structured query language statements, comprising:
the acquisition module is used for acquiring the stored structured query language statement;
the processing module is used for selecting target keywords matched with the keywords of the structured query language sentence from a preset catalog keyword list, and comprises the following steps: extracting preset marking information of the structured query language sentence, wherein the marking information is used for representing the name of the problem solved by the structured query language sentence; taking the phrase in the marking information as a keyword of the structured query language sentence; comparing the keywords in the catalog keyword list with the keywords of the structured query language sentence; when the keywords in the catalog keyword list have the same phrase as the keywords of the structured query language sentence, taking the same phrase as the target keyword;
and the execution module is used for storing the structured query language statement into a catalog where the target keyword is located.
6. An apparatus for storing structured query language statements, comprising:
the acquisition module is used for acquiring the stored structured query language statement;
the processing module is used for acquiring the catalog information of the item where the structured query language statement is located, wherein the catalog information comprises hierarchical catalog information; extracting keywords from the hierarchical directory information of the item, and adding the keywords into a preset directory keyword list; selecting target keywords matched with keywords of the structured query language sentence from a preset catalog keyword list, wherein the target keywords comprise: obtaining hierarchical directory information of the structured query language sentence in the item; comparing the hierarchical directory information with keywords in the directory keyword list; when the comparison is consistent, the keywords which are consistent in comparison are used as the target keywords;
and the execution module is used for storing the structured query language statement into a catalog where the target keyword is located.
7. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the steps of the method of storing a structured query language statement of any one of claims 1 to 4.
8. A storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of a method of storing structured query language statements as claimed in any one of claims 1 to 4.
CN201811349074.0A 2018-11-13 2018-11-13 Method, device, computer equipment and storage medium for storing SQL (structured query language) sentences Active CN109656942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811349074.0A CN109656942B (en) 2018-11-13 2018-11-13 Method, device, computer equipment and storage medium for storing SQL (structured query language) sentences

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811349074.0A CN109656942B (en) 2018-11-13 2018-11-13 Method, device, computer equipment and storage medium for storing SQL (structured query language) sentences

Publications (2)

Publication Number Publication Date
CN109656942A CN109656942A (en) 2019-04-19
CN109656942B true CN109656942B (en) 2023-06-27

Family

ID=66110938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811349074.0A Active CN109656942B (en) 2018-11-13 2018-11-13 Method, device, computer equipment and storage medium for storing SQL (structured query language) sentences

Country Status (1)

Country Link
CN (1) CN109656942B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111063443B (en) * 2019-10-31 2023-08-18 望海康信(北京)科技股份公司 Medical entity retrieval method, medical entity retrieval device, computer equipment and storage medium
CN113127519B (en) * 2021-04-30 2023-02-07 平安普惠企业管理有限公司 File query method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021875A (en) * 2007-03-22 2007-08-22 金蝶软件(中国)有限公司 Object-oriented data bank access method and system
CN107480280A (en) * 2017-08-22 2017-12-15 金蝶软件(中国)有限公司 The method and relevant device of a kind of data processing
CN108255478A (en) * 2018-01-19 2018-07-06 上海锐垚科技有限公司 A kind of label type template development method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7526425B2 (en) * 2001-08-14 2009-04-28 Evri Inc. Method and system for extending keyword searching to syntactically and semantically annotated data
US8375351B2 (en) * 2007-06-23 2013-02-12 International Business Machines Corporation Extensible rapid application development for disparate data sources
US8386497B2 (en) * 2010-09-10 2013-02-26 Business Objects Software Limited Query generation based on hierarchical filters

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021875A (en) * 2007-03-22 2007-08-22 金蝶软件(中国)有限公司 Object-oriented data bank access method and system
CN107480280A (en) * 2017-08-22 2017-12-15 金蝶软件(中国)有限公司 The method and relevant device of a kind of data processing
CN108255478A (en) * 2018-01-19 2018-07-06 上海锐垚科技有限公司 A kind of label type template development method

Also Published As

Publication number Publication date
CN109656942A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
CN108804532B (en) Query intention mining method and device and query intention identification method and device
US8250053B2 (en) Intelligent enhancement of a search result snippet
US8347231B2 (en) Methods, systems, and computer program products for displaying tag words for selection by users engaged in social tagging of content
US8086604B2 (en) Universal interface for retrieval of information in a computer system
JP4806178B2 (en) Annotation management in pen-based computing systems
US9298721B2 (en) Prioritized search results based on monitored data
US9183261B2 (en) Lexicon based systems and methods for intelligent media search
US8880559B2 (en) Location activity search engine computer system
US20090094189A1 (en) Methods, systems, and computer program products for managing tags added by users engaged in social tagging of content
US8180757B2 (en) System and method for leveraging tag context
US20100161592A1 (en) Query Intent Determination Using Social Tagging
KR20090111827A (en) Method and apparatus for voice searching in a mobile communication device
CN101373468A (en) Method for loading word stock, method for inputting character and input method system
CN103064956A (en) Method, computing system and computer-readable storage media for searching electric contents
CN107085583B (en) Electronic document management method and device based on content
CN111694965A (en) Image scene retrieval system and method based on multi-mode knowledge graph
US8799257B1 (en) Searching based on audio and/or visual features of documents
CN107783976B (en) User information mining method and device
CN109656942B (en) Method, device, computer equipment and storage medium for storing SQL (structured query language) sentences
EP3079083A1 (en) Providing app store search results
CN111666383A (en) Information processing method, information processing device, electronic equipment and computer readable storage medium
US11409790B2 (en) Multi-image information retrieval system
CN110750683A (en) Data modification method and device, computer equipment and storage medium
CN109814923A (en) Data processing method, device, computer equipment and storage medium
US8875007B2 (en) Creating and modifying an image wiki page

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