Keyword Query Method, Apparatus and Electronic Device
By providing keyword query methods during software development, and using multiple search libraries to query the full name and abbreviation of keywords in variable names, the problem of irregular naming is solved, and query efficiency and naming standardization is improved.
Patent Information
- Application Number
- CN202310250710.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-15
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2043-03-15
AI Technical Summary
During the software development process, the keyword naming of variable names is not standardized, resulting in the inability to determine the corresponding full name and abbreviation, which affects users' understanding of variable information.
Provide a keyword query method, by obtaining multiple keywords, querying them separately in the first search library, with the full name and the first abbreviation corresponding to each keyword. If the first search library does not contain a certain keyword, then query it in the second search library, and the second search library contains the second abbreviation corresponding to the full name. Determine the query result and output it based on the query name information.
It realizes the full name and abbreviation of all keywords in the variable name at one time, which improves query efficiency, and can handle keywords that are not named according to the naming rules, and improves the standardization of variable naming.
Smart Images

Figure CN116226335B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of data processing, and particularly to a keyword query method, apparatus, and electronic device. Background Art
[0002] In the process of software development, the name of a software variable generally consists of multiple keywords. Among them, each keyword can be composed of the abbreviations of English words and needs to follow certain naming rules. However, when software developers name variable names, for the naming of some keywords, there are often situations where the naming rules are not followed. Keywords that do not follow the naming rules cannot determine their corresponding full names and abbreviations, so it may mislead users' understanding of the variable information. Summary of the Invention
[0003] In view of the above problems, the embodiments of the present application provide a keyword query method, apparatus, and electronic device, which are used to solve the problems of non-standard naming of variable names and inability to determine the corresponding full names and abbreviations of keywords that do not follow the naming rules in the related art.
[0004] According to the first aspect of the embodiments of the present application, a keyword query method is provided. The method includes: First, obtain multiple keywords of the query target. Then, query the multiple keywords in the first search library respectively; where the first search library includes at least one full name of the query information and the first abbreviation corresponding to each full name. If the first search library does not include the first query keyword among the multiple keywords, query the first query keyword in the second search library; where the second search library includes the second abbreviation corresponding to the full name of the query information, and the second abbreviation is different from the first abbreviation. Then, according to the name information queried for each keyword among the multiple keywords, determine the query result of the query target; where the name information includes at least one of the full name, the first abbreviation, and the second abbreviation corresponding to each keyword. Finally, output the query result.
[0005] In an optional manner, after querying the first query keyword in the second search library, the method further includes: If the second abbreviation corresponding to the first query keyword is queried in the second search library, determine that the name information of the first query keyword includes the second abbreviation corresponding to the first query keyword.
[0006] In an optional manner, the second search library also includes the association information between the second abbreviation and the full name. After determining that the name information of the first query keyword includes the second abbreviation corresponding to the first query keyword, the method further includes: According to the association information between the second abbreviation and the full name, determine the full name corresponding to the first query keyword; determine that the name information of the first query keyword also includes the full name corresponding to the first query keyword.
[0007] In an alternative manner, after determining that the name information of the first query keyword further includes the full name corresponding to the first query keyword, the method further includes: querying the full name corresponding to the first query keyword in the first search library to determine the first short name corresponding to the first query keyword; determining that the name information of the first query keyword further includes the first short name corresponding to the first query keyword.
[0008] In an alternative manner, the method further includes: if the first query keyword is included in the first search library, determining that the name information of the first query keyword includes at least one of the full name and the first short name corresponding to the first query keyword.
[0009] In an alternative manner, after querying the first query keyword in the second search library, the method further includes: if the second short name corresponding to the first query keyword is not found in the second search library, determining that the name information of the first query keyword includes the prompt information for indicating that the first query keyword is not found.
[0010] In an alternative manner, the method further includes: processing all the full names in the first search library to obtain the second short name corresponding to each full name; generating the second search library according to the second short name.
[0011] In an alternative manner, processing all the full names in the first search library to obtain the second short name corresponding to each full name includes: deleting the vowel letters in the other letters except the first letter in each full name to obtain the second short name corresponding to each full name.
[0012] In an alternative manner, obtaining multiple keywords of the query target includes: receiving the keyword group input by the user for the query target; splitting the keyword group by the camel case method to obtain multiple keywords of the query target.
[0013] In an alternative manner, determining the query result of the query target according to the name information queried for each keyword in the multiple keywords includes: connecting the full names corresponding to each keyword with the first character; and / or connecting the first short names corresponding to each keyword with the first character; and / or connecting the second short names corresponding to each keyword with the first character to obtain the query result of the query target.
[0014] In an alternative manner, the name information of the first query keyword includes multiple full names and corresponding multiple first abbreviations. The query result of the query target is determined according to the name information queried for each keyword among the multiple keywords, including: sequentially connecting the multiple full names corresponding to the first query keyword by using a second character to obtain a full name combination; and / or sequentially connecting the multiple first abbreviations corresponding to the first query keyword by using a second character to obtain a first abbreviation combination; connecting the full name or full name combination corresponding to each keyword by using a first character; and / or connecting the first abbreviation or first abbreviation group corresponding to each keyword by using a first character to obtain the query result of the query target.
[0015] According to a second aspect of the embodiments of the present application, there is provided a keyword query device, including: an acquisition module, configured to acquire multiple keywords of a query target; a query module, configured to query the multiple keywords in a first search library respectively; wherein, the first search library includes at least one full name of query information and a first abbreviation corresponding to each full name; if the first search library does not include the first query keyword among the multiple keywords, query the first query keyword in a second search library; the second search library includes a second abbreviation corresponding to the full name of the query information, and the second abbreviation is different from the first abbreviation; a determination module, configured to determine the query result of the query target according to the name information queried for each keyword among the multiple keywords; wherein, the name information includes at least one of the full name, the first abbreviation, and the second abbreviation corresponding to each keyword; and an output module, configured to output the query result.
[0016] According to a third aspect of the embodiments of the present application, there is provided an electronic device, including: a processor, a memory, a communication interface, and a communication bus; the processor, the memory, and the communication interface complete communication with each other through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to perform the operations of the keyword query method described in any one of the above first aspects.
[0017] According to a fourth aspect of the embodiments of the present application, there is provided a computer-readable storage medium, in which at least one executable instruction is stored, and when the executable instruction runs on an electronic device, it causes the electronic device to perform the operations of the keyword query method described in any one of the above first aspects.
[0018] In the embodiments of the present application, multiple keywords are obtained and the multiple keywords are respectively queried in the first search library. Among them, the first search library includes at least one full name of the query information and a first short name corresponding to each full name. Therefore, when the first search library includes a first query keyword, the full name and the first short name corresponding to the first query keyword can be determined. If the first search library does not include the first query keyword, the first query keyword is queried in the second search library. Among them, the second search library includes a second short name corresponding to the full name of the query information. Therefore, when the second search library includes the first query keyword, the second short name corresponding to the second query keyword can be determined. When the query of each keyword is completed, the name information of each keyword is determined according to at least one of the full name, the first short name, and the second short name corresponding to each keyword. Then, the query result of the query target is determined according to the name information of each keyword. Finally, the query result is output. Therefore, through the embodiments of the present application, the name information corresponding to all keywords of the query target (such as variable names) can be queried at one time, improving the query efficiency. At the same time, when the first search library does not include the first query keyword, that is, when the first query keyword is not named according to the naming rule, the full name corresponding to the first query keyword can also be determined according to the second search library, and then the first short name corresponding to the first query keyword can be determined according to the first search library. Therefore, the method provided by the embodiments of the present application can query the full name and the first short name corresponding to each keyword that is not named according to the naming rule.
[0019] The above description is only an overview of the technical solutions of the embodiments of the present application. In order to be able to understand the technical means of the embodiments of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the embodiments of the present application more obvious and understandable, the specific embodiments of the present application are specifically exemplified below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings are only used to illustrate the embodiments and are not considered as a limitation to the present application. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0021] Figure 1 is a flowchart of a keyword query method provided by an embodiment of the present application;
[0022] Figure 2 is a schematic diagram of a query result provided by an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of another query result provided by an embodiment of the present application;
[0024] Figure 4 is a flowchart of another keyword query method provided by an embodiment of the present application;
[0025] Figure 5 Flow chart of another keyword query method provided by an embodiment of the present application;
[0026] Figure 6 Flow chart of yet another keyword query method provided by an embodiment of the present application;
[0027] Figure 7 Flow chart of yet another keyword query method provided by an embodiment of the present application;
[0028] Figure 8 Schematic diagram of yet another query result provided by an embodiment of the present application;
[0029] Figure 9 Flow chart of yet another keyword query method provided by an embodiment of the present application;
[0030] Figure 10 Schematic diagram of yet another query result provided by an embodiment of the present application;
[0031] Figure 11 Flow chart of yet another keyword query method provided by an embodiment of the present application;
[0032] Figure 12 Schematic diagram of the structure of a keyword query device provided by an embodiment of the present application;
[0033] Figure 13 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0034] The exemplary embodiments of the present application will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.
[0035] A variable name (such as a software variable name) can be composed of multiple keywords. Generally, the keyword is named using the corresponding abbreviation of each keyword. During the software development process, when software developers name some variables, there may be situations where the naming is not standardized. For example, in a variable name, each keyword is named using its respective full name; or, in a variable name, some keywords are named using their corresponding full names, while another part of the keywords are named using their corresponding abbreviations; or, in a variable name, a certain keyword is named using its corresponding abbreviation, but the abbreviation is not the standard abbreviation form corresponding to the keyword. The non-standardization of variable names may affect the user's understanding of the variable information, thereby affecting the efficiency of software development.
[0036] For example, when a keyword in a variable name is "Position", the abbreviation "Posn" corresponding to "Position" can be used to name the keyword "Position". However, if a developer is not clear or forgets the abbreviation corresponding to "Position" and uses, for example, "Posi" or directly uses "Position" to name the keyword "Position", it will lead to non-standard naming of the variable name. For example, when a developer uses "Posi" to name the keyword "Position", other users may not know what "Posi" represents, which is "Position", or they may think that "Posi" represents another meaning, such as "Positive", etc., thus affecting users' understanding of the variable's meaning.
[0037] In some examples, to improve the standardization of variable names during the software development process, before naming a variable, a software developer can query in a variable name query library using the full names of each keyword in the variable to obtain the corresponding abbreviations of each keyword, and then name the variable with the abbreviations of each keyword.
[0038] In other examples, to more accurately understand variable information, a user can query in a variable name query library using the abbreviations of each keyword in the variable name to obtain the full names of each keyword, and then understand the information of the variable based on the full names of each keyword.
[0039] As an implementation method, the variable name query library can be an Excel file. This Excel file can include a full name column and an abbreviation column. When the keyword is an abbreviation, if the keyword can be found in the abbreviation column, the corresponding full name of the keyword can be obtained in the full name column; when the keyword is a full name, if the keyword can be found in the full name column, the corresponding abbreviation of the keyword can be obtained in the abbreviation column.
[0040] However, when a user queries a variable name through the variable name query library, each keyword in the variable name needs to be input into the variable name query library one by one for query, and the query results of each keyword are obtained one by one, with relatively low query efficiency. Moreover, the user needs to distinguish whether each keyword is a full name or an abbreviation. When the keyword is a full name, the user needs to query the corresponding abbreviation in the variable name query library based on this full name to name the variable; when the keyword is an abbreviation, the user needs to query the corresponding full name in the variable name query library based on this abbreviation to understand the meaning of the variable. At the same time, when the abbreviation of a certain keyword in the variable name is not standard, the corresponding full name of this keyword cannot be found in the variable name query library, so it will also affect the user's understanding of the variable's meaning.
[0041] To solve the above problems, an embodiment of the present application provides a keyword query method. This keyword query method can query and output the full names and abbreviations of all keywords in the variable name at one time, improving the query efficiency; and it can query the full names and abbreviations corresponding to each keyword that is not named according to the naming rules, improving the standardization of variable naming and facilitating users' understanding of variable information.
[0042] Figure 1 The flowchart of a keyword query method provided by an embodiment of the present application is as Figure 1 shown, and this method includes steps S110 to S150 as shown below.
[0043] Step S110, obtain multiple keywords of the query target.
[0044] Among them, the multiple keywords of the query target are the content that the user needs to query.
[0045] In some embodiments, obtaining multiple keywords of the query target includes: receiving a keyword group of the query target input by the user; using the camel case method to split the keyword group to obtain multiple keywords of the query target.
[0046] In some examples, the keyword group input by the user can be a variable name, and this variable name can be composed of multiple keywords. When receiving the variable name input by the user, the variable name can be split into multiple keywords.
[0047] As an implementation manner, each keyword in the keyword group (such as a variable name) can be composed of multiple letters. Among them, the first letter of each keyword can be in uppercase, and the other letters can be in lowercase. For example, a keyword can be the full form (also called the full name) of an English word, or the abbreviated form (also called the abbreviation) or the abbreviated form of an English word, and the first letter of this English word is in uppercase.
[0048] Exemplarily, the camel case method (Camel-Case) can be used to split the keyword group into multiple keywords. In some examples, the camel case method can split the variable name according to the uppercase or lowercase form of each letter in the variable name. For example, when the variable name includes multiple uppercase letters, the qth uppercase letter in the variable name, and all lowercase letters between the qth uppercase letter and the (q + 1)th uppercase letter can be used as a keyword, where q is an integer greater than or equal to 1 and less than the number of uppercase letters in the variable name. When the variable name includes one uppercase letter, this uppercase letter and all subsequent lowercase letters can be used as a keyword.
[0049] For example, when the variable name is "AccrPedalPosn", according to the camel case method and the three capital letters in the variable name, the variable name "AccrPedalPosn" can be split into three keywords, which are: "Accr", "Pedal", and "Posn".
[0050] In some examples, when it is necessary to determine whether the variable name is named in a standard way or to understand the meaning of the variable name, after obtaining the variable name, each keyword in the variable name can be queried to obtain the full name and the first abbreviation corresponding to each keyword. The following takes the case where the first query keyword is included in multiple keywords as an example for illustration. It should be noted that the multiple keywords of the query target do not only include the first query keyword, and the first query keyword can be any one of the multiple keywords of the query target.
[0051] Step S120, query multiple keywords in the first search library respectively.
[0052] In some embodiments, the first search library includes at least one full name of the query information and the first abbreviation corresponding to each full name. The query information is used to indicate all the contents existing in the first search library. For example, the query information includes the query target. It should be noted that the first search library may include one or more full names. In this embodiment of the present application, the case where the first search library includes multiple full names is taken as an example for illustrative description.
[0053] Exemplarily, the first search library can be pre-generated and stored locally or on the server. The first search library may include a full name sub-library and a first abbreviation sub-library.
[0054] In some examples, the full name sub-library includes multiple full names (which can also be called word full names). For example, the multiple full names can be the full names of each keyword in different variable names during the software development process; or, the multiple full names can also be the full names of a certain number of words.
[0055] In some examples, the first abbreviation sub-library includes multiple first abbreviations (which can also be called the first abbreviations of words). It should be noted that the first abbreviation can also be called the standard abbreviation. For example, the multiple first abbreviations can be the standardized naming forms corresponding to the full names of each keyword in different variable names during the software development process. The variable name obtained by naming the keyword with the first abbreviation conforms to the keyword naming standard.
[0056] As an implementation, there is a certain mapping relationship between multiple full names in the full name sub-library and multiple first abbreviations in the first abbreviation sub-library. For example, each first abbreviation can have a corresponding full name in the full name sub-library, that is, one full name can correspond to one first abbreviation. Therefore, for a keyword in the variable name, there is only one first abbreviation that conforms to the naming rules.
[0057] Exemplarily, the first search library can be updated. For example, the first search library can be updated every preset time; or, the first search library can also be updated irregularly. The update of the first search library includes: adding the full name of the keyword to the full name sub-library, and adding the first abbreviation corresponding to the full name to the first abbreviation sub-library; or, deleting the full name of at least one keyword from the full name sub-library, and deleting the first abbreviations corresponding to each full name from the first abbreviation sub-library.
[0058] In some examples, the first query keyword is input into the first search library for query, and it is judged whether the first search library contains the first query keyword.
[0059] Therefore, if a certain keyword among multiple keywords can be found in the first search library, the full name and the first abbreviation corresponding to the keyword can be obtained.
[0060] Step S130, if the first search library does not include the first query keyword among multiple keywords, then query the first query keyword in the second search library.
[0061] In some examples, that the first search library does not include the first query keyword may include: the multiple full names in the full name sub-library of the first search library do not include the first query keyword, and, the multiple first abbreviations in the first abbreviation sub-library also do not include the first query keyword.
[0062] That the multiple full names in the full name sub-library do not include the first query keyword may indicate that the first query keyword is not a full name; and that the multiple first abbreviations in the first abbreviation sub-library also do not include the first query keyword indicates that the first query keyword is not a abbreviation form that conforms to the naming rules (or is called non-standard). In this case, the first query keyword may be a non-standard abbreviation form. Therefore, the first query keyword can be continuously queried in the second search library.
[0063] Exemplarily, before querying the first query keyword in the second search library, it is also necessary to generate the second search library. For example, the second search library can be pre-generated, or the second search library can also be generated when the first query keyword cannot be found in the first search library. After generating the second search library, the second search library can be stored locally or on the server, or the second search library can not be stored locally or on the server, but instead, the second search library is generated each time it is used. This application does not make any limitations in this regard.
[0064] In some embodiments, the second search library includes a second short name corresponding to the full name of the query information, and the second short name is different from the first short name. Among them, the second short names in the second search library are another (different) short name corresponding to each keyword that is different from the first short name.
[0065] In some embodiments, the second search library further includes the association information between the second short name and the full name. The association information between the second short name and the full name can be used to indicate the mapping management between the second short name and the full name. That is to say, through the second short name and the association relationship, the full name corresponding to the second short name can be determined.
[0066] Exemplarily, the association information between the second short name and the full name can include the full name corresponding to the second short name, that is, the second search library can include multiple full names of the query target, and the second short name corresponding to each full name. Among them, the multiple full names in the second search library can be the same as the multiple full names in the first search library. It should be noted that the embodiments of this application use the full name of the association information as an example for illustrative purposes.
[0067] In some embodiments, all the full names in the first search library are processed to obtain the second short name corresponding to each full name; according to the second short name, the second search library is generated.
[0068] In some embodiments, processing all the full names in the first search library to obtain the second short name corresponding to each full name includes: deleting the vowel letters in other letters except the first letter in each full name to obtain the second short name corresponding to each full name.
[0069] In some embodiments, the first search library and the second search library can be the same search library. When the first search library and the second search library are the same search library, the search library can include a full name sub-library, a first short name sub-library, and a second short name sub-library. Among them, the second short name sub-library includes multiple second short names. When the first search library and the second search library are different search libraries, the second search library can further include a full name sub-library and a second short name sub-library. In some examples, the full name sub-library in the second search library can be the same full name sub-library as the full name sub-library in the first search library.
[0070] In some examples, the second abbreviation sub-library in the second search library can be determined based on the full name sub-library. That is to say, one of the multiple second abbreviations can be obtained by processing one or more full names in the full name sub-library.
[0071] As an implementation method, one of the second abbreviations can be obtained by deleting the vowel letters in a certain full name or certain full names in the full name sub-library. When the first letter is a vowel letter, it does not need to be deleted. For example, the vowel letters except the first letter in each full name in the full name sub-library can be deleted to obtain multiple second abbreviations, and the second sub-library is generated from the multiple second abbreviations.
[0072] In some examples, the vowel letters include a, e, i, o, and u in the English alphabet. For example, when the full name of a keyword is "hello", after removing the vowel letters (e and o) in "hello", the obtained second abbreviation is "hll". Therefore, "hll" can be used as one of the second abbreviations corresponding to the full name "hello" in the second search library. Since the second abbreviations corresponding to multiple full names may be the same after removing the vowel letters, the relationship between the second abbreviation and the full name can be one-to-many. For example, after removing the vowel letters from the full names "hill" and "hello" respectively, the obtained second abbreviations are both "hll". That is to say, in the second search library, one second abbreviation "hll" can correspond to two full names "hill" and "hello".
[0073] Therefore, if the first query keyword is included in the second search library, the second abbreviation corresponding to the first query keyword can be obtained from the second search library, and then according to the second abbreviation and the association information between the second abbreviation and the full name (such as the full name), the first abbreviation corresponding to the first query keyword can be determined in the first search library.
[0074] Step S140: Determine the query result of the query target according to the name information queried for each keyword.
[0075] Exemplarily, the name information includes at least one of the full name, the first abbreviation, and the second abbreviation corresponding to the keyword. After each keyword among the multiple keywords is queried through the above step S120, or after being queried through step S120 and step S130, the full name, the first abbreviation, and the second abbreviation corresponding to each keyword can be obtained, and the name information of each keyword is determined according to at least one of the full name, the first abbreviation, and the second abbreviation corresponding to each keyword. The query result of the query target is determined according to the name information of each keyword.
[0076] For example, if the first search library includes the first query keyword, the first short name and full name corresponding to the first query keyword can be obtained; if the first query keyword cannot be found in the first search library but can be found in the second search library, the second short name, full name, and first short name corresponding to the first query keyword can be obtained.
[0077] In some embodiments, the full names corresponding to each keyword are connected using the first character; and / or, the first short names corresponding to each keyword are connected using the first character; and / or, the second short names corresponding to each keyword are connected using the first character to obtain the query result of the query target.
[0078] For example, when the name information of each keyword includes the full name and the first short name, the full names corresponding to each keyword can be connected using the first character, and the first short names corresponding to each keyword can be connected using the first character. It should be noted that when the name information of each keyword also includes the second short name, the second short names corresponding to each keyword can be connected using the first character.
[0079] In some examples, the name information of each keyword may include the full name and the first short name. The embodiments of the present application are exemplarily described by taking the name information of each keyword including the full name and the first short name as an example.
[0080] Exemplarily, the first character can be any kind of punctuation mark. For example, the first character can be a quotation mark, such as a single quotation mark or a double quotation mark; or, the first character can also be other characters. For example, the first character can be a slash, such as a single slash or a double slash. The present application does not limit the form of the first character as long as the first character can separate the full name, the first short name, or the second short name corresponding to each keyword.
[0081] Figure 2 This is a schematic diagram of a query result provided by an embodiment of the present application. As Figure 2As shown, when the variable name entered by the user is "AccrPedalPosn", if the keyword "Accltr" is not included in the first search library and the keyword "Accltr" is included in the second search library, the full name corresponding to the keyword "Accltr" determined according to the first search library and the second search library is "Accelerator" and the first short name is "Accr"; if the keyword "Pedal" is included in the first search library, its full name is "Pedal" and the first short name is "Pedl", and if the keyword "Posn" is included in the first search library, its full name is "Position" and the first short name is "Posn". Therefore, the full names of the keywords in the variable name can be output as: "Accelerator" PedalPosition; the first short names of the keywords in the variable name can be output as: "Accr" PedlPosn. Among them, the full name and the first short name between the keywords "Accltr" and "Pedal" are separated by double quotes (the first character).
[0082] As an implementation, if two consecutive keywords among all keywords can be found in the first search library, the full names (or the first short names) corresponding to these two keywords can be directly connected, that is, the full names corresponding to these two keywords do not need to be separated by a character (such as the first character).
[0083] Figure 3 This is a schematic diagram of another query result provided by the embodiment of the present application. As Figure 3 shown, when the variable name entered by the user is "AccrPedalPosn", according to the camel case method, the variable name can be split into three keywords "Accr", "Pedal" and "Posn". If all three keywords "Accr", "Pedal" and "Posn" are included in the first search library, the full names of the output keywords can be "AcceleratorPedalPosition", and the first short names of the keywords can be "AccrPedlPosn", that is, the full names or the first short names corresponding to the keywords can be directly connected.
[0084] Step S150, output the query result.
[0085] After querying all the keywords in the keyword group, output the query result corresponding to the keyword group (such as the variable name).
[0086] As an implementation, the query result can be displayed. For example, the query results of the keywords in the keyword group can be displayed in two fields, such as the full names, the first short names, and the second short names corresponding to the keywords can be displayed in different fields respectively.
[0087] As Figure 2 and Figure 3 shown in the query results of the output, the keyword group, the full name, and the first short name are respectively displayed in different fields. It should be noted that if the name information of each keyword also includes a second short name, the second short name can also be displayed in different fields.
[0088] Therefore, in the embodiment of the present application, by obtaining a plurality of keywords, each of the plurality of keywords is respectively queried in the first search library; wherein, the first search library includes at least one full name of the query information and a first short name corresponding to each full name; therefore, if the first search library includes a first query keyword, the full name and the first short name corresponding to the first query keyword can be determined. If the first search library does not include the first query keyword, the first query keyword is queried in the second search library; wherein, the second search library includes a second short name corresponding to the full name of the query information; therefore, if the second search library includes the first query keyword, the second short name corresponding to the second query keyword can be determined. When the query of each keyword is completed, the name information of each keyword is determined according to at least one of the full name, the first short name, and the second short name corresponding to each keyword; then, the query result of the query target is determined according to the name information of each keyword; finally, the query result is output. Therefore, through the embodiment of the present application, the name information corresponding to all keywords of the query target (such as variable name) can be queried at one time, improving the query efficiency. At the same time, when the first search library does not include the first query keyword, that is, when the first query keyword is not named according to the naming rule, the full name corresponding to the first query keyword can also be determined according to the second search library, and then the first short name corresponding to the first query keyword can be determined according to the first search library. Therefore, the method provided by the embodiment of the present application can query the full name and the first short name corresponding to each keyword that is not named according to the naming rule.
[0089] Figure 4 is a flowchart of another keyword query method provided by the embodiment of the present application. As Figure 4 shown, the method includes steps S210 to S250 as follows.
[0090] Step S210, obtain a plurality of keywords of the query target.
[0091] Step S220, respectively query the plurality of keywords in the first search library.
[0092] It should be noted that steps S210 to S220 are similar to steps S110 to S120 in the above embodiment. To avoid repetition, they will not be elaborated here.
[0093] Step S230, if the first search library includes the first query keyword, determine that the name information of the first query keyword includes at least one of the full name and the first short name corresponding to the first query keyword.
[0094] In some examples, the first search library including the first query keyword may include: the first query keyword is included in multiple full names in the full name sub-library of the first search library, or the first query keyword is included in multiple first short names in the first short name sub-library of the first search library.
[0095] Exemplarily, if the first query keyword is included in multiple full names in the full name sub-library of the first search library, it indicates that the first query keyword is a full name, and the first short name corresponding to the first query keyword can be determined in the first search library according to the full name corresponding to the first query keyword; or, if the first query keyword is included in multiple first short names in the first short name sub-library of the first search library, it indicates that the first query keyword is a short name and is a standard short name, and the full name corresponding to the first query keyword can be determined in the first search library according to the first short name of the first query keyword.
[0096] In some examples, if the first search library includes the first query keyword, the full name and the first short name determined by the first query keyword in the first search library can be used as the full name and the standard short name that conform to the naming rules of the first query keyword. The user can name the first query keyword according to the first short name, or determine whether the naming of the first query keyword is correct, or the user can also understand the meaning of the first query keyword according to the full name corresponding to the first query keyword.
[0097] After the first query keyword is found in the first search library, the name information of the first query keyword can be determined according to the full name and the first short name of the first query keyword respectively. The name information of the first query keyword includes its corresponding full name and / or first short name. For example, the name information of the first query keyword includes its corresponding full name and first short name.
[0098] Step S240, determine the query result of the query target according to the name information queried for each keyword in the multiple keywords.
[0099] Step S250, output the query result.
[0100] It should be noted that steps S240 to S250 are similar to steps S140 to S150 in the above embodiments. To avoid repetition, they will not be elaborated here.
[0101] Figure 5 This is a flowchart of another keyword query method provided by an embodiment of the present application, as Figure 5As shown in the figure, the method includes steps S310 to S360.
[0102] Step S310: Obtain multiple keywords of the query target.
[0103] Step S320: Query the multiple keywords in the first search library respectively.
[0104] Step S330: If the first search library does not include the first query keyword, query the first query keyword in the second search library.
[0105] It should be noted that steps S310 to S330 are similar to steps S110 to S130 in the above embodiment. To avoid repetition, they will not be elaborated here.
[0106] Step S340: If the second abbreviation corresponding to the first query keyword is found in the second search library, determine that the name information of the first query keyword includes the second abbreviation corresponding to the first query keyword.
[0107] In some examples, finding the second abbreviation corresponding to the first query keyword in the second search library includes: multiple second abbreviations in the second search library include the first query keyword, that is to say, at least one of the multiple second abbreviations in the second search library is the same as the first query keyword.
[0108] As an implementation, the second abbreviation sub-library in the second search library includes multiple second abbreviations. The second abbreviations in the second abbreviation sub-library are not the standard abbreviations corresponding to the full names, but a possible abbreviation corresponding to the full name. In some examples, in the second abbreviation sub-library, one second abbreviation can correspond to multiple full names. For example, when the keyword is "hll", its corresponding full name can be "hello" or "hill". It should be noted that in the second abbreviation sub-library, one second abbreviation can correspond to one full name; or, multiple second abbreviations can also correspond to one full name.
[0109] Therefore, when the second search library includes the first query keyword, the second abbreviation corresponding to the first query keyword can be obtained, and based on the second abbreviation corresponding to the first query keyword, the name information corresponding to the first query keyword is determined. That is to say, the name information of the first query keyword includes the second abbreviation.
[0110] Step S350: Determine the query result of the query target according to the name information queried for each keyword in the multiple keywords.
[0111] Step S360: Output the query result.
[0112] It should be noted that steps S350 to S360 are similar to steps S140 to S150 in the above embodiments. To avoid repetition, they will not be elaborated here.
[0113] Therefore, when the first query keyword cannot be found in the first search library in the embodiments of the present application, a second search library can be generated, or the first query keyword can be continuously queried in the already generated second search library. If the second search library includes the first query keyword, the name information of the first query keyword can be determined according to the second abbreviation corresponding to the first query keyword. Therefore, the embodiments of the present application can query the second abbreviations corresponding to the keywords that are not named according to the naming rules.
[0114] Figure 6 It is a flowchart of another keyword query method provided by the embodiments of the present application. As Figure 6 shown, this method includes steps S410 to S470 as follows.
[0115] Step S410, obtain multiple keywords of the query target.
[0116] Step S420, respectively query multiple keywords in the first search library.
[0117] Step S430, if the first query keyword among the multiple keywords is not included in the first search library, query the first query keyword in the second search library.
[0118] It should be noted that steps S410 to S430 are similar to steps S110 to S130 in the above embodiments. To avoid repetition, they will not be elaborated here.
[0119] Step S440, if the second abbreviation corresponding to the first query keyword is found in the second search library, determine the full name corresponding to the first query keyword according to the association information between the second abbreviation and the full name.
[0120] Step S450, determine that the name information of the first query keyword further includes the full name corresponding to the first query keyword.
[0121] After the second abbreviation corresponding to the first keyword is found in the second search library, the full name corresponding to the first query keyword can be determined according to the second abbreviation and the association information between the second abbreviation and the full name.
[0122] For example, if the association information of the full name included in the second search library is the full name, that is, when the second search library includes a full name sub-library, the corresponding full name can be determined in the second search library according to the second abbreviation corresponding to the first query keyword.
[0123] In some examples, since there may be a situation where a first query keyword corresponds to multiple second abbreviations in the second search library, therefore, the full names corresponding to the first query keyword may also include multiple ones. Therefore, the name information of the first query keyword can be determined according to the full name(s) corresponding to the first query keyword.
[0124] Exemplarily, when the second search library includes the first query keyword, the name information of the first query keyword may include the second abbreviation(s) and / or full name(s) corresponding to the first query keyword.
[0125] It should be noted that the full name corresponding to the first query keyword determined through step S450 may be a possible full name corresponding to the first query keyword. For example, the full name and the first abbreviation determined through the second search library may also be referred to as the recommended full name.
[0126] Step S460, determine the query result of the query target according to the name information of each keyword in the multiple keywords.
[0127] Step S470, output the query result.
[0128] It should be noted that steps S460 to S470 are similar to steps S140 to S150 in the above embodiments. To avoid repetition, they will not be elaborated here.
[0129] Figure 7 It is a flowchart of another keyword query method provided by the embodiments of the present application. As Figure 7 shown, this method includes steps S510 to S580 as follows.
[0130] Step S510, obtain multiple keywords of the query target.
[0131] Step S520, query the multiple keywords in the first search library respectively.
[0132] Step S530, if the first search library does not include the first query keyword among the multiple keywords, query the first query keyword in the second search library.
[0133] Step S540, if the second abbreviation corresponding to the first query keyword is queried in the second search library, determine the full name corresponding to the first query keyword according to the association information between the second abbreviation and the full name.
[0134] It should be noted that steps S510 to S540 are similar to steps S410 to S440 in the above embodiments. To avoid repetition, they will not be elaborated here.
[0135] Step S550: Query the full name corresponding to the first query keyword in the first search library, and determine the first abbreviation corresponding to the first query keyword.
[0136] After determining the full name corresponding to the first query keyword according to step S440 in the above embodiments, the full name corresponding to the first keyword can be queried in the first search library to determine the first abbreviation corresponding to the first query keyword.
[0137] In some examples, if the full name sub-library in the first search library includes the full name corresponding to the first query keyword, the first abbreviation corresponding to the first query keyword can be determined according to the full name.
[0138] Among them, if there is only one full name corresponding to the first query keyword in the second search library, query the first abbreviation corresponding to the full name in the first search library according to the full name to obtain the first abbreviation corresponding to the first query keyword. If there are multiple full names corresponding to the first query keyword in the second search library, query the first abbreviations corresponding to the multiple full names in the first search library respectively according to the multiple full names to obtain multiple first abbreviations corresponding to the first query keyword.
[0139] It should be noted that the first abbreviation corresponding to the first query keyword determined through step S550 can be a possible first abbreviation corresponding to the first query keyword. For example, the first abbreviation determined through the second search library can also be called the recommended first abbreviation.
[0140] Step S560: Determine that the name information of the first query keyword further includes the first abbreviation corresponding to the first query keyword.
[0141] After determining the first abbreviation (one or more) corresponding to the first query keyword, the name information of the first query keyword can be determined according to the first abbreviation corresponding to the first query keyword.
[0142] Exemplarily, when the second search library includes the first query keyword, the name information of the first query keyword can include the full name (one or more), the first abbreviation (one or more) corresponding to the first query keyword, and the second abbreviation.
[0143] Step S570: Determine the query result of the query target according to the name information queried for each keyword among the multiple keywords.
[0144] In some embodiments, if the name information of the first query keyword includes multiple full names and corresponding multiple first abbreviations, the second character can be used to sequentially connect the multiple full names corresponding to the first query keyword to obtain a full name combination; and / or, the second character can be used to sequentially connect the multiple first abbreviations corresponding to the first query keyword to obtain a first abbreviation combination.
[0145] In some examples, the second character can be any punctuation mark different from the first character. For example, the second character can be a comma, or the second character can also be other punctuation marks such as a semicolon; or, the second character can also be other characters. For example, the second character can be a slash. The present application does not limit the form of the second character, as long as the second character can separate multiple full names or multiple first abbreviations corresponding to the first query keyword, so that the user can more clearly see the query results of the first query keyword.
[0146] When the second search library includes the first query keyword and the name information of the first query keyword includes multiple full names and multiple first abbreviations, the multiple full names corresponding to the first query keyword are sequentially connected using the second character to obtain the full name combination corresponding to the first query keyword; and / or, the multiple first abbreviations corresponding to the first query keyword are sequentially connected using the second character to obtain the first abbreviation combination corresponding to the first query keyword.
[0147] In some embodiments, the full names or full name combinations corresponding to each keyword are connected using the first character; and / or, the first abbreviations or first abbreviation combinations corresponding to each keyword are connected using the first character to obtain the query results of the query target.
[0148] In some examples, the full names or full name combinations corresponding to each keyword can be sequentially connected using the first character; or, the first abbreviations or first abbreviation combinations corresponding to each keyword can be sequentially connected using the first character. If there are second abbreviations in the name information of each keyword, the second abbreviations corresponding to each keyword can be sequentially connected using the first character.
[0149] Figure 8 This is a schematic diagram of the query results provided by the embodiments of the present application. As Figure 8As shown, the keyword group (i.e., variable name) input by the user is "DtTi". The full names corresponding to each keyword in the variable name "DtTi" are displayed in the "Full Name" column, and the first abbreviations corresponding to each keyword in the variable name "DtTi" are displayed in the "First Abbreviation" column. If the first query keyword in the variable name "DtTi" is "Dt", the two full names corresponding to the first query keyword "Dt" determined through the above embodiments are "Data" and "Date" respectively. Among them, the first abbreviation corresponding to the full name "Data" is "Data", and the first abbreviation corresponding to the full name "Date" is "Date". Then, the two full names "Data" and "Date" corresponding to the first query keyword "Dt" can be connected by a second character (such as a comma) to obtain the full name combination "Data, Date"; the two first abbreviations "Data" and "Date" corresponding to the first query keyword "Dt" can also be connected by a second character (such as a comma) to obtain the first abbreviation combination "Data, Date".
[0150] It should be noted that the character for connecting multiple full names and the character for connecting multiple first abbreviations may not be the same character. For example, the character for connecting multiple full names can be a third character, and the character for connecting multiple first abbreviations can be a fourth character; among them, the third character and the fourth character are different characters. For example, the third character can be a comma, and the fourth character can be a semicolon. This application does not make any limitations in this regard.
[0151] As an implementation, since the first search library does not include the first query keyword, the full name and the first abbreviation corresponding to the determined first query keyword can be a recommended full name and a recommended first abbreviation. Therefore, the name information of the first query keyword can also include a recommended prompt message, which is used to prompt the user that the first query keyword is not queried in the quasi-search library and is a possible full name and first abbreviation determined through the second search library.
[0152] In some examples, prompt messages such as "recommended" can be added before the full name and the first abbreviation of the first query keyword as the name information of the first query keyword. For example, referring to Figure 8 , when the first query keyword is "Dt" and the two full names corresponding to the first query keyword "Dt" determined through the above embodiments are "Data" and "Date" respectively, the query result of the first query keyword can be "recommended Data, Date".
[0153] Step S580, output the query result.
[0154] It should be noted that step S580 is similar to step S150 in the above embodiments. To avoid repetition, it will not be elaborated here.
[0155] Figure 9 The flowchart of yet another keyword query method provided by the embodiment of the present application is as follows. As Figure 9 shown, the method includes steps S710 to S760 as shown below.
[0156] Step S710: Obtain multiple keywords of the query target.
[0157] Step S720: Query the multiple keywords in the first search library respectively.
[0158] Step S730: If the first query keyword among the multiple keywords is not included in the first search library, query the first query keyword in the second search library.
[0159] It should be noted that steps S710 to S730 are similar to steps S110 to S130 in the above embodiment. To avoid repetition, they will not be elaborated here.
[0160] Step S740: If the second abbreviation corresponding to the first query keyword is not found in the second search library, determine that the name information of the first query keyword includes a prompt message for prompting that the first query keyword is not found.
[0161] Exemplarily, when the first query keyword cannot be found in both the first search library and the second search library, it can be determined that the first query keyword does not exist, that is, the full name, the first abbreviation, and the second abbreviation corresponding to the first query keyword all do not exist. In this case, the name information of the first query keyword includes a prompt message for prompting the user that the first query keyword is not found.
[0162] In some examples, when the first query keyword cannot be found in both the first search library and the second search library, it indicates that the first query keyword may be a wrong word. In this case, the name information of the first query keyword can include a prompt message for prompting the user that the first query keyword is not found. For example, a prompt message such as "does not exist" can be added before or after the first query keyword to prompt the user that there is no query result for the first query keyword.
[0163] As Figure 10 shown, when the variable name "AccrPedalPosn" input by the user is received, if the keyword "Acctr" is not included in both the first search library and the second search library, the name information of the keyword "Acctr" can be a prompt message of "Acctr does not exist".
[0164] Therefore, when the first query keyword in the keyword group cannot be found in either the first search library or the second search library, the embodiments of the present application can output a prompt message for prompting the non-existence of the first query keyword, so as to prompt the user that the first query keyword cannot find the corresponding full name, first abbreviation, and second abbreviation.
[0165] Step S750: Determine the query result of the query target according to the name information queried for each keyword in the multiple keywords.
[0166] Step S760: Output the query result.
[0167] It should be noted that steps S750 to S760 are similar to steps S140 to S150 in the above embodiments. To avoid repetition, they will not be elaborated here.
[0168] Figure 11 The flowchart of yet another keyword query method provided by the embodiments of the present application is as Figure 11 shown, and this method includes steps S801 to S816 as shown below.
[0169] Step S801: Receive the keyword group input by the user.
[0170] Step S802: Split the keyword group into n keywords.
[0171] Where n is an integer greater than or equal to 1.
[0172] Step S803: Determine whether i is greater than n.
[0173] Where i is an integer greater than or equal to 1 and less than or equal to n. i represents the i-th keyword in the keyword group. For example, i = 1 can represent the first keyword, and i = n can represent the n-th keyword.
[0174] In some examples, it is possible to start from i = 1 until i = n, and query the first keyword to the n-th keyword in sequence.
[0175] If i is less than or equal to n, continue to execute step S804; if i is greater than n, execute step S816.
[0176] Step S804: Query the i-th keyword in the first search library.
[0177] Step S805: Determine whether the first search library includes the i-th keyword.
[0178] If the first search library includes the i-th keyword, continue to execute step S806; if the first search library does not include the i-th keyword, execute step S807.
[0179] Specifically, if the first search library includes a full name sub-library and a first abbreviation sub-library, it can be assumed that the i-th keyword is an abbreviation, and it is queried whether the i-th keyword is included in the first abbreviation sub-library in the first search library. If it is included, step S806 is continued; if it is not included, it is assumed that the i-th keyword is a full name, and it is queried whether the i-th keyword is included in the full name sub-library in the first search library. If it is included, step S806 is continued; if it is not included, step S807 is executed.
[0180] Step S806, determine the full name and the first abbreviation corresponding to the i-th keyword.
[0181] Step S807, generate a second search library.
[0182] It should be noted that step S807 can be executed after step 805 or before step S805. For example, step S807 can be executed before step S801, and this application does not make a limitation on this. Step S807 is step S130 in the above embodiment, and for the sake of avoiding repetition, it will not be elaborated here.
[0183] Step S808, query the i-th keyword in the second search library.
[0184] Step S809, determine whether the i-th keyword is included in the second search library.
[0185] If the i-th keyword is included in the second search library, step S810 is continued; if the i-th keyword is not included in the second search library, step S813 is executed.
[0186] Step S810, determine whether the full name corresponding to the i-th keyword is unique.
[0187] If the full name corresponding to the i-th keyword is unique, step S811 is continued; if the full name corresponding to the i-th keyword is not unique, step S812 is executed.
[0188] Step S811, determine the full name and the first abbreviation corresponding to the i-th keyword.
[0189] If the i-th keyword is included in the second search library, the full name of the i-th keyword is determined according to the second abbreviation corresponding to the i-th keyword in the second search library, and then the first abbreviation corresponding to it is determined in the first search library according to the full name corresponding to the i-th keyword.
[0190] Step S812, determine multiple full names and multiple first abbreviations corresponding to the i-th keyword.
[0191] Among them, the multiple full names corresponding to the i-th keyword can be connected by the second character in the above embodiments, and the multiple first abbreviations corresponding to the i-th keyword can also be connected by the second character in the above embodiments.
[0192] Step S813, determine that the i-th keyword does not exist.
[0193] Step S814, connect the name information of the i-th keyword with the name information of the 1st to the (i - 1)-th keywords respectively.
[0194] For example, after the query of the i-th keyword is completed, the full name of the i-th keyword can be connected with the full names of the 1st to the (i - 1)-th keywords. For example, the first abbreviations of the i-th keyword and the 1st to the (i - 1)-th keywords are connected by the first character in the above embodiments.
[0195] Step S815, i = i + 1.
[0196] Continue to query the (i + 1)-th keyword according to the above steps S804 to S814. When i is greater than n, execute step S816.
[0197] Step S816, output the query result.
[0198] The query result includes the name information of the 1st to the n-th keywords after connection.
[0199] Figure 12 This is a schematic structural diagram of a keyword query device provided by some embodiments of the present application. As Figure 12 shown, the keyword query device 10 includes: an acquisition module 11, a query module 12, a determination module 13, and an output module 14.
[0200] The acquisition module 11 is configured to acquire multiple keywords of a query target;
[0201] The query module 12 is configured to query the multiple keywords in a first search library respectively; among them, the first search library includes at least one full name of query information and a first abbreviation corresponding to each full name. If the first search library does not include the first query keyword among the multiple keywords, query the first query keyword in a second search library. Among them, the second search library includes a second abbreviation corresponding to the full name of the query information, and the second abbreviation is different from the first abbreviation;
[0202] The determination module 13 is configured to determine a query result of the query target according to the name information queried for each keyword; among them, the name information includes at least one of the full name, the first abbreviation, and the second abbreviation corresponding to the keyword;
[0203] The output module 14 is used to output the query result.
[0204] In some embodiments, the determination module 12 is further configured to: if a second short name corresponding to the first query keyword is found in the second search library, determine that the name information of the first query keyword includes the second short name corresponding to the first query keyword.
[0205] In some embodiments, the determination module 12 is further configured to: determine the full name corresponding to the first query keyword according to the association information between the second short name and the full name; determine that the name information of the first query keyword further includes the full name corresponding to the first query keyword.
[0206] In some embodiments, the determination module 12 is further configured to: query the full name corresponding to the first query keyword in the first search library, and determine the first short name corresponding to the first query keyword; determine that the name information of the first query keyword further includes the first short name corresponding to the first query keyword.
[0207] In some embodiments, the determination module 12 is further configured to: if the first search library includes the first query keyword, determine that the name information of the first query keyword includes at least one of the full name and the first short name corresponding to the first query keyword.
[0208] In some embodiments, the determination module 12 is further configured to: if the second short name corresponding to the first query keyword is not found in the second search library, determine that the name information of the first query keyword includes a prompt information for prompting that the first query keyword is not found.
[0209] In some embodiments, the device further includes a processing module, and the processing module is configured to: process all the full names in the first search library to obtain the second short name corresponding to each full name; generate a second search library according to the second short name.
[0210] In some embodiments, the processing module is specifically configured to: delete the vowel letters in the other letters except the first letter in each full name to obtain the second short name corresponding to each full name.
[0211] In some embodiments, the acquisition module 11 is specifically configured to: receive the keyword group of the query target input by the user; split the keyword group by the camel case method to obtain multiple keywords for the target query.
[0212] In some embodiments, the determination module 13 is further configured to: connect the full names corresponding to the respective keywords with a first character; and / or connect the first short names corresponding to the respective keywords with a first character; and / or connect the second short names corresponding to the respective keywords with a first character to obtain the query result of the query target.
[0213] In some embodiments, the determining module 13 is further configured to: sequentially connect multiple full names corresponding to the first query keyword by using a second character to obtain a full name combination; and / or, sequentially connect multiple first abbreviations corresponding to the first query keyword by using a second character to obtain a first abbreviation combination; connect the full name or full name combination corresponding to each keyword by using a first character; and / or, connect the first abbreviation or first abbreviation combination corresponding to each keyword by using a first character to obtain a query result of the query target.
[0214] Figure 13 FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the electronic device.
[0215] As Figure 13 shown, the electronic device 100 may include: a processor 101 and a memory 102. Exemplarily, the electronic device 100 may further include: a communication interface 103 and a communication bus 104.
[0216] Among them, the processor 101, the memory 102, and the communication interface 103 complete mutual communication through the communication bus 104. The communication interface 103 is used to communicate with network elements of other devices such as clients or other servers.
[0217] In some embodiments, the processor 101 is configured to execute a program 105, and specifically may execute relevant steps in the above-described query method embodiment of keywords. Specifically, the program 105 may include program code, and the program code includes computer-executable instructions.
[0218] Exemplarily, the processor 101 may be a central processing unit CPU, or a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. One or more processors that the electronic device 100 may include may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.
[0219] In some embodiments, the memory 102 is used to store the program 105. The memory 102 may include a high-speed RAM memory, and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
[0220] The program 105 may specifically be called by the processor 101 to cause the electronic device 100 to perform the following operations:
[0221] Obtain multiple keywords of the query target;
[0222] Query the multiple keywords separately in the first search library; wherein, the first search library includes at least one full name of the query information and a first short name corresponding to each full name;
[0223] If the first query keyword among the multiple keywords is not included in the first search library, then query the first query keyword in the second search library; wherein, the second search library includes a second short name corresponding to the full name of the query information, and the second short name is different from the first short name;
[0224] Determine the query result of the query target according to the name information queried by each keyword; wherein, the name information includes at least one of the full name, the first short name, and the second short name corresponding to the keyword;
[0225] Output the query result.
[0226] An embodiment of the present application provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction runs on the electronic device 100, the electronic device 100 is enabled to execute the keyword query method in the above embodiment.
[0227] The executable instruction can specifically be used to enable the electronic device 100 to perform the following operations:
[0228] Obtain multiple keywords of the query target;
[0229] Query the multiple keywords separately in the first search library; wherein, the first search library includes at least one full name of the query information and a first short name corresponding to each full name;
[0230] If the first query keyword among the multiple keywords is not included in the first search library, then query the first query keyword in the second search library; wherein, the second search library includes a second short name corresponding to the full name of the query information, and the second short name is different from the first short name;
[0231] Determine the query result of the query target according to the name information queried by each keyword; wherein, the name information includes at least one of the full name, the first short name, and the second short name corresponding to the keyword;
[0232] Output the query result.
[0233] For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0234] The keyword query device, electronic device, and computer-readable storage medium provided in the embodiments of the present application are all used to execute the corresponding keyword query method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be elaborated here.
[0235] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. In addition, the embodiments of the present application are not directed to any specific programming language.
[0236] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present application can be practiced without these specific details. Similarly, in order to streamline the present application and assist in understanding one or more of the various inventive aspects, in the description of the exemplary embodiments of the present application above, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. Among them, the claims following the specific implementation manners are hereby expressly incorporated into the specific implementation manners, where each claim itself is a separate embodiment of the present application.
[0237] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive.
[0238] It should be noted that the above embodiments are illustrative of the present application rather than restrictive of the present application, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words may be construed as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A keyword query method, characterized in that, The method includes: Obtaining multiple keywords of a query target; Querying the multiple keywords in a first search library respectively; wherein, the first search library includes at least one full name of query information and a first short name corresponding to each full name; If the first search library does not include a first query keyword among the multiple keywords, querying the first query keyword in a second search library; wherein, the second search library includes a second short name corresponding to the full name of the query information, and the second short name is different from the first short name; Determining a query result of the query target according to the name information queried for each keyword among the multiple keywords; wherein, the name information includes at least one of the full name, the first short name, and the second short name corresponding to each keyword; Outputting the query result; The method further includes: processing all the full names in the first search library to obtain a second short name corresponding to each full name; generating the second search library according to the second short name; Wherein, the processing all the full names in the first search library to obtain a second short name corresponding to each full name includes: deleting the vowel letters among the other letters except the first letter in each full name to obtain a second short name corresponding to each full name.
2. The method according to claim 1, wherein After querying the first query keyword in the second search library, the method further includes: If the second short name corresponding to the first query keyword is queried in the second search library, determining that the name information of the first query keyword includes the second short name corresponding to the first query keyword.
3. The method according to claim 2, wherein The second search library further includes the association information between the second short name and the full name; after determining that the name information of the first query keyword includes the second short name corresponding to the first query keyword, the method further includes: Determining the full name corresponding to the first query keyword according to the association information between the second short name and the full name; Determining that the name information of the first query keyword further includes the full name corresponding to the first query keyword.
4. The method according to claim 3, characterized in that After determining that the name information of the first query keyword further includes the full name corresponding to the first query keyword, the method further includes: Querying the full name corresponding to the first query keyword in the first search library to determine the first short name corresponding to the first query keyword; Determining that the name information of the first query keyword further includes the first short name corresponding to the first query keyword.
5. The method according to claim 1, characterized in that The method further includes: If the first search library includes the first query keyword, determining that the name information of the first query keyword includes at least one of the full name and the first short name corresponding to the first query keyword.
6. The method according to claim 1, characterized in that, After querying the first query keyword in the second search library, the method further includes: If the second short name corresponding to the first query keyword is not queried in the second search library, determining that the name information of the first query keyword includes a prompt information for prompting that the first query keyword is not queried.
7. The method according to any one of claims 1-6, characterized in that, The obtaining multiple keywords of a query target includes: Receiving a keyword group of the query target input by a user; The keyword group is split using the camel case method to obtain the multiple keywords of the query target.
8. The method according to any one of claims 1-6, characterized in that, Determining the query result of the query target according to the name information queried for each keyword in the multiple keywords includes: Connecting the full names corresponding to each keyword using the first character; and / or, Connecting the first abbreviations corresponding to each keyword using the first character; and / or, Connecting the second abbreviations corresponding to each keyword using the first character to obtain the query result of the query target.
9. The method according to claim 8, wherein The name information of the first query keyword includes multiple full names and corresponding multiple first abbreviations; Determining the query result of the query target according to the name information queried for each keyword in the multiple keywords includes: Sequentially connecting the multiple full names corresponding to the first query keyword using the second character to obtain a full name combination, and / or sequentially connecting the multiple first abbreviations corresponding to the first query keyword using the second character to obtain a first abbreviation combination; Connecting the full names or full name combinations corresponding to each keyword using the first character, and / or connecting the first abbreviations or first abbreviation combinations corresponding to each keyword using the first character to obtain the query result of the query target.
10. A keyword query device, characterized in that, The device includes: An acquisition module for acquiring multiple keywords of a query target; A query module for separately querying the multiple keywords in a first search library; wherein, the first search library includes at least one full name of query information and a first abbreviation corresponding to each full name; if the first query keyword in the multiple keywords is not included in the first search library, then query the first query keyword in a second search library; the second search library includes a second abbreviation corresponding to the full name of the query information, and the second abbreviation is different from the first abbreviation; A determination module for determining the query result of the query target according to the name information queried for each keyword in the multiple keywords; wherein, the name information includes at least one of the full name, the first abbreviation, and the second abbreviation corresponding to each keyword; An output module for outputting the query result; A processing module for processing all the full names in the first search library to obtain a second abbreviation corresponding to each full name; generating the second search library according to the second abbreviation; Wherein, processing all the full names in the first search library to obtain a second abbreviation corresponding to each full name includes: deleting the vowel letters in the other letters except the first letter in each full name to obtain a second abbreviation corresponding to each full name.
Citation Information
Patent Citations
Information query method and device, computer readable storage medium and electronic equipment
CN113946652A