CN117033402A - Data access method, device, equipment and storage medium - Google Patents

Data access method, device, equipment and storage medium Download PDF

Info

Publication number
CN117033402A
CN117033402A CN202311083779.3A CN202311083779A CN117033402A CN 117033402 A CN117033402 A CN 117033402A CN 202311083779 A CN202311083779 A CN 202311083779A CN 117033402 A CN117033402 A CN 117033402A
Authority
CN
China
Prior art keywords
data
target
columns
request
column
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311083779.3A
Other languages
Chinese (zh)
Inventor
靳峥
陈振强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Transwarp Technology Shanghai Co Ltd
Original Assignee
Transwarp Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Transwarp Technology Shanghai Co Ltd filed Critical Transwarp Technology Shanghai Co Ltd
Priority to CN202311083779.3A priority Critical patent/CN117033402A/en
Publication of CN117033402A publication Critical patent/CN117033402A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data access method, a device, equipment and a storage medium. The method comprises the following steps: acquiring a data access request, wherein the data access request comprises case sensitive attribute information; accessing an accompanying column and a non-accompanying column in a data table according to a data access request under the condition that the case sensitive attribute information is case insensitive, wherein the accompanying column is used for storing case unified data corresponding to a target data column; the non-accompanying columns are used for storing the original data, and the functions of the case insensitive semantics of the multimode database are realized by analyzing and processing the case insensitive semantics in the engine.

Description

Data access method, device, equipment and storage medium
Technical Field
The present invention relates to the field of database technologies, and in particular, to a data access method, apparatus, device, and storage medium.
Background
A multimodal database is a database capable of supporting processing a mixture of multiple data patterns, which may include, for example: relationships, key values, documents, relationships, graphs, time sequences, etc., provide a better solution for heterogeneous data. The case sensitive or case insensitive approach may be chosen for accessing most of the character type data in the database.
The function of the relational database for realizing the insensitivity of the case of the data value is generally realized by performing case insensitivity analysis on a storage end or converting the column value into the lower case by using a function. However, in our multimode database architecture, storage and databases of other systems need to be interfaced, so that case-insensitive parsing and computation of data cannot be realized on storage. Processing data by a case insensitive semantic through a case transfer function at the engine level can result in filtering conditions that cannot be performed efficiently, resulting in poor performance of the multi-modal database.
Disclosure of Invention
The invention provides a data access method, a device, equipment and a storage medium, which are used for solving the problem that the case insensitive semantics of data cannot be effectively realized for a heterogeneous storage multimode database.
According to an aspect of the present invention, there is provided a data access method applied to an engine of a multimode database, the method comprising:
acquiring a data access request; the data access request comprises case sensitive attribute information;
accessing an associated column and a non-associated column in a data table according to the data access request under the condition that the case sensitive attribute information is case insensitive; the accompanying columns are used for storing the unified data of the case and the case corresponding to the target data columns; the non-associated columns are used to store the raw data.
According to another aspect of the present invention, there is provided a data access apparatus for use with an engine of a multi-mode database, the apparatus comprising:
the request acquisition module is used for acquiring a data access request; the data access request comprises case sensitive attribute information;
the data access module is used for accessing the accompanying columns and the non-accompanying columns in the data table according to the data access request under the condition that the case sensitive attribute information is case insensitive; the accompanying columns are used for storing the unified data of the case and the case corresponding to the target data columns; the non-associated columns are used to store the raw data.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data access method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a data access method according to any one of the embodiments of the present invention.
According to the technical scheme, the data access request is obtained, and the data access request comprises case sensitive attribute information; accessing an associated column and a non-associated column in a data table according to the data access request under the condition that the case sensitive attribute information is case insensitive, wherein the associated column is used for storing case unified data corresponding to a target data column; the non-associated columns are used for storing the original data, and the problem that filtering conditions cannot be effectively executed due to the fact that case insensitive semantics of the data are processed through a case conversion function in an engine layer is solved through resolving and processing the case insensitive semantics in the engine, and the case insensitive semantics of the multi-mode database are achieved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data access method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a data access method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data access device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a data access method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," "original," and "target," and the like in the description and claims of the present invention and in the above-described drawings, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a data access method according to an embodiment of the present invention, where the method may be performed by a data access device, which may be implemented in hardware and/or software, and the data access device may be configured in an electronic device, where the case insensitive function is implemented on a multimode database. As shown in fig. 1, the method includes:
s110, acquiring a data access request; the data access request includes case sensitive attribute information.
Where a data access request refers to a request for accessing data stored in a storage tier of a multimodal database. The data access request includes: case sensitive attribute information. The case sensitive attribute information is used for representing case sensitive semantics of the access data, namely whether the access data is case sensitive or not; case sensitive attribute information may include: case sensitive and case insensitive. Optionally, the data access request may include: data insertion requests, data query requests, data update requests, data packet requests, data association requests, and data ordering requests, etc.
In this embodiment, an engine of the multimode database obtains a data access request, analyzes the data access request, and obtains case sensitive attribute information and a data access instruction. Whether the data access instruction is case sensitive or not can be controlled by configuring case sensitive attribute information. The configuration mode of the case sensitive attribute information can be set according to the requirement of a user, for example, the case sensitive attribute information is set to be case sensitive in a default state; case sensitive attribute information may also be set to case insensitive according to parameter configuration.
Illustratively, the initial data access statement may be an initial data access statement, and the case sensitive attribute information is an access parameter in the initial data access statement; or acquiring the initial data access statement and the case sensitive attribute information, and generating a data access request in a data packet format according to the initial data access statement and the case sensitive attribute information.
S120, accessing an accompanying column and a non-accompanying column in a data table according to a data access request under the condition that the case sensitive attribute information is case insensitive; the companion column is used for storing the case unified data of the target data column; the non-associated columns are used to store the raw data.
Wherein, a data table is stored in a data storage layer of the multimode database, and the data table comprises a non-associated type and an associated column. The non-associated column is used for storing original data, and the non-associated column contains a target data column which is used for storing accessed target data, such as a main key; the accessed target data may contain both uppercase and lowercase data. The accompanying columns are used for storing the case unified data of the target data columns, and the case unified data can be unified into high-writing data or low-writing data.
In this embodiment, when determining that the case sensitive attribute information of the data access request is case insensitive, the engine of the multimode database pushes the data access request down to the data storage layer of the multimode database, accesses the data of the accompanying column corresponding to the target data column in the data table, realizes screening of the data, and accesses the data stored in the non-accompanying column according to the screening result.
Therefore, the engine of the multimode database is used for accessing the unified data of the case and the upper case in the associated column in the data storage layer according to the acquired data access request to screen the data, and accessing the original data stored in the non-associated column by the screened data, so that the data access of the multimode database is insensitive to the case and the upper case.
In the data query and display, the information of the associated column is not displayed to the user, and only the information of the non-associated column is displayed. At the same time, the introduction of companion columns has no direct impact on the transaction. The companion column provides just one auxiliary column for implementing case insensitive semantics. The isolation level, lock mechanism and concurrency control of the transaction still apply to the non-companion column and companion column.
In an alternative embodiment of the present invention, before the data access request is acquired, the method further includes: acquiring a data creation request; creating a data table containing a target data column in a storage layer of the multimode database according to the data creation request; and adding an associated column corresponding to the target data column in the data table.
Wherein the data creation request refers to a request for creating data in a storage layer of the multimodal database.
In this embodiment, before accessing data stored in a storage layer in the multimode database, a data table storing a target data column needs to be created in the database, and an associated column is created in the data table for storing case unified data corresponding to the target data column.
Illustratively, the acquired data creation request may be: create table student (id int, name varchar (10)); the engine of the database creates a data table student (id int, name varchar (10)), namely, an associated column name __ ci varchar (10) is added to the last column of the data table, and is used for storing lower case data corresponding to the target data column name varchar (10).
Optionally, after adding an associated column corresponding to the target data column in the data table, the method further includes: the same index as the target data column is created on the companion column.
In the present embodiment, when an index is created on a data table, if an index is created on a target data column of the data table, the same index is also created synchronously on the accompanying column. By creating an index on the companion column, the performance of case insensitive comparisons of queries based on the target data columns can be improved. Further, by using a combined index, the companion column can also be combined with other columns to support more complex query requirements.
According to the embodiment of the invention, the accompanying columns corresponding to the target data columns are created in the data layer in the multimode database and are used for storing the unified data of the upper and lower cases of the target data columns, so that when an engine of the multimode database acquires a data access request for requesting to access the target data columns, data screening can be realized according to the accompanying columns corresponding to the target data columns and the original data stored in the non-accompanying columns by the screened data are accessed, and the data access of the multimode database is insensitive to the upper and lower cases.
According to the technical scheme, the data access request is obtained, and the data access request comprises case sensitive attribute information; accessing an associated column and a non-associated column in a data table according to the data access request under the condition that the case sensitive attribute information is case insensitive, wherein the associated column is used for storing case unified data corresponding to a target data column; the non-accompanying columns are used for storing the original data, and the stored heterogeneity is shielded by analyzing and processing the case insensitive semantics in the engine, so that the function of the case insensitive semantics of the multimode database is realized.
Example two
Fig. 2 is a flowchart of a data access method according to a second embodiment of the present invention, where the data access request process in the foregoing embodiment is further defined, and the data access request includes: data insertion requests, data query requests, data update requests, data packet requests, data association requests, and data ordering requests.
As shown in fig. 2, the method includes:
s210, acquiring a data access request; the data access request includes case sensitive attribute information.
S220, generating a target data access statement according to the initial data access statement contained in the data access request under the condition that the case sensitive attribute information is case insensitive.
Wherein the initial data access statement is a statement instruction requesting access to data in the data storage layer without considering case sensitive attribute information.
S230, accessing the accompanying columns corresponding to the target data columns in the data table according to the target data access statement to obtain target data, and accessing the original data in the non-accompanying columns corresponding to the target data.
In this embodiment, the case insensitive semantics of the data are implemented due to the need to access the companion column. Therefore, it is necessary to convert the initial data access statement into the target data access statement. Accessing an associated column corresponding to a target data column in the data table according to the target data access statement to obtain target data, and screening the data based on the unified data of the upper and lower cases in the associated column; accessing original data in a non-associated column corresponding to the target data; and realizing the access to the case insensitive semantics of the data table.
In a first optional embodiment of the present invention, accessing, according to the target data access statement, an accompanying column corresponding to a target data column in a data table to obtain target data, and accessing original data in a non-accompanying column corresponding to the target data may include: and under the condition that the data access request is a data insertion request, inserting unified data with the case corresponding to the target insertion data into the associated column corresponding to the target data column according to a target data insertion statement, and inserting the target insertion data into the target data column in the data table.
The target data insertion statement is obtained by optimizing an initial data insertion statement in a data access request by an engine of the multimode database and is used for realizing the data insertion statement under case insensitive semantics.
In this embodiment, when inserting data based on the case insensitivity, it is necessary to insert target insertion data in the target data column in the data table in addition to the case unification data corresponding to the target insertion data in the associated column corresponding to the target data column according to the target data insertion statement.
The method for inserting the unified data with the case corresponding to the target insertion data in the associated column corresponding to the target data column according to the target data insertion statement may be as follows: for example, the initial data insertion statement may be: "insert into student select '1', 'TDH' from real", the engine of the multimodal database can supplement the associated column name __ ci with a lower (name) expression to optimize the initial data insertion statement to a target data insertion statement, such as: "insert into student select '1', 'TDH', 'TDH' from dual; ", thereby inserting the target insert data into the target data column in the data storage layer, and inserting the lower case data corresponding to the target insert number into the associated column in the data storage layer.
In a second optional embodiment of the present invention, accessing, according to the target data access statement, an accompanying column corresponding to a target data column in a data table to obtain target data, and accessing original data in a non-accompanying column corresponding to the target data may include: and under the condition that the data access request is a data query request, screening the unified data with the upper and lower cases stored in the accompanying columns according to a target data query statement to obtain target query data, and returning the original data in the non-accompanying columns corresponding to the target query data.
The target data query statement is obtained by optimizing an initial data query statement in a data access request by an engine of the multimode database and is used for realizing the data query statement under case insensitive semantics.
In this embodiment, when querying data based on the case insensitivity, the initial data query statement may be: the engine of the multimodal database may optimize the initial data query statement to a target data query statement, such as "select from student_grade name __ ci= 'Tdh'". Therefore, an engine of the multimode database can push down a filtering condition ' name __ ci= ' tdh ' of the associated column to a data storage layer, and the data storage layer is subjected to case unified data screening, so that target query data with unified cases is finally obtained; and returning the original data in the non-associated columns corresponding to the target query data. The associated column stores the case unified data, which is not presented to the user, but the original data of the target query data in the non-associated column.
In a third optional implementation of the embodiment of the present invention, accessing, according to the target data access statement, an accompanying column corresponding to a target data column in a data table to obtain target data, and accessing original data in a non-accompanying column corresponding to the target data may include: and under the condition that the data access request is a data update request, updating the accompanying columns according to the unified data of the case of the target update data in the target data update statement, and updating the target data columns in the non-accompanying columns according to the target update data.
The target data updating statement is obtained by optimizing an initial data updating statement in a data access request by an engine of the multimode database and is used for realizing the data updating statement under the condition of insensitive semantics of case and case.
In the present embodiment, when updating data based on the case insensitivity, it is assumed that there is another data table: "create table newStudent (id int, name varchar (10) casespecific)", then update the initial data update statement according to the id association may be: "update student a set name = (select name from newStudent b where a.id=b.id); "; the engine of the multimodal database may optimize the initial data update statement to a target data update statement, such as update student a set (name, name __ ci) = (select name, lower (name) from newStudent b where a.id=b.id) ", update the target data column in the companion column with target update data, update the companion column with lower case data of the target update data.
In a fourth optional implementation of the embodiment of the present invention, accessing, according to the target data access statement, an accompanying column corresponding to a target data column in a data table to obtain target data, and accessing original data in a non-accompanying column corresponding to the target data may include: and under the condition that the data access request is a data grouping request, grouping the data in the accompanying columns according to a target data grouping statement to obtain target grouping data, and returning the original data in the non-accompanying columns corresponding to the target grouping data.
The target data packet statement is obtained by optimizing an initial data packet statement in a data access request by an engine of the multimode database and is used for realizing the data packet statement under case insensitive semantics.
In this embodiment, when data is grouped based on the case insensitivity, the initial data packet statement may be: "select name from student group by name", the engine of the multimodal database can optimize the initial data packet statement to a target data packet statement, such as "select name __ ci from student group by name __ ci". The method comprises the steps of grouping data in associated columns according to target data grouping sentences to obtain target grouping data, and returning original data in non-associated columns corresponding to the target grouping data. The associated column stores the case unified data, which is not presented to the user, but the original data of the target packet data in the non-associated column.
In a fifth optional implementation of the embodiment of the present invention, accessing, according to the target data access statement, an accompanying column corresponding to a target data column in a data table to obtain target data, and accessing original data in a non-accompanying column corresponding to the target data may include: judging whether the case sensitive attribute information of the two associated target data columns is case insensitive or not according to the target data association statement under the condition that the data access request is a data association request; if yes, associating the data in the associated columns corresponding to the two target data columns to obtain a target association result, and returning the original data in the non-associated columns corresponding to the target association result.
The target data association statement is obtained by optimizing an initial data association statement in a data access request by an engine of the multimode database and is used for realizing the data association statement under case insensitive semantics.
In this embodiment, when data is grouped based on the case insensitivity, the initial data association statement may be: "select count (x) from student a join student b on a.name=b.name; the method includes the steps that firstly, whether case sensitive attribute information of two associated data columns is case insensitive semantic is judged, and if yes, an engine of the multimode database can optimize an initial data association statement into a target data association statement, for example, a selection count from student a join student b on a, a name __ ci=b, a name __ ci; the method is characterized in that the data storage layer is equivalent to the data storage layer which adopts the associated column to replace the target data column to carry out data association to obtain a target association result, but the returned original data in the non-associated column corresponding to the target association result.
In a sixth optional implementation of the embodiment of the present invention, accessing, according to the target data access statement, an accompanying column corresponding to a target data column in a data table to obtain target data, and accessing original data in a non-accompanying column corresponding to the target data may include: and under the condition that the data access request is a data ordering request, ordering the screened data in the accompanying columns according to a target data ordering statement to obtain a first target ordering result, and returning the original data in the non-accompanying columns corresponding to the first target ordering result.
The target data sorting statement is obtained by optimizing an initial data sorting statement in a data access request by an engine of the multi-mode database and is used for realizing the data sorting statement under case insensitive semantics.
In this embodiment, the ordering of data may include ordering at database level/table level/query level. The ranking functions (colorings) of different levels under the multimodal database actually contain case insensitive attribute information (casespecific). If the case sensitive attribute information is determined to be case insensitive according to the level of the sorting function set by the user, for example, "select from student order by name COLLATE binary; that is, the fact that the accounting is insensitive according to the case is set from the lookup table level, the engine of the multimode database can sort and compare according to the accompanying column name __ ci column, so that a first target sorting result which accords with the case insensitivity of the current accounting is obtained, and original data in a non-accompanying column corresponding to the first target sorting result is returned.
According to the technical scheme, the data access request is acquired; the data access request includes case sensitive attribute information; generating a target data access statement according to an initial data access statement contained in the data access request under the condition that the case sensitive attribute information is case insensitive; aiming at a data insertion request, a data query request, a data update request, a data grouping request, a data association request and a data ordering request, accessing an associated column corresponding to a target data column in a data table according to a target data access statement to obtain target data, and accessing original data in a non-associated column corresponding to the target data. By analyzing and processing the case insensitive semantics in the engine, the stored heterogeneity is shielded, the function of the case insensitive semantics of the multimode database is realized, and the data access performance of the multimode database is ensured.
In an alternative embodiment of the present invention, further comprising: and under the condition that the case sensitive attribute information is case sensitive and the data access request is a data ordering request, ordering the target data column according to the data access request to obtain a second ordering result, and returning the original data in the non-associated column corresponding to the second ordering result.
In this embodiment, if the case sensitive attribute information is determined to be case insensitive according to the level of the ranking function set by the user, for example, "select from student order by name COLLATE binary _ci; by "(i.e., from the column level of the query that the formulation is set in a case-sensitive manner, the engine of the multimodal database may sort and compare according to the non-accompanied column name column, and obtaining a second target ordering result which accords with the case sensitivity of the current linkage, and returning the second target ordering result.
In an alternative embodiment of the present invention, further comprising: when the case sensitive attribute information is case sensitive and the data access request is a data query request, a data update request, a data grouping request or a data association request, screening the data table according to a logic operator contained in a data access statement to obtain a screening result; deleting associated columns contained in the screening result through a column clipping optimizer; the original data in the non-associated columns is accessed according to the logical operator.
In the case that the compiler adds accompanying columns internally, in order to ensure semantic consistency and performance consistency in the database, for the select statement, all columns are selected, and in the case that the compiler does not do additional processing, the accompanying columns are also selected, which does not meet the expectations of data access. For example, "Select from student where name = 'a'", during execution of the data access, three logical operators of TableScan (table student), filter (window name= 'a' (casespecific)), select (Select) are sequentially generated, and first, column information to be output is generated for each operator from bottom to top, tableScan (representing all columns including accompanying columns), filter (all columns including accompanying columns), select (representing all non-accompanying columns). In this embodiment, the compiler may cut the unnecessary columns from top to bottom through a column cutting optimizer, and because the filtering function is sensitive semantics and no accompanying columns are needed, the accompanying columns of the Filter operator may be cut by the column cutting optimizer, and then the accompanying columns of the TableScan operator may be cut. Thus, the screening result is ensured to not contain unnecessary accompanying columns; meanwhile, other operators cut unnecessary accompanying columns as much as possible, so that the best performance of database execution is ensured.
Example III
Fig. 3 is a schematic structural diagram of a data access device according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a request acquisition module 310 and a data access module 320; wherein,
a request acquisition module 310, configured to acquire a data access request; the data access request comprises case sensitive attribute information;
a data access module 320, configured to access an accompanying column and a non-accompanying column in a data table according to the data access request when the case sensitive attribute information is case insensitive; the accompanying columns are used for storing the unified data of the case and the case corresponding to the target data columns; the non-associated columns are used to store the raw data.
According to the technical scheme, the data access request is obtained, and the data access request comprises case sensitive attribute information; accessing an associated column and a non-associated column in a data table according to the data access request under the condition that the case sensitive attribute information is case insensitive, wherein the associated column is used for storing case unified data corresponding to a target data column; the non-accompanying columns are used for storing the original data, and the functions of the case insensitive semantics of the multimode database are realized by analyzing and processing the case insensitive semantics in the engine.
Optionally, the method further comprises:
the system comprises a creation request acquisition module, a data access module and a data access module, wherein the creation request acquisition module is used for acquiring a data creation request before acquiring the data access request;
a data table creation module for creating a data table containing a target data column in a storage layer of the multimode database according to the data creation request;
and the accompanying column creation module is used for creating an accompanying column corresponding to the target data column in the data table.
Optionally, the method further comprises:
and the index creation module is used for creating the index which is the same as the target data column on the accompanying column after the accompanying column corresponding to the target data column is added in the data table.
Optionally, the data access module 320 includes:
an access statement generating unit, configured to generate a target data access statement according to an initial data access statement included in the data access request;
and the data access unit is used for accessing the accompanying columns corresponding to the target data columns in the data table according to the target data access statement to obtain target data, and accessing the original data in the non-accompanying columns corresponding to the target data.
Optionally, the data access request includes: a data insertion request, a data query request, a data update request, a data packet request, a data association request, and a data ordering request; the data access unit is specifically configured to:
Under the condition that the data access request is a data insertion request, inserting unified data with the case corresponding to the target insertion data into the associated column corresponding to the target data column according to a target data insertion statement, and inserting the target insertion data into the target data column in the data table;
under the condition that the data access request is a data query request, screening the unified data of the upper and lower cases stored in the companion column according to a target data query statement to obtain target query data, and returning original data in a non-companion column corresponding to the target query data;
when the data access request is a data update request, updating the accompanying columns according to the unified data of the upper and lower cases of the target update data in the target data update statement, and updating the target data columns in the non-accompanying columns according to the target update data;
when the data access request is a data grouping request, grouping the data in the accompanying columns according to a target data grouping statement to obtain target grouping data, and returning the original data in the non-accompanying columns corresponding to the target grouping data;
judging whether the case sensitive attribute information of the two associated target data columns is case insensitive or not according to the target data association statement under the condition that the data access request is a data association request; if yes, associating the data in the associated columns corresponding to the two target data columns to obtain a target association result, and returning the original data in the non-associated columns corresponding to the target association result;
And under the condition that the data access request is a data ordering request, ordering the screened data in the accompanying columns according to a target data ordering statement to obtain a first target ordering result, and returning the original data in the non-accompanying columns corresponding to the first target ordering result.
Optionally, the method further comprises:
and the data sorting module is used for sorting the target data columns according to the data access request to obtain a second sorting result and returning the original data in the non-associated columns corresponding to the second sorting result when the case sensitive attribute information is case sensitive and the data access request is a data sorting request.
Optionally, the method further comprises:
the screening module is used for screening the data table according to a logic operator contained in the data access statement to obtain a screening result when the case sensitive attribute information is case sensitive and the data access request is a data query request, a data update request, a data grouping request or a data association request;
the deleting module is used for deleting the associated columns contained in the screening result through the column clipping optimizer;
and the access module is used for accessing the original data in the non-associated columns according to the logic operator.
The data access device provided by the embodiment of the invention can execute the data access method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the data access method.
In some embodiments, the data access method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. One or more of the steps of the data access method described above may be performed when the computer program is loaded into RAM 13 and executed by processor 11. Alternatively, in other embodiments, the processor 11 may be configured to perform the data access method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of data access, characterized by an engine applied to a multimodal database, the method comprising:
acquiring a data access request; the data access request comprises case sensitive attribute information;
accessing an associated column and a non-associated column in a data table according to the data access request under the condition that the case sensitive attribute information is case insensitive; the accompanying columns are used for storing the unified data of the case and the case corresponding to the target data columns; the non-associated columns are used to store the raw data.
2. The method of claim 1, further comprising, prior to obtaining the data access request:
acquiring a data creation request;
creating a data table containing a target data column in a storage layer of the multimode database according to the data creation request;
and creating an associated column corresponding to the target data column in the data table.
3. The method of claim 2, further comprising, after adding the associated column corresponding to the target data column to the data table:
the same index as the target data column is created on the companion column.
4. The method of claim 1, wherein accessing accompanying columns and non-accompanying columns in a data table in accordance with the data access request comprises:
generating a target data access statement according to an initial data access statement contained in the data access request;
and accessing an associated column corresponding to the target data column in the data table according to the target data access statement to obtain target data, and accessing original data in a non-associated column corresponding to the target data.
5. The method of claim 4, wherein the data access request comprises: a data insertion request, a data query request, a data update request, a data packet request, a data association request, and a data ordering request; accessing the accompanying columns corresponding to the target data columns in the data table according to the target data access statement to obtain target data, and accessing the original data in the non-accompanying columns corresponding to the target data, wherein the method comprises the following steps:
Under the condition that the data access request is a data insertion request, inserting unified data with the case corresponding to the target insertion data into the associated column corresponding to the target data column according to a target data insertion statement, and inserting the target insertion data into the target data column in the data table;
under the condition that the data access request is a data query request, screening the unified data of the upper and lower cases stored in the companion column according to a target data query statement to obtain target query data, and returning original data in a non-companion column corresponding to the target query data;
when the data access request is a data update request, updating the accompanying columns according to the unified data of the upper and lower cases of the target update data in the target data update statement, and updating the target data columns in the non-accompanying columns according to the target update data;
when the data access request is a data grouping request, grouping the data in the accompanying columns according to a target data grouping statement to obtain target grouping data, and returning the original data in the non-accompanying columns corresponding to the target grouping data;
judging whether the case sensitive attribute information of the two associated target data columns is case insensitive or not according to the target data association statement under the condition that the data access request is a data association request; if yes, associating the data in the associated columns corresponding to the two target data columns to obtain a target association result, and returning the original data in the non-associated columns corresponding to the target association result;
And under the condition that the data access request is a data ordering request, ordering the screened data in the accompanying columns according to a target data ordering statement to obtain a first target ordering result, and returning the original data in the non-accompanying columns corresponding to the first target ordering result.
6. The method as recited in claim 5, further comprising:
and under the condition that the case sensitive attribute information is case sensitive and the data access request is a data ordering request, ordering the target data column according to the data access request to obtain a second ordering result, and returning the original data in the non-associated column corresponding to the second ordering result.
7. The method as recited in claim 5, further comprising:
when the case sensitive attribute information is case sensitive and the data access request is a data query request, a data update request, a data grouping request or a data association request, screening the data table according to a logic operator contained in the data access statement to obtain a screening result;
deleting associated columns contained in the screening result through a column clipping optimizer;
And accessing the original data in the non-associated columns according to the logic operator.
8. A data access apparatus, characterized by an engine for application to a multimodal database, the apparatus comprising:
the request acquisition module is used for acquiring a data access request; the data access request comprises case sensitive attribute information;
the data access module is used for accessing the accompanying columns and the non-accompanying columns in the data table according to the data access request under the condition that the case sensitive attribute information is case insensitive; the accompanying columns are used for storing the unified data of the case and the case corresponding to the target data columns; the non-associated columns are used to store the raw data.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data access method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the data access method of any one of claims 1-7.
CN202311083779.3A 2023-08-25 2023-08-25 Data access method, device, equipment and storage medium Pending CN117033402A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311083779.3A CN117033402A (en) 2023-08-25 2023-08-25 Data access method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311083779.3A CN117033402A (en) 2023-08-25 2023-08-25 Data access method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117033402A true CN117033402A (en) 2023-11-10

Family

ID=88641060

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311083779.3A Pending CN117033402A (en) 2023-08-25 2023-08-25 Data access method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117033402A (en)

Similar Documents

Publication Publication Date Title
US10311062B2 (en) Filtering structured data using inexact, culture-dependent terms
CN110795455A (en) Dependency relationship analysis method, electronic device, computer device and readable storage medium
US9734176B2 (en) Index merge ordering
CN114357276A (en) Data query method and device, electronic equipment and storage medium
US20210191921A1 (en) Method, apparatus, device and storage medium for data aggregation
US20220358178A1 (en) Data query method, electronic device, and storage medium
CN116611411A (en) Business system report generation method, device, equipment and storage medium
CN114676678A (en) Structured query language data parsing method and device and electronic equipment
CN114816578A (en) Method, device and equipment for generating program configuration file based on configuration table
US20210216713A1 (en) Method, apparatus, device and storage medium for intelligent response
CN114139040A (en) Data storage and query method, device, equipment and readable storage medium
CN113722600A (en) Data query method, device, equipment and product applied to big data
CN116185389A (en) Code generation method and device, electronic equipment and medium
CN117033402A (en) Data access method, device, equipment and storage medium
CN114995719A (en) List rendering method, device, equipment and storage medium
CN113377808A (en) SQL optimization method and device
CN114443802A (en) Interface document processing method and device, electronic equipment and storage medium
CN117331926B (en) Data auditing method and device, electronic equipment and storage medium
CN116303578A (en) Query expression processing method, device, equipment and storage medium
CN116991779A (en) Method, device, equipment and medium for energy big data service query
CN118093523A (en) Intelligent file searching method and device and electronic equipment
CN116414856A (en) Data query method and device, electronic equipment and storage medium
CN114936246A (en) Redis data management method, device, equipment, storage medium and product
CN116303828A (en) Data query method, device, electronic equipment and storage medium
CN115878661A (en) Query method, query device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination