Method for searching data in integrated development environment and related equipment

CN118786409APending Publication Date: 2024-10-15HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280093064.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-03-15
Filing Date
2022-12-06
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing integrated development environment (IDE) search technology requires more keywords or phrases when locating target search items, resulting in a slow and inaccurate search process.

Method used

The computing device determines the search terms according to the data source and keywords, and uses the first distance and the second distance to sort and display the search terms, so that fewer keywords or phrases can quickly locate the target search terms and improve the accuracy of the search. and efficiency.

Benefits of technology

It can quickly locate target search items with fewer keywords or phrases, save manual search time, and improve search accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118786409A_ABST
    Figure CN118786409A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for searching data in an integrated development environment and related equipment. The method comprises: determining M search entries according to a data source and N keywords (S210) wherein the mth search entry in the M search entries comprises N keywords, N and M are positive integers greater than or equal to 1, and m = 1,..., M; determining an arrangement order of the M search entries (S220), wherein the arrangement order of the mth search entry in the M search entries is positively correlated with the first distance and / or the second distance of the mth search entry; and displaying the M search entries according to the determined arrangement order (S230). According to the method, the search entries with smaller first distances and / or second distances can be arranged on the sequence bits with smaller numerical values, so that the target search entry can be quickly positioned through fewer keywords or phrases, the time for manually searching the target search entry is saved, and the search accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

A method for searching data in an integrated development environment and related equipment

[0001] This application claims priority to Russian patent application No. RU2022106755 filed with the Russian Federal Patent Office on March 15, 2022, entitled “A method and related device for searching data in an integrated development environment”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] The embodiments of the present application relate to the field of computers, and primarily to a method for searching data in an integrated development environment, a computing device, a computing equipment, a chip system, and a computer-readable storage medium. Background Art

[0003] An integrated development environment (IDE) is an application that provides a program development environment and can include tools such as a code editor, compiler, debugger, and graphical user interface. An IDE can provide functions such as code writing, analysis, compilation, and debugging. IDE code search technology allows a code search engine to obtain all search terms for a keyword or phrase, given a specific keyword or phrase. Search types can be categorized as symbolic, text, and file searches. Symbolic searches use strings containing keywords or phrases to obtain search terms within code files (e.g., classes, methods, etc.). Text searches use keywords or phrases to obtain search terms within plain text files. File searches use keywords or phrases to obtain search terms within the file system. Current IDE search technology supports both symbolic and text searches, and the resulting search terms can be sorted and displayed by type. However, due to the large number of search terms and the need to sort and display them by type, it is not possible to quickly locate the desired search terms using a small number of keywords or phrases.

[0004] Therefore, how to locate the target search item more quickly with fewer keywords or phrases becomes an urgent problem to be solved.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a method, computing device, computing equipment, chip system and computer-readable storage medium for searching data in an integrated development environment, which can locate the target search item more quickly through fewer keywords or phrases, thereby saving time in manually searching for the target search item and improving the accuracy of the search.

[0007] In a first aspect, a method for searching data in an integrated development environment is provided, the method comprising: determining M search items based on a data source and N keywords; determining an arrangement order of the M search items, wherein the arrangement order of the mth search item among the M search items is positively correlated with the first distance and / or second distance of the mth search item; and displaying the M search items according to the determined arrangement order.

[0008] The mth search item among the M search items includes N keywords, where N and M are positive integers greater than or equal to 1, and m=1, ..., M. The first distance of the mth search item is used to indicate the distance between a reference location and the locations of the N keywords included in the mth search item, and the second distance of the mth search item is used to indicate the distance between the N keywords included in the mth search item in the data source.

[0009] In an embodiment of the present application, the computing device can determine M search items based on the data source and N keywords, and can also determine the order of arrangement of each search item in the M search items. The computing device can arrange and display search items with smaller first distances and / or second distances at positions with smaller numerical values, thereby more quickly locating the target search item with fewer keywords or phrases, saving time in manually searching for the target search item and improving search accuracy.

[0010] In combination with the first aspect, in certain implementations of the first aspect, the N third distances of the mth search item are determined based on the positions of the N keywords included in the mth search item; the first distance of the mth search item is determined based on the N third distances of the mth search item; and the arrangement order of the M search items is determined based on the first distances of the M search items.

[0011] The nth third distance of the N third distances of the mth search item is the distance from the position of the nth keyword among the N keywords included in the mth search item to the reference position, where n=1, ..., N. The positions of the N keywords included in the mth search item are respectively the positions of the N keywords in the reference data. The reference data includes a currently open file, and the reference position is the position of the cursor before obtaining the N keywords in the currently open file, and / or the reference data includes record information, and the reference position is the latest record in the record information.

[0012] In an embodiment of the present application, the computing device can determine the first distance of each search item based on the positions of the N keywords included in each search item, thereby determining the arrangement order of the M search items. The computing device can arrange search items with smaller first distances in data bits with smaller values, thereby increasing the probability that the search items in data bits with smaller values ​​are the target search items, saving time in manually searching for the target search items and improving search accuracy.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the record information includes: any one or more of: code history submission records, file system modification records, search records, or code browsing records.

[0014] In an embodiment of the present application, the computing device can determine the first distance of each search entry based on the position of the N keywords included in each search entry in any one or more records of the code history submission record, file system modification record, search record, or code browsing record, thereby determining the arrangement order of the M search entries.

[0015] In combination with the first aspect, in certain implementations of the first aspect, when N≠1, the second distance of the mth search item is determined based on the code level distance and / or file level distance of the mth search item; and the arrangement order of the M search items is determined based on the second distances of the M search items.

[0016] The code level distance of the mth search item includes the code level distance between each two keywords in the mth search item at the data source, and the file level distance of the mth search item includes the file level distance between each two keywords in the mth search item at the data source.

[0017] In an embodiment of the present application, the computing device may determine the second distance of each search item based on the code level distance and / or file level distance of each search item. The computing device may arrange the search items with smaller second distances on data bits with smaller values, thereby increasing the probability that the search items on data bits with smaller values ​​are the target search items, thereby saving time in manually searching for the target search items and improving search accuracy.

[0018] In combination with the first aspect, in certain implementations of the first aspect, N keywords are searched in the data source respectively to obtain N search result sets; and M search items are determined from the N search result sets.

[0019] Among them, the search results included in the nth search result set among N search result sets are obtained by searching the nth keyword among N keywords in the data source, and the nth search result set includes at least one search result containing the nth keyword, n=1,...,N.

[0020] In an embodiment of the present application, a computing device may search for N keywords in a data source, obtain N search result sets, and thereby determine M search terms. The computing device may obtain M search terms containing N keywords from the data source, and thereby filter search terms containing only some of the N keywords, thereby increasing the probability that the search terms presented at the end are the target search terms, thereby improving search accuracy.

[0021] In combination with the first aspect, in certain implementations of the first aspect, the currently opened file includes any one or more of the following: the name of the currently opened file, the content of the currently opened file, or the arrangement order of the currently opened files, the code history submission record includes the code history submission content and / or the code history submission name, the file system modification record includes the file history modification name, the search record includes the historical search content, and the code browsing record includes the browsed code file content and / or the browsed code file name.

[0022] In an embodiment of the present application, the computing device can determine the first distance of the mth search item based on the location of the N keywords included in the mth search item in one or more information included in the currently opened file and / or one or more information included in the recorded information, thereby determining the arrangement order of the M search items.

[0023] In combination with the first aspect, in certain implementations of the first aspect, the data source includes any one or more of a code index of the project, a code index of a database that the project depends on, or a text index of a resource file of the project.

[0024] In an embodiment of the present application, the computing device may determine M search items including N keywords based on any one or more indexes included in the data source. The computing device may also determine a second distance of the M search items based on the distance between the N keywords included in the m-th search item in any one or more indexes included in the data source.

[0025] In a second aspect, a computer device is provided, comprising an acquisition module, a processing module, and a display module, wherein the acquisition module is used to acquire N keywords, and the processing module and the display module are used to implement the first aspect or any possible implementation of the first aspect.

[0026] In a third aspect, a computer device is provided, comprising a processor, wherein the processor is configured to couple with a memory, read and execute instructions and / or program codes in the memory, so as to perform the first aspect or any possible implementation of the first aspect.

[0027] In a fourth aspect, a chip system is provided, which includes a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute the first aspect or any possible implementation of the first aspect.

[0028] In a fifth aspect, a computer-readable storage medium is provided, which stores program code. When the computer storage medium is run on a computer, it enables the computer to execute the first aspect or any possible implementation of the first aspect.

[0029] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, which, when running on a computer, enables the computer to execute the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] FIG1 is a schematic structural block diagram of an IDE data search system according to an embodiment of the present application.

[0031] FIG2 is a schematic flow chart of a method for searching data using an IDE according to an embodiment of the present application.

[0032] FIG3 is a schematic diagram of determining M search items according to an embodiment of the present application.

[0033] FIG4 is a schematic diagram of a code hierarchy of a data source according to an embodiment of the present application.

[0034] FIG5 is a schematic flowchart of a method for searching data by an IDE according to another embodiment of the present application.

[0035] FIG6 is a schematic diagram of a code hierarchy of a data source according to another embodiment of the present application.

[0036] FIG7 is a schematic flowchart of a method for searching data by an IDE according to another embodiment of the present application.

[0037] FIG8 is a schematic effect diagram of a method for searching data using an IDE according to an embodiment of the present application.

[0038] FIG9 is a schematic structural diagram of a computing device according to an embodiment of the present application.

[0039] FIG10 is a schematic structural diagram of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0041] The technical solutions of the embodiments of the present application can be applied to various computing devices equipped with IDE, such as host computers, laptop computers, desktop computers, workstations, etc., and the embodiments of the present application are not limited to this.

[0042] FIG1 is a schematic structural block diagram of an IDE data search system 100. As shown in FIG1, the IDE data search system includes a processing component 110 and a display component 120.

[0043] The processing component 110 can determine M search items based on the data source and N keywords, and the m-th search item in the M search items includes the N keywords. The data source includes any one or more of the code index of the project, the code index of the database that the project depends on, or the text index of the resource file of the project. N and M are positive integers greater than or equal to 1, m=1,...,M. Specifically, the processing component 110 can search for N keywords in the data source, obtain N search result sets, and thus determine M search items. The N search result sets correspond one-to-one to the N keywords, and the n-th search result set in the N search result sets includes at least one search result containing the n-th keyword.

[0044] The processing component can also determine the arrangement order of M search items, wherein the arrangement order of the mth search item in the M search items is positively correlated with the first distance and / or the second distance of the mth search item. The first distance of the mth search item is used to indicate the distance between the reference position and the position of the N keywords included in the mth search item, and the second distance of the mth search item is used to indicate the distance between the N keywords included in the mth search item in the data source. The reference data may include a currently open file or record information. In the case where the reference data includes the currently open file, the reference position is the position of the cursor before obtaining the N keywords in the currently open file; in the case where the reference data includes record information, the reference position is the latest record in the record information. The record information includes: any one or more of code history submission records, file system modification records, search records, or code browsing records.

[0045] For example, assuming that the first distance of the m1th search entry is greater than the first distance of the m2th search entry, it can be determined that the value of the order bit of the m1th search entry is greater than the value of the order bit of the m2th search entry. For example, assuming that the second distance of the m1th search entry is greater than the second distance of the m2th search entry, it can be determined that the value of the order bit of the m1th search entry is greater than the value of the order bit of the m2th search entry. For example, assuming that the fourth distance of the m1th search entry is greater than the fourth distance of the m2th search entry, it can be determined that the value of the order bit of the m1th search entry is greater than the value of the order bit of the m2th search entry. The fourth distance of the m1th search entry is the distance determined based on the first distance and the second distance of the m1th search entry. m1≠m2, m1, m2=1, ...M.

[0046] The display component 120 may display the M search items according to the determined arrangement order. For example, assuming that the arrangement order of the m1th search item is 2 and the arrangement order of the m2th search item is 1, the display component 120 may display the m2th search item and the m1th search item in order from top to bottom.

[0047] The IDE search data system 100 shown in FIG1 can be executed on a computing device. The IDE search data system shown in FIG1 can determine M search items based on N keywords, and can also determine the order of each of the M search items. This method can arrange search items with smaller first and / or second distances in numerically lower order positions, i.e., search items in numerically lower order positions are more likely to be target search items. In other words, the system can more quickly locate target search items using fewer keywords or phrases, thereby saving time in manually searching for target search items and improving search accuracy.

[0048] Fig. 2 is a schematic flow chart of a method for searching data by an IDE, and the method in Fig. 2 can be executed by the IDE data searching system in Fig. 1. The method in Fig. 2 includes the following steps.

[0049] S210: Determine M search items based on the data source and N keywords.

[0050] The computing device may search a data source for N keywords, thereby determining M search items. The mth search item among the M search items includes the N keywords, where N and M are positive integers greater than or equal to 1, m=1, ..., M. The data source may include any one or more of the following: a code index of the project, a code index of a database that the project depends on, or a text index of a resource file of the project.

[0051] Specifically, the computing device may search for N keywords in a data source, obtain N search result sets, and determine M search items from the N search result sets. The search results included in the n-th search result set in the N search result sets are obtained by searching the data source for the n-th keyword in the N keywords. The n-th search result set includes at least one search result including the n-th keyword, where n=1, ..., N.

[0052] When N is 1, the computing device may search the data source for the keyword and obtain a set of search results for the keyword. The computing device may also treat each search result in the set of search results as a search item, thereby obtaining M search items. If N is not 1, the computing device may search the data source for the N keywords separately and obtain a set of search results for each keyword, thereby obtaining N search result sets. The computing device may also determine M search items from the N search result sets.

[0053] Optionally, when N is not 1, a specific method of determining M search items from N search result sets may be as shown in FIG3 .

[0054] FIG3 is a schematic diagram of determining M search items. When searching for N keywords in a data source, the same or different types of search results may be obtained for each keyword. The search result type may include one or more of a package, a class, a method, a text, and a file. The search result types may be the same or different for different data sources, and this is not limited in the present embodiment.

[0055] The computing device may combine one type of search results for each keyword with other types of search results for other keywords other than that type, and the types of search results for each keyword after the combination are different, thereby obtaining M search items, and the M search items all actually exist in the data source. Other keywords are keywords other than the keyword. The mth search item actually exists in the data source if the mth search item is any one of a path, file name, package name, class name, method name, or text already in the data source, and is not a path or name created by the combination and not existing in the data source.

[0056] For example, if the mth search item is a class name, then the class name is a class name that already exists in the data source, rather than a class name that is created due to combination and does not exist in the data source. If the mth search item is a path, then the path is a path that already exists in the data source, rather than a path that is created due to combination and does not exist in the data source.

[0057] For example, assuming the keywords are row and bar, searching for row in the data source shown in Figure 4 yields search results of row1, row2, and rowlength. Searching for bar in the data source yields search results of bar and barMethod. Row1 and row2 are of class type, rowlength is of text type, bar is of package type, and barMethod is of method type. Since package bar is an ancestor node of class row1 in the code hierarchy of the data source shown in Figure 4, bar.row1 is the name of a class already in the data source. Similarly, bar.row2 is the name of a class already in the data source. Since class row2 is the ancestor node of method barMethod, row2.barMethod is the name of a method already in the data source. Similarly, bar.row2.barMethod is the name of a method already in the data source, and bar.row2.barMethod and row2.barMethod are actually the same method name, so only one of bar.row2.barMethod and row2.barMethod can be retained. Because the text rowlength doesn't have any of the methods, classes, or packages containing the keyword bar in its ancestor nodes, the text obtained by combining the text rowlength with any of the search results for the keyword bar isn't already in the data source. In other words, the text rowlength can't be combined with any of the search results for the keyword bar to obtain a search entry. Similarly, because class row1 isn't an ancestor of method barMethod, the class name obtained by combining class row1 with method barMethod isn't a method name already in the data source. Therefore, class row1 and method barMethod can't be combined to obtain a search entry.

[0058] That is, combining the search results for the keyword row with the search results for types other than class for the keyword bar yields three search items: bar.row1, bar.row2, and row2.barMethod, where bar.row1 and bar.row2 are class names already in the data source, and row2.barMethod is a method name already in the data source. Combining the search results for the keyword row with the search results for types other than text for the keyword bar yields no search items. Similarly, combining the search results for the keyword bar with the search results for types other than package for the keyword row yields the search items bar.row1 and bar.row2. Combining the search results for the keyword bar with the search results for types other than method for the keyword row yields the search item row2.barMethod. In other words, searching for the keywords row and bar in the data source yields the following search items: bar.row1, bar.row2, and row2.barMethod.

[0059] Optionally, the symbol connecting each search result after the search results of the keywords are combined can be pre-defined, for example, it can be bar.row1, or it can be bar:row1. Among them, the symbol "." and the symbol ":" are symbols for connecting different types of search results. The symbols connecting different types of search results in the same data source can be the same or different. The symbols connecting different types of search results in different data sources can be the same or different, and the embodiments of the present application do not limit this.

[0060] Optionally, when N is not 1, a specific method of determining M search items from N search result sets may also be: determining M search results containing N keywords from the N search sets, and taking each search result containing N keywords as a search item.

[0061] For example, assuming the keywords are test and foo, searching for test in the data source yields the search results test1, testfoo1, and testfoo2. Searching for foo in the data source yields the search results testfoo1 and testfoo2, and all five search results are of class type. In other words, two search result sets are obtained: {test1, testfoo1, testfoo2} and {testfoo1, testfoo2}. If the class testfoo1 and testfoo2 contained in both search result sets are the same class, then two search items can be determined from these two search result sets: testfoo1 and testfoo2.

[0062] Optionally, the embodiments of the present application do not limit the form of the keyword search results. The keyword search results may include one or more character strings, wherein one or more character strings may be exactly the same as the keyword. For example, assuming the keyword is test, the search result obtained by searching for test in the data source is test, and the type of the search result is class. Alternatively, the search result obtained by searching for test in the data source is packagecom1.test, where packagecom1 is the package containing the class test. The search result packagecom1.test contains two character strings, namely packagecom1 and test.

[0063] Alternatively, the search results for a keyword may include one or more strings, where some characters in one or more strings are identical to the keyword. For example, assuming the keyword is test, searching for test in the data source may yield the search result testfoo, where the search result type is class. Alternatively, searching for test in the data source may yield the search result packagecom1.testfoo, where packagecom1 is the package containing the class testfoo. The search result packagecom1.testfoo contains two strings: packagecom1 and testfoo.

[0064] For example, assuming the keyword is test, searching for test in the data source yields the following search results: packagecom1.test1, packagecom1.test2, and packagecom2.testfoo. The search result set for the keyword test can be determined to be {packagecom1.test1, packagecom1.test2, packagecom2.testfoo}. All three search results are of class type. Based on this search result set, the three search terms that can be determined are packagecom1.test1, packagecom1.test2, and packagecom2.testfoo. Packagecom1 is the package containing the classes test1 and test2, and packagecom2 is the package containing the class testfoo.

[0065] For example, assuming the keywords are test and foo, searching for test in the data source will yield the search results packagecom1.test1, packagecom2.testfoo1, and packagecom2.testfoo2. Searching for foo in the data source will yield the search results packagecom2.testfoo1 and packagecom2.testfoo2, and all five search results are of class type. That is, based on the keywords test and foo, the two search result sets that can be obtained are {packagecom1.test1, packagecom2.testfoo1, packagecom2.testfoo2} and {packagecom2.testfoo1, packagecom2.testfoo2}, respectively. Based on these two search result sets, the two search entries can be determined to be packagecom2.testfoo1 and packagecom2.testfoo2. Packagecom2 is the package that contains the classes testfoo1 and testfoo2.

[0066] For example, assuming the keywords are row and bar, searching for row in the data source can obtain the search results of bar.row1, packagecom3.row2 and rowlength, and searching for bar in the data source can obtain the search results of bar, packagecom3.row2.barMethod. That is, based on the keywords row and bar, the two search result sets that can be obtained are {bar.row1, packagecom3.row2, rowlength} and {bar, packagecom3.row2.barMethod} respectively. Among them, the types of row1 and row2 are classes, the type of rowlength is text, the type of bar is a package, and the type of barMethod is a method. Based on the two search result sets, the two search items can be determined as bar.row1 and packagecom3.row2.barMethod. Among them, packagecom3 is the package containing the class row2.

[0067] Optionally, the search entry may be a path located from a package, a path located from a file, or a path located from a class, which is not limited in the embodiments of the present application.

[0068] Optionally, the search entry may be a path, or the search entry may be in one or more forms such as a file name, a package name, a class name, a method name, etc., which is not limited in the embodiments of the present application.

[0069] Optionally, the computing device may obtain the data source before step S210. The embodiment of the present application does not specifically limit the manner in which the computing device obtains the data source.

[0070] S220: Determine the arrangement order of the M search items.

[0071] The computing device may determine a ranking order for each of the M search items, wherein the ranking order of the mth search item is positively correlated with the first distance and / or the second distance of the mth search item. In other words, if the first distance of the m1th search item is greater than the first distance of the m2th search item, then when the ranking order of the m1th search item is 2, the ranking order of the m2th search item may be 1. Alternatively, if the second distance of the m1th search item is greater than the second distance of the m2th search item, then when the ranking order of the m1th search item is 2, the ranking order of the m2th search item may be 1. Alternatively, if the fourth distance of the m1th search item is greater than the fourth distance of the m2th search item, then when the ranking order of the m1th search item is 2, the ranking order of the m2th search item may be 1. The fourth distance of the m1th search item is a distance determined based on the first distance and the second distance of the m1th search item.

[0072] The first distance of the mth search entry is used to indicate the distance between the reference position and the positions of the N keywords included in the mth search entry. The second distance of the mth search entry is used to indicate the distance between the N keywords included in the mth search entry in the data source. The positions of the N keywords included in the mth search entry are respectively the positions of the N keywords in the reference data. The reference data may include a currently open file or record information. In the case where the reference position includes the currently open file, the reference position is the position of the cursor before obtaining the N keywords in the currently open file. Alternatively, in the case where the reference data includes record information, the reference position is the latest record in the record information. The record information includes: any one or more of code history submission records, file system modification records, search records, or code browsing records.

[0073] For example, assuming the keyword is test, searching for test in the data source yields three search items: packagecom1.test1, packagecom1.test2, and packagecom2.testfoo. If the distance between the keyword test in packagecom1.test1 in the currently opened file and the cursor position before obtaining N keywords is a1, the distance between the keyword test in packagecom1.test2 in the currently opened file and the cursor position before obtaining N keywords is b1, and the distance between the keyword test in packagecom2.testfoo in the currently opened file and the cursor position before obtaining N keywords is c1. Assuming the first distances of the three search items are a1, b1, and c1, respectively, and a1>b1>c1, then the order of the three search items is: packagecom2.testfoo, packagecom1.test2, packagecom1.test1.

[0074] If the distance between the position of the keyword test in packagecom1.test1 in the historical commit record and the position of the latest record in the historical commit record is a2, the distance between the position of the keyword test in packagecom1.test2 in the currently opened file and the cursor position before obtaining N keywords is b2, and the distance between the position of the keyword test in packagecom2.testfoo in the currently opened file and the cursor position before obtaining N keywords is c2. Assuming that the first distances of the three search items are a1+a2, b1+b2, and c1+c2 respectively, and a1+a2>b1+b2>c1+c2, then the order of the three search items is: packagecom2.testfoo, packagecom1.test2, packagecom1.test1.

[0075] For example, assuming the keywords are test and foo, searching for test in the data source will yield two search entries: packagecom2.testfoo1 and packagecom2.testfoo2. If the distance between the position of the keyword test in packagecom2.testfoo1 in the currently opened file and the cursor position before obtaining N keywords is d1, since the keywords test and foo in packagecom2.testfoo1 belong to the same string testfoo1, the distance between the position of the keyword foo in packagecom2.testfoo1 in the currently opened file and the cursor position before obtaining N keywords is also d1. The distance between the position of the keyword test in packagecom2.testfoo1 in the currently opened file and the cursor position before obtaining N keywords is e1. Similarly, the distance between the position of the keyword foo in packagecom2.testfoo1 in the currently opened file and the cursor position before obtaining N keywords is also e1. Assume that the first distances of the two search items are d1+d1 and e1+e1 respectively, and d1+d1>e1+e1, then the arrangement order of the two search items is: packagecom2.testfoo2, packagecom2.testfoo1.

[0076] For example, assuming the keywords are row and bar, searching for row in the data source yields two search items: com.bar.test.row1 and packagecom3.row2.barMethod. If the distance between the keyword row in com.bar.test.row1 and the cursor position before retrieving N keywords is f1, and the distance between the keyword bar in com.bar.test.row1 and the cursor position before retrieving N keywords is f2, then the distance between the keyword row in packagecom3.row2.barMethod and the cursor position before retrieving N keywords is g1, and the distance between the keyword bar in packagecom3.row2.barMethod and the cursor position before retrieving N keywords is g2. Assuming the first distances of the two search items are f1+f2 and g1+g2, respectively, and f1+f2 > g1+g2, then the order of the two search items can be: packagecom3.row2.barMethod, then com.bar.test.row1.

[0077] Alternatively, if the distance between the keyword "row" in com.bar.test.row1 and the keyword "bar" in the data source is f3, and the distance between the keyword "row" in packagecom3.row2.barMethod and the keyword "bar" in the data source is g3. Assuming that the second distances of the two search entries are f3 and g3 respectively, and f3 > g3, then the arrangement order of the two search entries can be packagecom3.row2.barMethod and com.bar.test.row1.

[0078] Alternatively, if the sum of the first distance and the second distance of the search entry com.bar.test.row1 is greater than the sum of the first distance and the second distance of the search entry packagecom3.row2.barMethod, that is, f1 + f2 + f3 > g1 + g2 + g3, then the arrangement order of the two search entries can be packagecom3.row2.barMethod and com.bar.test.row1.

[0079] Optionally, the computing device can determine the fourth distance of the m-th search entry according to the first distance and the second distance of the m-th search entry, so as to determine the arrangement order of the M search entries according to the fourth distance of each search entry.

[0080] Optionally, the fourth distance of the m-th search entry can be determined according to the sum of the first distance and the second distance of the m-th search entry. The fourth distance of the m-th search entry can be determined according to the weighted sum of the first distance and the second distance of the m-th search entry. Alternatively, the fourth distance of the m-th search entry can be determined according to the average value of the first distance and the second distance of the m-th search entry. Alternatively, the fourth distance of the m-th search entry can be determined according to the minimum value of the first distance and the second distance of the m-th search entry, etc. The embodiments of the present application do not specifically limit this.

[0081] For example, assuming that the first distance of the m-th search entry is f1 + f2 and the second distance of the m-th search entry is f3, then the fourth distance of the m-th search entry can be the sum of the first distance and the second distance, that is, the fourth distance of the m-th search entry can be f1 + f2 + f3. Alternatively, the fourth distance of the m-th search entry can be the weighted sum of the first distance and the second distance, that is, the fourth distance of the m-th search entry can be f1 + f2 + 2f3. Alternatively, the fourth distance of the m-th search entry can be the average value of the first distance and the second distance, that is, the fourth distance of the m-th search entry can be (f1 + f2 + f3) / 2. Alternatively, if f1 + f2 < f3, then the fourth distance of the m-th search entry can be the minimum value of the first distance and the second distance, that is, the fourth distance of the m-th search entry can be f1 + f2.

[0082] Optionally, the computing device may determine the weight of the m-th search entry according to the first distance or the second distance of the m-th search entry. Among them, the weight of the m-th search entry is inversely proportional to the first distance of the m-th search entry. Alternatively, the weight of the m-th search entry is inversely proportional to the second distance of the m-th search entry. The computing device may also determine the sorting order of the m-th search entry according to the weights of each of the M search entries. Among them, the weight of the m-th search entry is inversely proportional to the sorting order of the m-th search entry.

[0083] Optionally, the computing device may determine the fourth distance of the m-th search entry according to the first distance and the second distance of the m-th search entry. The computing device may also determine the weight of the m-th search entry according to the fourth distance of the m-th search entry. Among them, the weight of the m-th search entry is inversely proportional to the fourth distance of the m-th search entry. The computing device may also determine the sorting order of the M search entries according to the weights of each of the M search entries. Among them, the weight of the m-th search entry is inversely proportional to the sorting order of the m-th search entry. The specific manner in which the computing device determines the fourth distance of the m-th search entry may be various, and the embodiments of the present application do not limit this.

[0084] For example, assume that the keyword is test, and the 3 search entries obtained by searching for test in the data source are packagecom1.test1, packagecom1.test2, and packagecom2.testfoo respectively. Assume that the first distances of the 3 search entries are a1, b1, and c1 respectively, and a1 < b1 < c1. Then, according to the first distances of the 3 search entries, the weights of the 3 search entries can be determined as y1, y2, and y3 respectively, and y1 > y2 > y3. According to the weights of the 3 search entries, the sorting order of the 3 search entries can be determined as: packagecom1.test1, packagecom1.test2, and packagecom2.testfoo.

[0085] For example, assume the keywords are "row" and "bar". When searching for "row" in the data source, the two search entries obtained are "com.bar.test.row1" and "packagecom3.row2.barMethod". Assume the second distances of the two search entries are f3 and g3 respectively, and f3 > g3. Then, based on the second distances of the two search entries, the weights of the two search entries can be determined as z1 and z2 respectively, and z1 < z2. Based on the weights of the two search entries, the arrangement order of the two search entries can be determined as: "packagecom3.row2.barMethod", "com.bar.test.row1".

[0086] Alternatively, if the sum of the first distance and the second distance of the search entry "com.bar.test.row1" is greater than the sum of the first distance and the second distance of the search entry "packagecom3.row2.barMethod", that is, f1 + f2 + f3 > g1 + g2 + g3. Here, f1 + f2 is the first distance of the search entry "com.bar.test.row1", and g1 + g2 is the first distance of "packagecom3.row2.barMethod". Based on the sum of the first distance and the second distance of the two search entries, the weights of the two search entries can be determined as w1 and w2 respectively, and w1 < w2. Based on the weights of the two search entries, the arrangement order of the two search entries can be determined as: "packagecom3.row2.barMethod", "com.bar.test.row1".

[0087] Optionally, before step S220, the computing device can determine the first distance and / or the second distance of the m-th search entry. The specific implementation manner for the computing device to determine the first distance and / or the second distance of the m-th search entry can be referred to the description of FIG. 5.

[0088] S230, display the M search entries according to the determined arrangement order.

[0089] The computing device can display the M search entries one by one from top to bottom according to the arrangement order determined in step S220. For example, assume the arrangement order of the m1-th search entry is 2, and the arrangement order of the m2-th search entry is 1. Then the computing device can display the m2-th search entry and the m1-th search entry from top to bottom in sequence.

[0090] The computing device can determine M search items based on N keywords, and can also determine the order of the mth search item among the M search items. Furthermore, the computing device can arrange and display search items that are closer to the reference location and / or closer to the keywords in numerically smaller order positions, thereby increasing the probability that the search items in numerically smaller order positions are the target search items. In other words, the computing device can more quickly locate the target search item using fewer keywords or phrases, thereby saving time in manually searching for the target search item and improving search accuracy.

[0091] Fig. 5 is a schematic flow chart of a method for searching data by an IDE, and the method in Fig. 5 can be executed by the IDE data searching system in Fig. 1. The method in Fig. 5 includes the following steps.

[0092] S310: Search N keywords in the data source to obtain M search items. The specific implementation of step S310 is similar to step S210 and will not be repeated here.

[0093] S320 : Determine a first distance of the m th search item according to the distance between the reference position and the positions of the N keywords included in the m th search item.

[0094] The computing device may determine a first distance of an mth search item among the M search items, where the first distance of the mth search item may be used to indicate a distance between a reference position and positions of N keywords included in the mth search item in the reference data.

[0095] Optionally, the reference data may include the currently opened file and / or record information. The record information may include any one or more of the following: code history submission records, file system modification records, search records, or code browsing records. Among them, the currently opened file data may include any one or more of the following: the name of the currently opened file, the content of the currently opened file, or the arrangement order of the currently opened files. The code history submission record may include the code history submission content and / or the code history submission name, and the code history submission record may also include the code history submission time. The file system modification record may include the file history modification name, and the file system modification record may also include the file history modification time. The search record may include the historical search content, and the search record may also include the historical search time. The code browsing record may include the historical browsing code file content and / or the historical browsing code file name, and the code browsing record may also include the historical browsing code file time.

[0096] Optionally, the reference position may include the position where the cursor is located before obtaining N keywords or the latest record in the record information. For example, in the case where the reference data is a currently opened file, the reference position may be the position where the cursor is located before obtaining N keywords in the currently opened file. In the case where the reference data is a code history submission record, the reference position may be the latest code history submission record. In the case where the reference data is a file system modification record, the reference position may be the latest file system modification record. In the case where the reference data is a search record, the reference position may be the latest search record. In the case where the reference data is a code browsing record, the reference position may be the latest code browsing record. Alternatively, the reference position may be predefined, which is not limited in the embodiments of the present application.

[0097] Optionally, the computing device may determine the first distance of the m-th search item among the M search items by determining N third distances of the m-th search item based on positions of N keywords included in the m-th search item, thereby determining the first distance of the m-th search item. The n-th third distance of the N third distances of the m-th search item is the distance from the position of the n-th keyword among the N keywords included in the m-th search item to the reference position, and the positions of the N keywords included in the m-th search item are respectively positions of the N keywords in the reference data.

[0098] For example, when the reference position and the position of the nth keyword of the mth search item are in the same currently opened file, the distance between the reference position and the position of the nth keyword of the mth search item can be determined based on the line spacing and / or column spacing between the reference position and the position of the nth keyword.

[0099] For example, in the case where the reference position and the position of the nth keyword of the mth search item are in different currently opened files, the distance between the reference position and the position of the nth keyword of the mth search item can be determined based on the number of files between the reference position and the position of the nth keyword, and can also be determined based on the line spacing and / or column spacing between the reference position and the position of the nth keyword. In the case where the reference position and the position of the nth keyword of the mth search item are in different currently opened files, the line spacing and / or column spacing between the reference position and the position of the nth keyword can be the line spacing and / or column spacing between the reference position and the position of the nth keyword after projecting the reference position to the currently opened file where the position of the nth keyword is located. For example, if the reference position is the 10th line in file A and the position of the nth keyword is the 3rd line in file B, then the line spacing between the reference position and the position of the nth keyword is 7 lines.

[0100] For example, when the reference position and the position of the nth keyword of the mth search item are in the same code history submission record, that is, the reference position is the latest code history submission record, the position of the nth keyword of the mth search item is in the latest code history submission record, and the distance between the reference position and the position of the nth keyword of the mth search item is 0.

[0101] For example, when the reference position and the position of the nth keyword of the mth search item are in different code history submission records, that is, the reference position is the latest code history submission record, and the position of the nth keyword of the mth search item is located in a code history submission record other than the latest code history submission record, the distance between the reference position and the position of the nth keyword of the mth search item can be determined based on the number of code history submission records between the reference position and the position of the nth keyword. For example, if the position of the nth keyword in the mth search item is separated from the latest code history submission record by 3 code history submission records, then the distance between the reference position and the position of the nth keyword in the mth search item is 3, or 30, or 300, which is not limited in the embodiments of the present application.

[0102] Optionally, a specific implementation method for determining the N third distances of the mth search item based on the positions of the N keywords included in the mth search item may be, for example, determining the nth third distance of the mth search item based on the distance between the position of the nth keyword in the mth search item in the currently opened file and the position of the cursor before obtaining the N keywords. Alternatively, the nth third distance of the mth search item may be determined based on the distance between the position of the nth keyword in the mth search item in the currently opened file and the position of the cursor before obtaining the N keywords, and the distance between the position of the nth keyword in the mth search item in the historical submission record and the latest historical submission record, etc., and the embodiments of the present application are not limited to this.

[0103] Optionally, the specific method for determining the first distance of the m-th search item based on the N third distances of the m-th search item may be: adding the N third distances to determine the first distance. Alternatively, the specific method for determining the first distance of the m-th search item based on the N third distances of the m-th search item may be: averaging the N third distances to determine the first distance, etc., which is not specifically limited in this embodiment of the present application.

[0104] For example, assume the order of currently opened files is: currently opened file A, currently opened file B, currently opened file E. There is one currently opened file between currently opened file B and currently opened file A, and there are two currently opened files between currently opened file E and currently opened file A. If the reference data is the current file, the reference position is the cursor position before obtaining N keywords in the currently opened file.

[0105] For example, assume that the code history submission record is shown in Table 1 below.

[0106] Table 1 Code history submission record

[0107] Serial number record 1 Code history submission record C2 Code history submission record D3 Code history submission record E4 Code history submission record F

[0108] Among them, the code history submission record C with serial number 1 is the latest code history submission record. The code history submission record D with serial number 2 is the code history submission record submitted before the code history submission record C. The code history submission record E with serial number 3 is the code history submission record submitted before the code history submission record D. The code history submission record F with serial number 4 is the code history submission record submitted before the code history submission record E. In addition, there is one code history submission record between the code history submission record D and the code history submission record C, and there are three code history submission records between the code history submission record F and the code history submission record C. If the reference data is the code history submission record table shown in Table 1, then the reference position can be the code history submission record C.

[0109] For example, assuming the keyword is test, the three search items that can be obtained by searching for test in the data source are packagecom1.test1, packagecom1.test2, and packagecom2.testfoo. If the keyword test in packagecom1.test1 is located at line 39 in the currently opened file A, and the reference position is line 10 in the currently opened file A, then the third distance of the search item packagecom1.test1 is 29. The first distance determined based on the third distance is 29. If the keyword test in the search item packagecom1.test2 is located at line 45 in the currently opened file A, then the third distance of the search item packagecom1.test1 is 35. The first distance determined based on the third distance is 35. If the keyword test in the search item packagecom2.testfoo is in the currently opened file B, and the currently opened file B is separated from the currently opened file A by one currently opened file, then the third distance of the search item packagecom2.testfoo is 1Δ1. Here, Δ1 represents a preset threshold, for example, it can be 100, 500, 1000, etc. The first distance determined according to the third distance is 1Δ1.

[0110] If the keyword test in packagecom1.test1 is in the code history submission record C, the third distance of the search entry packagecom1.test1 is 0. The first distance determined based on the third distance is 0. If the keyword test in the search entry packagecom1.test2 is in the code history submission record C, the third distance of the search entry packagecom1.test1 is 0, and the first distance determined based on the third distance is 0. If the keyword test in the search entry packagecom2.testfoo is in the code history submission record D, it can be seen from Table 1 that the code history submission record D is separated from the code history submission record C by 1 code history submission record, then the third distance of the search entry packagecom2.testfoo is 1Δ2. Wherein, Δ2 represents a preset threshold, for example, it can be 80, 600, 1100, etc. The first distance determined based on the third distance is 1Δ2.

[0111] Alternatively, if the distance between packagecom1.test1 and the first reference location in the currently opened file A is 29, and the first reference location is line 10 in the currently opened file A. If packagecom1.test1 is in the second reference location, and the second reference location is code history commit record C, then the third distance of the search entry packagecom1.test1 may be 19. The first distance determined based on the third distance is 19. If the distance between packagecom1.test2 and the first reference location in the currently opened file A is 35, and packagecom1.test1 is in the second reference location, then the third distance of the search entry packagecom1.test1 may be 25. The first distance determined based on the third distance is 25. If the distance between packagecom2.testfoo and the first reference location in the currently opened file B is 1Δ1, and the distance between packagecom1.test1 and the second reference location in code history commit record D is 1Δ2, then the third distance of the search entry packagecom1.test1 may be 1Δ1+1Δ2. The first distance determined based on the third distance is 1Δ1+1Δ2.

[0112] For example, assuming the keywords are test and foo, searching for test and foo in the data source yields two search entries: packagecom2.testfoo1 and packagecom2.testfoo2. If the keyword test in packagecom2.testfoo1 is located at line 50 of the currently opened file A, the reference position is line 10 of the currently opened file A. Since the keywords test and foo in packagecom2.testfoo1 belong to the same string testfoo1, the keyword foo in the search entry packagecom2.testfoo1 is also located at line 50 of the currently opened file A. Therefore, the two third distances for packagecom2.testfoo1 are 40 and 40, respectively. The first distance determined based on these two third distances is 80. If the keyword test in packagecom2.testfoo2 is located at line 3 of the currently opened file A, since the keywords test and foo in the search entry packagecom2.testfoo2 belong to the same string testfoo2, the keyword foo in packagecom2.testfoo2 is also located at line 3 of the currently opened file A. Therefore, the two third distances for the search entry packagecom2.testfoo2 are 7 and 7, respectively. The first distance determined based on the two third distances is 14.

[0113] For example, assuming the keywords are row and bar, the two search entries that can be obtained by searching for row and bar in the data source are com.bar.test.row1 and packagecom3.row2.barMethod. If the keyword row in com.bar.test.row1 is located at line 25 in the currently opened file A, and the keyword bar in com.bar.test.row1 is located at line 5 in the currently opened file A, and the reference position is line 10 in the currently opened file A, then the third distance of com.bar.test.row1 is 20. The first distance that can be determined based on this third distance is 20. If the keyword row in packagecom3.row2.barMethod is in the currently opened file E, the keyword bar in packagecom3.row2.barMethod is in the currently opened file E, and the currently opened file E is separated from the currently opened file A by two currently opened files, then the third distance of packagecom3.row2.barMethod is 2Δ1+2Δ1=4Δ1. The first distance determined based on this third distance is 4Δ1.

[0114] If the keyword row in com.bar.test.row1 is in code history commit record C, and the keyword bar in com.bar.test.row1 is in code history commit record C, and the reference position is code history commit record C, then the third distance of the search entry com.bar.test.row1 is 0. The first distance determined based on the third distance is 0. If the keyword row in the search entry packagecom3.row2.barMethod is in code history commit record F, and the keyword bar in the search entry packagecom3.row2.barMethod is in code history commit record F. As can be seen from Table 1, code history commit record F is separated from code history commit record C by 3 code history commit records, then the third distance of the search entry packagecom1.test1 is 3Δ2+3Δ2=6Δ2, and the first distance determined based on the third distance is 6Δ2.

[0115] Alternatively, if the distance between the keyword row in com.bar.test.row1 and the first reference position in the currently opened file A is 15, the distance between the keyword bar in com.bar.test.row1 and the first reference position in the currently opened file A is 5. The first reference position is the position of the cursor before obtaining N keywords in the currently opened file A. In addition, the distance between the keyword row in com.bar.test.row1 and the second reference position in the code history submission record C is 0, and the distance between the keyword bar in com.bar.test.row1 and the second reference position in the code history submission record C is 0, wherein the second reference position is the code history submission record C. The third distance of the search entry com.bar.test.row1 can be 20. The first distance determined based on the third distance is 20.

[0116] If the distance between the keyword row in packagecom3.row2.barMethod and the first reference position in the currently opened file E is 2Δ1, and the distance between the keyword bar in packagecom3.row2.barMethod and the first reference position in the currently opened file E is 2Δ1. Furthermore, the distance between the keyword row in packagecom3.row2.barMethod and the second reference position in the code history commit record F is 3Δ2, and the distance between the keyword row in packagecom3.row2.barMethod and the second reference position in the code history commit record F is 3Δ2, then the third distance of the search entry packagecom3.row2.barMethod can be 4Δ1+6Δ2. The first distance determined based on this third distance is 4Δ1+6Δ2.

[0117] S330 : Determine a second distance of the m th search item according to the distances between the N keywords included in the m th search item in the data source.

[0118] The computing device may determine a second distance of an m-th search item among the M search items, where the second distance of the m-th search item indicates a distance between N keywords included in the m-th search item in a data source. The data source includes any one or more of a code index of a project, a code index of a database that the project depends on, or a text index of a resource file of the project.

[0119] Optionally, the distance between the N keywords included in the m-th search item in the data source may include a code-level distance and / or a file-level distance between the N keywords in the m-th search item. The code-level distance between the N keywords is the distance between every two of the N keywords at the code level of the data source. The file-level distance between the N keywords is the distance between every two of the N keywords at the file level of the data source.

[0120] For example, the code hierarchy of a data source is shown in Figure 6. Figure 6 shows a project with three packages: Package 1, Package 2, and Package 3. Package 1 includes Class 1, Class 2, and Class 3; Package 2 includes Class 4; and Package 3 includes Class 5. Class 1 includes Inner Class 1 and Inner Class 2; Inner Class 1 includes Method 7; Inner Class 2 includes Method 8. Class 2 includes Method 1 and Method 2. Class 3 includes Method 3. Class 4 includes Method 4 and Method 5. Class 5 includes Method 6.

[0121] Assume the keywords are test and foo, package 1 is test1, class 1 is foo1, class 2 is bar, and method 1 is foo2. If search entry 1 is test1.foo1, search entry 2 is test1.bar.foo2. Since package 1 and class 1 are directly contained in the source code hierarchy, the distance between the two keywords in search entry 1 can be 1. Since package 1 and method 1 are indirectly contained in the source code hierarchy, and package 1 and method 1 are separated by only class 2, the distance between the two keywords in search entry 2 can be 2.

[0122] For example, assume the keywords are test and foo, the search entries are com.foo.test1 and com.foo.bar.test1, and these two search entries can be represented in the file hierarchy of the data source as C:\src\main\com\foo\test1.java and C:\src\main\com\foo\bar\test2.java. Since the two keywords in the search entry com.foo.test1 are directly adjacent in the file hierarchy of the data source, the distance between the two keywords in com.foo.test1 in the file hierarchy of the data source can be 1. Since the two keywords in the search entry com.foo.bar.test1 are indirectly adjacent in the file hierarchy of the data source and are separated by only the string "bar", the distance between the two keywords in com.foo.bar.test1 in the file hierarchy of the data source can be 2.

[0123] Optionally, the computing device may determine the second distance of the mth search item among the M search items by: determining the second distance of the mth search item based on the code level distance and / or file level distance of the mth search item. Alternatively, the computing device may determine the second distance of the mth search item based on any one or more of the following distances of the mth search item: the code level distance of the mth search item, the file level distance of the mth search item, or the row distance or column distance between N keywords in the mth search item.

[0124] Optionally, the specific implementation method for the computing device to determine the second distance of the mth search item based on the code level distance and the file level distance of the mth search item can be: determining the second distance of the mth search item based on the minimum value of the code level distance and the file level distance of the mth search item. Alternatively, determining the second distance of the mth search item based on the sum of the code level distance and the file level distance of the mth search item. Alternatively, determining the second distance of the mth search item based on the average of the code level distance and the file level distance of the mth search item, etc., which is not limited in this embodiment of the present application.

[0125] Optionally, the computing device may determine the code level distance of the mth search item by: determining the code level distance of the mth search item based on the minimum value of the code level distances between the N keywords in the mth search item at the data source. Alternatively, the computing device may determine the code level distance of the mth search item based on the sum of the code level distances between the N keywords in the mth search item at the data source. Alternatively, the computing device may determine the code level distance of the mth search item based on the average value of the code level distances between the N keywords in the mth search item at the data source.

[0126] Optionally, the computing device may determine the file level distance of the mth search item by: determining the file level distance of the mth search item based on the minimum value of the file level distances between the N keywords in the mth search item at the data source. Alternatively, the computing device may determine the file level distance of the mth search item based on the sum of the file level distances between the N keywords in the mth search item at the data source. Alternatively, the computing device may determine the file level distance of the mth search item based on the average value of the file level distances between the N keywords in the mth search item at the data source.

[0127] For example, assuming the keywords are test and foo, searching for test and foo in the data source yields two search entries: packagecom2.testfoo1 and packagecom2.testfoo2, where packagecom2 is the package containing the classes testfoo1 and testfoo2. These two search entries can be represented in the file hierarchy of the data source as C:\src\main\packagecom2\testfoo1.java and C:\src\main\packagecom2\testfoo2.java. Since the keywords test and foo in the search entry packagecom2.testfoo1 belong to the same string testfoo1, there is no direct or indirect inclusion relationship between the keywords test and foo in packagecom2.testfoo1 in the code hierarchy of the data source, i.e., the code hierarchy distance of packagecom2.testfoo1 is 0. Furthermore, since the keywords test and foo in the search entry packagecom2.testfoo1 belong to the same string testfoo1, there is no direct or indirect adjacent relationship between the keywords test and foo in packagecom2.testfoo1 in the file hierarchy of the data source, i.e., the file hierarchy distance of packagecom2.testfoo1 is 0. Similarly, the code level distance of packagecom2.testfoo2 is 0, and the file level distance of packagecom2.testfoo2 is 0. Therefore, based on the code level distance and / or file level distance of the two search items, it can be determined that the second distances of the two search items are both 0.

[0128] For example, assuming the keywords are row and bar, searching for row and bar in the data source yields two search entries: com.bar.test.row1 and packagecom3.row2.barMethod. Row1 and row2 are classes, and barMethod is a method. These two search entries can be represented in the file hierarchy of the data source as C:\src\main\com\bar\test\row1.java and C:\src\main\packagecom3\row2.java. Furthermore, the keywords row and bar in com.bar.test.row1 belong to the two strings row1 and bar, while the keywords row and bar in packagecom3.row2.barMethod belong to the two strings row2 and barMethod. Since the keywords row and bar in com.bar.test.row1 are adjacent to each other with test in the code hierarchy, the code hierarchy distance of com.bar.test.row1 is 2. Since the keywords row and bar in com.bar.test.row1 are adjacent to each other with test in the file hierarchy, the file hierarchy distance of com.bar.test.row1 is 2. According to the code level distance of com.bar.test.row1, the second distance of the search item can be determined to be 2. Alternatively, according to the file level distance of com.bar.test.row1, the second distance of the search item can be determined to be 2. Alternatively, according to the minimum value of the code level distance and the file level distance of com.bar.test.row1, the second distance of the search item can be determined to be 2.

[0129] Since the keywords row and bar in packagecom3.row2.barMethod are directly adjacent in the code hierarchy, the code hierarchy distance of packagecom3.row2.barMethod is 1. Since the keywords row and bar in packagecom3.row2.barMethod do not have an adjacent relationship in the file hierarchy, the file hierarchy distance of packagecom3.row2.barMethod is 0. Based on the code hierarchy distance of packagecom3.row2.barMethod, the second distance of the search entry can be determined to be 1. Alternatively, based on the file hierarchy distance of packagecom3.row2.barMethod, the second distance of the search entry can be determined to be 0. Alternatively, based on the minimum value of the code hierarchy distance and the file hierarchy distance of packagecom3.row2.barMethod, the second distance of the search entry can be determined to be 0.

[0130] For example, assuming the keywords are row and bar, searching for row and bar in the data source yields two search entries: packagecom3.row2.barMethod1 and packagecom3.row2.barMethod2. BarMethod1 and barMethod2 are methods. Since the keywords row and bar in packagecom3.row2.barMethod1 are directly adjacent at the code level, the code level distance of packagecom3.row2.barMethod1 is 1. Assume the line distance between the keywords row and bar in packagecom3.row2.barMethod1 is 20, and the line distance between the keywords row and bar in packagecom3.row2.barMethod2 is 50. Based on the code level distance of packagecom3.row2.barMethod1, the second distance of the search entry can be determined to be 1. Alternatively, based on the line distance between the two keywords in packagecom3.row2.barMethod1, the second distance of the search entry can be determined to be 20. Alternatively, the second distance of the search item may be determined to be 1 based on the minimum value of the code level distance of packagecom3.row2.barMethod1 and the line distance between the two keywords.

[0131] Similarly, based on the code level distance of packagecom3.row2.barMethod2, the second distance of the search item can be determined to be 1. Alternatively, based on the line distance between two keywords in packagecom3.row2.barMethod2, the second distance of the search item can be determined to be 50. Alternatively, based on the minimum value of the code level distance of packagecom3.row2.barMethod2 and the line distance between two keywords, the second distance of the search item can be determined to be 1.

[0132] Optionally, the distance between the N keywords of the mth search item can be in units of 1, 10, or 100, which is not limited in the present embodiment. For example, assuming the keywords are row and bar, the code level distance of the search item packagecom3.row2.barMethod2 can be 1, 10, or 100.

[0133] S340: Determine an arrangement order of the M search items according to the first distance and / or the second distance of each search item.

[0134] The computing device may determine an arrangement order of the M search items based on the first distance and / or the second distance of each search item in the M search items. The arrangement order of the mth search item in the M search items is positively correlated with the first distance and / or the second distance of the mth search item.

[0135] Alternatively, the computing device may determine an order of the M search items based on the first distance of each of the M search items. If the first distance of the m1th search item is greater than the first distance of the m2th search item, the m1th search item may be arranged in the order position with the larger value, and the m2th search item may be arranged in the order position with the smaller value. For example, the m1th search item may be arranged in the second position, and the m2th search item may be arranged in the first position.

[0136] Alternatively, the computing device may determine an order of the M search items based on the second distance of each of the M search items. If the second distance of the m1th search item is greater than the second distance of the m2th search item, the m1th search item may be arranged in the order position with the larger value, and the m2th search item may be arranged in the order position with the smaller value. For example, the m1th search item may be arranged in the second position, and the m2th search item may be arranged in the first position.

[0137] Optionally, the computing device may determine the order of the M search items based on the fourth distance of each of the M search items, where the fourth distance of the mth search item is determined based on the first distance and the second distance of the mth search item. If the fourth distance of the m1th search item is greater than the fourth distance of the m2th search item, the m1th search item may be arranged in the order position with the larger value, and the m2th search item may be arranged in the order position with the smaller value. For example, the m1th search item may be arranged in the second position, and the m2th search item may be arranged in the first position.

[0138] Optionally, the fourth distance of the mth search item can be determined based on the sum of the first distance and the second distance of the mth search item. Alternatively, the fourth distance of the mth search item can be determined based on the weighted sum of the first distance and the second distance of the mth search item. Alternatively, the fourth distance of the mth search item can be determined based on the average of the first distance and the second distance of the mth search item. Alternatively, the fourth distance of the mth search item can be determined based on the minimum value of the first distance and the second distance of the mth search item, etc., and the embodiments of the present application are not limited to this.

[0139] Optionally, the computing device may determine a weight of the mth search item based on the first distance or the second distance of the mth search item, thereby determining the arrangement order of the M search items, wherein the weight of the mth search item is negatively correlated with the first distance or the second distance of the mth search item.

[0140] Optionally, the computing device may determine the fourth distance of the mth search item based on the first distance and the second distance of the mth search item. The computing device may also determine the weight of the mth search item based on the fourth distance of the mth search item, thereby determining the arrangement order of the M search items. The weight of the mth search item is negatively correlated with the fourth distance of the mth search item. The computing device may determine the fourth distance of the mth search item in a variety of specific ways, which are not limited in the embodiments of the present application.

[0141] For example, assuming the keyword "test," searching for "test" in the data source yields three search terms: packagecom1.test1, packagecom1.test2, and packagecom2.testfoo. The first distances determined in step S320 are 29, 35, and 1Δ1, respectively. Based on the first distances of these three search terms, the order of these three search terms is determined to be: packagecom1.test1, packagecom1.test2, and packagecom2.testfoo.

[0142] Alternatively, assuming that the weights of the three search items are determined to be y1, y2, and y3 based on the first distances of the three search items, the weights of the three search items are in the following order: y1 > y2 > y3. Based on the weights of the three search items, the order of the three search items can be determined to be: packagecom1.test1, packagecom1.test2, and packagecom2.testfoo.

[0143] For example, assume the keywords are test and foo. Searching for test and foo in the data source yields two search entries: packagecom2.testfoo1 and packagecom2.testfoo2. Among them, the first distances determined according to step S320 are 80 and 14 respectively, and the second distances determined according to step S330 are 0 and 0 respectively. Based on the first distances of these two search entries, the sorting order of these two search entries can be determined as: packagecom2.testfoo2, packagecom2.testfoo1. Based on the sum of the first distances and the second distances of these two search entries, the sorting order of these two search entries can be determined as: packagecom2.testfoo2, packagecom2.testfoo1.

[0144] Alternatively, assume that based on the first distances of these three search entries, the weights of these two search entries are determined as z1 and z2 respectively. Then the magnitude relationship of the weights of these two search entries is: z1 < z2. Based on the weights of these two search entries, the sorting order of these two search entries can be determined as: packagecom2.testfoo2, packagecom2.testfoo1.

[0145] For example, assume the keywords are row and bar. Searching for row and bar in the data source yields two search entries: com.bar.test.row1 and packagecom3.row2.barMethod. Among them, the first distances determined according to step S320 are 20 and 4Δ1 respectively, and the second distances determined according to step S330 are 2 and 0 respectively. Based on the first distances of these two search entries, the sorting order of these two search entries can be determined as: com.bar.test.row1, packagecom3.row2.barMethod. Based on the second distances of these two search entries, the sorting order of these two search entries can be determined as: com.bar.test.row1, packagecom3.row2.barMethod. Based on the sum of the first distances and the second distances of these two search entries, the sorting order of these two search entries can be determined as: com.bar.test.row1, packagecom3.row2.barMethod.

[0146] Alternatively, assuming that the weights of the two search items are w1 and w2, respectively, based on the first and second distances of the three search items, the weights of the two search items are w1 > w2. Based on the weights of the two search items, the order of the two search items can be determined as: com.bar.test.row1, packagecom3.row2.barMethod.

[0147] For example, searching for the keywords "rest" and "temp" in the data source produces the following result, as shown in Figure 7. Figure 7 is a schematic diagram of the IDE's data search method. Figure 7 includes a search bar, a search item list, and a document preview. The search bar accepts the keywords "rest" and "temp." The search item list displays one or more sorted search items. The document preview allows you to preview the content or information contained in any search item when you select it.

[0148] Assuming that Figure 7 is a diagram showing the effect of determining the order of search items based on the fourth distance of each search item, then among the search items ranked 1, 2, 3, 4, and 5 from top to bottom in Figure 7, the fourth distance of the search item ranked 1 is less than or equal to the fourth distance of any of the search items ranked 2, 3, 4, and 5. Furthermore, the fourth distances of these five search items are in the following order: the fourth distance of the search item ranked 1 ≤ the fourth distance of the search item ranked 2 ≤ the fourth distance of the search item ranked 3 ≤ the fourth distance of the search item ranked 4 ≤ the fourth distance of the search item ranked 5. The fourth distance of the mth search item is determined based on the first and second distances of the mth search item.

[0149] Optionally, when the order of the M search items is determined based on the first distance of each search item, if the first distance of the m1th search item is the same as the first distance of the m2th search item, the search items may be sorted based on the magnitude of the second distance of the m1th search item and the second distance of the m2th search item. Alternatively, the search items may be sorted based on the magnitude of the fourth distance of the m1th search item and the fourth distance of the m2th search item. Alternatively, the search items may be sorted based on the letters of the m1th search item and the letters of the m2th search item, etc., and this embodiment of the present application is not limited to this.

[0150] Similarly, when the arrangement order of M search items is determined based on the second distance of each search item, if the second distance of the m1th search item is the same as the second distance of the m2th search item, they can be sorted based on any one or more of the size of the first distance of the m1th search item and the first distance of the m2th search item, or the size of the fourth distance of the m1th search item and the fourth distance of the m2th search item, or the letter of the m1th search item and the letter of the m2th search item.

[0151] Similarly, when the arrangement order of M search items is determined based on the fourth distance of each search item, if the fourth distance of the m1th search item is the same as the fourth distance of the m2th search item, they can be sorted based on any one or more of the size of the first distance of the m1th search item and the first distance of the m2th search item, or the size of the second distance of the m1th search item and the second distance of the m2th search item, or the letter of the m1th search item and the letter of the m2th search item.

[0152] The computing device can determine M search items based on N keywords, and can also determine an arrangement order for the M search items based on the first distance and / or second distance of each of the M search items. The computing device can arrange search items with smaller first, second, or fourth distances in numerically smaller order positions, thereby increasing the probability that the search items in numerically smaller order positions are the target search items, saving time in manually searching for the target search items and improving search accuracy.

[0153] Fig. 8 is a schematic flow chart of a method for searching data by an IDE, and the method in Fig. 8 can be executed by the IDE data searching system in Fig. 1. The method in Fig. 8 includes the following steps.

[0154] S410: Determine M search items based on the data source and the N keywords. The specific implementation of step S410 is similar to step S210 and will not be repeated here.

[0155] S420: Determine whether N=1 or the N keywords of the m-th search item belong to the same character string.

[0156] The computing device may determine whether the value of N is 1, or may determine whether the N keywords included in the m-th search entry among the M search entries belong to the same string, thereby determining whether it is necessary to determine the second distance of the m-th search entry. The N keywords in the m-th search entry belong to the same string. For example, if the keywords are test and foo, and the search entries are packagecom2.testfoo1 and com.test2.foo3, then the keywords test and foo in the search entry packagecom2.testfoo1 belong to the same string testfoo1, while the keywords test and foo in the search entry com.test2.foo3 belong to different strings test2 and foo3.

[0157] When the value of N is 1, the mth search item contains only one keyword, and the distance between keywords cannot be determined. Therefore, the computing device does not need to determine the second distance of the mth search item. In this case, the computing device can determine the first distance of the mth search item and compare the first distance of the mth search item with the first distances of other search items to determine the order of the M search items. The other search items are the other search items in the M search items except the mth search item.

[0158] If the N keywords included in the m-th search item belong to the same string, according to step S330, the second distance of the m-th search item is 0, and therefore the computing device does not need to determine the second distance of the m-th search item. The computing device can determine the first distance of the m-th search item and compare the first distance of the m-th search item with any of the first distances, second distances, or fourth distances of the other search items to determine the order of the M search items.

[0159] In cases other than the above two cases, that is, when the value of N is not 1 and the N keywords of the mth search item do not belong to the same string, the computing device can determine the first distance and / or second distance of the mth search item, thereby determining the arrangement order of the M search items.

[0160] In other words, if the value of N is 1 or the N keywords included in the m-th search item belong to the same string, the computing device may execute step S430. If the value of N is not 1 and the N keywords in the m-th search item do not belong to the same string, the computing device may execute step S440.

[0161] S430: Determine the first distance of the mth search item. The specific implementation of step S430 is similar to that of step S320 and will not be repeated here.

[0162] S440: Determine the first distance of the mth search item. The specific implementation of step S440 is similar to step S320 and will not be repeated here.

[0163] S450: Determine the second distance of the mth search item. The specific implementation of step S450 is similar to step S330 and will not be repeated here.

[0164] S460: Determine the arrangement order of the mth search item according to the first distance and / or the second distance of the mth search item. The specific implementation of step S460 is similar to step S340 and will not be repeated here.

[0165] The computing device can determine M search items based on N keywords, and can also determine whether it is necessary to determine the second distance of the mth search item in the M search items, thereby determining the order of the M search items based on the first distance and / or second distance of each search item in the M search items. The computing device can arrange search items with smaller first distances and / or second distances in numerically smaller order positions, thereby increasing the probability that the search items in numerically smaller order positions are the target search items, saving time in manually searching for the target search items and improving search accuracy.

[0166] The above describes the method for searching data by an IDE according to an embodiment of the present application. The following describes a computing device and a computing apparatus according to an embodiment of the present application in conjunction with FIG. 9 and FIG. 10 .

[0167] 9 is a schematic diagram of a computing device according to an embodiment of the present invention. The computing device 500 includes an acquisition module 510 , a processing module 520 , and a display module 530 .

[0168] The acquisition module 510 is used to acquire N keywords.

[0169] Processing module 520 is configured to determine M search items based on the data source and N keywords, where the m-th search item among the M search items includes the N keywords. Processing module 520 is further configured to determine an arrangement order for the M search items, where the arrangement order of the m-th search item among the M search items is positively correlated with the first distance and / or second distance of the m-th search item. Processing module 520 may execute some or all of steps S210 and S220 in the method of FIG. 2 , steps S310 to S340 in the method of FIG. 5 , and steps S410 to S460 in the method of FIG. 8 .

[0170] The display module 530 is configured to display the M search items according to the determined arrangement order. The display module 530 may execute step S230 in the method of FIG2 .

[0171] FIG10 is a block diagram of a computing device according to an embodiment of the present application. The computing device 600 shown in FIG10 includes a processor 601 , a memory 602 , and a communication interface 603 . The processor 601 , the memory 602 , and the communication interface 603 communicate with each other via a bus 604 .

[0172] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 601. Processor 601 can be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. During implementation, each step of the above method can be performed by hardware integrated logic circuits or software instructions in processor 601. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules may be located in the memory 602, which may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), which is used as an external cache.By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). Processor 601 reads instructions from memory 602 and, in conjunction with its hardware, performs the steps of the above method.

[0173] The memory 602 may store instructions for executing the method performed by the computing device in the above embodiment. The processor 601 may execute the instructions stored in the memory 602 and, in combination with other hardware, complete the steps of the computing device in the above embodiment. The specific working process and beneficial effects may be described in the above embodiment.

[0174] The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0175] In addition to the data bus, the bus 604 may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the bus 604 in the figure.

[0176] An embodiment of the present application further provides a computer storage medium storing program instructions. When the program is executed, the program may include some or all steps of the method for searching data by an IDE in the corresponding embodiments of FIG. 2 to FIG. 8 .

[0177] An embodiment of the present application also provides a chip system, which includes a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute each step included in Figures 2 to 8 except step S230 in the above embodiment.

[0178] According to the method provided in the embodiments of the present application, the present application also provides a computer program product, which includes: computer program code, which, when running on a computer, enables the computer to execute each step in the above embodiments.

[0179] According to the method provided in the embodiment of the present application, the present application also provides a computer-readable medium, which stores program code. When the program code is run on a computer, the computer executes the various steps in the above embodiments.

[0180] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0181] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0182] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0183] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0184] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0185] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0186] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for searching data in an integrated development environment, characterized in that: include: Determine M search items according to the data source and N keywords, wherein the mth search item among the M search items includes the N keywords, where N and M are positive integers greater than or equal to 1, and m=1, ..., M; determining an arrangement order of the M search items, wherein the arrangement order of the m-th search item among the M search items is positively correlated with a first distance and / or a second distance of the m-th search item, the first distance of the m-th search item being used to indicate a distance between a reference position and positions of the N keywords included in the m-th search item, and the second distance of the m-th search item being used to indicate a distance between the N keywords included in the m-th search item in the data source; The M search items are displayed according to the determined arrangement order.

2. The method according to claim 1, characterized in that Determining the arrangement order of the M search items includes: Determining N third distances of the m-th search item based on positions of N keywords included in the m-th search item, respectively, where an n-th third distance of the N third distances of the m-th search item is a distance from a position of the n-th keyword among the N keywords included in the m-th search item to the reference position, where the positions of the N keywords included in the m-th search item are respectively positions of the N keywords in reference data, where the reference data includes a currently opened file, where the reference position is a position of a cursor before obtaining the N keywords in the currently opened file, and / or where the reference data includes record information, where the reference position is a latest record in the record information, where n=1, ..., N; determining a first distance of the m-th search item according to the N third distances of the m-th search item; An arrangement order of the M search items is determined according to the first distances of the M search items.

3. The method according to claim 2, characterized in that The record information includes any one or more of: code history submission records, file system modification records, search records, or code browsing records.

4. The method according to any one of claims 1 to 3, characterized in that In the case that N≠1, determining the arrangement order of the M search items includes: determining a second distance of the mth search item according to a code level distance and / or a file level distance of the mth search item, wherein the code level distance of the mth search item includes a distance between each two keywords included in the mth search item at the code level of the data source, and the file level distance of the mth search item includes a distance between each two keywords included in the mth search item at the file level of the data source; An arrangement order of the M search items is determined according to the second distances of the M search items.

5. The method according to any one of claims 1 to 4, characterized in that Determining M search items based on the data source and N keywords includes: Searching the N keywords in the data source respectively to obtain N search result sets, wherein an n-th search result set in the N search result sets includes search results obtained by searching the data source for an n-th keyword in the N keywords, and the n-th search result set includes at least one search result including the n-th keyword, where n=1, ..., N; The M search terms are determined from the N search result sets.

6. The method according to any one of claims 2 to 5, characterized in that The currently opened file includes any one or more of the following: the name of the currently opened file, the content of the currently opened file, or the arrangement order of the currently opened files; the code history submission record includes the code history submission content and / or the code history submission name; the file system modification record includes the file history modification name; the search record includes the historical search content; the code browsing record includes the browsed code file content and / or the browsed code file name.

7. The method according to any one of claims 1 to 6, characterized in that The data source includes any one or more of a code index of the project, a code index of a database that the project depends on, or a text index of a resource file of the project.

8. A computing device, characterized in that: include: Acquisition module, used to obtain N keywords; a processing module, configured to determine M search items based on a data source and the N keywords, wherein an m-th search item among the M search items includes the N keywords, where N and M are positive integers greater than or equal to 1, and m=1, ..., M; The processing module is further configured to determine an arrangement order of the M search items, wherein the arrangement order of the m-th search item among the M search items is positively correlated with a first distance and / or a second distance of the m-th search item, the first distance of the m-th search item being used to indicate a distance between a reference position and positions of the N keywords included in the m-th search item, and the second distance of the m-th search item being used to indicate a distance between the N keywords included in the m-th search item in the data source; The display module is configured to display the M search items according to the determined arrangement order.

9. The device according to claim 8, characterized in that The processing module is specifically configured to determine N third distances of the m-th search item based on positions of N keywords included in the m-th search item, wherein an n-th third distance of the N third distances of the m-th search item is a distance from a position of an n-th keyword among the N keywords included in the m-th search item to the reference position, the positions of the N keywords included in the m-th search item are respectively positions of the N keywords in reference data, the reference data includes a currently opened file, the reference position is a position of a cursor before obtaining the N keywords in the currently opened file, and / or the reference data includes record information, the reference position is a latest record in the record information, and n=1, ..., N; The processing module is further configured to determine the first distance of the mth search item based on the N third distances of the mth search item; The processing module is further configured to determine an arrangement order of the M search items according to the first distances of the M search items.

10. The device according to claim 9, characterized in that The record information includes any one or more of: code history submission records, file system modification records, search records, or code browsing records.

11. The device according to any one of claims 8 to 10, characterized in that In the case where N≠1, the processing module is specifically configured to determine the second distance of the mth search item based on the code level distance and / or the file level distance of the mth search item, wherein the code level distance of the mth search item includes the distance between each two keywords included in the mth search item at the code level of the data source, and the file level distance of the mth search item includes the distance between each two keywords included in the mth search item at the file level of the data source; The processing module is further configured to determine an arrangement order of the M search items according to the second distances of the M search items.

12. The device according to any one of claims 8 to 11, characterized in that The processing module is specifically configured to search the N keywords in the data source respectively to obtain N search result sets, wherein an n-th search result set in the N search result sets includes search results obtained by searching the data source for an n-th keyword in the N keywords, and the n-th search result set includes at least one search result including the n-th keyword, where n=1, ..., N; The processing module is further configured to determine the M search items from the N search result sets.

13. The device according to any one of claims 9 to 12, characterized in that The currently opened file includes any one or more of the following: the name of the currently opened file, the content of the currently opened file, or the arrangement order of the currently opened files; the code history submission record includes the code history submission content and / or the code history submission name; the file system modification record includes the file history modification name; the search record includes the historical search content; the code browsing record includes the browsed code file content and / or the browsed code file name.

14. The device according to any one of claims 8 to 13, characterized in that The data source includes any one or more of a code index of the project, a code index of a database that the project depends on, or a text index of a resource file of the project.

15. A computer device, characterized in that: include: A processor, wherein the processor is coupled to a memory, and is configured to read and execute instructions and / or program codes in the memory to perform the method according to any one of claims 1 to 7.

16. A chip system, characterized in that: include: A logic circuit, wherein the logic circuit is configured to be coupled to an input / output interface and transmit data through the input / output interface to execute the method according to any one of claims 1 to 7.

17. A computer-readable medium, characterized in that The computer-readable medium stores a program code, and when the computer program code is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.