Data query method and device

By identifying and converting the structured and unstructured parts of semi-structured time series data, it solves the problems of low query efficiency and metadata consistency of semi-structured time series data in the existing technology, realizes efficient data query and storage, and supports users Customized table structure enhances the flexibility of data query.

CN114860997BActive Publication Date: 2024-10-25ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210481485.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2024-10-25
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

The existing technology cannot effectively query when processing semi-structured time series data, resulting in low data query efficiency, and it is difficult to meet the accuracy and consistency requirements of metadata in a distributed storage system, resulting in data writing and query conflicts.

Method used

By receiving the client's data query request, the structured and unstructured parts of the semi-structured time series data are identified, converted into structured data, and queried and stored based on the target data structure, avoiding strict verification of metadata. and conflict issues, supporting user-defined table structures and binding relationships.

Benefits of technology

It improves the efficiency of data query, avoids the consistency problem of metadata updates and conflicts of different types of columns with the same name, supports writing of any number of column names, reduces the expansion of table structure, and enhances the flexibility of data query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860997B_ABST
    Figure CN114860997B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a data query method and device, wherein the data query method includes: receiving a data query request sent by a client, wherein the data query request carries a data query condition and a data structure of target time series data; obtaining semi-structured time series data based on the data query condition, and determining first structured data and unstructured data in the semi-structured time series data; converting the unstructured data into second structured data based on the data structure, and obtaining the target time series data based on the first structured data and the second structured data, and sending the target time series data to the client. This avoids the problem of being unable to perform queries due to the fact that the semi-structured time series data itself does not have a fixed structured format, thereby improving the efficiency of data queries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to a data query method. Background Art

[0002] With the development of computer technology and Internet of Things technology, all data in different industries can be connected to the Internet, and a large amount of data organized by time is generated every moment. These data are called time series data. In practical applications, this time series data may be semi-structured data.

[0003] In the process of querying the stored semi-structured time series data, since the semi-structured time series data itself does not have the characteristics of a fixed structured format, some query statements that require the queried data to be structured cannot be queried, such as SQL query requests, which has a relatively negative impact on the efficiency of data query. Summary of the invention

[0004] In view of this, an embodiment of the present specification provides a data query method. One or more embodiments of the present specification also relate to a data query device, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a data query method is provided, including:

[0006] Receive a data query request sent by a client, wherein the data query request carries a data query condition and a data structure of target time series data;

[0007] Obtaining semi-structured time series data based on the data query condition, and determining first structured data and unstructured data in the semi-structured time series data;

[0008] The unstructured data is converted into second structured data based on the data structure, the target time series data is obtained according to the first structured data and the second structured data, and the target time series data is sent to the client.

[0009] According to a second aspect of an embodiment of this specification, a data query device is provided, including:

[0010] A receiving module is configured to receive a data query request sent by a client, wherein the data query request carries a data query condition and a data structure of target time series data;

[0011] A query module, configured to obtain semi-structured time series data based on the data query condition, and determine first structured data and unstructured data in the semi-structured time series data;

[0012] The conversion module is configured to convert the unstructured data into second structured data based on the data structure, obtain the target time series data according to the first structured data and the second structured data, and send the target time series data to the client.

[0013] According to a third aspect of an embodiment of this specification, a computing device is provided, including:

[0014] Memory and processor;

[0015] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the data query method are implemented.

[0016] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the data query method are implemented.

[0017] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the data query method.

[0018] The data query method provided in this specification includes: receiving a data query request sent by a client, wherein the data query request carries a data query condition and a data structure of a target time series data; obtaining semi-structured time series data based on the data query condition, and determining first structured data and unstructured data in the semi-structured time series data; converting the unstructured data into second structured data based on the data structure, and obtaining the target time series data based on the first structured data and the second structured data, and sending the target time series data to the client.

[0019] Specifically, after receiving a data query request sent by a client, the method queries the semi-structured time series data based on the data query request, and converts the unstructured data in the semi-structured time series data into a second structured data, thereby obtaining the target time series data and sending it to the client. This avoids the problem of being unable to perform a query due to the fact that the semi-structured time series data itself does not have a fixed structured format, thereby improving the efficiency of data query. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a schematic diagram of an application scenario of a data query method provided by an embodiment of this specification;

[0021] Figure 2 is a flow chart of a data query method provided by an embodiment of this specification;

[0022] Figure 3 is a processing flow chart of a data query method provided by an embodiment of this specification;

[0023] Figure 4 It is a structural schematic diagram of a data query device provided by an embodiment of this specification;

[0024] Figure 5 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0025] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0026] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0027] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0028] First, the terms involved in one or more embodiments of this specification are explained.

[0029] Distributed database: A distributed database uses a distributed architecture and related technologies to organize multiple nodes into a logically unified database through a computer network.

[0030] Structured data: Structured data refers to data with a fixed format, which can generally be stored in relational data. It is usually two-dimensional data, with data in rows, each row of data contains multiple columns, and the column name and data type of each column are the same.

[0031] Semi-structured data: Semi-structured data is similar to structured data, but the data does not have a fixed structured format and does not conform to the relational model. In terms of specific performance, general data is also in rows, and each row of data contains multiple fields, but the number, name, and type of the fields are not fixed.

[0032] Time series data: Time series data refers to data with time series characteristics. Each time series consists of a set of points arranged in chronological order. Time series data often appears in scenarios such as log analysis and IoT device collection. When modeling time series data, it can be modeled as a structured model or an unstructured model depending on whether the collected fields have a fixed structure.

[0033] With the development of computer technology and Internet of Things technology, all data in different industries can be connected to the Internet, and a large amount of data organized by time is generated every moment, which is called time series data. In practical applications, the time series data can be stored in the form of tables, and table storage is a distributed multi-model data storage product provided by some Internet companies. It provides a time series model for time series data storage (the time series module can be understood as a table structure for storing time series data), and this specification provides a data query method that can be applied to the time series model of table storage.

[0034] In the time series model of Table Store, each time series data can contain the following contents:

[0035] Measurement items: such as the names of physical quantities such as temperature and humidity, or machine indicators such as CPU usage and network traffic.

[0036] Data source: defines the data source that generates time series data, such as sensor ID, device ID, etc.

[0037] Time series labels: define some labels for this time series.

[0038] Time: The time when this time series data is generated.

[0039] Data value: The data value in this time series data, which can be a single value or multiple values.

[0040] The data value can contain multiple fields. The number, name, and type of fields in each row are not restricted. Fields with the same name in different rows can also use different types. That is, the model supports the writing of semi-structured data.

[0041] At the same time, the table storage supports API interfaces and SQL statements for time series data queries. SQL statements are applicable to relational models and require that the queried data itself is structured. However, the data written by users may be semi-structured and cannot be directly queried through relational models.

[0042] Based on this, this specification provides a query solution for time series data. The solution is that the server continuously maintains the structural information of all written semi-structured data, and verifies the newly written data through this information. Specifically, the server will continuously maintain the column name and type information of the data written in a table, and dynamically update the table structure according to the written data. The general process is:

[0043] 1. The server maintains the metadata information of a time series table, including the columns in the time series table and the type of each column.

[0044] 2. The server parses the format of the time series data written by the client each time and extracts the column name and type written this time.

[0045] 3. The server uses the existing metadata information to determine which columns are newly added among the columns being written this time, and adds the newly added columns to the metadata. At the same time, it determines whether the types of some columns conflict with the types of existing columns with the same name. In this case, the write is rejected or ignored as dirty data.

[0046] For example, assume that a timing table is written with the following data in sequence:

[0047] 1. Write a row for the first time, including column A (string) and column B (string), where column A means the column name is A, and the same below.

[0048] 2. Write a row a second time, including column C (numbers).

[0049] 3. Write a row for the third time, including column A (string) and column C (string).

[0050] For the above example, in this solution, the server will continuously maintain the metadata of the time series table:

[0051] 1. After the first write, the metadata information records that the table includes two columns, A and B, both of which are string types.

[0052] 2. After the second write, it is recorded that the table contains three columns: A, B, and C, where columns A and B are string types and column C is a numeric type.

[0053] 3. When writing for the third time, the server determines that the type of data written to column C conflicts with the previous one based on the metadata information, and refuses to write.

[0054] However, this solution has the following disadvantages:

[0055] 1. This solution needs to make judgments based on the metadata information at the time of writing, and relies on the accuracy of the metadata information. When this solution is applied to a distributed storage system, it is difficult to meet this requirement.

[0056] 2. For columns with the same name but different types, the solution takes the data written first as the standard. If the later data has columns with the same name but different types, it is treated as dirty data and not stored. This strategy may cause some data to fail to be entered.

[0057] 3. Under this solution, if the client frequently writes new column names, columns will be continuously added to the table, causing the metadata to continue to expand. If the total number of columns is limited, new data may not be written after the upper limit of the number of columns is reached.

[0058] Based on this, in this specification, a data query method is provided. This specification also involves a data query device, a computing device, a computer-readable storage medium and a computer program, which are described in detail one by one in the following embodiments.

[0059] Figure 1 A schematic diagram of an application scenario of a data query method provided according to an embodiment of this specification is shown, wherein: Figure 1 The data query method provided in this specification is applied to a data query system for performing time series data query, the system includes a client and a server, and the components of the server are as follows Figure 1 As shown, it specifically includes four components: access layer service, SQL query service, storage layer service and metadata management service.

[0060] Among them, the access layer service is responsible for processing user write requests; the access layer service is deployed in the form of a distributed cluster. In actual applications, the access layer service can be implemented by one or more servers in the distributed storage system that are responsible for processing user write requests. And the user write request will be sent to any access layer server. The access layer service (access layer server) will convert the column name according to the type of data written by the user, and then write the data of the converted column name to the storage layer service for storage. Among them, converting the column name according to the type of data written by the user can be understood as determining the corresponding column name according to the type of data written by the user, so as to store the same type of data in the same column. The purpose is to avoid users writing different types of data to columns with the same name in different requests, thereby causing conflicts in column types with the same name.

[0061] Among them, SQL query service: is responsible for receiving the user's SQL query statements, parsing and executing them. In actual applications, the SQL query service can be implemented by one or more servers in the distributed storage system that are responsible for receiving the user's SQL query statements and executing query operations. Before a user performs an SQL query on a table (a time series table storing semi-structured data), he must first establish an SQL structure binding relationship for this table through the SQL query service. This SQL structure binding relationship has two binding modes (i.e. Figure 1 Two structured mapping methods in ), namely single-value model binding and multi-value model (i.e. Figure 1 User-defined bindings in multi-valued models) bindings.

[0062] After the binding relationship is established, the user can send SQL query statements to the SQL query service. The SQL query service will first obtain the SQL binding information (including table structure information) through the metadata management service, and then access the storage layer service to query and read the data.

[0063] Among them, the storage layer service is responsible for storing the data of the time series table.

[0064] Among them, the metadata management service is responsible for managing metadata such as time series table information and SQL binding information.

[0065] The data query method provided in this specification avoids the problem of user data being unable to be written by not strictly verifying the table structure when writing, and also avoids the consistency problem of metadata updates in a distributed environment. And through column name conversion, it avoids the conflict caused by different types of columns with the same name at the storage layer.

[0066] This solution supports users to customize table structures to establish binding relationships, avoiding the problem of total column name expansion in semi-structured data. At the same time, this solution can also support users to arbitrarily add or delete column names in binding relationships. In addition, the server backend can also count column names and establish bindings by default to increase ease of use.

[0067] In addition, this solution provides the function of single-value model binding. Single-value model binding can support users to write any number of column names. It is a lossless conversion method and is a good supplement to the multi-value model.

[0068] Figure 2 A flow chart of a data query method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0069] Step 202: receiving a data query request sent by a client, wherein the data query request carries a data query condition and a data structure of target time series data.

[0070] The data query request can be understood as a query request for time series data. In practical applications, the data query request can be a query statement that requires the queried data to be structured, such as an SQL query statement. The data query condition can be understood as a query condition for the target time series data, such as data in row X and column Y, data within a specific time period, etc.

[0071] The data structure can be understood as the structure corresponding to the target time series data required by the user, such as a single-value model, a multi-value model, etc. When the data structure of the target time series data is a single-value model, it indicates that the user needs to query data that meets the data query conditions and at the same time represent the queried data in the structure of a single-value model. When the data structure of the target time series data is a multi-value model, it indicates that the user needs to query data that meets the data query conditions and at the same time represent the queried data in the structure of a multi-value model. The target time series data can be understood as structured time series data.

[0072] It should be noted that the single-value model can be understood as a data structure for storing time series data, such as a two-dimensional table. In the single-value model, one time corresponds to one value. The multi-value model can be understood as a data structure for storing time series data, such as a two-dimensional table. In the multi-value model, one time can correspond to multiple values.

[0073] Specifically, the data query method provided in this specification can be applied to the server in the above data query system, and the server can receive a data query request sent by a client that carries data query conditions and a data structure containing target time series data. For example, the receiving SQL query service can receive an SQL query statement sent by a client.

[0074] Step 204: Obtain semi-structured time series data based on the data query condition, and determine the first structured data and unstructured data in the semi-structured time series data.

[0075] The first structured data can be understood as data in a structured form in the semi-structured data, for example, the primary key part in the semi-structured data. The unstructured data can be understood as data that is unstructured in the semi-structured data, for example, the data value in the semi-structured data. The data value is explained above and will not be described in detail here.

[0076] Specifically, after receiving the data query request sent by the client, the server can query the semi-structured time series data based on the data query conditions carried in the request, and determine the first structured data and the unstructured data from the semi-structured time series data.

[0077] In one embodiment provided in this specification, the SQL query service is responsible for receiving the user's SQL query statement and parsing and executing it. Before a user performs an SQL query on a table, an SQL structure binding relationship must be established for the table. There are two binding modes, namely single-value model binding and multi-value model binding. After establishing the binding relationship, the user sends the SQL statement to the SQL query service. The SQL query service will first obtain the SQL binding information (including table structure information) through the metadata management service, and then access the storage layer service, thereby providing two binding modes for semi-structured data, which can meet more scenario requirements. Single-value model binding is suitable for scenarios where the total amount of data columns in the table is very large and changeable. At this time, whether the table structure is maintained by the system or the user customizes the column name, it cannot support any number of column names, and the single-value model provides a lossless conversion method that does not affect the user's write mode while supporting structured queries. Multi-value model binding retains the user's original row mode and supports users to establish multiple binding relationships, so semi-structured data can be mapped to structured data in the form of multiple structured views. Users can establish different binding tables for the same table for different scenarios. Based on this, the method of performing data query when the binding relationship is determined is as follows.

[0078] The obtaining of semi-structured time series data based on the data query condition includes:

[0079] Acquire identification information of a data storage unit from the data query condition, wherein the data storage unit is a unit for storing the semi-structured time series data;

[0080] Determining a structured mapping model corresponding to the data storage unit based on the identification information, wherein the structured mapping model is obtained by performing a structured transformation on the data storage unit;

[0081] Based on the structured mapping model and the data query condition, the semi-structured time series data is acquired from the data storage unit.

[0082] The data storage unit can be understood as a unit for storing semi-structured time series data, such as a time series table. The data storage identifier can be understood as information that uniquely identifies a data storage unit. For example, when the data storage unit is a time series table, the identification information of the data storage unit can be understood as the name, number, ID, etc. of the time series table.

[0083] The structured mapping model can be understood as the single-value model and multi-value model mentioned above. The structured storage information can be understood as the storage location corresponding to the semi-structured time series data in the single-value model; correspondingly, the corresponding storage area in the data storage unit can be understood as the storage location of the semi-structured time series data in the time series table.

[0084] Specifically, the SQL query service obtains the identification information of the data storage unit from the data query condition, and determines the structured mapping model corresponding to the data storage unit based on the identification information, and then obtains the semi-structured time series data from the data storage unit based on the structured mapping model and the data query condition. The data storage unit is a unit for storing semi-structured time series data; the structured mapping model is obtained by performing a structured transformation on the data storage unit.

[0085] The following is an example of a data query method that maps semi-structured time series data into structured data in a distributed data storage system to support SQL query scenarios. In the process of executing SQL statements, the SQL query service first needs to parse the SQL statement sent by the user (client), and query the type of the binding based on the parsed binding table name.

[0086] When the binding type is single-value model binding, data query is performed according to the table structure of single-value binding through the query condition carried in the SQL query statement, and semi-structured data that meets the query condition is obtained from the original semi-structured table structure.

[0087] When the binding type is multi-value model binding, the table structure information customized by the user in the binding is obtained. When the SQL layer queries data through the storage layer, it concatenates the actual column name according to the column name and type and the column name conversion rules before querying.

[0088] Further, in the embodiment provided in this specification, the acquiring the semi-structured time series data from the data storage unit based on the structured mapping model and the data query condition includes:

[0089] Based on the data query condition, obtaining structured storage information corresponding to the semi-structured time series data from the structured mapping model;

[0090] Determine, according to the structured storage information, a storage area for the semi-structured time series data in the data storage unit;

[0091] The semi-structured time series data is obtained from the storage area.

[0092] The storage area can be understood as an area in the data storage unit for storing the semi-structured data; when the data storage unit is a time series table, the storage area can be understood as a row / column in the time series table storing the semi-structured time series data. When the data storage unit is a tree data structure, the storage area can be understood as a node in the tree data structure. The following is an example of an application of a data query method in a distributed data storage system to map semi-structured time series data to structured data to support SQL query scenarios. In the process of performing data query according to a single-value binding table structure, the SQL layer (i.e., SQL query service) queries the data corresponding to the query condition from the single-value model based on the query condition, the data position in the single-value model (e.g., X row and Y column in the single-value model), and reversely maps the single-value model to the original semi-structured table structure, determines the data position in the single-value model, and the corresponding position in the original semi-structured table structure, that is, converts the data position in the single-value model to the corresponding position in the semi-structured table structure. Then, data query is performed through the storage layer to obtain the semi-structured data corresponding to the query condition from the corresponding position in the semi-structured table structure.

[0093] When the binding type is multi-value model binding, the table structure information customized by the user in the binding (ie, the multi-value model) is obtained, and the semi-structured data corresponding to the query condition is obtained from the semi-structured table structure in the same manner as the multi-value model binding.

[0094] In addition, when the SQL layer queries data through the storage layer, it concatenates the actual column names according to the column names and types and the column name conversion rules before performing the query.

[0095] Furthermore, in the embodiments provided in this specification, before a user performs an SQL query on a table, an SQL structure binding relationship must be established for the table. There are two binding modes, namely single-value model binding and multi-value model binding, wherein the construction method of single-value model binding is as follows.

[0096] Before receiving the data query request sent by the client, the method further includes:

[0097] Acquire a structured area and an unstructured area in the data storage unit, wherein the structured area stores first structured data, and the unstructured area stores unstructured data;

[0098] Performing structural adjustment on the unstructured region based on a preset structured template to obtain a second structured region;

[0099] A structured mapping model corresponding to the data storage unit is generated based on the first structured region and the second structured region.

[0100] The preset structured template can be understood as a binding relationship template pre-designed by the data query system. In the process of building a single-value model binding, it can be built directly based on the preset model. For example, the preset structured model can map each column of the unstructured attribute column as a separate row, and add an additional _field_name column to represent the column name, and the other 5 columns represent column values ​​under 5 types. For details, please refer to the contents of Table 1 and Table 2 below.

[0101] The structured area can be understood as the structured part of the semi-structured time series data, for example, the primary key part in the time series table (such as Table 1); the unstructured area can be understood as the area that stores the non-structured data in the structured time series data, for example, the data value part in the time series table, or the attribute column part in Table 1.

[0102] The second structured area can be understood as an area in the time series table that stores the converted structured data after the unstructured data is converted into structured data, see the attribute column part in Table 2 below.

[0103] Using the above example, under single-value model binding, semi-structured data will be directly mapped to structured data. The rules are as follows: the primary key part itself is structured, the same as the original table structure. The attribute column part is unstructured, and the number and type of columns in each row are different. At this time, each column is mapped as a separate row, which stores the column name and value of the column. After mapping, the primary key part of each row is the same as the original row, with an additional _field_name column to represent the column name, and the other 5 columns represent the column values ​​under 5 types. Since each column is mapped to a row, the number of rows in the mapped structure will expand compared to the original data.

[0104] Specifically, the following Tables 1 and 2 show examples of constructing a single-value model, assuming that the structure in the original table is as follows:

[0105] Table 1

[0106]

[0107] Converted to a single value model, the results are as follows:

[0108] Table 2

[0109]

[0110]

[0111] Wherein, refer to Table 1 and Table 2. The primary key columns of Table 1 and Table 2 include: m_name column, data_source column, tags column and _time column. The m_name column is used to store the name of the data provider that generates the time series data. The data_source column is used to store the source of the time series data, that is, the data source; tags is used to store the time series label; and the _time column is used to store the time. The attribute columns of Table 1 and Table 2 include cpu_usr:d, cpu_sys:d, net_in:i, and net_out:i, which are columns for storing different types of data values. The _long_value, _double_value, _bool_value, _string_value, and _binary_value are columns for storing different types of data values. _field_name is an additional column in Table 2 for storing the column names in Table 1.

[0112] Furthermore, in the embodiments provided in this specification, the multi-value model binding is constructed as follows.

[0113] Before receiving the data query request sent by the client, the method further includes:

[0114] Acquire a structured area and an unstructured area in the data storage unit, wherein the structured area stores first structured data, and the unstructured area stores unstructured data;

[0115] Performing structural adjustment on the unstructured area based on the structural adjustment parameters sent by the client to obtain a second structured area;

[0116] A structured mapping model corresponding to the data storage unit is generated based on the first structured region and the second structured region.

[0117] The structural adjustment parameters sent by the client can be understood as structural adjustment parameters sent by the user to the SQL query service through the client. The structural adjustment parameters can be understood as user-defined table structure information, which includes multiple data column names and types of the table structure.

[0118] Using the above example, under multi-value model binding, the original semi-structured data is regularized into a structured two-dimensional table through user-defined column names. The rules are as follows:

[0119] The primary key column itself is structured and in the SQL binding by default. Users provide customized data column names and types and add them to the SQL binding. Columns that are not in the user-provided column set or columns that do not match the user-provided type are not visible when querying. Users can create multiple SQL bindings with different column name sets, and each binding can define a different binding table name.

[0120] Step 206: Convert the unstructured data into second structured data based on the data structure, obtain the target time series data according to the first structured data and the second structured data, and send the target time series data to the client.

[0121] The second structured data may be understood as structured data obtained by performing structured conversion on unstructured data.

[0122] In the embodiments provided in this specification, in the single-value model binding relationship, the semi-structured data obtained by the query is converted into structured data, thereby solving the problem of being unable to query due to the fact that the semi-structured time series data itself does not have a fixed structured format. The following method is used.

[0123] The converting the unstructured data into second structured data based on the data structure includes:

[0124] Determine the data type information of the unstructured data and the corresponding storage area identifier;

[0125] Determine a preset structured template corresponding to the unstructured data based on the data structure of the target time series data;

[0126] Based on the data type information and the storage area identifier, the unstructured data is converted into second structured data using a preset structured template.

[0127] Continuing with the above example, the above embodiment shows an explanation of how to construct a single-value binding relationship. Based on this, after the SQL query service queries the semi-structured time series data from the storage layer service, the semi-structured time series data is converted into structured time series data in the same way. Specifically, since the attribute column part of the semi-structured time series data is unstructured, the number and type of columns in each row are different. Therefore, referring to Table 1 and Table 2, it can be seen that based on the preset structured template, each column is mapped as a separate row, and the row stores the column name and value of the column. After mapping, the primary key part of each row is the same as the original row, and an additional _field_name column is added to represent the column name, and the other 5 columns represent the column values ​​under 5 types respectively. Thus, the attribute column part is converted into structured data. That is to say, after the SQL query service queries the semi-structured time series data, it converts the column name of the semi-structured time series data into a single column according to the preset structured template, that is, _field_name in Table 2. Afterwards, according to the data type information of the semi-structured time series data, the semi-structured time series data is filled into the corresponding column in the preset structured template, so as to obtain structured data.

[0128] Furthermore, in the multi-value model binding relationship, the semi-structured data obtained by the query is converted into structured data, thereby solving the problem that the query cannot be performed due to the fact that the semi-structured time series data itself does not have a fixed structured format. The following method is used.

[0129] The converting the unstructured data into second structured data based on the data structure includes:

[0130] Determine the data type information of the unstructured data and the corresponding storage area identifier;

[0131] Determining a structured adjustment parameter sent by the client and corresponding to the data structure;

[0132] Based on the data type information and the storage area identifier, the unstructured data is converted into second structured data using the structured adjustment parameter.

[0133] Specifically, in the process of converting the unstructured data into the second structured data, the data type information of the unstructured data and the storage area identifier corresponding to the unstructured data are first determined. Then, based on the data structure carried in the data query request, the corresponding structured adjustment parameter sent by the client is determined.

[0134] A target structured area (for example, a structured table structure) is constructed based on the structured adjustment parameters. Then, according to the data type information of the unstructured data and the corresponding storage area identifier, the unstructured data is filled into the target structured area to obtain the second structured data, thereby realizing the conversion of the unstructured data into the second structured data.

[0135] Using the above example, the above embodiment shows an explanation of how to construct a multi-value binding relationship. Based on this, after the SQL query service queries the semi-structured time series data from the storage layer service, the semi-structured time series data is converted into structured time series data in the same way. That is, the semi-structured time series data is customized by the user.

[0136] That is to say, after querying the semi-structured time series data, the SQL query service fills the semi-structured time series data into the customized table structure according to the user-defined table structure (i.e., the target structured area) and the data type information and column name of the semi-structured time series data, thereby obtaining structured data.

[0137] In addition, when building a multi-value model binding, users can provide customized data column names and types and add them to the SQL binding. Columns that are not in the user-provided column set or columns that do not match the user-provided type will not be visible during query.

[0138] Based on this, when the table structure information customized by the user in the binding is obtained for data query, semi-structured data can be obtained, and the semi-structured data can be adjusted to structured data based on the user-defined table structure information, thereby converting part of the attribute column into structured data.

[0139] Further, in the embodiment provided in this specification, obtaining the target time series data according to the first structured data and the second structured data includes:

[0140] Determining corresponding third structured data for the second structured data from the first structured data, wherein the third structured data is data included in the first structured data;

[0141] The target time series data is generated based on the second structured data and the corresponding first structured data.

[0142] The third structured data may be a part of the first structured data, or may be all of the first structured data.

[0143] Using the above example, after converting the attribute columns into structured data, the attribute columns may increase or decrease. Therefore, if the attribute columns increase, the corresponding primary key content needs to be determined from the primary key columns to facilitate subsequent queries. If the attribute columns decrease, the primary keys without corresponding attribute columns need to be deleted to release storage resources.

[0144] Furthermore, the data query method provided in this specification also includes content for storing data. Specifically,

[0145] Before receiving the data query request sent by the client, the method further includes:

[0146] Receiving a data storage request sent by the client, wherein the data storage request carries semi-structured time series data and identification information of a data storage unit corresponding to the semi-structured time series data;

[0147] Determine the data storage unit based on the identification information, and determine a storage area identifier in the data storage unit based on the data type information of the semi-structured time series data;

[0148] A storage area corresponding to the storage area identifier is determined from the data storage unit, and the semi-structured time series data is stored in the storage area.

[0149] The data storage request can be understood as a request to write data to the storage layer service, that is, a data write request, and the storage area identifier can be understood as a column name of the time series table. Data type information includes but is not limited to INTEGER, BOOL, DOUBLE, STRING, BINARY, etc.

[0150] Using the above example, the user write process includes: the client sends a write request to the access layer service, the access layer service determines the data type of the time series data written by the user, and performs list conversion based on the data type information. The purpose of the conversion is to avoid the user writing different types of data for the same-name column in different requests, which will cause a conflict in the type of the same-name column.

[0151] After completing the column name conversion, the access layer service determines the timing table that stores the timing data based on the timing table name carried in the write request, and determines the rows and columns corresponding to the timing data according to the column name obtained by the conversion, and stores the timing data written by the user in the corresponding rows and columns of the timing table.

[0152] In addition, the converted column names are used by the internal SQL query layer to interact with the storage layer, which is hidden from the user. The access layer sends the converted data to the storage layer service, and the storage layer stores it according to the converted column names.

[0153] In one embodiment provided in this specification, the process of column name conversion performed by the access layer service is as follows.

[0154] The determining, based on the data type information of the semi-structured time series data, a storage area identifier in the data storage unit includes:

[0155] Determine a conversion rule corresponding to the data type information and the storage area identifier in the data storage unit;

[0156] Determine data type information of the semi-structured time series data, and determine a storage area identifier corresponding to the data type information according to the conversion rule.

[0157] The conversion rule can be understood as an access layer column name conversion rule. See Table 3 below, which shows the specific content of the access layer column name conversion rule.

[0158] Table 3

[0159]

[0160] Among them, col_name:i, col_name:B, col_name:d, col_name:s, and col_name:b in Table 3 can be understood as the column names of the time series table.

[0161] Using the above example, the access layer service will determine the type of data written by the user, and determine the column name corresponding to the type based on the access layer column name conversion rules, thereby converting the column name written by the user according to the type.

[0162] In addition, in one embodiment provided in this specification, the column name conversion rules in this solution are essentially to avoid conflicts between data with the same column name but different types, and this function can also be implemented by the storage layer. At this time, the storage layer needs to support writing multiple types of data in the same column, and also support reading data according to the column name and specified type. And the multi-value model binding in this solution can also automatically count and update the table structure through the server, establish a default binding structure and automatically update it, and also support users to perform additional binding and modification.

[0163] The data query method provided in this specification, after receiving a data query request sent by a client, queries semi-structured time series data based on the data query request, and converts unstructured data in the semi-structured time series data into second structured data, thereby obtaining the target time series data and sending it to the client. This avoids the problem of being unable to query due to the fact that the semi-structured time series data itself does not have a fixed structured format, and improves the efficiency of data query.

[0164] The following combination Figure 3 , taking the application of the data query method provided in this specification in the time series data query scenario as an example, the data query method is further described. Figure 3 A processing flow chart of a data query method provided by an embodiment of the present specification is shown. The data query method is applied to a data query system, which includes a client and a server consisting of an access layer service, an SQL query service, a storage layer service, and a metadata management service.

[0165] Step 302: The client sends a write request to the access layer service.

[0166] Step 304: The access layer service determines the data carried in the write request, and determines a corresponding column name for the data according to the type of the data.

[0167] Step 306: The access layer service sends the data after column name conversion to the storage layer service.

[0168] Step 308: The storage layer stores the data into the time series table according to the converted column names.

[0169] Step 310: Before performing data query, the SQL query service constructs an SQL structure binding relationship for the time series table.

[0170] SQL query service, before performing SQL query on a time series table, you must first establish an SQL structure binding relationship for this table. This SQL structure binding relationship has two binding modes, namely single-value model binding and multi-value model binding.

[0171] Among them, the construction process of single-value model binding is:

[0172] 1. The SQL query service obtains the time series table information from the metadata management service;

[0173] 2. Since the primary key part of the time series table is structured and the attribute column part is unstructured, for the attribute column part, each column in the attribute column part is mapped as a separate row through the structured mapping rules pre-set by the system, and the row stores the column name and value of the column. After mapping, the primary key part of each row is the same as the original row (the primary key part in the original time series table), and an additional _field_name column is added to indicate the column name, and the other 5 columns represent the column values ​​under 5 types respectively.

[0174] 3. After completing the mapping, the SQL query service binds the single-value mapping table to the original time series table to build an SQL structure binding relationship, and stores the single-value mapping table to the metadata management service.

[0175] Among them, the construction process of the multi-value model binding is:

[0176] 1. The SQL query service obtains the time series table information from the metadata management service;

[0177] 2. The SQL query service receives multiple customized data column names and types sent by the user;

[0178] 3. Since the primary key part of the time series table is structured and the attribute column part is unstructured, for the attribute column part, each column (semi-structured data) in the attribute column part is organized into a structured two-dimensional table through multiple data column names and types defined by the user, thereby obtaining a multi-value mapping table.

[0179] 4. After completing the mapping, the SQL query service binds the multi-value mapping table to the original time series table to build an SQL structure binding relationship, and stores the multi-value mapping table to the metadata management service.

[0180] Step 312: The user sends an SQL query statement to the SQL query service through the client, and specifies the type of SQL structure binding relationship.

[0181] Step 314: The SQL query service receives the user's SQL query statement and parses and executes it.

[0182] The SQL query service parses the user's SQL statement and obtains the binding table name and the type of binding relationship specified by the user.

[0183] If it is single-value model binding, data query is performed according to the table structure of single-value binding.

[0184] Specifically, the SQL query service obtains the time series table information corresponding to the table name and the single value mapping table corresponding to the time series table from the metadata management service.

[0185] The single-value mapping table is queried through the query condition in the SQL query statement to obtain the mapping position of the time series data corresponding to the query condition in the single-value mapping table.

[0186] Reversely map the single-value model to the original semi-structured table structure, determine the location information of the mapping position in the original time series table, and obtain the unstructured time series data corresponding to the location information from the original time series table through the storage layer service.

[0187] If it is multi-value model binding, data query is performed according to the table structure of multi-value binding.

[0188] Specifically, the SQL query service obtains the time series table information corresponding to the table name and the multi-value mapping table corresponding to the time series table from the metadata management service.

[0189] The multi-value mapping table is queried through the query condition in the SQL query statement to obtain the mapping position of the time series data corresponding to the query condition in the multi-value mapping table.

[0190] The multi-value model is reversely mapped to the original semi-structured table structure, and the position information of the mapping position in the original time series table is determined. The unstructured time series data corresponding to the position information is obtained from the original time series table through the storage layer service.

[0191] Step 316: The SQL query service converts the unstructured time series data obtained from the storage layer service into structured time series data.

[0192] Specifically, in the case of single-value model binding,

[0193] The SQL query service determines the attribute columns in the unstructured time series data, and based on the above step of building a single-value binding relationship, maps each column in the attribute column part as a separate row, thereby obtaining structured time series data.

[0194] In case of multi-value model binding,

[0195] The SQL query service determines the attribute columns in the unstructured time series data, and based on the above step of building a multi-value binding relationship, maps each column in the attribute column part to structured time series data through the user-defined data column name and type provided by the user.

[0196] Step 318: The SQL query service sends the structured time series data to the client.

[0197] Based on this, the data query method provided in this specification, through the three functions of column name conversion, single-value model mapping, and user-defined multi-value model binding, completes the function of mapping semi-structured time series data into structured data and providing SQL query, and provides users with rich freedom.

[0198] At the same time, two binding modes are provided for semi-structured data to meet the needs of more scenarios. Single-value model binding is suitable for scenarios where the total number of data columns in the table is very large and changeable. At this time, whether the table structure is maintained by the system or the column names are customized by the user, it is impossible to support as many column names as possible. The single-value model provides a lossless conversion method that does not affect the user's write mode while supporting structured queries. Multi-value model binding retains the user's original row mode and supports users to establish multiple binding relationships. Therefore, semi-structured data can be mapped to structured data in the form of multiple structured views. Users can establish different binding tables for the same table for different scenarios.

[0199] In addition, the storage layer service does not limit the total number of columns in the table, so there is no restriction on data with the same column name but different types. Instead, the storage layer is chosen to be compatible. This solution uses the method of internal column name conversion for different types of data. The converted column names are hidden inside the system and are not visible to users. The SQL query layer accesses the data in the storage layer through column name mapping, which improves the efficiency of data query.

[0200] Corresponding to the above method embodiment, this specification also provides a data query device embodiment, Figure 4 FIG. 1 shows a schematic diagram of a data query device provided by an embodiment of the present specification. Figure 4 As shown, the device comprises:

[0201] The receiving module 402 is configured to receive a data query request sent by a client, wherein the data query request carries a data query condition and a data structure of target time series data;

[0202] A query module 404 is configured to obtain semi-structured time series data based on the data query condition, and determine first structured data and unstructured data in the semi-structured time series data;

[0203] The conversion module 406 is configured to convert the unstructured data into second structured data based on the data structure, obtain the target time series data according to the first structured data and the second structured data, and send the target time series data to the client.

[0204] Optionally, the data query device further includes a data storage module configured to:

[0205] Receiving a data storage request sent by the client, wherein the data storage request carries semi-structured time series data and identification information of a data storage unit corresponding to the semi-structured time series data;

[0206] Determine the data storage unit based on the identification information, and determine a storage area identifier in the data storage unit based on the data type information of the semi-structured time series data;

[0207] A storage area corresponding to the storage area identifier is determined from the data storage unit, and the semi-structured time series data is stored in the storage area.

[0208] Optionally, the data storage module is further configured to:

[0209] Determine a conversion rule corresponding to the data type information and the storage area identifier in the data storage unit;

[0210] Determine data type information of the semi-structured time series data, and determine a storage area identifier corresponding to the data type information according to the conversion rule.

[0211] Optionally, the query module 404 is further configured to:

[0212] Acquire identification information of a data storage unit from the data query condition, wherein the data storage unit is a unit for storing the semi-structured time series data;

[0213] Determining a structured mapping model corresponding to the data storage unit based on the identification information, wherein the structured mapping model is obtained by performing a structured transformation on the data storage unit;

[0214] Based on the structured mapping model and the data query condition, the semi-structured time series data is acquired from the data storage unit.

[0215] Optionally, the query module 404 is further configured to:

[0216] Based on the data query condition, obtaining structured storage information corresponding to the semi-structured time series data from the structured mapping model;

[0217] Determine, according to the structured storage information, a storage area for the semi-structured time series data in the data storage unit;

[0218] The semi-structured time series data is obtained from the storage area.

[0219] Optionally, the data query device further includes a model building module configured to:

[0220] Acquire a structured area and an unstructured area in the data storage unit, wherein the structured area stores first structured data, and the unstructured area stores unstructured data;

[0221] Performing structural adjustment on the unstructured region based on a preset structured template to obtain a second structured region;

[0222] A structured mapping model corresponding to the data storage unit is generated based on the first structured region and the second structured region.

[0223] Optionally, the model building module is further configured to:

[0224] Acquire a structured area and an unstructured area in the data storage unit, wherein the structured area stores first structured data, and the unstructured area stores unstructured data;

[0225] Performing structural adjustment on the unstructured area based on the structural adjustment parameters sent by the client to obtain a second structured area;

[0226] A structured mapping model corresponding to the data storage unit is generated based on the first structured region and the second structured region.

[0227] Optionally, the conversion module 406 is further configured to:

[0228] Determine the data type information of the unstructured data and the corresponding storage area identifier;

[0229] Based on the data structure of the target time series data, determining a preset structured template corresponding to the unstructured data;

[0230] Based on the data type information and the storage area identifier, the unstructured data is converted into second structured data using a preset structured template.

[0231] Optionally, the conversion module 406 is further configured to:

[0232] Determine the data type information of the unstructured data and the corresponding storage area identifier;

[0233] Determining a structured adjustment parameter sent by the client and corresponding to the data structure;

[0234] Based on the data type information and the storage area identifier, the unstructured data is converted into second structured data using the structured adjustment parameter.

[0235] Optionally, the conversion module 406 is further configured to:

[0236] Determining corresponding third structured data for the second structured data from the first structured data, wherein the third structured data is data included in the first structured data;

[0237] The target time series data is generated based on the second structured data and the corresponding first structured data.

[0238] The data query device provided in this specification, after receiving the data query request sent by the client, queries the semi-structured time series data based on the data query request, and converts the unstructured data in the semi-structured time series data into the second structured data, thereby obtaining the target time series data and sending it to the client. This avoids the problem of being unable to query due to the fact that the semi-structured time series data itself does not have a fixed structured format, and improves the efficiency of data query.

[0239] The above is a schematic scheme of a data query device of this embodiment. It should be noted that the technical scheme of the data query device and the technical scheme of the above data query method belong to the same concept, and the details not described in detail in the technical scheme of the data query device can be referred to the description of the technical scheme of the above data query method.

[0240] Figure 5 The structure block diagram of a computing device 500 provided according to an embodiment of the present specification is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.

[0241] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0242] In one embodiment of the present specification, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0243] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 500 may also be a mobile or stationary server.

[0244] The processor 520 is used to execute the following computer executable instructions, which, when executed by the processor 520, implement the steps of the above-mentioned data query method.

[0245] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above data query method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above data query method.

[0246] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above-mentioned data query method when executed by a processor.

[0247] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above data query method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above data query method.

[0248] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned data query method.

[0249] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above data query method belong to the same concept, and the details of the technical scheme of the computer program that are not described in detail can be found in the description of the technical scheme of the above data query method.

[0250] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0251] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0252] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0253] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0254] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A data query method, comprising: Receive a data query request sent by a client, wherein the data query request carries a data query condition and a data structure of target time series data; Obtaining semi-structured time series data based on the data query condition, and determining first structured data and unstructured data in the semi-structured time series data; The unstructured data is converted into second structured data based on the data structure, the target time series data is obtained according to the first structured data and the second structured data, and the target time series data is sent to the client.

2. The data query method according to claim 1, before receiving the data query request sent by the client, further comprising: Receiving a data storage request sent by the client, wherein the data storage request carries semi-structured time series data and identification information of a data storage unit corresponding to the semi-structured time series data; Determine the data storage unit based on the identification information, and determine a storage area identifier in the data storage unit based on the data type information of the semi-structured time series data; A storage area corresponding to the storage area identifier is determined from the data storage unit, and the semi-structured time series data is stored in the storage area.

3. The data query method according to claim 2, wherein determining the storage area identifier in the data storage unit based on the data type information of the semi-structured time series data comprises: Determine a conversion rule corresponding to the data type information and the storage area identifier in the data storage unit; Determine data type information of the semi-structured time series data, and determine a storage area identifier corresponding to the data type information according to the conversion rule.

4. The data query method according to claim 1, wherein obtaining semi-structured time series data based on the data query condition comprises: Acquire identification information of a data storage unit from the data query condition, wherein the data storage unit is a unit for storing the semi-structured time series data; Determining a structured mapping model corresponding to the data storage unit based on the identification information, wherein the structured mapping model is obtained by performing a structured transformation on the data storage unit; Based on the structured mapping model and the data query condition, the semi-structured time series data is acquired from the data storage unit.

5. The data query method according to claim 4, wherein the step of acquiring the semi-structured time series data from the data storage unit based on the structured mapping model and the data query condition comprises: Based on the data query condition, obtaining structured storage information corresponding to the semi-structured time series data from the structured mapping model; Determine, according to the structured storage information, a storage area for the semi-structured time series data in the data storage unit; The semi-structured time series data is obtained from the storage area.

6. The data query method according to claim 4, before receiving the data query request sent by the client, further comprising: Acquire a structured area and an unstructured area in the data storage unit, wherein the structured area stores first structured data, and the unstructured area stores unstructured data; Performing structural adjustment on the unstructured region based on a preset structured template to obtain a second structured region; A structured mapping model corresponding to the data storage unit is generated based on the first structured region and the second structured region.

7. The data query method according to claim 4, before receiving the data query request sent by the client, further comprising: Acquire a structured area and an unstructured area in the data storage unit, wherein the structured area stores first structured data, and the unstructured area stores unstructured data; Performing structural adjustment on the unstructured area based on the structural adjustment parameters sent by the client to obtain a second structured area; A structured mapping model corresponding to the data storage unit is generated based on the first structured region and the second structured region.

8. The data query method according to claim 1, wherein converting the unstructured data into second structured data based on the data structure comprises: Determine the data type information of the unstructured data and the corresponding storage area identifier; Based on the data structure of the target time series data, determining a preset structured template corresponding to the unstructured data; Based on the data type information and the storage area identifier, the unstructured data is converted into second structured data using a preset structured template.

9. The data query method according to claim 1, wherein converting the unstructured data into second structured data based on the data structure comprises: Determine the data type information of the unstructured data and the corresponding storage area identifier; Determining a structured adjustment parameter sent by the client and corresponding to the data structure; Based on the data type information and the storage area identifier, the unstructured data is converted into second structured data using the structured adjustment parameter.

10. The data query method according to claim 1, wherein obtaining the target time series data according to the first structured data and the second structured data comprises: Determining corresponding third structured data for the second structured data from the first structured data, wherein the third structured data is data included in the first structured data; The target time series data is generated based on the second structured data and the corresponding first structured data.

11. A data query device, comprising: A receiving module is configured to receive a data query request sent by a client, wherein the data query request carries a data query condition and a data structure of target time series data; A query module, configured to obtain semi-structured time series data based on the data query condition, and determine first structured data and unstructured data in the semi-structured time series data; The conversion module is configured to convert the unstructured data into second structured data based on the data structure, obtain the target time series data according to the first structured data and the second structured data, and send the target time series data to the client.

12. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the data query method according to any one of claims 1 to 10 are implemented.

13. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the data query method according to any one of claims 1 to 10.