CN110018982A - Method, apparatus, equipment and the computer readable storage medium of locating file - Google Patents
Method, apparatus, equipment and the computer readable storage medium of locating file Download PDFInfo
- Publication number
- CN110018982A CN110018982A CN201810957820.8A CN201810957820A CN110018982A CN 110018982 A CN110018982 A CN 110018982A CN 201810957820 A CN201810957820 A CN 201810957820A CN 110018982 A CN110018982 A CN 110018982A
- Authority
- CN
- China
- Prior art keywords
- file
- keyword
- filename
- location information
- locating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Library & Information Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of methods of locating file, it include: when receiving look-up command, obtain the search criterion in the look-up command, the search criterion includes the location information of keyword and the keyword in filename, each filename for prestoring file is traversed according to the search criterion to obtain file destination, it include the keyword in the file destination name of the file destination, and position of the keyword in the file destination name is matched with the location information, the invention also discloses a kind of locating file devices, locating file equipment and computer storage medium.The present invention more accurately finds file required for user by the location lookup file according to keyword and keyword in filename, improves the efficiency of file search.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of method of locating file, locating file device, search
File device and computer readable storage medium.
Background technique
With the development of economy with the raising of Social Informatization Level, every profession and trade is rapid to software product and the demand of service
Increase, corresponding software project code size also sharp increase, proposes new problem for the management of project software code file.
When item code file size is very big, there may be hundreds and thousands of a code files, the life of these usual filenames
Name word is various and filename is long, and item code developer has not often remembered clearly when wanting to search some code file
Whole filename needs manually again if only will lead to excessive lookup result come locating file using some keyword
The file to be searched is filtered out from lookup result, searches accuracy rate and search efficiency is all very low.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill
Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of methods of locating file, the device of locating file and computer-readable
Storage medium, it is intended to which solution carrys out locating file just with some keyword in the prior art and will lead to excessive lookup result
Technical problem.
To achieve the above object, the present invention provides a kind of method of locating file, and the method for the locating file includes such as
Lower step:
When receiving look-up command, the search criterion in the look-up command is obtained, the search criterion includes key
The location information of word and the keyword in filename;
Traverse each filename for prestoring file according to the search criterion to obtain file destination, the file destination
It include the keyword in file destination name, and position of the keyword in the file destination name and the location information
Matching.
Preferably, described that each filename for prestoring file is traversed to obtain the step of file destination according to the search criterion
Suddenly include:
Obtain the filename character string for respectively prestoring file;
The interception significant character corresponding with the location information from each filename character string for prestoring file
String;
Whether judge in each valid string comprising the keyword;
When in the valid string include the keyword when, using the valid string it is corresponding prestore file as
The file destination found.
Preferably, described intercept from each filename character string for prestoring file corresponding with the location information has
Imitate character string the step of include:
Obtain the filename valid character string length for respectively prestoring file;
When the search criterion is keyword at the beginning of filename, by keyword be located at the initial position of filename with
The corresponding character string of significant character string length between position is begun to shut off as valid string;
When the search criterion is ending of the keyword in filename, keyword is located to the ending start bit of filename
The corresponding character string of significant character string length between end position is set as valid string;
When the search criterion is centre of the keyword in filename, position is begun to shut off by what keyword was located at filename
The corresponding character string of significant character string length set and ended up between initial position is as valid string.
Preferably, described that each filename for prestoring file is traversed to obtain the step of file destination according to the search criterion
Suddenly include:
Obtain the filename valid character string for respectively prestoring file;
Whether judge in each valid string comprising the keyword;
When in the valid string including the keyword, judge the keyword in the valid string
Whether position matches with the location information;
If position and location information matching of the keyword in the valid string, prestore file for described
As file destination.
Preferably, described to obtain the location information of keyword and the keyword in filename in file search instruction
Before step further include:
After detecting new files, the pass in the filename of the new files in the predetermined keyword library is extracted
Keyword obtains location information of the keyword of extraction in the filename, and is associated with and saves the keyword and described
Location information and the new files;
It is described the step of each filename for prestoring file is to obtain file destination is traversed according to the search criterion to include:
The incidence relation of the keyword and the location information is traversed according to the search criterion;
Will file corresponding with the matched incidence relation of the search criterion as target locating file.
Preferably, described that each filename for prestoring file is traversed to obtain the step of file destination according to the search criterion
Suddenly include:
When not finding the file destination, the synonym of the keyword is searched in predetermined keyword library;
With the location information locating file of the synonym of the keyword and the keyword in filename.
Preferably, the search criterion further include: the storage time of file is wrapped in the file destination name of the file destination
Containing the keyword, position of the keyword in the file destination name is matched with the location information and target text
The storage time of part is matched with the file storage time in the search criterion.
In addition, to achieve the above object, the present invention also provides a kind of locating file device, which includes:
Condition module is obtained, it is described for when receiving look-up command, obtaining the search criterion in the look-up command
Search criterion includes the location information of keyword and the keyword in filename;
Search file module, for traversing each filename for prestoring file according to the search criterion to obtain target text
Part includes the keyword in the file destination name of the file destination, and the keyword is in the file destination name
Position is matched with the location information.
In addition, to achieve the above object, the present invention also provides a kind of locating file equipment, which includes: memory, place
It manages device and is stored in the locating file processing routine that can be run on the memory and on the processor, the locating file
Processing routine realizes the step of locating file method as described above when being executed by the processor.
In addition, to achieve the above object, the present invention also proposes a kind of computer storage medium, which is characterized in that the meter
It is stored with locating file processing routine on calculation machine storage medium, is realized such as when the locating file processing routine is executed by processor
Above the step of locating file method.
Method, locating file device, locating file equipment and the calculating for a kind of locating file that the embodiment of the present invention proposes
Machine storage medium obtains the search criterion in the look-up command when receiving look-up command, and the search criterion includes closing
The location information of keyword and the keyword in filename traverses each filename for prestoring file according to the search criterion
It include the keyword in the file destination name of the file destination, and the keyword is in the mesh to obtain file destination
Position in mark filename is matched with the location information, and the present invention passes through the position according to keyword and keyword in filename
Locating file is set, file required for user is more accurately found, improves the efficiency of file search.
Detailed description of the invention
Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of locating file method first embodiment of the present invention;
Fig. 3 is the flow diagram of locating file method second embodiment of the present invention;
Fig. 4 is the flow diagram of locating file method 3rd embodiment of the present invention;
Fig. 5 is the functional block diagram of one embodiment of locating file device of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are: when receiving look-up command, obtaining in the look-up command
Search criterion, the search criterion includes the location information of keyword and the keyword in filename, according to the lookup
Condition traverses each filename for prestoring file to obtain file destination, includes described in the file destination name of the file destination
Keyword, and position of the keyword in the file destination name is matched with the location information.
Since in the prior art, carrying out locating file just with some keyword will lead to excessive lookup result, need
The file to be searched manually is filtered out from lookup result again, accuracy rate is searched and search efficiency is all very low.
The present invention provides a solution, passes through the location lookup text according to keyword and keyword in filename
Part more accurately finds file required for user, improves the efficiency of file search.
As shown in Figure 1, Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
The terminal of that embodiment of the invention is the equipment of locating file.
As shown in Figure 1, the equipment may include: processor 1001, such as CPU, communication bus 1002, memory 1003.
Wherein, communication bus 1002 is for realizing the connection communication between these components.Memory 1003 can be high-speed RAM storage
Device is also possible to stable memory (non-volatile memory), such as magnetic disk storage.Memory 1003 is optional
It can also be the storage device independently of aforementioned processor 1001.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap
It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include operating system and lookup in a kind of memory 1003 of computer storage medium
Documentor.
In equipment shown in Fig. 1, processor 1001 can be used for calling at the locating file stored in memory 1003
Program is managed, and executes following operation:
When receiving look-up command, the search criterion in the look-up command is obtained, the search criterion includes key
The location information of word and the keyword in filename;
Traverse each filename for prestoring file according to the search criterion to obtain file destination, the file destination
It include the keyword in file destination name, and position of the keyword in the file destination name and the location information
Matching.
Further, processor 1001 can call the locating file processing routine stored in memory 1003, also execute
It operates below:
Obtain the filename character string for respectively prestoring file;
Valid string corresponding with the location information is intercepted from each filename character string for prestoring file;
Whether judge in each valid string comprising the keyword;
When in the valid string include the keyword when, using the valid string it is corresponding prestore file as
The file destination found.
Further, processor 1001 can call the locating file processing routine stored in memory 1003, also execute
It operates below:
Obtain the filename valid character string length for respectively prestoring file;
When the search criterion is keyword at the beginning of filename, by keyword be located at the initial position of filename with
The corresponding character string of significant character string length between position is begun to shut off as valid string;
When the search criterion is ending of the keyword in filename, keyword is located to the ending start bit of filename
The corresponding character string of significant character string length between end position is set as valid string;
When the search criterion is centre of the keyword in filename, position is begun to shut off by what keyword was located at filename
The corresponding character string of significant character string length set and ended up between initial position is as valid string.
Further, processor 1001 can call the locating file processing routine stored in memory 1003, also execute
It operates below:
Obtain the filename valid character string for respectively prestoring file;
Whether judge in each valid string comprising the keyword;
When in the valid string including the keyword, judge the keyword in the valid string
Whether position matches with the location information;
If position and location information matching of the keyword in the valid string, prestore file for described
As file destination.
Further, processor 1001 can call the locating file processing routine stored in memory 1003, also execute
It operates below:
After detecting new files, the pass in the filename of the new files in the predetermined keyword library is extracted
Keyword obtains location information of the keyword of extraction in the filename, and is associated with and saves the keyword and described
Location information and the new files;
It is described the step of each filename for prestoring file is to obtain file destination is traversed according to the search criterion to include:
The incidence relation of the keyword and the location information is traversed according to the search criterion;
Will file corresponding with the matched incidence relation of the search criterion as target locating file.
Further, processor 1001 can call the locating file processing routine stored in memory 1003, also execute
It operates below:
When not finding the file destination, the synonym of the keyword is searched in predetermined keyword library;
With the location information locating file of the synonym of the keyword and the keyword in filename.
Further, processor 1001 can call the locating file processing routine stored in memory 1003, also execute
It operates below:
Search criterion includes the storage time of file, includes the keyword in the file destination name of the file destination,
Position of the keyword in the file destination name is matched with the location information and the storage time of the file destination
It is matched with the storage time of the file in the search criterion.
Referring to Fig. 2, first embodiment of the invention provides a kind of method of locating file, which comprises
Step S10 obtains the search criterion in the look-up command, the search criterion when receiving look-up command
Location information including keyword and the keyword in filename.
The keyword or location information for including in search criterion can be one or more, keyword and location information
Corresponding relationship are as follows: when keyword and location information all only one when, correspond;When keyword and location information be it is multiple simultaneously
And number it is identical when, the sequence of positions occurred in search criterion by it corresponds;When keyword has multiple, location information
When having one, all location informations correspond to multiple keywords.
Step S20 traverses each filename for prestoring file according to the search criterion to obtain file destination, the mesh
Mark file file destination name in include the keyword, and position of the keyword in the file destination name with it is described
Location information matching.
The filename lookup file destination of each file is traversed there are two types of method according to search criterion, and one is first according to looking into
The location information in condition is looked for obtain corresponding valid string in filename, then the matching keywords in valid string;Separately
One is the keywords in the valid string of filename in matched and searched condition, are matched to keyword and judge the pass again later
Keyword the position in the valid string of filename whether in search criterion location information matching.
Specifically, the detailed step of the first lookup scheme are as follows:
1) the filename character string for prestoring file is obtained.
When obtaining filename character string, the spcial character in filename character string, such as lower stroke can be identified and removed
Line " _ ", connecting line "-, --- " or " #&* " etc..
2) valid string corresponding with the location information is intercepted from the filename character string for prestoring file.
When search criterion be keyword at the beginning of filename, keyword is located to initial position and the beginning of filename
The corresponding character string of significant character string length between rest position is as valid string;
When search criterion is ending of the keyword in filename, by keyword be located at the ending initial position of filename with
The corresponding character string of significant character string length between end position is as valid string;
When search criterion is centre of the keyword in filename, by keyword be located at filename begin to shut off position with
The corresponding character string of significant character string length between ending initial position is as valid string.
Wherein it is possible to the filename character length of currently processed file first be obtained, by preset starting position ratio and text
The product of part name character length is as position is begun to shut off, by the product of preset end position ratio and filename character length
As ending initial position.
3) whether judge in the valid string comprising the keyword;
4) when in the valid string including the keyword, the corresponding file that prestores of the valid string is made
For the file destination found.
The detailed step of second of lookup scheme are as follows:
1) the filename valid character string for prestoring file is obtained, after the spcial character removal in filename character string
Character string is referred to as the valid string of filename, wherein special string usually plays connection or separation in file designation
Effect, such as underscore " _ ", connecting line "-, --- " or " #&* " etc..
2) whether judge in valid string comprising keyword;
3) when in valid string include keyword when, judge position of the keyword in valid string whether and position
Information matches;
4) if position and location information matching of the keyword in the valid string, will prestore file as target text
Part.
It further, can also include the storage time of file, the target text of the file destination found in search criterion
It include keyword, location information of the keyword in the position and search criterion in the file destination name of file destination in part name
The storage time of matching and file destination is matched with the storage time in search criterion.Such as target text is specified in search criterion
The storage time of part is to need first to obtain current date information, thus the date of desired file destination within one week
Range judges the target text to be determined when finding file destination to be determined according to the location information of keyword and keyword
Whether the storage time of part is in the date range of desired file destination, if just determining the target to be determined in date range
File is the file destination found.
In the present embodiment, by the location lookup file according to keyword and keyword in filename, more accurately
File required for user is found, the efficiency of file search is improved.
Further, referring to Fig. 3, second embodiment of the invention provides a kind of side of locating file based on first embodiment
Method, the present embodiment is before step S10 further include:
Step S30 is extracted in the filename of the new files after detecting new files in the predetermined keyword
Keyword in library obtains location information of the keyword of extraction in the filename, and is associated with and saves the key
Word and the location information and the new files.
In order to improve the efficiency of file search, file by it is newly-built when from filename obtain and the associated letter of search criterion
Breath, for being used when locating file.It, can be according to the life of project fields where file to be found firstly the need of keywords database is established
Name specification and habit establish keywords database, meanwhile, keywords database can also search the record of hit in search procedure by including
In keyword and constantly update.
After detecting new files, searched in the filename of the new files whether comprising in predetermined keyword library
Keyword determine location information of the keyword in the filename of new files, and will close when determining comprising keyword
Keyword, the location information of keyword and new files are associated preservation as a record, wherein can save in record new
Build filename, storage location or the storage index of file.
In order to which the matching based on keywords database further improves the efficiency of file search, when can be to new files pair
Following limitation is done in the name of file: needing to determine after the keyword comprising keywords database or file designation in file designation
The keyword is simultaneously added into keywords database by the keyword of filename.
Step S40 traverses the incidence relation of the keyword and the location information according to the search criterion.
According to the incidence relation of search criterion traversal keyword and location information, there are many methods.One is close in each
It is searched in the incidence relation of keyword and location information whether comprising the keyword and location information in search criterion;It is a kind of will be a plurality of
The record of incidence relation is ranked up according to the sequence of crucial initial letter, traversed according to search criterion match when, according to looking into
It looks for crucial initial letter in condition to filter out the consistent incidence relation record of crucial initial letter from all records, is filtering out
Record in carry out location information matched and searched;Another kind is to be divided the record of a plurality of incidence relation according to location information
Group matches corresponding grouping according to location information in search criterion, in corresponding grouping when traversing matching according to search criterion
The matched and searched of keyword is carried out in record.
Step S50, will file corresponding with the matched incidence relation of the search criterion as target locating file.
Further, when not finding file destination according to search criterion, the pass is searched in predetermined keyword library
The synonym of keyword, with the location information locating file of the synonym of the keyword and the keyword in filename.
In the present embodiment, pass through the keyword that is extracted and preserved in filename in new files and keyword position
Related information, and realized in locating file according to the incidence relation of search criterion traversal keyword and the location information
File based on predetermined keyword library is quickly searched.
Further, referring to Fig. 4, third embodiment of the invention provides one kind based on the first embodiment or the second embodiment and looks into
The method for looking for file, the present embodiment is after step S20 further include:
Step S60 obtains keyword in the position of the filename of the file destination and the matching degree of the location information.
Multiple file destinations can be found according to the location information of keyword and keyword in search criterion, according to lower section
Method calculates separately the matching degree of the location information of the file destination and keyword that find:
1) when the location information of keyword is to calculate keyword initial character and filename start bit at the beginning of filename
Character length between setting, and the ratio of the character length and the entire significant character length of filename is calculated, with this ratio mark
Know matching degree, ratio is smaller, and matching degree is bigger;
2) when the location information of keyword is the ending in filename, keyword end character and filename end are calculated
Character length between position, and the ratio of the character length and the entire significant character length of filename is calculated, with this ratio
Matching degree is identified, ratio is smaller, and matching degree is bigger;
3) it when the location information of keyword is the centre in filename, calculates separately keyword initial character and filename rises
Character length, keyword end character between beginning position and the character length between filename end position, and calculate this
The ratio of two character lengths identifies matching degree with this ratio, and the absolute difference between ratio and 1 is smaller, and matching degree is bigger.
The file destination found is ranked up and is shown according to the matching degree is descending by step S70.
In the present embodiment, by obtaining position and the location information of the keyword in the filename of the file destination
Matching degree, and the file destination found is ranked up and is shown according to the matching degree is descending, improved
The reference value of locating file result faster gets the file destination of needs conducive to user.
In addition, the embodiment of the present invention also proposes that a kind of locating file device, the locating file device include: referring to Fig. 5
Condition module 10 is obtained, for when receiving look-up command, obtaining the search criterion in the look-up command, institute
Stating search criterion includes the location information of keyword and the keyword in filename;
Search file module 20, for traversing each filename for prestoring file according to the search criterion to obtain target
File includes the keyword in the file destination name of the file destination, and the keyword is in the file destination name
Position matched with the location information.
Optionally, described search file module 20, comprising:
Acquiring unit: for obtaining the filename character string for respectively prestoring file;
Interception unit: corresponding with the location information for being intercepted from each filename character string for prestoring file
Valid string;
Judging unit: for whether judging in the valid string comprising the keyword;
Searching unit: for when in the valid string including the keyword, the valid string to be corresponded to
Prestore file as the file destination found.
Optionally, the interception unit is also used to:
Obtain the filename valid character string length for respectively prestoring file;
When the search criterion is keyword at the beginning of filename, by keyword be located at the initial position of filename with
The corresponding character string of significant character string length between position is begun to shut off as valid string;
When the search criterion is ending of the keyword in filename, keyword is located to the ending start bit of filename
The corresponding character string of significant character string length between end position is set as valid string;
When the search criterion is centre of the keyword in filename, position is begun to shut off by what keyword was located at filename
The corresponding character string of significant character string length set and ended up between initial position is as valid string.
Optionally, described search file module 20, comprising:
Acquiring unit: for obtaining the filename valid character string for respectively prestoring file;
Judging unit: for judging whether comprising the keyword in each valid string, when the significant character
In string include the keyword when, judge position of the keyword in the valid string whether with the location information
Matching;
Searching unit: if for position of the keyword in the valid string and location information matching,
Using the file that prestores as file destination.
Optionally, the locating file device further include:
Extract preserving module: described in the filename for after detecting new files, extracting the new files
Keyword in predetermined keyword library obtains location information of the keyword of extraction in the filename, and is associated with guarantor
Deposit the keyword and the location information and the new files;
Described search file module 20 is also used to traverse the keyword and the location information according to the search criterion
Incidence relation, will file corresponding with the matched incidence relation of the search criterion as target locating file.
Optionally, described search file module 20 is also used to:
When not finding the file destination, the synonym of the keyword is searched in predetermined keyword library, with institute
State the location information locating file of the synonym and the keyword of keyword in filename.
Optionally, search criterion acquired in the acquisition condition module 10 further include: the storage time of file, the mesh
Mark includes the keyword, position of the keyword in the file destination name and institute's rheme in the file destination name of file
It sets information matches and the storage time of the file destination is matched with the storage time of the file in the search criterion.
In addition, to achieve the above object, the present invention also provides a kind of locating file equipment, which includes: memory, place
It manages device and is stored in the locating file processing routine that can be run on the memory and on the processor, the locating file
Processing routine realizes the step of locating file method as described above when being executed by the processor.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium
On be stored with locating file processing routine, the locating file is realized when the locating file processing routine is executed by processor
The step of method.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in one as described above
In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone,
Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of method of locating file, which is characterized in that the method for the locating file the following steps are included:
When receiving look-up command, obtain the search criterion in the look-up command, the search criterion include keyword and
Location information of the keyword in filename;
Each filename for prestoring file is traversed according to the search criterion to obtain file destination, the target of the file destination
It include the keyword in filename, and position of the keyword in the file destination name and the location information
Match.
2. the method for locating file as described in claim 1, which is characterized in that described each according to search criterion traversal
Prestoring the step of filename of file is to obtain file destination includes:
Obtain the filename character string for respectively prestoring file;
Valid string corresponding with the location information is intercepted from each filename character string for prestoring file;
Whether judge in each valid string comprising the keyword;
When in the valid string including the keyword, using the corresponding file that prestores of the valid string as lookup
The file destination arrived.
3. the method for locating file as claimed in claim 2, which is characterized in that described from each filename for prestoring file
The step of interception valid string corresponding with the location information, includes: in character string
Obtain the filename valid character string length for respectively prestoring file;
When the search criterion be keyword at the beginning of filename, keyword is located to initial position and the beginning of filename
The corresponding character string of significant character string length between rest position is as valid string;
When the search criterion is ending of the keyword in filename, by keyword be located at the ending initial position of filename with
The corresponding character string of significant character string length between end position is as valid string;
When the search criterion is centre of the keyword in filename, by keyword be located at filename begin to shut off position with
The corresponding character string of significant character string length between ending initial position is as valid string.
4. the method for locating file as described in claim 1, which is characterized in that described each according to search criterion traversal
Prestoring the step of filename of file is to obtain file destination includes:
Obtain the filename valid character string for respectively prestoring file;
Whether judge in each valid string comprising the keyword;
When in the valid string including the keyword, position of the keyword in the valid string is judged
Whether matched with the location information;
If position of the keyword in the valid string and location information matching, using it is described prestore file as
File destination.
5. the method for locating file as described in claim 1, which is characterized in that keyword in the acquisition file search instruction
Before the step of location information of the keyword in filename further include:
After detecting new files, the keyword in the filename of the new files in predetermined keyword library is extracted, is obtained
Location information of the keyword of extraction in the filename is taken, and is associated with and saves the keyword and the location information
And the new files;
It is described the step of each filename for prestoring file is to obtain file destination is traversed according to the search criterion to include:
The incidence relation of the keyword and the location information is traversed according to the search criterion;
Will file corresponding with the matched incidence relation of the search criterion as target locating file.
6. such as the method for locating file described in any one of claim 1 to 5, which is characterized in that described according to the lookup item
Part traverses the step of filename of each file is to obtain file destination and includes:
When not finding the file destination, the synonym of the keyword is searched in predetermined keyword library;
With the location information locating file of the synonym of the keyword and the keyword in filename.
7. such as the method for locating file described in any one of claim 1 to 5, which is characterized in that the search criterion further include:
File storage time includes the keyword in the file destination name of the file destination, and the keyword is in the target text
Position in part name matched with the location information and the storage time of the file destination with it is described in the search criterion
The matching of file storage time.
8. a kind of device of locating file, which is characterized in that the locating file device includes:
Condition module is obtained, for when receiving look-up command, obtaining the search criterion in the look-up command, the lookup
Condition includes the location information of keyword and the keyword in filename;
Search file module, for traversing each filename for prestoring file according to the search criterion to obtain file destination,
It include the keyword, and position of the keyword in the file destination name in the file destination name of the file destination
It is matched with the location information.
9. a kind of equipment of locating file, which is characterized in that the equipment of the locating file includes: memory, processor and deposits
Store up the locating file processing routine that can be run on the memory and on the processor, the locating file processing routine
The step of method of the locating file as described in any one of claims 1 to 7 is realized when being executed by the processor.
10. a kind of computer readable storage medium, which is characterized in that be stored with lookup text on the computer readable storage medium
Part processing routine is realized as described in any one of claims 1 to 7 when the locating file processing routine is executed by processor
The step of method of locating file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810957820.8A CN110018982A (en) | 2018-08-21 | 2018-08-21 | Method, apparatus, equipment and the computer readable storage medium of locating file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810957820.8A CN110018982A (en) | 2018-08-21 | 2018-08-21 | Method, apparatus, equipment and the computer readable storage medium of locating file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110018982A true CN110018982A (en) | 2019-07-16 |
Family
ID=67188399
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810957820.8A Withdrawn CN110018982A (en) | 2018-08-21 | 2018-08-21 | Method, apparatus, equipment and the computer readable storage medium of locating file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110018982A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112230810A (en) * | 2020-10-10 | 2021-01-15 | 深圳市欢太科技有限公司 | Application searching method, device, terminal and storage medium |
CN112764851A (en) * | 2021-01-14 | 2021-05-07 | 青岛海信传媒网络技术有限公司 | Display method and display equipment for legal statement content |
CN113765769A (en) * | 2020-06-02 | 2021-12-07 | 腾讯科技(深圳)有限公司 | Message display method, message sending method, device, equipment and medium |
WO2022022466A1 (en) * | 2020-07-31 | 2022-02-03 | 华为技术有限公司 | Method and apparatus for determining file storage position, and terminal |
CN115374320A (en) * | 2022-10-25 | 2022-11-22 | 北京国电通网络技术有限公司 | Text matching method, text matching device, electronic equipment, computer medium and program product |
CN117171110A (en) * | 2023-09-15 | 2023-12-05 | 北京云枢创新软件技术有限公司 | Positioning method for appointed target position, electronic equipment and storage medium |
-
2018
- 2018-08-21 CN CN201810957820.8A patent/CN110018982A/en not_active Withdrawn
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113765769A (en) * | 2020-06-02 | 2021-12-07 | 腾讯科技(深圳)有限公司 | Message display method, message sending method, device, equipment and medium |
CN113765769B (en) * | 2020-06-02 | 2023-11-07 | 腾讯科技(深圳)有限公司 | Message display method, message sending device, message display equipment and medium |
WO2022022466A1 (en) * | 2020-07-31 | 2022-02-03 | 华为技术有限公司 | Method and apparatus for determining file storage position, and terminal |
CN112230810A (en) * | 2020-10-10 | 2021-01-15 | 深圳市欢太科技有限公司 | Application searching method, device, terminal and storage medium |
CN112764851A (en) * | 2021-01-14 | 2021-05-07 | 青岛海信传媒网络技术有限公司 | Display method and display equipment for legal statement content |
CN115374320A (en) * | 2022-10-25 | 2022-11-22 | 北京国电通网络技术有限公司 | Text matching method, text matching device, electronic equipment, computer medium and program product |
CN117171110A (en) * | 2023-09-15 | 2023-12-05 | 北京云枢创新软件技术有限公司 | Positioning method for appointed target position, electronic equipment and storage medium |
CN117171110B (en) * | 2023-09-15 | 2024-04-05 | 北京云枢创新软件技术有限公司 | Positioning method for appointed target position, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110018982A (en) | Method, apparatus, equipment and the computer readable storage medium of locating file | |
JP5575902B2 (en) | Information retrieval based on query semantic patterns | |
JP5540079B2 (en) | Knowledge base construction method and apparatus | |
US9171153B2 (en) | Bloom filter with memory element | |
US9015214B2 (en) | Process of generating a list of files added, changed, or deleted of a file server | |
CN109246163B (en) | Terminal information identification method and device | |
CN108897842A (en) | Computer readable storage medium and computer system | |
CN107016018B (en) | Database index creation method and device | |
CN107783985B (en) | Distributed database query method, device and management system | |
JP2007183864A (en) | File retrieval method and system therefor | |
US11556592B1 (en) | Storage estimate generation | |
CN106453320B (en) | The recognition methods of malice sample and device | |
KR20160100226A (en) | Method and device for constructing on-line real-time updating of massive audio fingerprint database | |
CN110889023A (en) | Distributed multifunctional search engine of elastic search | |
CN107480205A (en) | A kind of method and apparatus for carrying out data partition | |
CN108388556B (en) | Method and system for mining homogeneous entity | |
CN104700030A (en) | Virus data searching method, device and server | |
CN109992708B (en) | Method, device, equipment and storage medium for metadata query | |
CN104636384B (en) | A kind of method and device handling document | |
CN114218404A (en) | Content retrieval method, construction method, device and equipment of retrieval library | |
CN110633430B (en) | Event discovery method, apparatus, device, and computer-readable storage medium | |
CN113656659A (en) | Data extraction method, device and system and computer readable storage medium | |
CN112131462A (en) | Keyword discovery method and system based on information monitoring and electronic equipment | |
JP2013149068A (en) | Method, system, and program for analyzing relevancy between files | |
US20170154096A1 (en) | Data service system and electronic apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190716 |