Data interaction method and device, computer equipment and storage medium
By matching data files and obtaining metadata or obtaining it from a metadata database, combined with interaction frequency adjustment path information, the problem of data interaction performance bottleneck in the existing technology is solved, and the efficiency of metadata acquisition and the accuracy of data interaction are improved.
Patent Information
- Application Number
- CN202411107495.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-10-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When the amount of data interaction increases, the existing technology directly obtains metadata from the relational database, resulting in performance bottlenecks, increased query delays, increased system load, and impact on data processing efficiency.
By obtaining the interactive database identifier, match the data files and obtain metadata from them. If there is no match, obtain it from the preset metadata database. Use the metadata to perform corresponding operations on the interactive database, and adjust the path information according to the interaction frequency to optimize the storage of data files. and acquisition.
It improves the efficiency and accuracy of metadata acquisition, avoids erroneous results and data loss due to metadata errors, and improves the accuracy of data interaction and system stability.
Smart Images

Figure CN118779288A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a data interaction method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the continuous development of big data technology, metadata, as an important concept of "data describing data", has gradually attracted attention. Metadata is mainly used to describe the attribute information of data, including but not limited to the storage location of data, historical data records, resource search and file records. Metadata not only enriches the semantic connotation of data, but also greatly enhances the manageability and usability of data. Usually, metadata is stored in a dedicated metadata repository (Metastore). This Metastore generally uses a relational database, such as MySQL or PostgreSQL, to save key metadata information such as the structure information of the Hive table, partition information, and storage location of the table. In the prior art, when metadata is needed, the system usually queries directly from the relational database. This method performs well in scenarios with small data volume or low interaction frequency, but with the sharp increase in the amount of data interaction, the solution of directly obtaining metadata from the relational database begins to face performance bottlenecks. This situation may lead to increased query latency and increased system load, which in turn affects the overall data processing efficiency. Summary of the invention
[0003] Based on this, it is necessary to provide a data interaction method, apparatus, computer device, computer-readable storage medium and computer program product to address the above technical issues.
[0004] In a first aspect, the present application provides a data interaction method. The method comprises:
[0005] In response to the interaction with the target data, the data interaction request is acquired, and according to the data interaction request, an interaction database identifier corresponding to the data interaction request is determined;
[0006] According to the interactive database identifier, matching the data file corresponding to the interactive database;
[0007] When the data file is matched, obtaining metadata corresponding to the interactive database from the data file;
[0008] In the case where the data file is not matched, obtaining metadata corresponding to the interactive database from a preset metadata database; wherein the metadata database includes an association relationship between the database and the corresponding metadata;
[0009] Based on the metadata, the data interaction request is utilized to perform corresponding interaction on the interaction database.
[0010] In one embodiment, matching the data file corresponding to the interactive database according to the interactive database identifier includes:
[0011] According to the interactive database identifier, matching the path information of the data file corresponding to the database identifier;
[0012] Using the path information, obtaining the data file set;
[0013] The interactive database identifier is used to match the data file corresponding to the interactive database from the data file set.
[0014] In one embodiment, the obtaining the data file set by using the path information includes:
[0015] In a case where the path information is a first storage path, acquiring the data file set by using the path information;
[0016] When the path information is the second storage path, it is determined that the data file is not matched.
[0017] In one embodiment, the data file set is established in the following manner:
[0018] When the memory occupied by the data files reaches a preset threshold, determining the data files as a data file set;
[0019] When the memory occupied by the data file does not reach a preset threshold, the data file is determined as a sub-data file, and a plurality of sub-data files are merged to obtain a data file set.
[0020] In one embodiment, the interacting with the interaction database accordingly includes:
[0021] Perform corresponding interaction on the interaction database and record interaction information of the data interaction; wherein the interaction information includes at least one of the following: interaction object, database tag, time tag, interaction request.
[0022] In one embodiment, the method further comprises:
[0023] Determining the interaction frequency of the interaction database using the time stamp;
[0024] The path information of the data file corresponding to the interaction database is adjusted using the interaction frequency.
[0025] In a second aspect, the present application also provides a data interaction device. The device comprises:
[0026] an identification acquisition module, configured to acquire the data interaction request in response to the interaction with the target data, and determine the interaction database identification corresponding to the data interaction request according to the data interaction request;
[0027] A file matching module, used to match the data file corresponding to the interactive database according to the interactive database identifier;
[0028] A metadata acquisition module, used to acquire metadata corresponding to the interactive database from the data file when the data file is matched;
[0029] The metadata acquisition module is further used to acquire metadata corresponding to the interactive database from a preset metadata database when the data file is not matched; wherein the metadata database includes an association relationship between the database and the corresponding metadata;
[0030] A data interaction module is used to interact with the interaction database accordingly based on the metadata and using the data interaction request.
[0031] In one embodiment, the file matching module includes:
[0032] A path acquisition submodule, used to match the path information of the data file corresponding to the database identifier according to the interactive database identifier;
[0033] A file acquisition submodule, used to acquire the data file set using the path information;
[0034] The file acquisition submodule is further used to match the data file corresponding to the interactive database from the data file set using the interactive database identifier.
[0035] In one embodiment, the file acquisition submodule includes:
[0036] A file acquisition unit, configured to acquire the data file set by using the path information when the path information is the first storage path;
[0037] The file acquisition unit is further configured to determine that the data file is not matched when the path information is the second storage path.
[0038] In one embodiment, the data file set is established in the following manner:
[0039] When the memory occupied by the data files reaches a preset threshold, determining the data files as a data file set;
[0040] When the memory occupied by the data file does not reach a preset threshold, the data file is determined as a sub-data file, and a plurality of sub-data files are merged to obtain a data file set.
[0041] In one embodiment, the data interaction module further includes:
[0042] The data interaction submodule is used to interact with the interaction database and record the interaction information of the data interaction; wherein the interaction information includes at least one of the following: interaction object, database tag, time tag, interaction request.
[0043] In one embodiment, the device further comprises:
[0044] A frequency acquisition module, used to determine the interaction frequency of the interaction database using the time mark;
[0045] The path adjustment module is used to adjust the path information of the data file corresponding to the interaction database by using the interaction frequency.
[0046] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the resource management method as described in any one of the embodiments of the present disclosure is implemented.
[0047] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the resource management method as described in any one of the embodiments of the present disclosure is implemented.
[0048] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the resource management method as described in any one of the embodiments of the present disclosure is implemented.
[0049] The above-mentioned data interaction method, apparatus, computer equipment, storage medium and computer program product, in response to the interaction with the target data, obtains the database identifier using the data interaction request, further matches the data file, obtains the metadata corresponding to the database from the data file or the metadata database, and interacts with the interactive database. By matching the data file, while obtaining the metadata of the interactive database, the information of the data file can be obtained, thereby improving the accuracy of the metadata. At the same time, the data file is matched first and the metadata is obtained, thereby improving the efficiency of metadata acquisition. When the data file is not matched, the metadata is obtained from the metadata database, further ensuring the accuracy of metadata acquisition, thereby avoiding the problems of erroneous results, data loss and the like caused by metadata errors, thereby improving the accuracy of data interaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] FIG1 is a schematic diagram of a flow chart of a data interaction method in one embodiment;
[0051] FIG2 is a schematic diagram of a process for obtaining a data file in one embodiment;
[0052] FIG3 is a schematic diagram of a process for obtaining a data file set in one embodiment;
[0053] FIG4 is a schematic diagram of a process for establishing a data file set in one embodiment;
[0054] FIG5 is a schematic diagram of a process of adjusting path information in one embodiment;
[0055] FIG6 is a structural block diagram of a data interaction device in one embodiment;
[0056] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] In one embodiment, as shown in FIG1 , a data interaction method is provided. This embodiment is illustrated by applying the method to a server. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0059] Step S100: in response to the interaction with the target data, the data interaction request is obtained, and according to the data interaction request, an interaction database identifier corresponding to the data interaction request is determined.
[0060] In an exemplary embodiment, the data interaction request may include interacting with a target database; specifically, it may include adding, deleting, modifying, querying, etc. data in the target database. In an exemplary embodiment, the target data may include data in a target database, etc.; the target database may include a database with which the data interaction method is associated, etc.
[0061] In an exemplary embodiment, the interaction database may include a database where the data to be interacted in the data interaction request is located, etc. The database identifier may include a database name, a table name, etc. In another exemplary embodiment, the interaction database may include an interaction data table in a target database, etc.
[0062] Step S200, matching the data file corresponding to the interactive database according to the interactive database identifier;
[0063] In an exemplary embodiment, according to the interactive database identifier, before matching the data file corresponding to the interactive database, it can include establishing a correspondence between a table path and a data table when establishing a data table; during use, the correspondence between the table path and the database can be used to match the interactive database identifier to obtain the table path, and further use the table path to obtain the data file, etc.
[0064] In an exemplary embodiment, the data file may include metadata information corresponding to the interactive database, etc.; wherein the metadata may include metadata of the data in the interactive database and attribute information of the data file, and the attribute information may include at least one of the following: identification information, occupied memory, time identification, etc., for example, file name, size, type, creation time, modification time, owner, etc.
[0065] In an exemplary embodiment, the corresponding metadata information in the data file may include collecting the file information of the data file of the leaf path, for example, the file name, size, type, creation time, modification time, owner, etc.; then collecting the file information of the data file of the parent path of the leaf path and merging the file information of the data file of the leaf path to further obtain the file information of the data file of the parent path of the leaf path, and then collecting the file information of the data file of the current path (the parent path of the leaf path) again, and merging the file information of the data file of the current path, until finally merging to the root path, the obtained file information is the file information of the data file, and the file information of the data file is also a part of the metadata, etc. Specifically, according to the numerator of the path, for example, " / ", etc., the path containing the path itself and having one less grader is set as the parent path of the path, firstly obtain the data of the preset level, and all the paths containing the preset level path can be regarded as its child path, and all the files in the preset level path are added by path matching to obtain the total file information of the current path, and then the corresponding relationship between the data of the preset level path and the parent path is calculated layer by layer to level 1, so that the file data of all paths, that is, metadata information, etc. can be obtained.
[0066] In an exemplary embodiment, basic information of files of each cluster (such as isilon cluster and self-built cluster, etc.) can be collected and managed, such as file name, size, type, creation time, modification time, owner, etc., and the total files, total size and other information of the path and its sub-paths can be recursively calculated through the inclusion relationship between file paths. The obtained information is the metadata corresponding to the database, etc.
[0067] Step S300: when the data file is matched, metadata corresponding to the interactive database is obtained from the data file.
[0068] In an exemplary embodiment, when the data file is matched, it may include that the data file of the interactive database exists in the path corresponding to the interactive database identifier, and the metadata corresponding to the interactive database may be quickly acquired by using the data file.
[0069] Step S400: if the data file is not matched, metadata corresponding to the interactive database is obtained from a preset metadata database; wherein the metadata database includes an association relationship between a database and corresponding metadata.
[0070] In an exemplary embodiment, when the data file is not matched, the metadata information corresponding to the database can be obtained by using a metadata database. It is understandable that the metadata database may include Metastore, etc. Specifically, a relational database (such as MySQL or PostgreSQL, etc.) can be used to store metadata information such as table structure information, partition information, storage location of the table, etc. It is understandable that the efficiency of extracting metadata information from the metadata database is lower than the efficiency of extracting metadata information from the data file, so when there is no data file, the metadata information corresponding to the database is obtained from the metadata database.
[0071] Step S500: Based on the metadata, using the data interaction request, perform corresponding interaction on the interaction database.
[0072] In an exemplary embodiment, the data interaction request may include an SQL statement, etc.; the Sohu metadata may include a data type, etc.; based on the metadata, using the data interaction request to interact with the interaction database accordingly may include using the metadata to change the corresponding data type in the data interaction request, further using the data interaction request to interact with the interaction database, etc. In another exemplary embodiment, after using the data interaction request to interact with the interaction database, the metadata may be used to adjust the data type and format, etc.
[0073] In the above data interaction method, in response to the interaction with the target data, the database identifier is obtained by using the data interaction request, and the data file is further matched, the metadata corresponding to the database is obtained from the data file or the metadata database, and the interaction database is interacted. By matching the data file, the information of the data file can be obtained while obtaining the metadata of the interaction database, thereby improving the accuracy of the metadata. At the same time, the data file is matched first and the metadata is obtained, which improves the efficiency of metadata acquisition. When the data file is not matched, the metadata is obtained from the metadata database, which further ensures the accuracy of metadata acquisition, thereby avoiding the problems of erroneous results, data loss, etc. caused by metadata errors, thereby improving the accuracy of data interaction.
[0074] In one embodiment, as shown in FIG2 , matching the data file corresponding to the interaction database according to the interaction database identifier includes:
[0075] Step S201, matching the path information of the data file corresponding to the database identifier according to the interactive database identifier.
[0076] In an exemplary embodiment, establishing a database may include establishing a correspondence between a data file path and a database, so that the path information of the data file corresponding to the database may be matched using an interactive database identifier; specifically, the database identifier may also include a specific data table in the database, etc.
[0077] Step S202: using the path information, obtain the data file set.
[0078] In an exemplary embodiment, the data file set may include multiple data files or data file compression packages in the path information. It is understandable that when establishing a database or data table, in order to avoid the appearance of multiple small files to increase the interactive pressure of the system, a preset threshold can be set to merge or compress the files that occupy less memory than the threshold. In actual use, a threshold for the number of small files in a table or a partition can be defined, and the data corresponding to the table and partition whose number of small files exceeds the threshold can be determined as data to be governed. For the table or partition marked as data to be governed, a specific governance plan is formulated. The governance strategy may include merging small files, adjusting the data writing logic to avoid generating too many small files, or considering the use of archival storage.
[0079] Step S203: using the interaction database identifier, matching the data file corresponding to the interaction database from the data file set.
[0080] In an exemplary embodiment, the interactive database identifier may be used to search for data files corresponding to the interactive database from a data file collection.
[0081] In this embodiment, the file path of the data file is obtained through the interactive database identifier, and then the data file set is obtained and matched to obtain the data file corresponding to the interactive database. This can achieve the goal of quickly obtaining the data file set and matching the corresponding data file through the path information, which not only improves the efficiency of obtaining the data file, but also improves the accuracy of the obtained data file.
[0082] In one embodiment, as shown in FIG3 , the step of obtaining the data file set by using the path information includes:
[0083] Step S211, when the path information is the first storage path, using the path information to obtain the data file set.
[0084] Step S212: when the path information is the second storage path, determining that the data file is not matched.
[0085] In an exemplary embodiment, the interaction frequency of the database can be used to further store the data files corresponding to the database in different paths. Specifically, the interaction frequency of the database can be used to divide the data into hot data (high access frequency), warm data (average access frequency), cold data (almost 0 access frequency), etc., and the data tables corresponding to these data can be stored in different paths respectively. In the actual use process, in order to reduce the pressure of the system to store data files, the data files of cold data can be not stored or stored on a storage medium with lower cost, and when the metadata corresponding to the cold data needs to be obtained, it can be directly obtained through the metadata database, etc. Similarly, the data can also be divided into hot data and cold data only, the first storage path stores the data files of hot data, and the second storage path stores the data files of cold data; if the data files of cold data are not stored, a storage mark can be set, that is, when the storage mark is obtained as not stored, it is directly determined that the data file is not matched. Specifically, this solution may include using the interactive database identifier and the association relationship between the preset database identifier and the data file identifier to match the data file identifier; when the data file identifier is a first identifier, matching the file path and obtaining the data file set; when the data file identifier is a second identifier, determining that the data file is not matched, etc.
[0086] In this embodiment, by determining the path information of the data file and using the path information to obtain a data file set or determine that the data file is not matched, different data files can be controlled through different storage paths, and the metadata corresponding to the database can be quickly obtained, thereby improving the efficiency of obtaining metadata.
[0087] In one embodiment, as shown in FIG4 , the data file set is established in the following manner:
[0088] Step S221, when the memory occupied by the data files reaches a preset threshold, the data files are determined as a data file set.
[0089] In an exemplary embodiment, when the memory occupied by the data files reaches a preset threshold, determining the data files as a data file set may include determining a single data file as a data file set when the memory occupied by the data files reaches a preset threshold, etc.
[0090] Step S222: when the memory occupied by the data file does not reach a preset threshold, the data file is determined as a sub-data file, and multiple sub-data files are merged to obtain a data file set.
[0091] In an exemplary embodiment, when the memory occupied by the data files does not reach a preset threshold, the data files may be merged to obtain a data file set, etc. Specifically, the data file set may include multiple data files, etc.
[0092] In this embodiment, by merging data files that do not occupy a preset threshold in memory, it is possible to avoid increasing system pressure due to too many small files, reduce system pressure, improve system stability, and further improve metadata acquisition efficiency.
[0093] In one embodiment, the interacting with the interaction database accordingly includes:
[0094] Perform corresponding interaction on the interaction database and record interaction information of the data interaction; wherein the interaction information includes at least one of the following: interaction object, database tag, time tag, interaction request.
[0095] In an exemplary embodiment, data interaction can be recorded by starting the audit log. Specifically, the configuration file of HDFS can be modified to set the corresponding data to start the audit log, obtain the audit log data of hive, and record the file access record, operation record, permission change and other information.
[0096] In an exemplary embodiment, user access logs can be stored, and the execution SQL and corresponding tables submitted by each user can be stored in the system through interface calls. Specifically, during use, it can include first defining a data model to store log information, and the model can include necessary fields (for example, user ID, execution time, SQL statement, table name involved, etc.), then intercepting and capturing the SQL statements submitted by the user through the application layer, and finally implementing an interface that allows the user to submit SQL statements and record logs while processing these statements.
[0097] In an exemplary embodiment, by recording the interaction information of the data interaction, the interaction frequency of the database can be further obtained, and then the data can be classified into hot data (with extremely high access frequency and update frequency, belonging to the core of the business), warm data (with high access frequency but low update frequency), cold data (with almost 0 access frequency, and the data has not been accessed for a long time), etc. Specifically, hot data can be stored in a high-speed access and reliable storage medium, stable data can be stored in a storage medium with moderate performance and controllable cost, cold data can be stored in a storage medium with lower cost, etc.
[0098] In this embodiment, by recording the interaction information of the data interaction, efficient management and backtracking of the data interaction can be achieved, thereby improving the reliability of the data interaction.
[0099] In one embodiment, as shown in FIG5 , the method further includes:
[0100] Step S601: using the time stamp, determine the interaction frequency of the interaction database.
[0101] In an exemplary embodiment, the time stamp may be used to obtain the interaction frequency of the interaction database within a unit time.
[0102] Step S602: using the interaction frequency, adjusting the path information of the data file corresponding to the interaction database.
[0103] In an exemplary embodiment, data can be classified (hot data, warm data, cold data) according to the interaction frequency, and the paths of data and data files can be further adjusted. Specifically, a preset interaction threshold and frequency threshold can be set. The interaction threshold is used to consider data as cold data when the interaction frequency of data per unit time is lower than the interaction threshold; the frequency threshold is used to adjust the paths of data and data files when data with consecutive frequency threshold times are all cold data; in actual use, data with interaction frequencies that do not reach the preset interaction threshold for consecutive preset frequency threshold times can be determined as cold data, and the storage paths of cold data and corresponding data files can be adjusted.
[0104] In this embodiment, by using time stamps to obtain the interaction frequency of the database, and further adjusting the path information of the data files, it is possible to improve the efficiency of data file acquisition and further improve the reliability of data interaction by managing the path information of the data files.
[0105] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0106] Based on the same inventive concept, the embodiment of the present application also provides a data interaction device for implementing the data interaction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data interaction device embodiments provided below can refer to the limitations on the data interaction method above, and will not be repeated here.
[0107] In one embodiment, as shown in FIG6 , a data interaction device 100 is provided, comprising: an identification acquisition module 101, a file matching module 102, a metadata acquisition module 103 and a data interaction module 104, wherein:
[0108] an identification acquisition module, configured to acquire the data interaction request in response to the interaction with the target data, and determine the interaction database identification corresponding to the data interaction request according to the data interaction request;
[0109] A file matching module, used to match the data file corresponding to the interactive database according to the interactive database identifier;
[0110] A metadata acquisition module, used to acquire metadata corresponding to the interactive database from the data file when the data file is matched;
[0111] The metadata acquisition module is further used to acquire metadata corresponding to the interactive database from a preset metadata database when the data file is not matched; wherein the metadata database includes an association relationship between the database and the corresponding metadata;
[0112] A data interaction module is used to interact with the interaction database accordingly based on the metadata and using the data interaction request.
[0113] In one embodiment, the file matching module includes:
[0114] A path acquisition submodule, used to match the path information of the data file corresponding to the database identifier according to the interactive database identifier;
[0115] A file acquisition submodule, used to acquire the data file set using the path information;
[0116] The file acquisition submodule is further used to match the data file corresponding to the interactive database from the data file set using the interactive database identifier.
[0117] In one embodiment, the file acquisition submodule includes:
[0118] A file acquisition unit, configured to acquire the data file set by using the path information when the path information is the first storage path;
[0119] The file acquisition unit is further configured to determine that the data file is not matched when the path information is the second storage path.
[0120] In one embodiment, the data file set is established in the following manner:
[0121] When the memory occupied by the data files reaches a preset threshold, determining the data files as a data file set;
[0122] When the memory occupied by the data file does not reach a preset threshold, the data file is determined as a sub-data file, and a plurality of sub-data files are merged to obtain a data file set.
[0123] In one embodiment, the data interaction module further includes:
[0124] The data interaction submodule is used to interact with the interaction database and record the interaction information of the data interaction; wherein the interaction information includes at least one of the following: interaction object, database tag, time tag, interaction request.
[0125] In one embodiment, the device further comprises:
[0126] A frequency acquisition module, used to determine the interaction frequency of the interaction database using the time mark;
[0127] The path adjustment module is used to adjust the path information of the data file corresponding to the interaction database by using the interaction frequency.
[0128] Each module in the above data interaction device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0129] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store metadata. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data interaction method is implemented.
[0130] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0131] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0132] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0133] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0134] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data interaction method, characterized in that: The method comprises: In response to the interaction with the target data, the data interaction request is obtained, and according to the data interaction request, an interaction database identifier corresponding to the data interaction request is determined; According to the interactive database identifier, matching the data file corresponding to the interactive database; When the data file is matched, obtaining metadata corresponding to the interactive database from the data file; In the case where the data file is not matched, obtaining metadata corresponding to the interactive database from a preset metadata database; wherein the metadata database includes an association relationship between the database and the corresponding metadata; Based on the metadata, the data interaction request is utilized to perform corresponding interaction on the interaction database.
2. The method according to claim 1, characterized in that The matching of the data file corresponding to the interactive database according to the interactive database identifier includes: According to the interactive database identifier, matching the path information of the data file corresponding to the database identifier; Using the path information, obtaining the data file set; The interactive database identifier is used to match the data file corresponding to the interactive database from the data file set.
3. The method according to claim 2, characterized in that The step of obtaining the data file set by using the path information includes: In a case where the path information is the first storage path, obtaining the data file set by using the path information; When the path information is the second storage path, it is determined that the data file is not matched.
4. The method according to claim 2, characterized in that: The data file set is established in the following manner: When the memory occupied by the data files reaches a preset threshold, determining the data files as a data file set; When the memory occupied by the data file does not reach a preset threshold, the data file is determined as a sub-data file, and a plurality of sub-data files are merged to obtain a data file set.
5. The method according to claim 1, characterized in that The corresponding interaction with the interaction database includes: Perform corresponding interaction on the interaction database and record interaction information of the data interaction; wherein the interaction information includes at least one of the following: interaction object, database tag, time tag, interaction request.
6. The method according to claim 5, characterized in that The method further comprises: Determining the interaction frequency of the interaction database using the time stamp; The path information of the data file corresponding to the interaction database is adjusted using the interaction frequency.
7. A data interaction device, characterized in that: The device comprises: an identification acquisition module, configured to acquire the data interaction request in response to the interaction with the target data, and determine the interaction database identification corresponding to the data interaction request according to the data interaction request; A file matching module, used to match the data file corresponding to the interactive database according to the interactive database identifier; A metadata acquisition module, used to acquire metadata corresponding to the interactive database from the data file when the data file is matched; The metadata acquisition module is further used to acquire metadata corresponding to the interactive database from a preset metadata database when the data file is not matched; wherein the metadata database includes an association relationship between the database and the corresponding metadata; A data interaction module is used to interact with the interaction database accordingly based on the metadata and using the data interaction request.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data processing method and device in non-relational database
CN103577440A
Business data interaction method and device, computer equipment and storage medium
CN112506481A
File access request processing method, electronic equipment and computer program product
CN114528260A
Data processing method and device, electronic equipment and computer readable medium
CN118315005A
Data prefetching for large data systems
US20160381176A1
