File searching method, device and equipment and storage medium

By combining search keywords and user file activity logs in the file search method and inserting historical active files, the problem of file sorting mismatch in the existing technology is solved, and the effect of enabling users to quickly locate the target file is achieved.

CN114996215BActive Publication Date: 2025-12-23CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210678453.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-16
Publication Date
2025-12-23
Estimated Expiration
2042-06-16

AI Technical Summary

Technical Problem

In existing technologies, when users search for files in the cloud or local storage devices, the file sorting results do not match the user's search purpose, making it impossible to quickly locate the target file and resulting in low access efficiency.

Method used

By receiving users' file search requests, generating a set of files with high similarity based on search keywords, identifying historical active files from users' file activity logs, and comprehensively considering users' personalized needs, inserting historical active files into the search results to improve the relevance of file ranking.

Benefits of technology

It improves users' ability to efficiently search for target files from a large number of stored files, thus enhancing access efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996215B_ABST
    Figure CN114996215B_ABST
Patent Text Reader

Abstract

The application provides a file search method, device and equipment and a storage medium. The method comprises the following steps: receiving a file search request sent by a user, wherein the file search request comprises a search keyword, and the search keyword is used for searching a target file from stored files; searching a search file set according to the search keyword, wherein the search file set comprises K files, and the K files are all files stored by the user and having a similarity to the search keyword exceeding a preset threshold; determining the first P files having the highest similarity to the search keyword from the search file set; determining P historical activity files from a file activity log of the user, wherein each of the P historical activity files is a file having the highest similarity to each file in the first P files; and displaying a file search result to the user, wherein the K files are arranged in a descending order of similarity to the search keyword, and the P historical activity files are inserted into a sequence position after the first P files. The method improves the search efficiency of the user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and particularly relates to a file search method and device, equipment and a storage medium. BACKGROUND

[0002] At present, users usually have the need to store a large number of files. The files can be stored in a local device or in the cloud.

[0003] In order to enable the user to quickly locate the target file from a large number of files, the prior art provides a file search function. Taking the case that the file is stored in a cloud server, the user can input a file keyword in a cloud search interface, the cloud server performs file similarity calculation according to the file keyword, searches a plurality of files with high similarity to the file keyword, and then feeds back to the user after sorting according to the similarity size, so that the user can efficiently access.

[0004] However, the user finds in the use process that the file sorting result of the prior art does not match the user's search purpose, and cannot meet the user's demand to quickly locate the target file, and the access efficiency is low. SUMMARY

[0005] The present application provides a file search method, device, equipment and storage medium to solve the problem that the user cannot quickly find the target file from a large number of stored files.

[0006] In a first aspect, the present application provides a file search method, comprising:

[0007] receiving a file search request sent by a user, the file search request being used by the user to search a target file from stored files, and the file search request including a search keyword;

[0008] searching a search file set according to the search keyword, the search file set including K files, and the K files being files stored by the user and having a similarity to the search keyword exceeding a preset threshold;

[0009] determining the first P files with the highest similarity to the search keyword from the search file set;

[0010] determining P historical activity files from a file activity log of the user, the P historical activity files being files with the highest similarity to each file in the first P files;

[0011] displaying a file search result to the user, the K files in the file search result being sorted in descending order of similarity to the search keyword, and the P historical activity files being inserted in a sequence position after the first P files.

[0012] In a possible implementation, before displaying the file search result to the user, the method further includes: removing the repeated files from the P historical active files and the K files.

[0013] In a possible implementation, before inserting the P historical active files before the sequence position after the first P files, the method further includes: sorting the P historical active files in descending order of similarity to the search keyword.

[0014] In a possible implementation, before determining the first P files with the highest similarity to the search keyword from the search file set, the method further includes: sorting the K files in descending order of similarity to the search keyword; and correspondingly, determining the first P files with the highest similarity to the search keyword from the search file set includes: determining the first P files in the search file set in the front of the sorting.

[0015] In a possible implementation, the search file set is obtained according to the search keyword, and the method further includes:

[0016] inputting the search keyword into a first similarity calculation model to determine the similarity between all the files stored by the user and the search keyword; wherein the first similarity calculation model is obtained by training a training sample formed using a user search log;

[0017] determining the files with similarity to the search keyword exceeding a preset threshold from all the files stored by the user to form the search file set.

[0018] In a possible implementation, the first similarity calculation model is obtained by using the following training process:

[0019] obtaining a search log of the user, the search log including a plurality of search samples, each search sample including a search keyword, a search file corresponding to the search keyword, and a target file selected by the user;

[0020] for each search sample, obtaining a first semantic feature value of the search file, the first semantic feature value being a feature value of the search keyword on the title and content of the search file;

[0021] training an information retrieval ranking algorithm model using the obtained first semantic feature value and all the search sample training information to obtain the first similarity calculation model.

[0022] In a possible implementation, the P historical active files are determined from a file activity log of the user, and the method further includes:

[0023] The words in the file activity log of the user are input into a second similarity calculation model to determine the similarity between files in the file activity log of the user, the words including user-defined words and network popular words, the network popular words being network words with network popularity exceeding a preset threshold, and the second similarity calculation model being obtained by training a training sample formed using the file activity log of the user.

[0024] The P historical activity files with the highest similarity to each of the P files are determined from the file activity log of the user.

[0025] In a possible implementation, the second similarity calculation model is obtained by using the following training process:

[0026] The file activity log of the user in a preset period is obtained, and the file activity log includes a plurality of log samples, each log sample including a file accessed by the user in the preset period and an access time;

[0027] For each log sample, a second semantic feature value of the log file is obtained, the second semantic feature value being a feature value of a word in a title and content of the file;

[0028] The obtained second semantic feature value and all log samples are used to train a neural network model to obtain the second similarity calculation model.

[0029] In a possible implementation, a file search request sent by a user is received, the file search request being used by the user to search for a target file from stored files, and specifically:

[0030] A search request for a cloud storage file sent by the user through a terminal device is received, the search request being used by the user to search for a target file from files stored in a cloud server;

[0031] Correspondingly, a file search result is displayed to the user, and specifically:

[0032] A cloud response message containing the file search result is fed back to the terminal device of the user, so that the terminal device displays the file search result to the user.

[0033] In a second aspect, the present application provides a file search device, comprising:

[0034] A receiving module is configured to receive a file search request sent by a user, the file search request being used by the user to search for a target file from stored files, and the file search request including a search keyword;

[0035] A searching module is configured to search for a search file set according to the search keyword, the search file set including K files, the K files being files stored by the user and having a similarity to the search keyword exceeding a preset threshold.

[0036] The first determining module is configured to determine, from the search file set, the first P files with the highest similarity to the search keyword.

[0037] The second determining module is configured to determine, from the user's file activity log, the P historical activity files, the P historical activity files being the files with the highest similarity to each of the first P files.

[0038] The display module is configured to display the file search result to the user, the K files in the file search result being sorted in descending order of similarity to the search keyword, and the P historical activity files being inserted into the sequence position after the first P files.

[0039] In a third aspect, the present application provides a file search device, comprising a memory and a processor.

[0040] The memory is configured to store computer programs / instructions, and the processor is configured to execute the file search method in the first aspect and any possible design of the first aspect according to the computer programs / instructions stored in the memory.

[0041] In a fourth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing computer programs / instructions, when at least one processor of a file search device executes the computer programs / instructions, the file search device executes the file search method in the first aspect and any possible design of the first aspect.

[0042] The file search method, device, equipment and storage medium provided by the present application can search, according to a search keyword, a search file set with high similarity to the search keyword from user storage files, and insert files with high similarity to the files in the search file set in a user file activity log into the search file set as the search result fed back to the user finally, thereby comprehensively considering the individuality of the user and realizing the effect of efficiently searching for a target file from a large number of storage files. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without any creative effort.

[0044] Figure 1 An application scenario diagram of a file search provided by an embodiment of the present application;

[0045] Figure 2a A flowchart of a file search method provided by an embodiment of the present application;

[0046] Figure 2b for Figure 2a The flowchart illustrates the processing steps of a file search method.

[0047] Figure 3a A flowchart illustrating a file search method provided in an embodiment of this application;

[0048] Figure 3b for Figure 3a The flowchart illustrates the processing steps of a file search method.

[0049] Figure 4 This is a schematic diagram of a file search device provided in an embodiment of this application. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] The terms "first," "second," "third," "fourth," etc., used in the specification and claims of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be used interchangeably where appropriate. For example, without departing from the scope of this document, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.

[0052] Depending on the context, the word "if" as used here can be interpreted as "when," "when," or "in response to determination."

[0053] Furthermore, as used herein, the singular forms “a,” “one,” and “the” are intended to also include the plural forms, unless the context indicates otherwise.

[0054] It should be further understood that the terms “comprising” or “including” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups.

[0055] The terms "or" and "and / or" as used herein are to be interpreted as inclusive, i.e., as meaning one or any combination of items. Thus, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C." An exception to this definition will occur only when a combination of elements, functions, steps or acts are in some way inherently mutually exclusive.

[0056] At present, users usually have the need to store a large number of files, and the users can store the files to a local device or a cloud. When the local device or the cloud stores a large number of files, the user uses a file search function to quickly locate a target file from the large number of files.

[0057] In the prior art, the user inputs a keyword of the target file in a search interface, and the storage device calculates the similarity between the keyword and the stored files according to the keyword, searches a plurality of files with high similarity, and feeds back the files to the user in a descending order of similarity, so that the user can quickly locate the target file.

[0058] However, in the use process, the user finds that the storage device in the prior art compares the search keyword with the stored files in similarity, and does not consider the difference between different users when feeding back the search result, so that the file order fed back has a low relevance to the target file of the user, and the user cannot quickly locate the target file, and the access efficiency is low.

[0059] To solve the above problems, the present application provides a file search method, device, equipment and storage medium, which are applied to the technical field of computers. The present application considers the files in the user file activity log as a consideration factor for the user to search a target file from a large number of stored files, and comprehensively considers the individuality of the user, so that the file search result can better meet the demand of the user for efficient access.

[0060] The technical solutions of the present application will be described in detail in the following specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.

[0061] In the present application, a file search device is taken as an execution subject to execute the file search method of the following embodiments. Specifically, the execution subject can be a hardware device of the file search device, or a software application for implementing the following embodiments in the file search device, or a computer readable storage medium on which the software application for implementing the following embodiments is installed, or a code of the software application for implementing the following embodiments.

[0062] Figure 1An application scenario of a file search provided by an embodiment of the present application is shown. A user sends a file search request to a file search device, the file search device searches to obtain a plurality of files, and feeds back the plurality of files sorted as a final file search result to the user. The file search device can be a local storage device or a cloud server, which is not limited here.

[0063] Figure 2a A flowchart of a file search method provided by an embodiment of the present application is shown. Figure 2b For Figure 2a A processing process schematic diagram of a file search method corresponding to the flowchart is shown. As shown in the figure, the method of the present embodiment can include the following steps:

[0064] S201: receiving a file search request sent by a user, the file search request being used by the user to search a target file from stored files, and the file search request including a search keyword.

[0065] In the embodiment of the present application, the user sending the file search request can be the user inputting the search keyword in a search interface. The search keyword can be a single keyword or multiple keywords.

[0066] S202: searching to obtain a search file set according to the search keyword, the search file set including K files, and the K files being files stored by the user and having a similarity to the search keyword exceeding a preset threshold.

[0067] In the embodiment of the present application, the similarity threshold between the preset file and the search keyword is that the files searched according to the search keyword are all files having a similarity to the search keyword exceeding the threshold.

[0068] S203: determining the first P files having the highest similarity to the search keyword from the search file set.

[0069] In the embodiment of the present application, the files having the highest similarity can be determined by directly comparing the similarity between the search keyword and each file.

[0070] S204: determining P historical activity files from the file activity log of the user, the P historical activity files being files having the highest similarity to each file in the first P files.

[0071] In the embodiment of the present application, the first P files are compared with the files in the file activity log in terms of similarity, so as to determine the P historical activity files having the highest similarity to each file in the first P files. In addition, the file activity log of the user includes but is not limited to operations such as file creation, editing and deletion of the user.

[0072] S205: display the file search result to the user, the K files in the file search result are ordered from high to low according to the similarity with the search keyword, and the P historical active files are inserted into the sequence position after the first P files.

[0073] In the embodiment of the application, the P historical active files are inserted into the sequence position after the P files in the search file set, and are displayed as the final file search result to the user.

[0074] The file search method provided by the embodiment comprehensively considers the individuality of the user, solves the problem that the user cannot efficiently search the target file from a large number of stored files, and improves the user access efficiency.

[0075] Figure 3a A flowchart of a file search method provided by an embodiment of the application; Figure 3b For Figure 3a A flowchart of a file search method provided by an embodiment of the application; Figure 2a 、 2b On the basis of the embodiment shown in FIG. 5, the embodiment can further remove the repeated files between the P historical active files and the K files before displaying the file search result to the user, so as to achieve the effect that the file search result is more in line with the user demand. As shown in FIG. 6, the file search device is taken as the execution subject, and the method of the embodiment includes the following steps. Figure 3a 、 3b As shown in FIG. 6, the file search device is taken as the execution subject, and the method of the embodiment includes the following steps.

[0076] S301: receive the file search request sent by the user, the file search request is used for the user to search the target file from the stored files, and the file search request includes the search keyword.

[0077] S302: search the search file set according to the search keyword, the search file set includes K files, and the K files are the files stored by the user and having a similarity with the search keyword exceeding a preset threshold.

[0078] S303: determine the first P files with the highest similarity with the search keyword from the search file set.

[0079] S304: determine the P historical active files from the file activity log of the user, and the P historical active files are the files with the highest similarity with each file in the first P files.

[0080] S305: remove the repeated files between the P historical active files and the K files.

[0081] S306: Display the file search result to the user, the K files in the file search result are sorted in descending order of similarity to the search keyword, and the P historical active files are inserted in the sequence position after the first P files.

[0082] The implementation manners of the steps other than S305 are similar to those of the embodiments shown in Figure 2a , 2b and will not be described here.

[0083] In the embodiments shown in Figure 2a , 2b and / or the embodiments shown in Figure 3a , 3b , the search file set searched according to the search keyword in step S202 or S302 can be obtained in the following manner: input the search keyword into a first similarity calculation model to determine the similarity between all the files stored by the user and the search keyword; wherein the first similarity calculation model is obtained by training a training sample formed using the user search log; and determine the files with similarity to the search keyword exceeding a preset threshold from all the files stored by the user to form the search file set. This implementation manner makes the search files searched according to the search keyword all have high similarity to the search keyword, and the user can more easily and quickly locate the target file.

[0084] The first similarity calculation model is obtained by the following training process:

[0085] Step 1: Obtain the search log of the user, the search log contains multiple search samples, each search sample includes a search keyword, a search file corresponding to the search keyword, and a target file selected by the user.

[0086] In the embodiments of the present application, the search keyword can be a single keyword or multiple keywords. The search samples form a pre-training set, which is then iteratively updated to obtain a training set. The iterative updating process of the pre-training set is as follows:

[0087] Suppose the user searches using a single keyword q or a multiple keyword set Q = {q1, q2, …, qn}, and the search results TOP 5 returned by the file search device to the user are recorded as |Q| , and The files finally clicked by the user are recorded as d q and d Q , respectively, as and The file can be in the search results TOP 5 or not in the TOP 5 files.

[0088] When the search keyword is a single keyword q, determine whether the single keyword q belongs to the pre-training set:

[0089] If so, and d′ q ≠d q , Then change the training records of the pre-training set. for like Then change the training records of the pre-training set. for Where, d′ q For the file clicked by the user this time, d q This is the click file corresponding to the keyword q in the pre-training set. d q Compare It appears earlier in the sorting list;

[0090] If not, add training records. To the pre-training set.

[0091] When the search keyword is a multi-keyword set Q, determine whether the keyword set Q belongs to the pre-training set:

[0092] If so, and d′ Q ≠d Q , Then change the training records of the pre-training set. for like Then change the training records of the pre-training set. for Where, d′ Q For clicking the file, d Q The click file corresponding to the keyword set Q in the pre-training set. d Q Compare It appears earlier in the sorting list;

[0093] If not, add training records. To the pre-training set.

[0094] Step 2: For each search sample, obtain the first semantic feature value of the search file. The first semantic feature value is the feature value of the search keywords in the title and content of the search file.

[0095] In this application embodiment, the feature values ​​include typical feature values ​​such as Term Frequency (TF), Inverse Document Frequency (IDF), TF-IDF, and Okapi BestMatching 25 (BM25).

[0096] Step 3: training the information retrieval ranking algorithm model by using the obtained first semantic feature value and all search sample training information to obtain a first similarity calculation model.

[0097] In the embodiment of the application, step 3 comprises:

[0098] Step 31: constructing an information retrieval ranking algorithm LambdaRank model f(x; w) for each search keyword, s i = f(x i ; w) and s j = f(x j ; w) represent scores of files d i and d j respectively, x is a feature vector of the file, w is a model parameter, and the LambdaRank model parameter w is determined according to the first semantic feature value.

[0099] Step 32: describing the training degree of the model according to a loss function C1 of the LambdaRank model, and the loss function C1 is:

[0100]

[0101] wherein s ij ∈ {+1, 0, -1}, s ij = 1 indicates that d i is ranked ahead of d j , s ij = -1 indicates that d j is ranked ahead of d i , and s ij = 0 indicates that d i is ranked in accordance with d j .

[0102] If the loss function C1 does not tend to 0, i.e., s ij = 1 is not satisfied, s i > s j , s ij = 0 is not satisfied, s i = s j , s ij = -1 is not satisfied, and s i < s j , the gradient descent method is used to update the parameter w k in the function f(x; w), and the update formula is:

[0103]

[0104] wherein η is a learning parameter, which can be set to 0.01 or 0.05, and I is a set of {i, j}.

[0105]

[0106] ΔNDCG is the difference of the exchange file d i and d j NDCG is the normalized discounted cumulative gain, and the difference of NDCG after the sequence;

[0107] For the top K files of the search file, the corresponding calculation formula of NDCG@K is:

[0108]

[0109] Generally, K is taken as 5 or 8. IDCG@K is the maximum DCG value in the ideal case, and DCG@K is the DCG value of the actual returned result. DCG is the discounted cumulative gain, and the calculation formula is as follows:

[0110]

[0111] Wherein, rel i is the similarity between the i-th result in the file search result and the user search keyword.

[0112] Step 33: Based on the training set, the LambdaRank model is iteratively trained according to step 31 and step 32 until the loss function C1 tends to 0, and the first similarity calculation model is obtained.

[0113] The above training process enables the first similarity calculation model to calculate the similarity between all the files stored by the user and the search keyword, and the search result fed back by the file search device is more in line with the user's demand for quickly positioning the target file.

[0114] In the embodiments shown in Figure 2a , 2b and / or the embodiments shown in Figure 3a , 3b , the specific implementation of step S203 and / or S303 can be: sorting the K files in descending order of similarity to the search keyword, and determining the P files at the front of the sequence from the search file set. This implementation is one optional implementation for determining the P files with the highest similarity to the search keyword from the K files. Optionally, the K files are not sorted by similarity, and the P files with the highest similarity to the search keyword can also be determined therefrom.

[0115] In the embodiments shown in 2a, 2b and / or Figure 3a , 3bOn the basis of the embodiment shown, the P historical activity files determined from the user's file activity log in step S204 and / or S304 can be determined in the following manner: inputting the entries in the user's file activity log into a second similarity calculation model, determining the similarity between files in the user's file activity log, the entries including user-defined entries and network popular entries, the network popular entries being network entries with a network popularity exceeding a preset threshold, the second similarity calculation model being trained using training samples formed from the user's file activity log; and determining the P historical activity files with the highest similarity to each of the first P files from the user's file activity log. This implementation manner makes the P historical activity files determined from the user's activity log all have the highest similarity to each of the first P files, i.e., the highest similarity to the search keyword.

[0116] The second similarity calculation model is obtained using the following training process:

[0117] Step 1: Obtain the user's file activity log in a preset time period, the file activity log including a plurality of log samples, each log sample including a file accessed by the user in the preset time period and an access time.

[0118] In the embodiment of the application, the preset time period is to filter the file activity log with a time exceeding T1 from the current time T, and T1 is typically a time point one third or one fourth of the time between the earliest and latest time of the file activity log accessed by the user.

[0119] The log samples form a training data set, including the pre-similarity between files in the file activity log, and the pre-similarity determination process includes the following steps:

[0120] Step 11: According to the time period t, divide T-T1 into {t0, t1,...t k} from near to far.

[0121] Step 12: Traverse the activity log in any period, and determine whether files d i and d j are accessed simultaneously, if the access time is less than a preset threshold, it is considered that d i and d j are accessed simultaneously.

[0122] Step 13: Determine the pre-similarity of files d i and d j , the formula being:

[0123]

[0124] wherein CoAcc i (d i, d j represents a preset threshold value within d i and d j are simultaneously accessed, the value is 1, otherwise 0.

[0125] Step 2: For each log sample, obtain a second semantic feature value of the log file, the second semantic feature value being a feature value of a word in a title and content of the file.

[0126] In the embodiments of the present application, the feature values include typical features such as TF, IDF, TF-IDF, BM52, etc.

[0127] Step 3: Train a neural network model using the obtained second semantic feature value and all log samples to obtain a second similarity calculation model.

[0128] In the embodiments of the present application, the neural network model includes an input layer, a hidden layer and an output layer.

[0129] The input layer includes N neurons, denoted as A=(a1, a2,..., a N ) T , the weight from the i-th neuron of the input layer to the j-th neuron of the hidden layer is denoted as v ij .

[0130] The hidden layer includes M neurons, denoted as P=(p1, p2,..., p M ) T , the weight from the i-th neuron of the hidden layer to the j-th neuron of the output layer is denoted as w ij .

[0131] The output layer z has |D| neurons, where |D| is the number of files.

[0132] Step 3 includes:

[0133] Step 31: Determine the parameters of the neural network model according to the second semantic feature value, the parameters being the weights v ij and w ij .

[0134] The value calculation formula of the j-th neuron of the hidden layer is:

[0135]

[0136] The value calculation formula of the j-th neuron of the output layer is:

[0137]

[0138] where b j is a bias value.

[0139] Step 32: The training degree of the model is described according to the loss function C2 of the neural network model, the loss function C2 is the sum of the variance of the pre-similarity of the file and the model similarity, and the formula is:

[0140]

[0141] wherein z ij is the model similarity of the files d i and d i in the file activity log calculated based on the formulas (7) and (8) when the input vector A is the feature vector of the file d j .

[0142] If the loss function C2 does not tend to be stable, the gradient descent method is used to update the weights v ij and w ij , and the update formula is:

[0143]

[0144]

[0145] Step 33: Based on the training data set, the neural network model is iteratively trained according to steps 31 and 32 until the loss function C2 tends to be stable, and a second similarity calculation model is obtained.

[0146] The above training process enables the second similarity calculation model to calculate the similarity between files in the activity log, and the search results finally fed back by the file search device are more in line with the needs of users to quickly locate target files.

[0147] In an example, after step S204 and / or step S304, the P historical activity files can be sorted in order of similarity to the search keyword from high to low. This sorting process can also be performed after step S305. This implementation sorts both the search file set and the files inserted into the search file set, so that the search results finally displayed to the user are sorted in order of similarity to the search keyword from high to low, enabling the user to quickly locate the target file and improving the access efficiency.

[0148] The file search method provided in this embodiment, on the basis of the embodiments shown in Figure 2a , 2b , further removes the P historical files from the files in the search file set, and then inserts the files into the search file set as the final search results displayed to the user, so that the search results are more in line with the needs of users to quickly locate target files, and the user access efficiency is improved.

[0149] The file searching method provided by the embodiment of the present application, when applied to cloud storage technology, comprises the following steps:

[0150] Step 1: receiving a search request for a cloud storage file sent by a user through a terminal device, the search request being used by the user to search for a target file from files stored in a cloud server, and the search request comprising a search keyword.

[0151] In the embodiment of the present application, the terminal device can be a mobile phone, a computer or the like. The user can send a file search request by inputting a search keyword in a search interface of the terminal device, and the search keyword can be a single keyword or multiple keywords.

[0152] Step 2: searching for a search file set according to the search keyword, the search file set comprising K files, the K files being files stored by the user and having a similarity to the search keyword exceeding a preset threshold.

[0153] Step 3: determining the first P files having the highest similarity to the search keyword from the search file set.

[0154] Step 4: determining P historical activity files from a file activity log of the user, the P historical activity files being files having the highest similarity to each of the first P files.

[0155] Step 5: feeding back a cloud response message comprising a file search result to the terminal device of the user, so that the terminal device displays the file search result to the user, the K files in the file search result being sorted in descending order of similarity to the search keyword, and the P historical activity files being inserted in a sequence position after the first P files.

[0156] In the embodiment of the present application, the cloud server displays the file search result to the user through the terminal device.

[0157] In the above embodiment, the implementation manners of the steps are similar to those of the embodiment shown in Figure 2a 、 2b and / or the implementation manners of the corresponding steps and the achieved technical effects in the embodiment and examples shown in Figure 3a 、 3b , and thus will not be described herein.

[0158] In each of the above embodiments, the P value can be adjusted according to the NDCG value, specifically comprising:

[0159] Obtaining NDCG1 and NDCG2 in a time period from T-t to T and from T-2t to T-t, and obtaining a difference ΔNDCG therebetween, wherein T is the current time, and t is the time period.

[0160] According to the ΔNDCG modified P value, the formula is as follows:

[0161]

[0162] Figure 4 A structure schematic diagram of a file search device provided in Embodiment Four of the present application is shown, as shown in the figure, the file search device 40 of the embodiment comprises: Figure 4

[0163] The receiving module 401 is configured to receive a file search request sent by a user, the file search request being used for the user to search for a target file from stored files, and the file search request comprising a search keyword;

[0164] The search module 402 is configured to search for a search file set according to the search keyword, the search file set comprising K files, and the K files being files stored by the user and having a similarity to the search keyword exceeding a preset threshold;

[0165] The first determining module 403 is configured to determine, from the search file set, a first P files having a highest similarity to the search keyword;

[0166] The second determining module 404 is configured to determine, from a file activity log of the user, a second P files having a highest similarity to each of the first P files;

[0167] The display module 405 is configured to display a file search result to the user, the K files in the file search result being sorted in a descending order of similarity to the search keyword, and the second P files being inserted into a sequence position after the first P files.

[0168] The file search device 40 of the embodiment can implement any of the above file search methods, and the specific implementation principles and technical effects can be referred to the above method embodiments, which will not be described here again.

[0169] The present application further provides a file search device, comprising a memory and a processor; the memory is configured to store computer programs / instructions; the processor is configured to execute any of the above file search methods according to the computer programs / instructions stored in the memory, and the implementation manner and technical effects can be referred to the above method embodiments, which will not be described here again.

[0170] The present application further provides a computer readable storage medium, the computer readable storage medium storing computer programs / instructions, when at least one processor of a file search device executes the computer programs / instructions, the file search device executes any of the above file search methods, and the specific implementation principles and technical effects can be referred to the above method embodiments, which will not be described here again. ​

[0171] The computer readable storage medium can be a computer readable storage medium mentioned above, and can also be a communication medium. The communication medium includes any medium that facilitates the transfer of computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general or special purpose computer. For example, the computer readable storage medium is coupled to the processor, so that the processor can read information from the computer readable storage medium and write information to the computer readable storage medium. Of course, the computer readable storage medium can also be an integral part of the processor. The processor and the computer readable storage medium can be located in an application specific integrated circuit (ASIC). In addition, the ASIC can be located in the user equipment. Of course, the processor and the computer readable storage medium can also exist as discrete components in the communication device.

[0172] Specifically, the computer readable storage medium can be realized by any type of volatile or nonvolatile storage devices or their combinations, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0173] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the apparatus embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and in actual implementation, there can be another division manner, for example, a plurality of modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual elements can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.

[0174] The various modules can be physically separated, for example, installed at different positions of one device, or installed on different devices, or distributed to multiple network elements, or distributed to multiple processors. The various modules can also be integrated together, for example, installed in the same device, or integrated in a set of codes. The various modules can exist in the form of hardware, or in the form of software, or in the form of software plus hardware. The present application can select some or all of the modules to achieve the purpose of the embodiments.

[0175] When the integrated modules are implemented in the form of software functional modules, the integrated modules can be stored in a computer readable storage medium. The software functional modules stored in the storage medium include a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of the various embodiments.

[0176] It should be understood that, although the steps in the flowcharts in the above embodiments are displayed in sequence according to the arrows, these steps are not necessarily executed in sequence according to the arrows. Unless otherwise specified herein, the execution of these steps is not limited in sequence, and they can be executed in other sequences. Moreover, at least some of the steps in the figures can include a plurality of sub-steps or a plurality of stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be executed in rotation or alternation with other steps or sub-steps or stages of other steps.

[0177] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some or all of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments.

Claims

1. A file search method characterized by, The method comprises: receiving a file search request sent by a user, the file search request being used by the user to search for a target file from stored files, the file search request comprising a search keyword; searching for a search file set according to the search keyword, the search file set comprising K files, the K files being files stored by the user and having a similarity to the search keyword exceeding a preset threshold; determining the first P files having the highest similarity to the search keyword from the search file set; comparing the first P files with files in a file activity log of the user respectively to determine P historical activity files having the highest similarity to each file in the first P files, wherein the file activity log comprises operations of the user to newly create, edit and delete files; displaying a file search result to the user, the K files in the file search result being arranged in descending order of similarity to the search keyword, and the P historical activity files being inserted in a sequence position after the first P files.

2. The method of claim 1, wherein, Before the file search result is displayed to the user, the method further comprises: removing repeated files between the P historical activity files and the K files.

3. The method according to claim 1 or 2, characterized in that, Before the P historical activity files are inserted in the sequence position after the first P files, the method further comprises: arranging the P historical activity files in descending order of similarity to the search keyword.

4. The method according to claim 1 or 2, characterized in that, Before the first P files having the highest similarity to the search keyword are determined from the search file set, the method further comprises: arranging the K files in descending order of similarity to the search keyword. Correspondingly, the first P files having the highest similarity to the search keyword are determined from the search file set by comprising: determining the first P files arranged at the front from the search file set.

5. The method according to claim 1 or 2, characterized in that, The search file set is searched according to the search keyword by comprising: inputting the search keyword into a first similarity calculation model to determine similarity of all files stored by the user to the search keyword, wherein the first similarity calculation model is trained by using training samples formed by a search log of the user; determining files having a similarity to the search keyword exceeding a preset threshold from all files stored by the user to form the search file set.

6. The method of claim 5, wherein, The first similarity calculation model is obtained by using the following training process: obtaining a search log of the user, the search log comprising a plurality of search samples, each search sample comprising a search keyword, a search file corresponding to the search keyword and a target file selected by the user; obtaining a first semantic feature value of the search file for each search sample, the first semantic feature value being a feature value of the search keyword on a title and content of the search file; training an information retrieval ranking algorithm model by using the obtained first semantic feature value and all search samples to obtain the first similarity calculation model.

7. The method according to claim 1 or 2, characterized in that, The similarity comparison of the first P files with the files in the file activity log of the user respectively to determine P historical activity files with the highest similarity to each of the first P files comprises: Inputting the entries in the file activity log of the user into a second similarity calculation model to determine the similarity between files in the file activity log of the user, the entries including user-defined entries and network popular entries, the network popular entries being network entries with a network popularity exceeding a preset threshold, and the second similarity calculation model being obtained by training a training sample formed using the file activity log of the user; Determining, from the file activity log of the user, P historical activity files with the highest similarity to each of the first P files.

8. The method of claim 7, wherein, The second similarity calculation model is obtained by using the following training process: Obtaining the file activity log of the user in a preset period, the file activity log containing a plurality of log samples, each log sample including a file accessed by the user in the preset period and an access time; For each log sample, obtaining a second semantic feature value of the log file, the second semantic feature value being a feature value of the entries on the title and content of the file; Training a neural network model using the obtained second semantic feature value and all log samples to obtain the second similarity calculation model.

9. The method of claim 1 or 2, wherein, The receiving of the file search request sent by the user, the file search request being used by the user to search for a target file from stored files, specifically comprises: Receiving a search request for a cloud-stored file sent by the user through a terminal device, the search request being used by the user to search for a target file from files stored in a cloud server; Correspondingly, the displaying of the file search result to the user specifically comprises: Feeding back a cloud response message to the terminal device of the user, the cloud response message containing the file search result, so that the terminal device displays the file search result to the user.

10. A file search apparatus characterized by comprising: The apparatus comprises: A receiving module configured to receive a file search request sent by a user, the file search request being used by the user to search for a target file from stored files, the file search request including a search keyword; A search module configured to search for a search file set according to the search keyword, the search file set containing K files, the K files being files stored by the user and having a similarity to the search keyword exceeding a preset threshold; A first determining module configured to determine first P files with the highest similarity to the search keyword from the search file set; A second determining module configured to compare the first P files with files in a file activity log of the user respectively to determine P historical activity files with the highest similarity to each of the first P files, wherein the file activity log includes operations of the user to newly create, edit, and delete files. A display module is configured to display file search results to a user, wherein the K files in the file search results are ranked in descending order of similarity to the search keyword, and the P historical active files are inserted in the sequence position after the first P files.

11. A file search device characterized by comprising: The device comprises a memory and a processor; The memory is configured to store computer programs / instructions; and the processor is configured to implement the file search method according to any one of claims 1 to 9 based on the computer programs / instructions stored in the memory.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer programs / instructions, and the computer programs / instructions are configured to be executed by a processor to implement the file search method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Lexical item weight labeling method and device

    CN105975459A

  • Document query based on vector nearest neighbor search

    CN109948044A

  • File retrieval method and device, electronic equipment and readable storage medium

    CN112506864A