Index construction method, device and equipment, computer storage medium and vehicle
By extracting and building multi-dimensional indexes, the problem of low efficiency in building indexes for massive data files is solved, and rapid query and search of files in different formats is realized.
Patent Information
- Application Number
- CN202310764175.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2024-12-27
AI Technical Summary
It is difficult for the prior art to effectively build indexes of massive data files of different types and different data formats, resulting in inefficient data query.
By obtaining the stored files, extracting their key information, including file content, timing information and directory structure information, and building multi-dimensional indexes, supporting format conversion and feature extraction of text and non-text format files, realizing index construction of files in different formats.
It realizes efficient indexing of files of different formats, improves the speed and accuracy of data query and search, and meets the needs of fast query of massive data files.
Smart Images

Figure CN119201849A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of big data technology, and in particular, relates to an index construction method, device, equipment, computer storage medium and vehicle. Background Art
[0002] At present, in order to facilitate the storage and query of data files, data files are usually stored in a database and corresponding indexes are established. In this way, when a user needs to query a certain data file, the required data file can be quickly and conveniently queried according to the index in the database.
[0003] However, with the growth of business needs in actual production applications, people's demand for storage and query of massive data files of different types and different data formats has gradually increased. Based on this, how to reasonably and efficiently index and construct massive data files of different types and different data formats to facilitate subsequent users to quickly query files is still a problem that needs to be solved in the industry. Summary of the invention
[0004] The embodiments of the present application provide an index construction method, apparatus, device, computer storage medium and vehicle, which can reasonably and efficiently construct indexes for files of different formats, thereby facilitating subsequent users to quickly query and search data files.
[0005] In a first aspect, an embodiment of the present application provides an index construction method, the index construction method comprising:
[0006] Get the storage file;
[0007] When the format of the storage file is a text format, extracting key information of the storage file; wherein the text format is a user-readable format;
[0008] When the format of the storage file is not in text format, performing format conversion processing on the storage file to obtain a storage file in text format, and extracting key information of the storage file from the storage file converted into the text format;
[0009] The key information is constructed as an index of the storage file in the database; wherein the key information covers at least L dimensions, where L is a positive integer; and the L dimensions include at least one of a file content dimension, a timing dimension, and a directory structure dimension.
[0010] In some possible implementations, when the key information covers the file content dimension, extracting the key information of the stored file includes:
[0011] Perform word segmentation on the stored files through natural language processing technology to obtain a word segmentation set corresponding to the stored files, and extract keywords from the word segmentation set;
[0012] and / or, extracting metadata information from file attributes of the stored file;
[0013] Build key information as an index of the stored files in the database, including:
[0014] The keywords and / or metadata information are constructed as an index for storing the files in a database.
[0015] In some possible implementations, when the format of the storage file is not in text format, performing format conversion processing on the storage file to obtain a storage file in text format includes:
[0016] When the storage file is a multimedia format file, multimedia features are extracted from the storage file to obtain a multimedia feature description statement corresponding to the storage file;
[0017] The multimedia feature description sentences corresponding to the storage files are summarized to obtain the storage files in text format.
[0018] In some possible implementations, when the key information covers the time series dimension, extracting the key information of the storage file includes:
[0019] Extract K time series information of the storage file; the K time series information corresponds to K time series types one by one, K is a positive integer; each time series type in the K time series types is associated with a different file flow node of the storage file;
[0020] Build key information as an index of the stored files in the database, including:
[0021] According to the K time series information of the storage file, an index of the storage file under the K time series types is constructed.
[0022] In some possible implementations, the K types of time series types include a target time series type, the K time series information include target time series information, and the target time series type corresponds to the target time series information; after constructing an index storing files under the K types of time series types, the index construction method further includes:
[0023] Receive a user's query request for a target time series type in a database; the query request includes a query time point or a query time period corresponding to the target time series type;
[0024] In response to the query request, file information corresponding to the storage file is displayed; wherein the query time point matches the target timing information, or the query time period matches the target timing information.
[0025] In some possible implementations, when the key information covers the directory structure dimension, extracting the key information of the storage file includes:
[0026] Analyze the directory structure of the storage file and extract the target subdirectory corresponding to the storage file;
[0027] Build key information as an index of the stored files in the database, including:
[0028] Build the target subdirectory as an index of the stored files in the database;
[0029] After constructing the key information as an index of the storage file in the database, the index construction method further includes:
[0030] Receive user query input for a target subdirectory in the database;
[0031] Display N file information under the target subdirectory; wherein the N file information includes the file information corresponding to the storage file, and N is a positive integer.
[0032] In some possible implementations, the original file of the storage file is stored in the object storage server; after the key information is constructed as an index of the storage file in the database, the index construction method further includes:
[0033] Receiving a file query request from a user to a database, wherein the file query request includes at least one index information;
[0034] In response to the file query request, query feedback information matching at least one index information is returned; the query feedback information includes M search results, and the M search results are displayed in order according to a preset rule, where M is a positive integer;
[0035] In response to the user's selection input of a target search result among the M search results, the original file storage address corresponding to the target search result is returned, so that the user can obtain the original file corresponding to the target search result from the object storage server through the original file storage address.
[0036] In some possible implementations, receiving a file query request from a user to a database includes:
[0037] In the case where the user calls the first application program interface, receiving the user's file query request for the database, the first application program interface is used to implement query interaction on the database;
[0038] Returning query feedback information matching at least one index information, and returning the original file storage address corresponding to the target search result, including:
[0039] By calling a second application program interface, query feedback information matching at least one index information is returned, and,
[0040] By calling the second application program interface, the original file storage address corresponding to the target search result is returned;
[0041] The second application program interface is used to implement external response interaction of the database.
[0042] In a second aspect, an embodiment of the present application provides an index construction device, the index construction device comprising:
[0043] A first acquisition module, used to acquire a storage file;
[0044] A first extraction module is used to extract key information of the storage file when the storage file is in a text format; wherein the text format is a user-readable format;
[0045] The second extraction module is used to perform format conversion processing on the storage file when the format of the storage file is not in text format, obtain the storage file in text format, and extract key information of the storage file from the storage file converted into text format;
[0046] The first construction module is used to construct the key information into an index for storing files in a database; wherein the key information covers at least L dimensions, where L is a positive integer; and the L dimensions include at least one of a file content dimension, a timing dimension, and a directory structure dimension.
[0047] In a third aspect, an embodiment of the present application provides an index construction device, the index construction device comprising:
[0048] a processor and a memory storing computer program instructions;
[0049] When the processor executes the computer program instructions, the index construction method provided in any one of the above-mentioned embodiments of the present application is implemented.
[0050] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer readable storage medium is stored computer program instructions, and when the computer program instructions are executed by a processor, an index construction method provided in any one of the above-mentioned embodiments of the present application is implemented.
[0051] In a fifth aspect, an embodiment of the present application provides a vehicle, which includes at least one of the following: an index building device provided in the above-mentioned embodiment of the device of the present application; an index building device provided in the above-mentioned embodiment of the present application; and a computer-readable storage medium provided in the above-mentioned embodiment of the present application.
[0052] It can be seen from the above description that the index construction method, device, equipment, computer storage medium and vehicle of the embodiment of the present application, by obtaining the storage file, extract the key information of the storage file when the format of the storage file is a text format; wherein the text format is a user-readable format. When the format of the storage file is not a text format, the storage file is first formatted to obtain a storage file in a text format, and then the key information of the storage file is extracted from the storage file converted to the text format. In this way, the key information extracted from the storage information of different formats is finally constructed as an index of the storage file in the database; wherein the key information covers at least one of the file content dimension, the timing dimension and the directory structure dimension. It can be seen that the index construction method, device, equipment, computer storage medium and vehicle provided by the embodiment of the present application can reasonably and efficiently extract the key information in the file for files of different formats, and the key information covers at least one of the file content dimension, the timing dimension and the directory structure dimension, and then use the key information to perform index construction, so as to facilitate the subsequent user to quickly query and search the data file. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flowchart of an index construction method provided in an embodiment of the present application;
[0054] Figure 2 This is a flowchart of a scenario implementation of the index construction method provided in one embodiment of the present application;
[0055] Figure 3 is a schematic diagram of the structure of an index building device provided in an embodiment of the present application;
[0056] Figure 4 It is a structural diagram of an index building device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0058] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0059] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0060] In view of the above, in order to solve the above-mentioned prior art problems, the embodiments of the present application provide an index construction method, device, equipment, computer storage medium and vehicle. The index construction method provided by the embodiments of the present application is first introduced below. The index construction method can be applied to an electronic device, which can be a terminal or a server, etc., and the present application does not make specific restrictions on this.
[0061] First see Figure 1 , Figure 1 FIG. 1 is a flow chart of an index construction method provided by an embodiment of the present application. Figure 1 As shown, the index construction method provided in the embodiment of the present application includes the following steps:
[0062] S110, obtaining a storage file;
[0063] S120, when the format of the storage file is a text format, extracting key information of the storage file; wherein the text format is a user-readable format;
[0064] S130, when the format of the storage file is not in text format, performing format conversion processing on the storage file to obtain a storage file in text format, and extracting key information of the storage file from the storage file converted into text format;
[0065] S140, constructing the key information as an index for storing the file in the database; wherein the key information covers at least L dimensions, where L is a positive integer; and the L dimensions include at least one of a file content dimension, a timing dimension, and a directory structure dimension.
[0066] It can be seen from the above description that the index construction method of the embodiment of the present application, by acquiring the storage file, extracts the key information of the storage file when the format of the storage file is a text format; wherein the text format is a user-readable format. When the format of the storage file is not a text format, the storage file is first formatted and processed to obtain a storage file in a text format, and then the key information of the storage file is extracted from the storage file converted to the text format. In this way, the key information extracted from the storage information of different formats is finally constructed as an index of the storage file in the database; wherein the key information covers at least one of the file content dimension, the timing dimension, and the directory structure dimension. It can be seen that an index construction method provided by the embodiment of the present application can reasonably and efficiently extract the key information in the file for files of different formats, and the key information covers at least one of the file content dimension, the timing dimension, and the directory structure dimension, and then use the key information to perform index construction, so as to facilitate the subsequent user to quickly query and search for data files.
[0067] The specific implementation of the above steps 110 to 140 is described in detail below.
[0068] In S110, when it is specifically implemented, the acquisition of the storage file can be achieved through corresponding hardware collaborative interaction or communication between software. Considering the diversity of existing communication methods, this embodiment does not specifically explain how to achieve the acquisition of the storage file.
[0069] It should be noted that the storage file may specifically be a text file, binary file or multimedia file that is readable by a user, and this application does not impose any specific restrictions on this.
[0070] In S120, when the storage file is obtained, the specific file format of the storage file may be determined first. If the storage file is determined to be in text format, key information of the storage file may be directly extracted from the storage file in text format to facilitate subsequent database index construction.
[0071] The text format is a user-readable format, for example, the text format may be hexadecimal or other character formats that are easy for users to read and view, and this application does not impose strict restrictions on this.
[0072] The above-mentioned key information may be determined according to actual indexing requirements. The key information may include key feature information of multiple dimensions of the stored file, such as the file name, file size, file creation time or other timing information of the stored file, etc. This application does not impose specific restrictions on this.
[0073] In S130, when the storage file is obtained, the specific file format of the storage file is determined. If the storage file is determined not to be in text format, for example, the storage file is determined to be in binary format or multimedia format, the storage file needs to be processed in the corresponding format.
[0074] Specifically, the original non-text format storage file can be converted to obtain a text format storage file. In this way, after the storage file is converted from the non-text format to the text format, the key information of the storage file is extracted from the storage file converted to the text format.
[0075] Among them, the above key information can cover at least L dimensions, where L is a positive integer. The L dimensions can include at least one of a file content dimension, a timing dimension, and a directory structure dimension. The key information can be specifically related to key features of the stored files in multiple dimensions, and the dimensions covered can be determined according to actual index construction requirements, which will not be elaborated in this application.
[0076] Also, it should be understood that the above-mentioned file content dimension may be associated with the specific content information in the file, the above-mentioned timing dimension may be associated with the timing information of the file, and the above-mentioned directory structure dimension may be associated with the directory location where the file is located. This application does not impose any specific restrictions on this.
[0077] In some possible implementations, specifically, considering the actual file format type, in order to more reasonably realize the format processing conversion of the non-text format storage file, when the format of the storage file is not in text format, performing format conversion processing on the storage file to obtain the text format storage file may include:
[0078] When the storage file is a multimedia format file, multimedia features are extracted from the storage file to obtain a multimedia feature description statement corresponding to the storage file;
[0079] The multimedia feature description sentences corresponding to the storage files are summarized to obtain the storage files in text format.
[0080] In a specific implementation, if the stored file is an audio file, a video file, or a picture file, etc., it means that the stored file is in a non-text format, and is specifically a multimedia format file.
[0081] At this time, multimedia features are extracted from the stored file. For example, AI (Artificial Intelligence) means, speech recognition, image recognition or other related recognition models may be used to realize the recognition and extraction of multimedia features corresponding to the stored file, thereby obtaining the corresponding multimedia feature description statement, which is not specifically limited in this application.
[0082] The multimedia feature description statement is used to characterize the specific content features of the storage file in the multimedia format. For example, if the storage file is an audio file, the multimedia feature description statement can be the text content corresponding to the specific voice. Alternatively, if the storage file is a video file, the multimedia feature description statement can be specifically the corresponding video frame information at different time nodes in the video.
[0083] For example, multimedia features are extracted from a road video to obtain multiple corresponding multimedia feature description languages, where one of the multimedia feature description languages may be: at 1 p.m., the traffic light on the road shows green, an old man is crossing the road, etc. This application does not impose any specific restrictions on this.
[0084] In S140, when implemented specifically, the key information may be directly constructed as an index of the storage file in the database. Alternatively, in some other feasible implementations, the key information may be further screened and classified to construct the index of the storage file in the database, and this application does not impose any specific restrictions on this.
[0085] The above database can be a time-series database or a storage database, etc., which can be determined according to the actual data application needs of the user.
[0086] In some more specific implementations, when the above key information covers the file content dimension, in order to more efficiently and comprehensively extract the file key information, thereby constructing a database index of multiple dimensions, the above steps 120 and 130: extracting the key information of the stored file may specifically include:
[0087] Perform word segmentation on the stored files through natural language processing technology to obtain a word segmentation set corresponding to the stored files, and extract keywords from the word segmentation set;
[0088] and / or, extracting metadata information from file attributes of the stored file;
[0089] Build key information as an index of the stored files in the database, which can include:
[0090] The keywords and / or metadata information are constructed as an index for storing the files in a database.
[0091] The above-mentioned natural language processing (NPL) technology is an important branch of artificial intelligence. Its purpose is to use computers to perform intelligent processing of natural language. It can usually be used for operations such as stem extraction, word form restoration, sentiment analysis, text semantic similarity and text summarization.
[0092] The above metadata information may specifically include, for example, at least one of a file name, a file size, a file creation time, and a file modification time, etc., and this application does not impose any specific limitation on this.
[0093] In specific implementation, when the format of the storage file is a text format, the storage file can be directly segmented by natural language processing technology to obtain a segmentation set corresponding to the storage file, and keywords are extracted from the obtained segmentation set. In this way, subsequent index construction based on the above keywords can facilitate users to directly retrieve the content in the text file during the actual query process.
[0094] When the original format of the storage file is a non-text format, the storage file is converted to a text format, and then the storage file is segmented by natural language processing technology to obtain a segmented word set corresponding to the storage file, and keywords are extracted from the segmented word set.
[0095] In this way, after obtaining the above keywords and / or metadata information, the keywords and / or metadata information are constructed as an index of the storage file in the database, thereby realizing multi-dimensional index construction of the storage file.
[0096] It should be noted that, in this embodiment, the above-mentioned word segmentation set may include multiple words. After obtaining the word segmentation set corresponding to the above-mentioned storage file, natural language processing technology can also be used to parse the parts of speech, meanings, etc. of multiple words in the word segmentation set and perform weight judgment, and then extract the word segmentation words with higher weights from the word segmentation set as keywords, so as to subsequently construct an index in the database based on the extracted keywords.
[0097] In some more specific implementations, when the key information covers the time series dimension, in order to more reasonably realize the extraction and index construction of the key information about the time series dimension, the key information of the extracted storage file includes:
[0098] Extract K time series information of the storage file; the K time series information corresponds to K time series types one by one, K is a positive integer; each time series type in the K time series types is associated with a different file flow node of the storage file;
[0099] Build key information as an index of the stored files in the database, including:
[0100] According to the K time series information of the storage file, an index of the storage file under the K time series types is constructed.
[0101] Considering the complexity of the process of collecting, reporting, processing and analyzing the file content in actual scenarios, in this embodiment, the collection, generation, reporting and processing of the above-mentioned storage files can be understood as different file flow nodes of the storage files. Specifically, the storage file is used as the vehicle-side log for explanation. In the process of collecting and processing each log on the vehicle side to packaging, it often involves the time when the log occurs, the time when the log is collected, the time when the log is packaged, the time when the vehicle side reports the log, and the time when the cloud receives the reported log.
[0102] In this way, each of the K types of timing types is associated with a different file flow node for storing files, that is, different timing types can match occurrence nodes corresponding to different operations of files. Exemplarily, the above timing types can be, for example, file collection timing type, file reporting timing type, file acceptance timing type, file processing timing type, etc., which are not listed one by one in this application. The above timing information can be understood as specific time point information or time period information.
[0103] In a specific implementation, in combination with a specific example, if the K timing types include a file collection timing type and a file reporting timing type, then the K timing information of the storage file extracted above includes the file collection timing information of the storage file and the file reporting timing information of the storage file.
[0104] After extracting the file collection timing information and the file reporting timing information of the storage file, an index of the storage file under different timing types is established in the database according to the timing types corresponding to each timing information.
[0105] In some more specific implementations, further, considering the actual time series index query requirements of users, the K time series types include the target time series type, the K time series information include the target time series information, and the target time series type corresponds to the target time series information; after constructing the index of the storage file under the K time series types, the index construction method further includes:
[0106] Receive a user's query request for a target time series type in a database; the query request includes a query time point or a query time period corresponding to the target time series type;
[0107] In response to the query request, file information corresponding to the storage file is displayed; wherein the query time point matches the target timing information, or the query time period matches the target timing information.
[0108] In specific implementation, the user initiates a query request for the target time series type in the database according to the actual query requirements, and the query request includes the query time point or query time period corresponding to the target time series type. For example, still taking the index query of the vehicle-side log as an example, the business party can pull the file according to the collection time of the log in combination with its own business needs for corresponding data processing.
[0109] After receiving a query request initiated by a user for a target time series type in a database, if the query time point matches the target time series information, or the query time period matches the target time series information, in response to the query request, file information corresponding to the storage file is displayed.
[0110] The query time point matches the target timing information, which may be that the query time point matches the time point corresponding to the target timing information, or that the query time point is included in the time period corresponding to the target timing information. The query time period matches the target timing information, which may be that the query time period is consistent with the time period corresponding to the target timing information, or that the query time period includes the time period corresponding to the target timing information, or that the time period corresponding to the target timing information includes the query time period, etc.
[0111] It should be understood that the above is only an example, and the present application does not impose strict restrictions on how to judge the target timing information and the query time point or whether the query time point matches. The matching rules can be flexibly set according to the actual index requirements.
[0112] To facilitate understanding of the solution provided by this embodiment, the following is an explanation in conjunction with a specific example. If the above-mentioned target time series type can be a file reporting time series type, the target time series information of the stored file can be the file reporting time series information of the stored file, such as 3:00 p.m. last Tuesday. In conjunction with the example, if a user initiates a query request for a file in the database whose target time series type is a file reporting time series type and whose specific time point is 3:00 p.m. last Tuesday, then, in response to the query request, an index query is performed in the database, and a stored file matching the query information can be matched.
[0113] It should be noted that when there are other files other than the above-mentioned storage files that also meet the above-mentioned query request, the file information of multiple files that meet the query conditions can also be displayed at the same time, and the file information of the multiple files includes the file information of the above-mentioned storage files.
[0114] And, the file information of the above-mentioned storage file may specifically be the file name, file attributes and other data information corresponding to the storage file, which may be determined in combination with actual query and information feedback requirements.
[0115] In some more specific implementations, in order to construct the index of the file in the database from multiple dimensions as much as possible, so as to facilitate the subsequent flexible query and search of the data file by the user, when the above key information covers the directory structure dimension, the above key information of the storage file may be extracted and specifically include:
[0116] Analyze the directory structure of the storage file and extract the subdirectory corresponding to the storage file;
[0117] Build key information as an index of the stored files in the database, which can include:
[0118] Build the target subdirectory as an index of the stored files in the database;
[0119] After constructing the key information as an index of the storage file in the database, the index construction method may further include:
[0120] Receive user query input for a target subdirectory in the database;
[0121] Display N file information under the target subdirectory; wherein the N file information may include file information corresponding to the storage file, and N is a positive integer.
[0122] In specific implementation, after obtaining the above storage file, the folder or directory structure where the storage file is located is analyzed to extract the target subdirectory corresponding to the storage file, and the obtained target subdirectory is constructed as the index of the storage file in the database.
[0123] In this way, when the user accesses the target subdirectory in the database and inputs a query, the database responds to the query input and displays multiple file information under the target subdirectory, including the file information corresponding to the above-mentioned storage file.
[0124] In this embodiment, the file information displayed under the target subdirectory may specifically be data information such as file name, file attributes, etc., which may be determined in combination with actual needs of the user.
[0125] It should be added that the above-mentioned query input can be implemented through user voice, touch operation, etc., and the query input can specifically include information such as the identifier corresponding to the above-mentioned target sub-directory, and this application does not make specific restrictions on this.
[0126] In some more specific implementations, after the index of the storage file is established in the database, the original file of the storage file may be stored in the object storage server in consideration of the subsequent actual data query and search requirements; after the key information is constructed as the index of the storage file in the database, the index construction method may further include:
[0127] Receiving a file query request from a user to a database, where the file query request may include at least one index information;
[0128] In response to the query request, query feedback information matching at least one index information is returned; the query feedback information may include M search results, and the M search results are displayed in order according to a preset rule, where M is a positive integer;
[0129] In response to the user's selection input of a target search result among the M search results, the original file storage address corresponding to the target search result is returned, so that the user can obtain the original file corresponding to the target search result from the object storage server through the original file storage address.
[0130] In this embodiment, in order to improve the database retrieval efficiency and to more fully realize the utilization of database storage resources, considering that the memory of the original file of the above-mentioned storage file is usually large, the original file can be pre-stored in the object storage server, and only the relevant index information of the storage file is stored in the database.
[0131] In specific implementation, the user may initiate a file query request to the database by touch, click, or voice input, etc. The file query request needs to include at least one index information in order to perform actual file data search.
[0132] The index information may be information such as file creation time, file content, or directly the file name, etc. This application does not impose any specific restrictions on the specific dimensions of the index information.
[0133] Furthermore, users can also control the scope of file searches by limiting index information. Specifically, they can specify parameters such as file type, path, time period, etc. of the files to be searched. These parameters can be flexibly set based on the user's actual search needs.
[0134] In this way, in response to the file query request, query feedback information matching at least one index information is returned. The query feedback information may specifically include M search results, and the M search results are displayed in order according to a preset rule, where M is a positive integer.
[0135] The above search results can specifically correspond to the file information corresponding to the corresponding file, and each search result can be matched with the original file storage address of its corresponding file, which can specifically be the storage location, storage path or address link of the original file in the object storage server.
[0136] In this embodiment, the M search results are displayed and sorted according to preset rules, which can be, for example: sorting and displaying according to factors such as the relevance of the search results to the index information, the time and size of the search results, etc., and can be flexibly adjusted according to the user's actual search preferences, and this application does not impose any specific restrictions on this.
[0137] After the query feedback information matching at least one index information is returned and displayed, the user can select the desired target search result by touching and clicking on the M search results returned, thereby initiating a selection input for the target search result to the database.
[0138] After receiving the selection input, the database responds to the selection input and returns the original file storage address corresponding to the target search result to the user. In this way, after receiving the returned original file storage address, the user can obtain the original file corresponding to the target search result from the object storage server through the original file storage address.
[0139] In some more specific implementations, considering that there are often differences in the information interaction modes inside and outside the database, in order to more efficiently and conveniently implement the actual interaction between the user's application docking layer and the database to fully meet the user's needs, specifically, the above-mentioned receiving the user's file query request to the database may include:
[0140] In the case where the user calls the first application program interface, a file query request of the user to the database is received, and the first application program interface can be used to implement query interaction on the database;
[0141] Returning query feedback information matching at least one index information, and returning the original file storage address corresponding to the target search result, may include:
[0142] By calling a second application program interface, query feedback information matching at least one index information is returned, and,
[0143] By calling the second application program interface, the original file storage address corresponding to the target search result is returned;
[0144] The second application program interface can be used to implement external response interaction of the database.
[0145] An Application Programming Interface (API) usually refers to some predefined functions. By calling the API of the corresponding function, the database and other application docking layers, such as the interaction of application software, can be realized more conveniently.
[0146] In this embodiment, the first application program interface can be specifically used to implement query interaction on the database. For example, when a user needs to query a data file in the database, the user can easily implement the data query function on the database through the first application program interface.
[0147] The above-mentioned second application program interface can be used to implement the external response interaction of the database. For example, when the database needs to respond to the application layer feedback query search operation, the external (application layer) response interaction can be conveniently implemented by calling the second application program interface.
[0148] In combination with the specific steps, in a specific implementation, when the user calls the first application program interface, the user's file query request to the database is received. And the database can return the query feedback information matching the at least one index information by calling the second application program interface, and return the original file storage address corresponding to the target search result by calling the second application program interface.
[0149] It should be understood that the first application program interface and the second application program interface may be functions pre-coded by relevant technical personnel according to actual functional requirements in the interaction process, and this application does not impose any specific restrictions on this.
[0150] In order to facilitate understanding of the index construction method provided in the above embodiment, the above method is described below using a specific scenario embodiment. Figure 2 A flowchart of a scenario implementation of the index construction method provided in an embodiment of the present application.
[0151] In this scenario embodiment, if Figure 2 As shown, the original file of the storage file may be stored in an object storage server, and the object storage server corresponds to the object storage file system in the figure.
[0152] When implementing index construction, the storage file may be obtained first. After obtaining the above storage file, the specific file format of the storage file may be determined first. If the format of the storage file is determined to be a text format, the key information of the storage file may be directly extracted from the storage file in the text format to facilitate subsequent database index construction.
[0153] If it is determined that the format of the storage file is not a text format, for example, if it is determined that the format of the storage file is a binary format, the content in the storage file can be converted into binary text.
[0154] For another example, if the storage file is a multimedia format file, then the multimedia features of the storage file can be extracted by using speech recognition, image recognition technology and related general data models to obtain the multimedia feature description sentences corresponding to the storage file; the multimedia feature description sentences corresponding to the storage file are summarized to obtain the storage file in text format. The overall process can be regarded as the textualization of multimedia format files.
[0155] Then, after obtaining the storage file in text format, the storage file is segmented by natural language processing technology, such as an NLP model, to obtain a segmentation set corresponding to the storage file, and keywords are extracted from the segmentation set, and metadata information is extracted from the file attributes of the storage file. Alternatively, in some other embodiments, when converting the storage file format, the storage file can also be structured and converted by natural language processing technology, which is not strictly limited in this application.
[0156] Finally, after extracting the above key information, the above key information can be directly used as a multi-dimensional index for storing files in the database. In this way, when a user needs to query the stored file, he can initiate a corresponding file query request in the database at the application docking layer, and the file query request includes at least one index information. The at least one index information is associated with the multi-dimensional index previously constructed.
[0157] It should be added that when the database interacts with the application docking layer, the interactive docking can be achieved by calling the corresponding application program interface, such as a restful API, or an SDK (software development kit), and this application does not impose any specific restrictions on this.
[0158] Based on the index construction method provided in the above embodiment, the present application also provides an index construction device corresponding to the above index construction method. Figure 3 The index building device is introduced in detail.
[0159] Figure 3 It is a structural diagram of an index building device provided in one embodiment of the present application. Figure 3 The index building device 300 shown includes:
[0160] A first acquisition module 310, used to acquire a storage file;
[0161] The first extraction module 320 is used to extract key information of the storage file when the storage file is in a text format; wherein the text format is a user-readable format;
[0162] The second extraction module 330 is used to perform format conversion processing on the storage file to obtain the storage file in text format when the format of the storage file is not in text format, and extract key information of the storage file from the storage file converted into text format;
[0163] The first construction module 340 is used to construct the key information into an index for storing files in a database; wherein the key information covers at least L dimensions, where L is a positive integer; and the L dimensions include at least one of a file content dimension, a timing dimension, and a directory structure dimension.
[0164] The index construction device of the embodiment of the present application can obtain the storage file by setting the corresponding functional module, and extract the key information of the storage file when the format of the storage file is a text format; wherein the text format is a user-readable format. When the format of the storage file is not a text format, the storage file is first converted to obtain a storage file in a text format, and then the key information of the storage file is extracted from the storage file converted to the text format. In this way, the key information extracted from the storage information of different formats is finally constructed as an index of the storage file in the database; wherein the key information covers at least one of the file content dimension, the timing dimension, and the directory structure dimension. It can be seen that an index construction device provided by the embodiment of the present application can reasonably and efficiently extract the key information in the file for files of different formats, and the key information covers at least one of the file content dimension, the timing dimension, and the directory structure dimension, and then use the key information to perform index construction, so as to facilitate the subsequent user to quickly query and search for data files.
[0165] In some more specific implementations, when the above key information covers the file content dimension, in order to more efficiently and comprehensively extract the file key information, thereby building a database index of multiple dimensions, the above extraction of the key information of the stored file may specifically include:
[0166] The first extraction submodule can be used to perform word segmentation processing on the storage file through natural language processing technology, obtain a word segmentation set corresponding to the storage file, and extract keywords from the word segmentation set;
[0167] and / or, a second extraction submodule may be used to extract metadata information from file attributes of the storage file;
[0168] The first construction module 340 constructs the key information as an index of the storage file in the database, which may specifically include:
[0169] The keywords and / or metadata information are constructed as an index for storing the files in a database.
[0170] In some more specific implementations, further, in combination with actual file format types, in order to more reasonably implement the format processing conversion of non-text format storage files, the above-mentioned format conversion processing is performed on the storage file when the format of the storage file is not in text format to obtain the storage file in text format, which may specifically include:
[0171] The first obtaining submodule can be used to extract multimedia features from the storage file when the storage file is a multimedia format file, and obtain a multimedia feature description statement corresponding to the storage file;
[0172] The second obtaining submodule can be used to summarize the multimedia feature description sentences corresponding to the storage file to obtain the storage file in text format.
[0173] In some more specific implementations, when the key information covers the time series dimension, extracting the key information of the storage file may include:
[0174] The timing information extraction submodule can be used to extract K timing information of the storage file; the K timing information corresponds to K timing types one by one, K is a positive integer; each timing type in the K timing types is associated with a different file flow node of the storage file;
[0175] The first construction module 340 constructs the key information as an index of the storage file in the database, which may specifically include:
[0176] According to the K time series information of the storage file, an index of the storage file under the K time series types is constructed.
[0177] In some more specific implementations, the K time series types include a target time series type, the K time series information include the target time series information, and the target time series type corresponds to the target time series information; after constructing an index storing the file under the K time series types, the index construction device may further include:
[0178] The request receiving module can be used to receive a user's query request for a target time series type in a database; the query request includes a query time point or a query time period corresponding to the target time series type;
[0179] The request response module can be used to respond to the query request and display the file information corresponding to the storage file; wherein the query time point matches the target timing information, or the query time period matches the target timing information.
[0180] In some more specific implementations, further, in the case where the key information covers the directory structure information, in order to be able to construct the index of the file in the database from multiple dimensions as much as possible, so that subsequent users can flexibly query and search the data files, the key information of the stored files may include:
[0181] The third extraction submodule can be used to analyze the directory structure of the storage file and extract the target subdirectory corresponding to the storage file;
[0182] The first construction module 340 constructs the key information as an index of the storage file in the database, which may specifically include:
[0183] Build the target subdirectory as an index of the stored files in the database;
[0184] After constructing the key information as an index of the storage file in the database, the index construction device may further include:
[0185] The first receiving module may be used to receive a user's query input for a target sub-directory in the database;
[0186] The first display module can be used to display N file information under the target subdirectory; wherein the N file information may include file information corresponding to the storage file, and N is a positive integer.
[0187] In some more specific implementations, after the index of the storage file is established in the database, the original file of the storage file is stored in the object storage server in combination with the subsequent actual data query and search requirements; after the key information is constructed as the index of the storage file in the database, the index construction device may also include:
[0188] A second receiving module may be used to receive a file query request from a user to a database, where the file query request may include at least one index information;
[0189] The first returning module may be used to return query feedback information matching at least one index information in response to the file query request; the query feedback information may include M search results, and the M search results are displayed in order according to a preset rule, where M is a positive integer;
[0190] The second return module can be used to respond to the user's selection input of the target search result among the M search results, and return the original file storage address corresponding to the target search result, so that the user can obtain the original file corresponding to the target search result from the object storage server through the original file storage address.
[0191] In some more specific implementations, considering that there are often differences in the information interaction modes inside and outside the database, in order to more efficiently and conveniently realize the actual interaction between the user's application docking layer and the database to fully meet the user's needs, specifically, the first receiving module receives the user's file query request for the database, which may specifically include:
[0192] In the case where the user calls the first application program interface, a file query request of the user to the database is received, and the first application program interface can be used to implement query interaction on the database;
[0193] The first returning module returns the query feedback information matching the at least one index information, and the second returning module returns the original file storage address corresponding to the target search result, which may specifically include:
[0194] By calling a second application program interface, query feedback information matching at least one index information is returned, and,
[0195] By calling the second application program interface, the original file storage address corresponding to the target search result is returned;
[0196] The second application program interface can be used to implement external response interaction of the database.
[0197] Figure 4 It is a structural diagram of an index building device provided in one embodiment of the present application.
[0198] The index building device may include a processor 401 and a memory 402 storing computer program instructions.
[0199] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0200] Memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, memory 402 may include a removable or non-removable (or fixed) medium. In appropriate cases, memory 402 may be inside or outside of an integrated gateway disaster recovery device. In a specific embodiment, memory 402 is a non-volatile solid-state memory.
[0201] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0202] The processor 401 implements any one of the index building methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .
[0203] In one example, the data index construction device may further include a communication interface 403 and a bus 410. Figure 4 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0204] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0205] Bus 410 includes hardware, software or both, and the parts of index construction equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0206] The index building device executes the index building method in the embodiment of the present application, thereby achieving Figure 1 Describes the index building method.
[0207] In addition, in combination with the index building method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the index building methods in the above embodiment is implemented.
[0208] In addition, an embodiment of the present application further provides a vehicle, which includes at least one of the following: the index building device provided in the above-mentioned embodiment of the present application; the index building equipment provided in the above-mentioned embodiment of the present application; and the computer-readable storage medium provided in the above-mentioned embodiment of the present application.
[0209] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0210] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0211] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0212] Aspects of the present disclosure are described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable index construction device to produce a machine so that these instructions executed by the processor of the computer or other programmable index construction device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0213] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An index construction method, characterized in that: The method comprises: Get the storage file; In the case where the format of the storage file is a text format, extracting key information of the storage file; wherein the text format is a user-readable format; In the case where the format of the storage file is not the text format, performing format conversion processing on the storage file to obtain the storage file in the text format, and extracting key information of the storage file from the storage file converted into the text format; The key information is constructed as an index of the stored file in the database; wherein the key information covers at least L dimensions, where L is a positive integer; and the L dimensions include at least one of a file content dimension, a timing dimension, and a directory structure dimension.
2. The method according to claim 1, characterized in that In the case where the key information covers the file content dimension, the extracting the key information of the stored file includes: Performing word segmentation processing on the stored file by using natural language processing technology to obtain a word segmentation set corresponding to the stored file, and extracting keywords from the word segmentation set; and / or, extracting metadata information from file attributes of the stored file; The step of constructing the key information as an index of the storage file in the database includes: The keyword and / or the metadata information is constructed as an index of the storage file in the database.
3. The method according to claim 1, characterized in that When the format of the storage file is not the text format, performing format conversion processing on the storage file to obtain the storage file in the text format includes: In the case where the storage file is a multimedia format file, performing multimedia feature extraction on the storage file to obtain a multimedia feature description statement corresponding to the storage file; The multimedia feature description sentences corresponding to the storage file are summarized to obtain the storage file in the text format.
4. The method according to claim 1, characterized in that In the case where the key information covers the time series dimension, extracting the key information of the storage file includes: Extracting K time series information of the storage file; the K time series information correspond one-to-one to K time series types, where K is a positive integer; each time series type in the K time series types is associated with a different file transfer node of the storage file; The step of constructing the key information as an index of the storage file in the database includes: According to the K time series information of the storage file, an index of the storage file under the K time series types is constructed.
5. The method according to claim 4, characterized in that The K types of timing series types include the target timing series type, the K timing series information include the target timing series information, and the target timing series type corresponds to the target timing series information; After constructing the index of the storage file under the K time series types, the method further includes: Receive a user's query request for a target time series type in the database; the query request includes a query time point or a query time period corresponding to the target time series type; In response to the query request, file information corresponding to the storage file is displayed; wherein the query time point matches the target timing information, or the query time period matches the target timing information.
6. The method according to claim 1, characterized in that In the case where the key information covers the directory structure dimension, the extracting the key information of the storage file includes: Analyze the directory structure of the storage file and extract the target subdirectory corresponding to the storage file; The step of constructing the key information as an index of the storage file in the database includes: Building the target subdirectory as an index of the storage file in the database; After constructing the key information as an index of the storage file in the database, the method further includes: receiving a user's query input for the target sub-directory in the database; Display N file information under the target subdirectory; wherein the N file information includes the file information corresponding to the storage file, and N is a positive integer.
7. The method according to claim 1, characterized in that The original file of the storage file is stored in the object storage server; After constructing the key information as an index of the storage file in the database, the method further includes: Receiving a file query request from a user for the database, wherein the file query request includes at least one index information; In response to the file query request, query feedback information matching the at least one index information is returned; the query feedback information includes M search results, and the M search results are displayed in order according to a preset rule, where M is a positive integer; In response to the user's selection input of a target search result among the M search results, the original file storage address corresponding to the target search result is returned, so that the user can obtain the original file corresponding to the target search result from the object storage server through the original file storage address.
8. The method according to claim 7, characterized in that The receiving a user's file query request for the database includes: In the case where the user calls a first application program interface, receiving a file query request of the user for the database, wherein the first application program interface is used to implement query interaction for the database; The returning the query feedback information matching the at least one index information, and the returning the original file storage address corresponding to the target search result, include: By calling a second application program interface, query feedback information matching the at least one index information is returned, and, By calling the second application program interface, the original file storage address corresponding to the target search result is returned; The second application program interface is used to implement external response interaction of the database.
9. An index building device, characterized in that: The device comprises: A first acquisition module, used to acquire a storage file; A first extraction module, configured to extract key information of the storage file when the storage file is in a text format; wherein the text format is a user-readable format; A second extraction module is used for, when the format of the storage file is not the text format, performing format conversion processing on the storage file to obtain the storage file in the text format, and extracting key information of the storage file from the storage file converted into the text format; The first construction module is used to construct the key information as an index of the storage file in the database; wherein the key information covers at least L dimensions, L is a positive integer; the L dimensions include at least one of a file content dimension, a timing dimension, and a directory structure dimension.
10. An index building device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the index building method according to any one of claims 1 to 6 is implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the index building method according to any one of claims 1 to 8 is implemented.
12. A vehicle, characterized in that: It comprises at least one of the following: the index building device as described in claim 7; the index building equipment as described in claim 10.
Citation Information
Patent Citations
Construction method of index system and method and device of achieving search
CN107203532A
Multi-modal heterogeneous data storage method and system based on data quality
CN114661832A
Index construction and resource recall method and device, electronic equipment and storage medium
CN114860865A
Cited By
Data processing method and electronic equipment
CN122285752A
Data processing methods and electronic equipment
CN122285752B