WO2024113405A1 - Data processing method and apparatus, device, and storage medium - Google Patents

Data processing method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2024113405A1
WO2024113405A1 PCT/CN2022/137867 CN2022137867W WO2024113405A1 WO 2024113405 A1 WO2024113405 A1 WO 2024113405A1 CN 2022137867 W CN2022137867 W CN 2022137867W WO 2024113405 A1 WO2024113405 A1 WO 2024113405A1
Authority
WO
WIPO (PCT)
Prior art keywords
algorithm
data block
target
prompt information
data
Prior art date
Application number
PCT/CN2022/137867
Other languages
French (fr)
Chinese (zh)
Inventor
陈志标
黄靖东
谢锐
Original Assignee
深圳计算科学研究院
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 深圳计算科学研究院 filed Critical 深圳计算科学研究院
Publication of WO2024113405A1 publication Critical patent/WO2024113405A1/en

Links

Images

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/22Indexing; Data structures therefor; Storage structures
    • 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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of data processing, and in particular to a data processing method, device, equipment and storage medium.
  • CPU central processing unit
  • SIMD SIMD parallel instructions
  • Modern CPU architectures generally contain multiple cores. In order to shorten the data path and increase the main frequency of each core, the designer uses multiple groups of registers to separate the various parts of the CPU, forming an instruction and data pipeline.
  • general CPUs have built-in branch predictors to predict conditional branches and reduce pipeline damage, the main problem is that they can only make simple predictions, and they are not always correct; even if the judgment is correct, it is not zero cost, especially when there are too many conditions, it also requires a lot of instructions.
  • the present application is proposed to provide a data processing method, apparatus, device and storage medium that overcome the above problems or at least partially solve the above problems, including:
  • a data processing method is applied to calculation of column-type stored data, and the method comprises:
  • a target preferred algorithm corresponding to the prompt information can be matched in a preset algorithm set through a preferred degree
  • the operator is optimized according to the target optimization algorithm, and the target data in the target column data block is processed by the optimized operator.
  • the step of obtaining the target column data block and the prompt information in the target column data block includes:
  • the prompt information in the target column data block is obtained.
  • the step of generating a set of column data blocks to be processed based on the initial data includes:
  • the to-be-processed column data block set is generated according to a plurality of the initial column data blocks.
  • the step of determining the target column data block in the set of column data blocks to be processed includes:
  • the target column data block is determined in the set of column data blocks to be processed according to the preset query condition and the target column.
  • the step of selecting a target preferred algorithm that can satisfy the prompt information by matching the preferred degree in a preset algorithm set according to the prompt information includes:
  • the target preferred algorithm is determined among the first algorithm, the standard algorithm and several intermediate algorithms according to the prompt information.
  • the step of determining the target preferred algorithm among the first algorithm, the standard algorithm and the plurality of intermediate algorithms according to the prompt information includes:
  • a second algorithm located after the first algorithm and a second sub-condition of the second algorithm are obtained from the plurality of sub-conditions;
  • the standard algorithm is determined as the target preferred algorithm.
  • the embodiment of the present invention further discloses a data processing device, which is applied to calculation of column-type stored data, and includes:
  • a first acquisition module used for acquiring a target column data block and corresponding prompt information in the target column data block
  • a matching module configured to match a target preferred algorithm that can satisfy the prompt information in a preset algorithm set according to the prompt information through a preferred degree
  • the processing module is used to optimize the operator according to the target optimization algorithm, and process the target data in the target column data block through the optimized operator.
  • the first acquisition module it includes:
  • a first generating module configured to obtain initial data and generate a set of column data blocks to be processed according to the initial data
  • a first determining module configured to determine a target column data block in the set of column data blocks to be processed
  • the second acquisition module is used to acquire the prompt information in the target column data block.
  • An embodiment of the present invention further discloses a computer device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of a data processing method as described above when executed by the processor.
  • An embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored.
  • a computer program is stored on which a computer program is stored.
  • the present application provides a solution for allowing the memory computing engine to use these prompt information and adopt the optimal processing algorithm by saving the data-specific prompt information of the stored data block, specifically: obtaining the target column data block and the corresponding prompt information in the target column data block; matching the target optimization algorithm corresponding to the prompt information in the preset algorithm set through the degree of preference according to the prompt information; optimizing the operator according to the target optimization algorithm, and processing the target data in the target column data block by the optimized operator.
  • the efficiency of single-core data processing is improved; by saving the data-specific prompt information of the stored data block, the memory computing engine can use these prompt information and adopt the optimal processing algorithm, thereby improving the processing efficiency of unit data and ultimately reducing the overall computing cost.
  • FIG1 is a flowchart of a data processing method according to an embodiment of the present application.
  • FIG2 is a structural block diagram of a data processing method and device provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention.
  • Runtime operator specialization technology In 2018, memSQL published the Fast Selection and Aggregation on Encoded Data using Operator Specialization paper at SIGMOD. Its main contributions are: first, it proposed a variety of different filtering and aggregation algorithms and implemented operators on this basis. Then, it dynamically selected different operators for specialization to process the data by analyzing the parameters of the data to be processed (including the number of groups, the number of aggregations, the number of bits for each value, the selection rate, etc.) during operation, thereby achieving efficient data processing.
  • a data processing method is applied to calculation of column-type stored data, and the method comprises:
  • the present application provides a solution for allowing the memory computing engine to use these prompt information and adopt the optimal processing algorithm by saving the data-specific prompt information of the stored data block, specifically: obtaining the target column data block and the corresponding prompt information in the target column data block; according to the prompt information, matching the target optimization algorithm corresponding to the prompt information through the degree of preference in the preset algorithm set; optimizing the operator according to the target optimization algorithm, and processing the target data in the target column data block by the optimized operator.
  • the efficiency of single-core data processing is improved; by saving the data-specific prompt information of the stored data block, the memory computing engine can use these prompt information and adopt the optimal processing algorithm, thereby improving the processing efficiency of unit data and ultimately reducing the overall computing cost.
  • step S110 a target column data block and corresponding prompt information in the target column data block are obtained.
  • step S110 the specific process before "obtaining the target column data block and the corresponding prompt information in the target column data block" in step S110 may be further explained in combination with the following description.
  • the initial data refers to the data input into the system by the user.
  • the to-be-processed column data block set refers to a set formed by normalized data, which includes prompt information.
  • the target column data block refers to a target column data block obtained by screening the to-be-processed column data block set according to the query range, ie, the preset query condition.
  • generating a set of column data blocks to be processed from initial data is a process of data normalization.
  • two-dimensional table relational data is stored in a column storage organization, and all data in a column with a certain number of record rows is called a column data block unit, namely an initial column data block: the to-be-processed column data block set is formed by a number of initial column data blocks.
  • data is generally imported or written in units of rows, and multiple rows can be written at one time.
  • Each column of data in each row needs to be written into a column data block corresponding to the column organization.
  • initial data is acquired, and a set of column data blocks to be processed is generated according to the initial data.
  • step S101 the specific process of "obtaining initial data, and generating a set of column data blocks to be processed according to the initial data" in step S101 can be further explained in combination with the following description.
  • S1014 Generate the to-be-processed column data block set according to a plurality of the initial column data blocks.
  • the initial column data block is generally configured with a maximum number of data to be written. When the maximum number is reached, that is, it is greater than the preset number or the upper-level user explicitly requests that the contents of the buffer be forcibly written out, it will trigger the writing of data into the actual storage; for the initial column data block of each column, the preprocessing function of the corresponding data type is obtained according to the data type defined by the column; the initial data is normalized using the preprocessing function to generate the normalized column data block that ultimately needs to be written, namely the initial column data block, and at the same time, a number of initial column data blocks are generated into a set of column data blocks to be processed; the initial column data block is written to the persistent storage through the storage module.
  • the preprocessing function corresponding to the data type is determined through the initial data and the data type corresponding to the initial data; the initial data is normalized according to the preprocessing function to generate a set of column data blocks to be processed.
  • a preprocessing function of its type is obtained according to the data type defined by the column. If no preprocessing function exists for this type, the initial column data block is directly written to the persistent storage through the storage module.
  • a plurality of initial column data blocks are generated according to the initial data and the preprocessing function, that is, the initial data is normalized.
  • the prompt information of the normalized column data blocks ie, the initial column data blocks, is collected at the same time.
  • a target column data block in the set of column data blocks to be processed is determined.
  • step S102 the specific process of "determining the target column data block in the set of column data blocks to be processed" in step S102 may be further explained in combination with the following description.
  • S1022 Determine the target column data block in the set of column data blocks to be processed according to the preset query condition and the target column.
  • the preset query condition refers to a query range defined by a user, through which a target column can be obtained from the set of column data blocks to be processed, and then the target column data block can be determined through the target column and the query range.
  • step S120 the operator is optimized according to the target optimization algorithm, and the target data in the target column data block is processed by the optimized operator.
  • step S120 the specific process of "optimizing the operator according to the target optimization algorithm, and processing the target data in the target column data block by the optimized operator" in step S120 can be further explained in combination with the following description.
  • S1201 sorting all algorithms in the preset algorithm set according to the degree of preference to generate a preferred algorithm set with preferred ranking numbers, wherein the preferred algorithm set includes a first algorithm at the top, a standard algorithm at the bottom, and a plurality of intermediate algorithms with preferred ranking numbers between the first algorithm and the standard algorithm;
  • S1202 Determine the target preferred algorithm among the first algorithm, the standard algorithm, and the plurality of intermediate algorithms according to the prompt information.
  • algorithm types in the preset algorithm set include but are not limited to addition, subtraction and multiplication.
  • the prompt information includes but is not limited to whether the sign bits of the numerical values are the same, the most significant bit of the numerical value, the result of the null value judgment and the maximum precision value of the numerical value.
  • all values of all data in the target column data block are obtained, and based on all values, whether the numerical sign bits of all data are the same number, the most significant bit and the null value judgment results are determined, and the maximum precision value of the numerical value is generated based on the most significant bit.
  • whether the sign bits of the numerical value are the same number refers to judging whether the numerical values are all positive or negative; the most significant bit refers to the most significant bit of the numerical value, and the most significant bit refers to the n-1 bit in an n-bit binary number, with the highest weight 2 ⁇ (n-1); the null value judgment result refers to judging whether the numerical values are all null values or non-null values; the maximum precision value of the numerical value refers to storing the numerical value according to the number of bytes required for the most significant bit, and calculating the maximum precision value.
  • each column data block is also fixed.
  • a preprocessing function is defined for each supported data type.
  • the preprocessing function normalizes the initial data to generate an initial column data block, and collects prompt information corresponding to the initial column data block.
  • the prompt information is optional.
  • the prompt information (which may be empty) is stored together with the normalized column data, that is, the initial column data block, which is called a set of column data blocks to be processed.
  • whether the numerical values of all the data are the same number is determined by judging whether the numerical sign bits are all positive or negative, the most significant bit in the numerical value is determined, and the null value judgment result is determined by judging whether the numerical values are all null values or non-null values.
  • a normalized column data block namely an initial column data block
  • data is uniformly normalized at a data block granularity
  • prompt information of the initial column data block is obtained. Subsequent calculations can use this prompt information to dynamically accelerate the calculation.
  • the user's computing request will be converted into the execution operator tree of the memory computing engine.
  • the operator types of general relational computing engines include: filter operator, projection operator, join operator, aggregation operator, etc.
  • the normalized column data block required by the request that is, the initial column data block, is used to determine the target column data block through the preset query conditions.
  • the target column data block and the prompt information in the target column data block are passed to the operator and the algorithm in the operator, that is, the target optimization algorithm, is executed to realize the computational processing of the data.
  • the use of prompt information is added to further optimize the calculation, and the implementation of the operator is divided into a normal path and multiple fast paths. When the prompt information meets the requirements of the fast path, the code of the fast path will be executed to improve the data processing efficiency.
  • the operator uses the prompt information in the target column data block, and selects the target optimization algorithm for calculation based on the prompt information: there are several types of target optimization algorithms, and the best algorithm, i.e. the first algorithm, is selected in the optimization algorithm set according to the degree of optimization, followed by several intermediate algorithms, and finally the most common standard implementation method, i.e. the standard algorithm.
  • the algorithm is dynamically selected at the granularity of the target column data block, and there is no need to modify the execution framework of the existing computing engine, only the performance-sensitive operators need to be transformed and optimized.
  • all algorithms in the preset algorithm set are ranked by priority to generate a preferred algorithm set with preferred ranking numbers, wherein the preferred algorithm set includes a first algorithm at the first position, a standard algorithm at the last position, and several intermediate algorithms with preferred ranking numbers between the first algorithm and the standard algorithm.
  • the target preferred algorithm is determined among the first algorithm, the standard algorithm and the plurality of intermediate algorithms according to the prompt information.
  • step S1302 of “determining the target preferred algorithm among the first algorithm, the standard algorithm, and the plurality of intermediate algorithms according to the prompt information”.
  • the standard algorithm is determined as the target preferred algorithm.
  • the prompt information in the target column data block is obtained, and the target optimization algorithm is obtained by matching the prompt information.
  • the prompt information satisfies the first condition that can satisfy the specialized implementation X, that is, the first algorithm. If not, it is checked whether the prompt information satisfies the second sub-condition that can satisfy the specialized implementation Y, that is, the second algorithm. If not, it is determined in turn whether the prompt information has a target sub-condition that satisfies the prompt information in several sub-conditions; when there is no target algorithm that satisfies the prompt information in the first condition and several sub-conditions, the standard algorithm is determined as the target preferred algorithm, the target data in the target column data block is processed by the algorithm implemented by the general standard, that is, the standard algorithm, and the result is returned, ending the current round of processing of the operator.
  • the prompt information satisfies the first condition of the specialized implementation X, i.e., the first algorithm. If so, the target data in the target column data block is processed by the specialized implementation X, i.e., the first algorithm, and the result is returned, thereby ending the current round of processing of the operator.
  • the first condition of the specialized implementation X i.e., the first algorithm.
  • the target data in the target column data block is processed through the specialized implementation Y, i.e., the second algorithm, and the result is returned, thus ending this round of processing of the operator.
  • the algorithm is determined to be the target preferred algorithm.
  • the standard algorithm is directly used to process the target data in the target column data block, and the result is returned, ending this round of processing of the operator.
  • the column type is a high-precision numeric type. Assume that each column data block has 5 data entries. The precision generally refers to the number of decimal digits that can be represented. The high-precision numeric type has a relatively large precision. Users can easily expand to multiple columns and types, and each data block can accommodate more data.
  • Data preprocessing and writing mainly involve the generation of prompt information and the conversion of data into normalized form. Taking high-precision digital types as an example, the preprocessing steps are as follows:
  • the value is stored in the number of bytes required for the most significant bit, and the maximum precision is calculated.
  • the input values are normalized according to scale 2, that is, the scale of the values in the data block is 2.
  • the data is stored in a fixed length of 2 bytes, and the prompt information of the data block is written.
  • the data block data contains the following prompt information: maximum precision (i.e., the maximum precision of val for all values in the data block, for example, 99.9, 999.9, 9999.9, then the maximum precision is 5), whether the scale is the same, whether the sign is the same, whether all data are not null, etc.
  • the not null value information of a data block is stored separately, using a bool array to store. If all are NULL, the array is empty. Using this information, the judgment logic in the calculation process can be reduced, and some fast paths can be taken to speed up the calculation of data block data.
  • the following is an example of the processing logic of addition.
  • the digital structure is generally as follows:
  • u128 val is used to indicate how many bits of integer the value is represented by
  • int16_t scale is used to indicate how many decimal places there are if the value is a positive integer; or, if the value is a negative number, how many zeros are after the integer;
  • bool Negative is used to indicate whether a value is negative.
  • val is a 16-byte integer used to store numbers. It can also be an integer with higher bytes, depending on the maximum precision required. If it is u128, its maximum precision can only be expressed to 38 bits (decimal).
  • Number is a numerical value.
  • the value 23500 is represented as follows:
  • Data block 1 represents the first data block of addition
  • Data block 2 represents the second data block of addition
  • Data block 3 represents the result data block
  • value1 represents a value of data block 1
  • value2 represents a value of data block 2
  • Value3 represents a value of data block 2.
  • the addition of the val of the two data blocks only needs to be converted into u64 and added, because a 19-bit integer (an integer consisting of 19 9s) can be represented by u64 (a 64-bit unsigned integer), and the result of adding two 19-bit integers is at most 20 bits, and the result cannot exceed the maximum value of u64.
  • the scale of the result is the same as the scale of the original data block, and the maximum precision of the result is ⁇ MAX(Pmax1,Pmax2)+1 ⁇ , where the maximum precision is the evaluation value, which does not need to be an exact value, and the sign bit of the result is the sign bit of the original data block.
  • Data block 1 has values (2.22, 1.11, 33.33), the maximum precision of data block 1 is 4, and the scale is 2;
  • Data block 2 has values (4.01, 999.02, 6.04), the maximum precision of data block 2 is 5, and the scale is 2;
  • Data block 3 is used to store the results.
  • the scales of data blocks 1 and 2 are both 2, and the maximum precision of the results is 6 (note that this is the evaluation precision, and it may also be 5 in some scenarios, for example, 999.02 becomes 998.02), which does not exceed 19.
  • the scale of the results is 2, the signs are positive, and the results are also positive.
  • value1 number ⁇ val(222),scale(2),negative(false) ⁇ and value2:number ⁇ val(401),scale(2),negative(false) ⁇ ;
  • value1 number ⁇ val(111),scale(2),negative(false) ⁇ and value2:number ⁇ val(99902),scale(2),negative(false) ⁇ ;
  • value1 number ⁇ val(3333),scale(2),negative(false) ⁇ and value2:number ⁇ val(604),scale(2),negative(false) ⁇ ;
  • the data of data block 3 is (6.23, 1000.13, 39.37), with a maximum precision of 6, a scale of 2, and a positive sign.
  • the scale of the result is the same as the scale of the original data block, and the maximum precision of the result is ⁇ MAX(Pmax1, Pmax2) + 1 ⁇ , where the maximum precision is the evaluation value, which does not need to be an exact value, and the sign bit of the result is the sign bit of the original data block.
  • Data block 1 has values (2.22, 1.11, 33.33), the maximum precision of data block 1 is 4, and the scale is 2;
  • Data block 2 has values (4.01, 999999999999999.02, 6.04), the maximum precision of data block 2 is 19, and the scale is 2;
  • Data block 3 is used to store the results.
  • the scale of data block 1 and data block 2 is 2, and the maximum precision of the result is 20 (the maximum precision here is the evaluation precision, which may also be 19 in some scenarios). It does not exceed 19.
  • the scale of the result is 2, the sign is positive, and the result is also positive; there is no NULL.
  • value1 number ⁇ val(222),scale(2),negative(false) ⁇ and value2:number ⁇ val(401),scale(2),negative(false) ⁇ ;
  • value1 number ⁇ val(111),scale(2),negative(false) ⁇ and value2:number ⁇ val(99999999999999902),scale(2),negative(false) ⁇ ;
  • value1 number ⁇ val(3333),scale(2),negative(false) ⁇ and value2:number ⁇ val(604),scale(2),negative(false) ⁇ ;
  • the data in data block 3 is (6.23,1000000000000000000.13,39.37), with a maximum precision of 20, a scale of 2, a sign of positive, and no NULL value.
  • the processing logic is the same as specialization 1.
  • the corresponding value of the NOT NULL array identifier is Not NULL
  • Data block 1 has values (2.22, 1.11, 33.33).
  • the maximum precision of data block 1 is 4, and there is no NULL.
  • the scale is 2.
  • Data block 2 has the value (4.01,999.02,NULL), the maximum precision of data block 2 is 5, the scale is 2, and the NOT NULL array is (true,true,false), true means the data is not NULL, false means the data is NULL;
  • Data block 3 is used to store the results.
  • the scale of data block 1 and data block 2 is 2, and the maximum precision of the result is 6 (the maximum precision here is the evaluation precision, which may also be 5 in some scenarios, for example, 999.02 becomes 998.02), and it does not exceed 19.
  • the scale of the result is 2, the signs are positive, and the results are also positive.
  • the data of data block 3 is (6.23,1000.13,NULL), with a maximum precision of 6, a scale of 2, and a positive sign.
  • the Not NULL array is (true,true,false).
  • the processing logic is the same as specialization 2.
  • the corresponding value of the NOT NULL array identifier is Not NULL
  • Data block 1 has values (2.22, 1.11, 33.33), the maximum precision of data block 1 is 4, and the scale is 2;
  • Data block 2 has the value (4.01, 999999999999999.02, NULL), the maximum precision of data block 2 is 19, scale is 2, and the NOT NULL array is (true, true, false), true means the data is not NULL, false means the data is NULL;
  • Data block 3 is used to store the results.
  • the scale of data block 1 and data block 2 is 2, the maximum precision of the result is 20 (evaluation precision), and it does not exceed 19.
  • the scale of the result is 2, the sign is positive, and the result is also positive. There is no NULL.
  • value1 number ⁇ val(3333),scale(2),negative(false) ⁇ and value2:number(NULL), according to the Not NULL array of the data block, value2 is judged to be NULL, and the result is NULL;
  • the data of data block 3 is (6.23,100000000000000000.13,NULL), with a maximum precision of 20, a scale of 2, and a sign of positive.
  • the Not NULL array is (true,true,false).
  • the subtraction of the val of the two data blocks only needs to be converted into u64 subtraction, because a 19-bit integer (an integer consisting of 19 9s) can be represented by u64 (a 64-bit unsigned integer), and the result of subtracting two 19-bit integers is at most 20 bits, and the result cannot exceed the maximum value of u64.
  • the scale of the result is the same as the scale of the original data block, and the maximum precision of the result is ⁇ MAX(Pmax1, Pmax2)+1 ⁇ , where the maximum precision is an evaluation value and does not need to be an exact value.
  • the sign bit of the result is determined by the size of the two numbers.
  • Data block 1 has values (4.22, 1.11, 33.33), the maximum precision of data block 1 is 4, and the scale is 2;
  • Data block 2 has values (2.01, 3.31, 6.11), the maximum precision of data block 2 is 3, and the scale is 2;
  • Data block 3 is used to store the results.
  • the scales of data blocks 1 and 2 are both 2, and the maximum evaluation accuracy of the results is 5 (due to the large overhead of calculation accuracy, evaluation accuracy is used), which does not exceed 19.
  • the scale of the results is 2 and the signs are all positive.
  • value1 number ⁇ val(422), scale(2), negative(false) ⁇ and value2: number ⁇ val(201), scale(2), negative(false) ⁇ ;
  • value1.val is greater than value2.val;
  • value1 number ⁇ val(111),scale(2),negative(false) ⁇ and value2:number ⁇ val(331),scale(2),negative(false) ⁇ ;
  • value1 number ⁇ val(3333),scale(2),negative(false) ⁇ and value2:number ⁇ val(611),scale(2),negative(false) ⁇ ;
  • value1.val is greater than value2.val;
  • the data of data block 3 is (2.21, 2.20, 27.22), its maximum precision is 5 (evaluation value), and the scale is 2.
  • the multiplication of the val of the two data blocks only needs to be converted into u64 multiplication, because a 19-bit integer (an integer consisting of 19 9s) can be represented by u64 (a 64-bit unsigned integer).
  • the scale of the result is Scale1+scale2, and the maximum precision of the result is (Pmax1+Pmax2), where the maximum precision is an evaluation value and does not need to be an exact value.
  • Data block 1 has values (4.02, 1.11, 3.33), the maximum precision of data block 1 is 3, and the scale is 2;
  • Data block 2 has values (2.1, 3.1, 6.2), the maximum precision of data block 2 is 2, and the scale is 1;
  • Data block 3 is used to store the results.
  • the scales of data blocks 1 and 2 are both 2, and the maximum evaluation precision of the results is 5 (due to the large cost of calculation precision, the evaluation precision is used), which does not exceed 19.
  • the scale of the results is 2, and the signs are all positive.
  • value1 number ⁇ val(402),scale(2),negative(false) ⁇ and value2:number ⁇ val(2.1),scale(1),negative(false) ⁇ ;
  • value1 number ⁇ val(111),scale(2),negative(false) ⁇ and value2:number ⁇ val(31),scale(1),negative(false) ⁇ ;
  • value1 number ⁇ val(333),scale(2),negative(false) ⁇ and value2:number ⁇ val(62),scale(1),negative(false) ⁇ ;
  • the data of data block 3 is (8.442, 3.441, 20.646), its maximum precision is 5 (evaluation value), and the scale is 3.
  • the optimal algorithm can be dynamically selected to process each data block. 2. Users do not perceive it and do not need to change the existing computing framework. They only need to gradually transform the relevant operators.
  • the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
  • a data processing device the device is applied to calculation of column-type stored data, the device comprising:
  • a first acquisition module 210 is used to acquire a target column data block and corresponding prompt information in the target column data block;
  • a matching module 220 configured to match a target preferred algorithm that can satisfy the prompt information in a preset algorithm set according to the prompt information by a preferred degree;
  • the processing module 230 is used to optimize the operator according to the target optimization algorithm, and process the target data in the target column data block through the optimized operator.
  • a first generating module used for acquiring initial data, and generating a set of column data blocks to be processed according to the initial data
  • a first determining module configured to determine a target column data block in the set of column data blocks to be processed
  • the second acquisition module is used to acquire the prompt information in the target column data block.
  • the first generating module includes:
  • a first acquisition submodule used to acquire a data type corresponding to the initial data
  • a first determination submodule configured to determine a preprocessing function corresponding to the data type according to the data type
  • a first generating submodule used for generating a plurality of initial column data blocks according to the initial data and the preprocessing function
  • the second generating submodule is used to generate the to-be-processed column data block set according to a plurality of the initial column data blocks.
  • the first determining module includes:
  • a second determination submodule is used to determine a target column in the set of column data blocks to be processed according to a preset query condition
  • the third determining submodule is used to determine the target column data block in the set of column data blocks to be processed according to the preset query condition and the target column.
  • the matching module 220 includes:
  • a third generation submodule is used to sort all algorithms in the preset algorithm set according to the degree of preference to generate a preferred algorithm set with a preferred ranking sequence number, wherein the preferred algorithm set includes a first algorithm at the first position, a standard algorithm at the last position, and a plurality of intermediate algorithms with preferred ranking sequences between the first algorithm and the standard algorithm;
  • the fourth determination submodule is used to determine the target preferred algorithm among the first algorithm, the standard algorithm and the plurality of intermediate algorithms according to the prompt information.
  • the fourth determining submodule includes:
  • a generating unit configured to generate a first condition corresponding to the first algorithm and a plurality of sub-conditions corresponding to the plurality of intermediate algorithms according to the first algorithm and the plurality of intermediate algorithms;
  • a matching unit used for matching the prompt information with the first condition and the plurality of sub-conditions
  • a first determining unit configured to obtain, from among the plurality of sub-conditions, a second algorithm following the first algorithm and a second sub-condition of the second algorithm when the prompt information does not satisfy the first condition;
  • a second determining unit configured to determine in sequence whether the prompt information has a target sub-condition that satisfies the prompt information among several sub-conditions when the prompt information does not satisfy the second sub-condition;
  • the third determining unit is used to determine the standard algorithm as the target preferred algorithm when there is no target algorithm that satisfies the prompt information in the first condition and the plurality of sub-conditions.
  • a computer device of a data processing method of the present invention is shown, which may specifically include the following:
  • the computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
  • the bus 18 represents one or more of several types of bus 18 structures, including a memory bus 18 or memory controller, a peripheral bus 18, an accelerated graphics port, a processor or a local bus 18 using any of a variety of bus 18 architectures. These architectures include, by way of example, but are not limited to, an Industry Standard Architecture (ISA) bus 18, a Micro Channel Architecture (MAC) bus 18, an Enhanced ISA bus 18, an Audio Video Electronics Standards Association (VESA) local bus 18, and a Peripheral Component Interconnect (PCI) bus 18.
  • ISA Industry Standard Architecture
  • MAC Micro Channel Architecture
  • VESA Audio Video Electronics Standards Association
  • PCI Peripheral Component Interconnect
  • the computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
  • the system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32.
  • the computer device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • the storage system 34 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as "hard drives").
  • a disk drive for reading and writing removable non-volatile disks such as "floppy disks”
  • an optical disk drive for reading and writing removable non-volatile optical disks (such as CD-ROMs, DVD-ROMs or other optical media) may be provided.
  • each drive may be connected to the bus 18 via one or more data medium interfaces.
  • the memory may include at least one program product having a set (e.g., at least one) of program modules 42 that are configured to perform the functions of various embodiments of the present invention.
  • a program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment.
  • the program modules 42 generally perform the functions and/or methods of the embodiments described herein.
  • the computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), may communicate with one or more devices that enable an operator to interact with the computer device 12, and/or may communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input/output (I/O) interface 22.
  • the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and/or public networks (e.g., the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 via a bus 18.
  • LANs local area networks
  • WANs wide area networks
  • public networks e.g., the Internet
  • the processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the data processing method provided by the embodiment of the present invention.
  • the processing unit 16 executes the program, it achieves: obtaining the target column data block and the corresponding prompt information in the target column data block; matching the target optimization algorithm corresponding to the prompt information in the preset algorithm set through the degree of preference; optimizing the operator according to the target optimization algorithm, and processing the target data in the target column data block through the optimized operator.
  • the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the data processing method provided in all embodiments of the present application is implemented:
  • the program when executed by the processor, it is implemented as follows: obtaining the target column data block and the corresponding prompt information in the target column data block; according to the prompt information, a target optimization algorithm corresponding to the prompt information can be satisfied by matching the degree of preference in a preset algorithm set; according to the target optimization algorithm, the operator is optimized, and the target data in the target column data block is processed by the optimized operator.
  • a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • a computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof.
  • Computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
  • a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.
  • Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • the computer program code for performing the operation of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages.
  • the program code can be executed entirely on the operator's computer, partially on the operator's computer, as an independent software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server.
  • the remote computer can be connected to the operator's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider for example, using an Internet service provider to connect through the Internet.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application provides a data processing method and apparatus, a device, and a storage medium. The method is applied to calculation of column-based storage data, and the method comprises: acquiring a target column data block and corresponding prompt information in the target column data block; according to the prompt information, matching, in a preset algorithm set on the basis of degrees of preferences, a target preferred algorithm capable of satisfying and corresponding to the prompt information; and optimizing an operator according to the target preferred algorithm, and processing target data in the target column data block by means of the optimized operator. For a stored data block, data-specific prompt information thereof is saved, so that an in-memory compute engine can utilize the prompt information and use an optimal processing algorithm, thereby improving the processing efficiency of unit data, and finally reducing the overall computing cost.

Description

一种数据处理方法、装置、设备及存储介质A data processing method, device, equipment and storage medium 技术领域Technical Field
本申请涉及数据处理领域,特别是一种数据处理方法、装置、设备及存储介质。The present application relates to the field of data processing, and in particular to a data processing method, device, equipment and storage medium.
背景技术Background technique
海量数据的处理传统的处理方式一般采用分布式计算来解决数据规模的处理效率问题,但这一般需要大量的计算资源,这往往也导致大数据解决方案实施的成本过高,最终无法在企业落地。所以随着需要处理的数据量越来越大,处理时延要求越来越短,提升单位计算资源的数据处理效率也开始成为大数据计算软件的核心竞争力之一。特别是在内存计算技术领域,一般将提升每个线程每秒能够处理的记录数,作为提升其竞争力的关键手段。The traditional way of processing massive data generally uses distributed computing to solve the problem of data scale processing efficiency, but this generally requires a large amount of computing resources, which often leads to high implementation costs of big data solutions and ultimately cannot be implemented in enterprises. Therefore, as the amount of data to be processed increases and the processing latency requirements become shorter and shorter, improving the data processing efficiency per unit of computing resources has also begun to become one of the core competitiveness of big data computing software. Especially in the field of in-memory computing technology, increasing the number of records that each thread can process per second is generally regarded as a key means to improve its competitiveness.
现在CPU(central processing unit,中央处理器)为了提升处理能力,除了提升CPU的时钟频率外,一般通过指令流水线和SIMD并行指令实现单核处理,如何可以更好的利用CPU,追求更高的IPC(Instructions per cycle,每个周期的指令),成为数据库工业界与学术界研究的热点。In order to improve the processing power of CPU (central processing unit), in addition to increasing the clock frequency of CPU, single-core processing is generally achieved through instruction pipeline and SIMD parallel instructions. How to better utilize the CPU and pursue higher IPC (Instructions per cycle) has become a hot research topic in the database industry and academia.
现代CPU架构一般包含多个核心,每个核心为了缩短数据通路、提升主频,设计者使用多组寄存器将CPU的各个部分分割开来,形成了指令与数据的流水线,一般CPU虽然内置了分支预测器,用于预测条件分支减少破坏流水线,但存在主要的问题是:只能做简单预测,且不总是正确的;即使判断正确,也不是零代价的,特别是条件过多时也需要消耗不少指令。Modern CPU architectures generally contain multiple cores. In order to shorten the data path and increase the main frequency of each core, the designer uses multiple groups of registers to separate the various parts of the CPU, forming an instruction and data pipeline. Although general CPUs have built-in branch predictors to predict conditional branches and reduce pipeline damage, the main problem is that they can only make simple predictions, and they are not always correct; even if the judgment is correct, it is not zero cost, especially when there are too many conditions, it also requires a lot of instructions.
发明内容Summary of the invention
鉴于所述问题,提出了本申请以便提供克服所述问题或者至少部分地解决所述问题的一种数据处理方法、装置、设备及存储介质,包括:In view of the above problems, the present application is proposed to provide a data processing method, apparatus, device and storage medium that overcome the above problems or at least partially solve the above problems, including:
一种数据处理方法,所述方法应用于对列式存储数据的计算,所述方法包括:A data processing method is applied to calculation of column-type stored data, and the method comprises:
获取目标列数据块和所述目标列数据块内对应的提示信息;Obtaining a target column data block and corresponding prompt information in the target column data block;
依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法;According to the prompt information, a target preferred algorithm corresponding to the prompt information can be matched in a preset algorithm set through a preferred degree;
依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。The operator is optimized according to the target optimization algorithm, and the target data in the target column data block is processed by the optimized operator.
进一步地,所述获取目标列数据块和所述目标列数据块内的提示信息的步骤之前,包括:Furthermore, before the step of obtaining the target column data block and the prompt information in the target column data block, the step includes:
获取初始数据,依据所述初始数据生成待处理列数据块集合;Acquire initial data, and generate a set of column data blocks to be processed according to the initial data;
确定所述待处理列数据块集合中的目标列数据块;Determine a target column data block in the set of column data blocks to be processed;
获取所述目标列数据块内的所述提示信息。The prompt information in the target column data block is obtained.
进一步地,所述依据所述初始数据生成待处理列数据块集合的步骤,包括:Furthermore, the step of generating a set of column data blocks to be processed based on the initial data includes:
获取对应于所述初始数据的数据类型;Acquire the data type corresponding to the initial data;
依据所述数据类型确定对应于所述数据类型的预处理函数;Determining a preprocessing function corresponding to the data type according to the data type;
依据所述初始数据和所述预处理函数生成若干个初始列数据块;generating a plurality of initial column data blocks according to the initial data and the preprocessing function;
依据若干个所述初始列数据块生成所述待处理列数据块集合。The to-be-processed column data block set is generated according to a plurality of the initial column data blocks.
进一步地,所述确定所述待处理列数据块集合中的目标列数据块的步骤,包括:Furthermore, the step of determining the target column data block in the set of column data blocks to be processed includes:
依据预设查询条件在所述待处理列数据块集合中确定目标列;Determine a target column in the set of column data blocks to be processed according to a preset query condition;
依据所述预设查询条件和所述目标列在所述待处理列数据块集合中确定所述目标列数据块。The target column data block is determined in the set of column data blocks to be processed according to the preset query condition and the target column.
进一步地,所述依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法的步骤,包括:Furthermore, the step of selecting a target preferred algorithm that can satisfy the prompt information by matching the preferred degree in a preset algorithm set according to the prompt information includes:
在所述预设算法集合中对所有算法进行所述优选程度排序生成带有优选排位序号的优选算法集合,其中,所述优选算法集合中包括位于首位的第一算法、位于末位的标准算法以及位于所述第一算法和所述标准算法的若干个具有优选排位序号的中间算法;Sorting all algorithms in the preset algorithm set according to the degree of preference to generate a preferred algorithm set with a preferred ranking sequence number, wherein the preferred algorithm set includes a first algorithm at the first position, a standard algorithm at the last position, and a plurality of intermediate algorithms with preferred ranking sequences between the first algorithm and the standard algorithm;
依据所述提示信息在所述第一算法、所述标准算法和若干个所述中间算法中确定所述目标优选算法。The target preferred algorithm is determined among the first algorithm, the standard algorithm and several intermediate algorithms according to the prompt information.
进一步地,所述依据所述提示信息在所述第一算法、所述标准算法和若干个所述中间算法中确定所述目标优选算法的步骤,包括:Furthermore, the step of determining the target preferred algorithm among the first algorithm, the standard algorithm and the plurality of intermediate algorithms according to the prompt information includes:
依据所述第一算法和若干个所述中间算法生成对应于所述第一算法的第一条件以及对应于若干个所述中间算法的若干个子条件;generating a first condition corresponding to the first algorithm and a plurality of sub-conditions corresponding to the plurality of intermediate algorithms according to the first algorithm and the plurality of intermediate algorithms;
将所述提示信息与所述第一条件和若干个所述子条件进行匹配;Matching the prompt information with the first condition and the plurality of sub-conditions;
当所述提示信息不满足所述第一条件时,则在若干个所述子条件中获取位于所述第一算法之后的第二算法以及所述第二算法的第二子条件;When the prompt information does not satisfy the first condition, a second algorithm located after the first algorithm and a second sub-condition of the second algorithm are obtained from the plurality of sub-conditions;
当所述提示信息不满足所述第二子条件时,则依次确定所述提示信息在若干个所述子条件是否存在具有满足所述提示信息对应的目标子条件;When the prompt information does not satisfy the second sub-condition, determining in sequence whether the prompt information has a target sub-condition satisfying the prompt information among several sub-conditions;
当所述第一条件和若干个所述子条件中均不存在满足所述提示信息的目标算法时,则确定所述标准算法为所述目标优选算法。When there is no target algorithm satisfying the prompt information in the first condition and the plurality of sub-conditions, the standard algorithm is determined as the target preferred algorithm.
本发明实施例还公开了一种数据处理装置,所述装置应用于对列式存储数据的计算,所述装置包括:The embodiment of the present invention further discloses a data processing device, which is applied to calculation of column-type stored data, and includes:
第一获取模块,用于获取目标列数据块和所述目标列数据块内对应的提示信息;A first acquisition module, used for acquiring a target column data block and corresponding prompt information in the target column data block;
匹配模块,用于依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法;A matching module, configured to match a target preferred algorithm that can satisfy the prompt information in a preset algorithm set according to the prompt information through a preferred degree;
处理模块,用于依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。The processing module is used to optimize the operator according to the target optimization algorithm, and process the target data in the target column data block through the optimized operator.
进一步地,所述第一获取模块之前,包括:Furthermore, before the first acquisition module, it includes:
第一生成模块,用于获取初始数据,依据所述初始数据生成待处理列数据块集合;A first generating module, configured to obtain initial data and generate a set of column data blocks to be processed according to the initial data;
第一确定模块,用于确定所述待处理列数据块集合中的目标列数据块;A first determining module, configured to determine a target column data block in the set of column data blocks to be processed;
第二获取模块,用于获取所述目标列数据块内的所述提示信息。The second acquisition module is used to acquire the prompt information in the target column data block.
本发明实施例还公开了一种计算机设备,包括处理器、存储器及存储在所述存储器上并能够在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的一种数据处理方法的步骤。An embodiment of the present invention further discloses a computer device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of a data processing method as described above when executed by the processor.
本发明实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如上所述的一种数据处理方法的步骤。An embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method described above are implemented.
本申请具有以下优点:This application has the following advantages:
在本申请的实施例中,相对于现有技术中的只能做简单预测,且不总是正确的;即使判断正确,也不是零代价的,特别是条件过多时也需要消耗不少指令的问题,本申请提供了通过对存储的数据块保存其数据特有的提示信息,实现让内存计算引擎利用这些提示信息并采用最优的处理算法的解决方案,具体为:获取目标列数据块和所述目标列数据块内对应的提示信息;依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法;依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。通过依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理,解决了只能做简单预测,且不总是正确的;即使判断正确,也不是零代价的,特别是条件过多时也需要消耗不少指令的问题,达到了利用数据的局部性原理,实现对每个数据块保存其整体符合的某些条件的提示信息,在处理这一数据块时,可以将条件判断等语句提前进行一次性判断,并根据这些提示信息选择匹配这一数据处理最高效的算法,通过减少处理过程中的条件判断和最高效处理算法,来实现提升单核处理数据的效率;通过对存储的数据块保存其数据特有的提示信息,实现让内存计算引擎利用这些提示信息并采用最优的处理算法,从而提升单位数据的处理效率,最终降低整体计算成本。In the embodiments of the present application, compared with the prior art which can only make simple predictions, which are not always correct; even if the judgment is correct, it is not zero cost, especially when there are too many conditions, a lot of instructions are required. The present application provides a solution for allowing the memory computing engine to use these prompt information and adopt the optimal processing algorithm by saving the data-specific prompt information of the stored data block, specifically: obtaining the target column data block and the corresponding prompt information in the target column data block; matching the target optimization algorithm corresponding to the prompt information in the preset algorithm set through the degree of preference according to the prompt information; optimizing the operator according to the target optimization algorithm, and processing the target data in the target column data block by the optimized operator. By optimizing the operator according to the target optimization algorithm and processing the target data in the target column data block through the optimized operator, the problem that only simple predictions can be made and are not always correct is solved; even if the judgment is correct, it is not zero cost, especially when there are too many conditions, a lot of instructions are required. The principle of locality of data is utilized to save prompt information of certain conditions that each data block meets as a whole. When processing this data block, statements such as conditional judgments can be judged in advance once, and the most efficient algorithm matching this data processing is selected based on these prompt information. By reducing the conditional judgments and the most efficient processing algorithm in the processing process, the efficiency of single-core data processing is improved; by saving the data-specific prompt information of the stored data block, the memory computing engine can use these prompt information and adopt the optimal processing algorithm, thereby improving the processing efficiency of unit data and ultimately reducing the overall computing cost.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请的技术方案,下面将对本申请的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
图1是本申请一实施例提供的一种数据处理方法的步骤流程图;FIG1 is a flowchart of a data processing method according to an embodiment of the present application;
图2是本申请一实施例提供的一种数据处理方法装置的结构框图;FIG2 is a structural block diagram of a data processing method and device provided by an embodiment of the present application;
图3是本发明一实施例提供的一种计算机设备的结构示意图。FIG. 3 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本申请的所述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。依据本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
发明人通过分析现有技术发现:现代CPU架构一般包含多个核心,每个核心为了缩短数据通路、提升主频,设计者使用多组寄存器将CPU的各个部分分割开来,形成了指令与数据的流水线,通过流水线并行提升指令平均处理时延,流水线的高效运作对CPU的处理性能非常关键,而计算中的条件分支跳转等指令是破坏流水线高效运作的杀手,为了减少这些指令的影响,列存的向量化计算通过对每次单条计算改成按批计算,减少函数的调用和提升高速缓冲存储器命中等来提升性能,但对于复杂类型(非CPU原生类型,如高精度数字类型)的计算,为了处理各种不同的场景,在一批数据的处理中,往往需要针对每条数据做各种判断,然后根据判断执行不同的处理,一般CPU虽然内置了分支预测器,用于预测条件分支减少破坏流水线,但存在主要的问题是:1、只能做简单预测,且不总是正确的;2、即使判断正确,也不是零代价的,特别是条件过多时也需要消耗不少指令;The inventors have found through analysis of the prior art that modern CPU architectures generally include multiple cores. In order to shorten the data path and increase the main frequency of each core, the designer uses multiple groups of registers to separate the various parts of the CPU, forming an instruction and data pipeline. The average processing delay of instructions is improved through pipeline parallelism. The efficient operation of the pipeline is very critical to the processing performance of the CPU, and instructions such as conditional branch jumps in calculations are killers that destroy the efficient operation of the pipeline. In order to reduce the impact of these instructions, column-based vectorized calculations improve performance by changing each single calculation to batch calculation, reducing function calls and improving cache memory hits. However, for calculations of complex types (non-CPU native types, such as high-precision digital types), in order to handle various scenarios, in the processing of a batch of data, it is often necessary to make various judgments for each data, and then perform different processing based on the judgments. Although general CPUs have built-in branch predictors for predicting conditional branches to reduce pipeline damage, the main problems are: 1. Only simple predictions can be made, and they are not always correct; 2. Even if the judgment is correct, it is not zero cost, especially when there are too many conditions, a lot of instructions are consumed;
现有技术方案一:Existing technical solution 1:
向量化计算技术:2005年Peter Boncz等学者在VLDB(Very Large Data Bases,数据库领域著名国际会议)上发表了MonetDB/X100:Hyper-PIPelining Query Execution论文,首次提出了向量化计算技术,这一技术是当代内存计算的基础技术之一,它的主要贡献是:1、采用流水线的执行算子;2、小的,连续内存的,常驻cache(高速缓冲存储器)的,固定类型数组作为计算单元,采用确定分支减少计算过程中的分支预测失效,并充分利用Cache(高速缓冲存储器)。Vectorized computing technology: In 2005, Peter Boncz and other scholars published the paper MonetDB/X100: Hyper-PI Pelining Query Execution at VLDB (Very Large Data Bases, a famous international conference in the database field), proposing vectorized computing technology for the first time. This technology is one of the basic technologies of contemporary memory computing. Its main contributions are: 1. The use of pipeline execution operators; 2. Small, continuous memory, resident cache (cache memory), fixed type arrays as computing units, using deterministic branches to reduce branch prediction failures during the calculation process, and making full use of cache (cache memory).
该方案的缺点:1、确定分支改写只能针对简单的类型和判读,如整形,对于复杂的数据类型和算法一般无法改写,或者改写后提升效果不好。2、针对一种类型,只有一种实现算法。Disadvantages of this solution: 1. The branch rewrite can only be applied to simple types and interpretations, such as integers. It is generally impossible to rewrite complex data types and algorithms, or the improvement effect after rewriting is not good. 2. There is only one implementation algorithm for one type.
现有技术方案二:Existing technical solution 2:
运行时算子特化技术:2018年memSQL公司在SIGMOD上发表的Fast Selection and Aggregation on Encoded Data using Operator Specialization论文;它的主要贡献是:首先提出了多种不同过滤和聚集算法并在此基础上实现了算子实现,然后在运行通过分析待处理的数据的参数(包含分组数、聚集数、每个值的bit数、选择率等),来动态选择不同的算子进行特化来处理数据,从而实现对数据的高效处理。Runtime operator specialization technology: In 2018, memSQL published the Fast Selection and Aggregation on Encoded Data using Operator Specialization paper at SIGMOD. Its main contributions are: first, it proposed a variety of different filtering and aggregation algorithms and implemented operators on this basis. Then, it dynamically selected different operators for specialization to process the data by analyzing the parameters of the data to be processed (including the number of groups, the number of aggregations, the number of bits for each value, the selection rate, etc.) during operation, thereby achieving efficient data processing.
该方案的缺点:只利用了数据编码时的一些隐含信息,这些隐含信息在算子实际向量化计算时是很难用于减少分支预测的,所以文中举的算法主要是针对整数或者采用字典编码后的数据。The disadvantage of this scheme is that it only utilizes some implicit information during data encoding, which is difficult to use to reduce branch prediction during actual vectorized calculations of operators. Therefore, the algorithms cited in this article are mainly for integers or data encoded using dictionary encoding.
参照图1,示出了本申请一实施例提供的一种数据处理方法的步骤流程图;1 , a flowchart of a data processing method according to an embodiment of the present application is shown;
一种数据处理方法,所述方法应用于对列式存储数据的计算,所述方法包括:A data processing method is applied to calculation of column-type stored data, and the method comprises:
S110、获取目标列数据块和所述目标列数据块内对应的提示信息;S110, obtaining a target column data block and corresponding prompt information in the target column data block;
S120、依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法;S120, according to the prompt information, a target preferred algorithm that can meet the prompt information by matching the preferred degree in a preset algorithm set;
S130、依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。S130, optimizing the operator according to the target optimization algorithm, and processing the target data in the target column data block by the optimized operator.
在本申请的实施例中,相对于现有技术中的只能做简单预测,且不总是正确的;即使判断正确,也不是零代价的,特别是条件过多时也需要消耗不少指令的问题,本申请提供了通过对存储的数据块保存其数据特有的提示信息,实现让内存计算引擎利用这些提示信息并采用最优的处理算法的解决方案,具体为:获取目标列数据块和所述目标列数据块内对应的提示信息;依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述 提示信息的目标优选算法;依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。通过依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理,解决了只能做简单预测,且不总是正确的;即使判断正确,也不是零代价的,特别是条件过多时也需要消耗不少指令的问题,达到了利用数据的局部性原理,实现对每个数据块保存其整体符合的某些条件的提示信息,在处理这一数据块时,可以将条件判断等语句提前进行一次性判断,并根据这些提示信息选择匹配这一数据处理最高效的算法,通过减少处理过程中的条件判断和最高效处理算法,来实现提升单核处理数据的效率;通过对存储的数据块保存其数据特有的提示信息,实现让内存计算引擎利用这些提示信息并采用最优的处理算法,从而提升单位数据的处理效率,最终降低整体计算成本。In the embodiments of the present application, compared with the prior art which can only make simple predictions, which are not always correct; even if the judgment is correct, it is not zero cost, especially when there are too many conditions, a lot of instructions are required. The present application provides a solution for allowing the memory computing engine to use these prompt information and adopt the optimal processing algorithm by saving the data-specific prompt information of the stored data block, specifically: obtaining the target column data block and the corresponding prompt information in the target column data block; according to the prompt information, matching the target optimization algorithm corresponding to the prompt information through the degree of preference in the preset algorithm set; optimizing the operator according to the target optimization algorithm, and processing the target data in the target column data block by the optimized operator. By optimizing the operator according to the target optimization algorithm and processing the target data in the target column data block through the optimized operator, the problem that only simple predictions can be made and are not always correct is solved; even if the judgment is correct, it is not zero cost, especially when there are too many conditions, a lot of instructions are required. The principle of locality of data is utilized to save prompt information of certain conditions that each data block meets as a whole. When processing this data block, statements such as conditional judgments can be judged in advance once, and the most efficient algorithm matching this data processing is selected based on these prompt information. By reducing the conditional judgments and the most efficient processing algorithm in the processing process, the efficiency of single-core data processing is improved; by saving the data-specific prompt information of the stored data block, the memory computing engine can use these prompt information and adopt the optimal processing algorithm, thereby improving the processing efficiency of unit data and ultimately reducing the overall computing cost.
下面,将对本示例性实施例中一种数据处理方法作进一步地说明。Next, a data processing method in this exemplary embodiment will be further described.
如所述步骤S110所述,获取目标列数据块和所述目标列数据块内对应的提示信息。As described in step S110, a target column data block and corresponding prompt information in the target column data block are obtained.
在本发明一实施例中,可以结合下列描述进一步说明步骤S110所述“获取目标列数据块和所述目标列数据块内对应的提示信息”之前的具体过程。In an embodiment of the present invention, the specific process before "obtaining the target column data block and the corresponding prompt information in the target column data block" in step S110 may be further explained in combination with the following description.
如下列步骤所述,As described in the following steps,
S101、获取初始数据,依据所述初始数据生成待处理列数据块集合;S101, obtaining initial data, and generating a set of column data blocks to be processed according to the initial data;
S102、确定所述待处理列数据块集合中的目标列数据块;S102, determining a target column data block in the set of column data blocks to be processed;
S103、获取所述目标列数据块内的所述提示信息。S103: Acquire the prompt information in the target column data block.
需要说明的是,初始数据指的是用户输入到系统中的数据。It should be noted that the initial data refers to the data input into the system by the user.
需要说明的是,待处理列数据块集合指的是规范化后的数据形成的集合,其包含提示信息。It should be noted that the to-be-processed column data block set refers to a set formed by normalized data, which includes prompt information.
需要说明的是,目标列数据块指的是根据查询范围即预设查询条件从待处理列数据块集合筛选得到的目标列数据块。It should be noted that the target column data block refers to a target column data block obtained by screening the to-be-processed column data block set according to the query range, ie, the preset query condition.
需要说明的是,从初始数据生成待处理列数据块集合是数据规范化的过程。It should be noted that generating a set of column data blocks to be processed from initial data is a process of data normalization.
需要说明的是,首先,以列存组织来存放二维表格关系数据,并将一定记录行数的列的所有数据即称为一个列数据块单元即初始列数据块:通过若干个初始列数据块形成所述待处理列数据块集合。It should be noted that, first, two-dimensional table relational data is stored in a column storage organization, and all data in a column with a certain number of record rows is called a column data block unit, namely an initial column data block: the to-be-processed column data block set is formed by a number of initial column data blocks.
作为一种示例,数据导入或写入一般以行为单位,可以一次性写入多行,需要将每一行的每一列数据写入到列组织对应的列数据块中。As an example, data is generally imported or written in units of rows, and multiple rows can be written at one time. Each column of data in each row needs to be written into a column data block corresponding to the column organization.
如所述步骤S101所述,获取初始数据,依据所述初始数据生成待处理列数据块集合。As described in step S101, initial data is acquired, and a set of column data blocks to be processed is generated according to the initial data.
在本发明一实施例中,可以结合下列描述进一步说明步骤S101所述“获取初始数据,依据所述初始数据生成待处理列数据块集合”的具体过程。In an embodiment of the present invention, the specific process of "obtaining initial data, and generating a set of column data blocks to be processed according to the initial data" in step S101 can be further explained in combination with the following description.
如下列步骤所述,As described in the following steps,
S1011、获取对应于所述初始数据的数据类型;S1011, obtaining a data type corresponding to the initial data;
S1012、依据所述数据类型确定对应于所述数据类型的预处理函数;S1012, determining a preprocessing function corresponding to the data type according to the data type;
S1013、依据所述初始数据和所述预处理函数生成若干个初始列数据块;S1013, generating a plurality of initial column data blocks according to the initial data and the preprocessing function;
S1014、依据若干个所述初始列数据块生成所述待处理列数据块集合。S1014: Generate the to-be-processed column data block set according to a plurality of the initial column data blocks.
需要说明的是,初始列数据块一般配置了最大写入的数据个数,当达到最大个数即大于预设个数或者上层使用者明确要求将缓冲区的内容强制的写出时,会触发数据的写入实际的存储中;针对每一个列的初始列数据块,根据列定义的数据类型,获取对应数据类型的预处理函数;利用预处理函数对初始数据进行规范化处理生成最终需要写入的规范化列数据块即初始列数据块,同时将若干个初始列数据块生成待处理列数据块集合;将初始列数据块通过存储模块写入持久化存储。It should be noted that the initial column data block is generally configured with a maximum number of data to be written. When the maximum number is reached, that is, it is greater than the preset number or the upper-level user explicitly requests that the contents of the buffer be forcibly written out, it will trigger the writing of data into the actual storage; for the initial column data block of each column, the preprocessing function of the corresponding data type is obtained according to the data type defined by the column; the initial data is normalized using the preprocessing function to generate the normalized column data block that ultimately needs to be written, namely the initial column data block, and at the same time, a number of initial column data blocks are generated into a set of column data blocks to be processed; the initial column data block is written to the persistent storage through the storage module.
作为一种示例,通过初始数据的数量预处理函数,当初始数据的数量大于预设数量时,则通过初始数据和对应于初始数据的数据类型确定对应于所述数据类型的预处理函数;依据所述预处理函数对所述初始数据进行规范化处理生成待处理列数据块集合。As an example, through the number preprocessing function of initial data, when the number of initial data is greater than a preset number, the preprocessing function corresponding to the data type is determined through the initial data and the data type corresponding to the initial data; the initial data is normalized according to the preprocessing function to generate a set of column data blocks to be processed.
在一具体实现中,针对每一个列的初始列数据块,根据列定义的数据类型,获取其类型的预处理函数,如果该类型不存在预处理函数,则直接将初始列数据块通过存储模块写入持久化存储。In a specific implementation, for the initial column data block of each column, a preprocessing function of its type is obtained according to the data type defined by the column. If no preprocessing function exists for this type, the initial column data block is directly written to the persistent storage through the storage module.
在一具体实现中,依据所述初始数据和所述预处理函数生成若干个初始列数据块即对初始数据进行规范化处理。In a specific implementation, a plurality of initial column data blocks are generated according to the initial data and the preprocessing function, that is, the initial data is normalized.
在一具体实现中,在通过依据所述初始数据和所述预处理函数生成若干个初始列数据块后,同时收集所述规范化处理后的列数据块即初始列数据块的提示信息。In a specific implementation, after a plurality of initial column data blocks are generated according to the initial data and the preprocessing function, the prompt information of the normalized column data blocks, ie, the initial column data blocks, is collected at the same time.
如所述步骤S102所述,确定所述待处理列数据块集合中的目标列数据块。As described in step S102, a target column data block in the set of column data blocks to be processed is determined.
在本发明一实施例中,可以结合下列描述进一步说明步骤S102所述“确定所述待处理列数据块集合中的目标列数据块”的具体过程。In an embodiment of the present invention, the specific process of "determining the target column data block in the set of column data blocks to be processed" in step S102 may be further explained in combination with the following description.
如下列步骤所述,As described in the following steps,
S1021、依据预设查询条件在所述待处理列数据块集合中确定目标列;S1021, determining a target column in the set of column data blocks to be processed according to a preset query condition;
S1022、依据所述预设查询条件和所述目标列在所述待处理列数据块集合中确定所述目标列数据块。S1022: Determine the target column data block in the set of column data blocks to be processed according to the preset query condition and the target column.
需要说明的是,预设查询条件指的是用户定义的查询范围,通过查询范围可以在所述待处理列数据块集合中得到目标列,再通过目标列和查询范围确定目标列数据块。It should be noted that the preset query condition refers to a query range defined by a user, through which a target column can be obtained from the set of column data blocks to be processed, and then the target column data block can be determined through the target column and the query range.
如所述步骤S120所述,依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。As described in step S120, the operator is optimized according to the target optimization algorithm, and the target data in the target column data block is processed by the optimized operator.
在本发明一实施例中,可以结合下列描述进一步说明步骤S120所述“依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理”的具体过程。In one embodiment of the present invention, the specific process of "optimizing the operator according to the target optimization algorithm, and processing the target data in the target column data block by the optimized operator" in step S120 can be further explained in combination with the following description.
如下列步骤所述,As described in the following steps,
S1201、在所述预设算法集合中对所有算法进行所述优选程度排序生成带有优选排位序号的优选算法集合,其中,所述优选算法集合中包括位于首位的第一算法、位于末位的标准算法以及位于所述第一算法和所述标准算法的若干个具有优选排位序号的中间算法;S1201, sorting all algorithms in the preset algorithm set according to the degree of preference to generate a preferred algorithm set with preferred ranking numbers, wherein the preferred algorithm set includes a first algorithm at the top, a standard algorithm at the bottom, and a plurality of intermediate algorithms with preferred ranking numbers between the first algorithm and the standard algorithm;
S1202、依据所述提示信息在所述第一算法、所述标准算法和若干个所述中间算法中确定所述目标优选算法。S1202: Determine the target preferred algorithm among the first algorithm, the standard algorithm, and the plurality of intermediate algorithms according to the prompt information.
需要说明的是,预设算法集合中的算法类型包括但不限于加法、减法和乘法。It should be noted that the algorithm types in the preset algorithm set include but are not limited to addition, subtraction and multiplication.
需要说明的是,所述提示信息包括但不限于数值符号位是否为相同数、数值的最高有效位、空值判断结果和数值最大精度值。It should be noted that the prompt information includes but is not limited to whether the sign bits of the numerical values are the same, the most significant bit of the numerical value, the result of the null value judgment and the maximum precision value of the numerical value.
作为一种示例,在所述目标列数据块内获取所有数据的所有数值,依据所有数值确定所述所有数据的数值符号位是否为相同数、最高有效位和空值判断结果,依据最高有效位生成数值最大精度值。As an example, all values of all data in the target column data block are obtained, and based on all values, whether the numerical sign bits of all data are the same number, the most significant bit and the null value judgment results are determined, and the maximum precision value of the numerical value is generated based on the most significant bit.
其中,所述数值符号位是否为相同数指的是判断数值是否全为正数或负数;所述最高有效位指的是所述数值的最高有效位,最高有效位指的是一个n位二进制数字中的n-1位,具有最高的权值2^(n-1);所述空值判断结果指的是判断数值是否全为空值或非空值;所述数值最大精度值指的是数值按最高有效位需要的字节数进行存储,并计算出最大精度值。Among them, whether the sign bits of the numerical value are the same number refers to judging whether the numerical values are all positive or negative; the most significant bit refers to the most significant bit of the numerical value, and the most significant bit refers to the n-1 bit in an n-bit binary number, with the highest weight 2^(n-1); the null value judgment result refers to judging whether the numerical values are all null values or non-null values; the maximum precision value of the numerical value refers to storing the numerical value according to the number of bytes required for the most significant bit, and calculating the maximum precision value.
因为列的数据类型是固定的,所以每个列数据块存放的数据类型也是固定的,针对每种支持的数据类型定义预处理函数,预处理函数对初始数据进行规范化处理生成初始列数据块,以及一并收集对应于初始列数据块的提示信息,提示信息为可选,将提示信息(可能为空)与规范化列数据即初始列数据块一起存储称为待处理列数据块集合。Because the data type of the column is fixed, the data type stored in each column data block is also fixed. A preprocessing function is defined for each supported data type. The preprocessing function normalizes the initial data to generate an initial column data block, and collects prompt information corresponding to the initial column data block. The prompt information is optional. The prompt information (which may be empty) is stored together with the normalized column data, that is, the initial column data block, which is called a set of column data blocks to be processed.
作为一种示例,通过判断数值符号位是否全为正数或负数确定所述所有数据的数值是否为相同数,确定数值内的最高有效位,以及通过判断数值是否全为空值或非空值确定空值判断结果。As an example, whether the numerical values of all the data are the same number is determined by judging whether the numerical sign bits are all positive or negative, the most significant bit in the numerical value is determined, and the null value judgment result is determined by judging whether the numerical values are all null values or non-null values.
在一具体实现中,通过预处理生成规范化列数据块即初始列数据块:以数据块为粒度对数据进行统一的规范化,并获取该初始列数据块的提示信息,后续的计算可以利用这些提示信息动态进行计算加速。In a specific implementation, a normalized column data block, namely an initial column data block, is generated through preprocessing: data is uniformly normalized at a data block granularity, and prompt information of the initial column data block is obtained. Subsequent calculations can use this prompt information to dynamically accelerate the calculation.
用户的计算请求会转换为内存计算引擎的执行算子树,一般关系型计算引擎的算子类型有:过滤算子,投影算子,Join算子,聚集算子等,将该请求所需的规范化列数据块即初始列数据块通过预设查询条件确定目标列数据块,将目标列数据块以及目标列数据块内的提示信息传递给算子并执行算子内的算法即目标优选算法从而实现对数据的计算加工。在算子的实现中, 在利用向量化计算技术的基础上,增加利用提示信息进一步进行计算优化,将算子的实现分为正常路径和多个快速路径,当提示信息满足快速路径的要求时,会执行快速路径的代码从而提升数据的处理效率。The user's computing request will be converted into the execution operator tree of the memory computing engine. The operator types of general relational computing engines include: filter operator, projection operator, join operator, aggregation operator, etc. The normalized column data block required by the request, that is, the initial column data block, is used to determine the target column data block through the preset query conditions. The target column data block and the prompt information in the target column data block are passed to the operator and the algorithm in the operator, that is, the target optimization algorithm, is executed to realize the computational processing of the data. In the implementation of the operator, on the basis of using vectorized computing technology, the use of prompt information is added to further optimize the calculation, and the implementation of the operator is divided into a normal path and multiple fast paths. When the prompt information meets the requirements of the fast path, the code of the fast path will be executed to improve the data processing efficiency.
需要说明的是,计算时算子使用目标列数据块中的提示信息,由提示信息选择目标优选算法进行计算:目标优选算法包括若干种,在优选算法集合依据优选程度选择优选最优即第一算法,接着次之即若干个中间算法,最后才选择最通用的标准实现方式即标准算法,按目标列数据块为粒度进行算法的动态选择,对现有计算引擎的执行框架无需修改,只需对性能敏感的算子进行改造优化。It should be noted that during calculation, the operator uses the prompt information in the target column data block, and selects the target optimization algorithm for calculation based on the prompt information: there are several types of target optimization algorithms, and the best algorithm, i.e. the first algorithm, is selected in the optimization algorithm set according to the degree of optimization, followed by several intermediate algorithms, and finally the most common standard implementation method, i.e. the standard algorithm. The algorithm is dynamically selected at the granularity of the target column data block, and there is no need to modify the execution framework of the existing computing engine, only the performance-sensitive operators need to be transformed and optimized.
作为一种示例,对所述预设算法集合中对所有算法进行优选程度排序生成带有优选排位序号的优选算法集合,在优选算法集合中包括位于首位的第一算法、位于末位的标准算法以及位于所述第一算法和所述标准算法的若干个具有优选排位序号的中间算法。As an example, all algorithms in the preset algorithm set are ranked by priority to generate a preferred algorithm set with preferred ranking numbers, wherein the preferred algorithm set includes a first algorithm at the first position, a standard algorithm at the last position, and several intermediate algorithms with preferred ranking numbers between the first algorithm and the standard algorithm.
如所述步骤S1202所述,依据所述提示信息在所述第一算法、所述标准算法和若干个所述中间算法中确定所述目标优选算法。As described in step S1202, the target preferred algorithm is determined among the first algorithm, the standard algorithm and the plurality of intermediate algorithms according to the prompt information.
在本发明一实施例中,可以结合下列描述进一步说明步骤S1302所述“依据所述提示信息在所述第一算法、所述标准算法和若干个所述中间算法中确定所述目标优选算法。In an embodiment of the present invention, the following description may be combined to further illustrate the step S1302 of “determining the target preferred algorithm among the first algorithm, the standard algorithm, and the plurality of intermediate algorithms according to the prompt information”.
如下列步骤所述,As described in the following steps,
S12021、依据所述第一算法和若干个所述中间算法生成对应于所述第一算法的第一条件以及对应于若干个所述中间算法的若干个子条件;S12021. Generate a first condition corresponding to the first algorithm and a plurality of sub-conditions corresponding to the plurality of intermediate algorithms according to the first algorithm and the plurality of intermediate algorithms;
S12022、将所述提示信息与所述第一条件和若干个所述子条件进行匹配;S12022. Match the prompt information with the first condition and the plurality of sub-conditions;
S12023、当所述提示信息不满足所述第一条件时,则在若干个所述子条件中获取位于所述第一算法之后的第二算法以及所述第二算法的第二子条件;S12023. When the prompt information does not satisfy the first condition, obtaining a second algorithm located after the first algorithm and a second sub-condition of the second algorithm from among the plurality of sub-conditions;
S12024、当所述提示信息不满足所述第二子条件时,则依次确定所述提示信息在若干个所述子条件是否存在具有满足所述提示信息对应的目标子条件;S12024: When the prompt information does not satisfy the second sub-condition, determining in sequence whether the prompt information has a target sub-condition satisfying the prompt information among several sub-conditions;
S13025、当所述第一条件和若干个所述子条件中均不存在满足所述提示信息的目标算法时,则确定所述标准算法为所述目标优选算法。S13025. When there is no target algorithm that satisfies the prompt information in the first condition and the plurality of sub-conditions, the standard algorithm is determined as the target preferred algorithm.
需要说明的是,获取目标列数据块中的提示信息,通过提示信息匹配得到目标优选算法。It should be noted that the prompt information in the target column data block is obtained, and the target optimization algorithm is obtained by matching the prompt information.
作为一种示例,通过检查提示信息是否满足能够满足特化实现X即第一算法的第一条件,如果不满足则检查提示信息是否满足能够满足特化实现Y即第二算法的第二子条件,如果不满足则依次确定提示信息在若干个子条件是否存在具有满足提示信息对应的目标子条件;当第一条件和若干个子条件中均不存在满足提示信息的目标算法时,则确定标准算法为目标优选算法,通过通用标准实现的算法即标准算法对目标列数据块内的目标数据进行处理,并将结果返回,结束算子本轮处理过程。As an example, it is checked whether the prompt information satisfies the first condition that can satisfy the specialized implementation X, that is, the first algorithm. If not, it is checked whether the prompt information satisfies the second sub-condition that can satisfy the specialized implementation Y, that is, the second algorithm. If not, it is determined in turn whether the prompt information has a target sub-condition that satisfies the prompt information in several sub-conditions; when there is no target algorithm that satisfies the prompt information in the first condition and several sub-conditions, the standard algorithm is determined as the target preferred algorithm, the target data in the target column data block is processed by the algorithm implemented by the general standard, that is, the standard algorithm, and the result is returned, ending the current round of processing of the operator.
在一具体实现中,通过检查提示信息是否满足能够满足特化实现X即第一算法的第一条件,如果满足则通过特化实现X即第一算法对目标列数据块内的目标数据进行处理,并将结果返回,结束算子本轮处理过程。In a specific implementation, it is checked whether the prompt information satisfies the first condition of the specialized implementation X, i.e., the first algorithm. If so, the target data in the target column data block is processed by the specialized implementation X, i.e., the first algorithm, and the result is returned, thereby ending the current round of processing of the operator.
通过检查提示信息是否满足能够满足特化实现Y即第二算法的第二子条件,如果满足则通过特化实现Y即第二算法对目标列数据块内的目标数据进行处理,并将结果返回,结束算子本轮处理过程。By checking whether the prompt information satisfies the second sub-condition of the specialized implementation Y, i.e., the second algorithm, if it satisfies the second sub-condition, the target data in the target column data block is processed through the specialized implementation Y, i.e., the second algorithm, and the result is returned, thus ending this round of processing of the operator.
通过在优选算法集合依据优选程度选择目标优选算法,当存在能够满足提示信息的算法时,则确定该算法为目标优选算法,当将优选算法集合的所有优选算法都不存在能够满足提示信息的算法,则直接使用标准算法对目标列数据块内的目标数据进行处理,并将结果返回,结束算子本轮处理过程。By selecting the target preferred algorithm according to the degree of preference in the preferred algorithm set, when there is an algorithm that can meet the prompt information, the algorithm is determined to be the target preferred algorithm. When all the preferred algorithms in the preferred algorithm set do not have an algorithm that can meet the prompt information, the standard algorithm is directly used to process the target data in the target column data block, and the result is returned, ending this round of processing of the operator.
实施例一Embodiment 1
以一个只有一个列的表作为例子,列的类型为高精度数值数字类型,假设每个列数据块有5条数据;其中,精度一般是表示能表示10进制的位数;高精度数值类型,其能表示的精度比较大;用户可以很容易的扩展到多列多类型,以及每个数据块容纳更多数据的场景。Take a table with only one column as an example. The column type is a high-precision numeric type. Assume that each column data block has 5 data entries. The precision generally refers to the number of decimal digits that can be represented. The high-precision numeric type has a relatively large precision. Users can easily expand to multiple columns and types, and each data block can accommodate more data.
数据的预处理与写入,主要是提示信息的生成和数据规范化的转化,以 高精度数字类型为例,其预处理步骤如下:Data preprocessing and writing mainly involve the generation of prompt information and the conversion of data into normalized form. Taking high-precision digital types as an example, the preprocessing steps are as follows:
1、将输入数值按scale进行对齐,其中,scale用于表示如果数值是正整数,即表示小数点有多少位;如果数值是负数,即表示整数后面有多少个0。1. Align the input value according to scale, where scale is used to indicate how many decimal places there are if the value is a positive integer; if the value is a negative number, it indicates how many zeros are after the integer.
2、统计数据块内数值是否全为正数或负数。2. Check whether all the values in the data block are positive or negative.
3、统计数据块内数值的最高有效位。3. Count the most significant bits of the values in the data block.
4、统计数据块内是否全为null(表示空值,没有值)或not null(非空值,值不为空)。4. Check whether all the data in the data block are null (indicating null values, no value) or not null (non-null values, the value is not null).
5、数值按最高有效位需要的字节数进行存储。并计算出最大精度。5. The value is stored in the number of bytes required for the most significant bit, and the maximum precision is calculated.
6、根据上述数据块数据特征存储提示信息。6. Store prompt information based on the data characteristics of the above data block.
预处理时生成数据块如下提示信息:The following prompt information is generated when preprocessing the data block:
1、输入值按照scale 2进行规范化处理,即数据块内数值scale均为2。1. The input values are normalized according to scale 2, that is, the scale of the values in the data block is 2.
2、规范化后数值最高有效位为16,即可以使用2字节表示其数值,最大精度为5。2. The most significant digit of the normalized value is 16, which means that the value can be represented by 2 bytes, and the maximum precision is 5.
3、符号位一致,且全为正。3. The sign bits are consistent and all positive.
4、数据块内所有值都为not null即非空值。4. All values in the data block are not null, that is, non-empty values.
5、写入时按固定长度2字节存储数据,并且写入数据块的提示信息。5. When writing, the data is stored in a fixed length of 2 bytes, and the prompt information of the data block is written.
数据块数据里面有如下提示信息:最大precision(即数据块的最高有效位转换而来,表示数据块内的所有数值的val的最大精度,例如99.9,999.9,9999.9,那么其最大精度就为5),scale是否相同,符号是否相同,是否所有数据都为not null即非空值等信息,其中,一个数据块的not null值信息是单独进行存储的,用一个bool数组来存储,如果全部都为NULL,数组为空。利用这些信息可以减少计算过程中的判断逻辑,并走一些快速路径,加速数据块数据的计算。下面是加法的处理逻辑为例。两个高精度数数值相加,需要判断符号位走不同的逻辑,判断scale是否需要调整,判断是否溢出。这些判断都是有开销的,加法流程优化可以利用数据块的提示信息减少这些判断,并针对特定的条件,整个数据块的数据都走相同的计算逻辑。The data block data contains the following prompt information: maximum precision (i.e., the maximum precision of val for all values in the data block, for example, 99.9, 999.9, 9999.9, then the maximum precision is 5), whether the scale is the same, whether the sign is the same, whether all data are not null, etc. Among them, the not null value information of a data block is stored separately, using a bool array to store. If all are NULL, the array is empty. Using this information, the judgment logic in the calculation process can be reduced, and some fast paths can be taken to speed up the calculation of data block data. The following is an example of the processing logic of addition. When adding two high-precision numbers, it is necessary to judge whether the sign bit follows different logics, whether the scale needs to be adjusted, and whether there is overflow. These judgments are all overhead. The optimization of the addition process can use the prompt information of the data block to reduce these judgments, and for specific conditions, the data of the entire data block follows the same calculation logic.
数字结构一般如下:The digital structure is generally as follows:
struct Numberstruct Number
{{
u128 val,u128 val,
int16_t scale,int16_t scale,
bool Negative,bool Negative,
};};
其中,“u128 val”用于表示数值用多少位整数表示;Among them, "u128 val" is used to indicate how many bits of integer the value is represented by;
“int16_t scale”用于表示如果数值是正整数,则表示小数点有多少位;或,如果数值是负数,表示整数后面有多少个0;"int16_t scale" is used to indicate how many decimal places there are if the value is a positive integer; or, if the value is a negative number, how many zeros are after the integer;
“bool Negative”用于表示数值是否为负数。"bool Negative" is used to indicate whether a value is negative.
val是一个16字节的整数,用于存放数字,也可以是更高字节的整数,取决于所需要的最大精度值,如果是u128,其最大精度只能表示到38位(10进制)。val is a 16-byte integer used to store numbers. It can also be an integer with higher bytes, depending on the maximum precision required. If it is u128, its maximum precision can only be expressed to 38 bits (decimal).
其中,Number为数值。Among them, Number is a numerical value.
例如,数值-2.35表示成如下:For example, the value -2.35 is represented as follows:
struct Numberstruct Number
{{
Val(235)Val(235)
Scale(2),Scale(2),
Negative(true),Negative(true),
}。}.
数值23500表示成如下:The value 23500 is represented as follows:
struct Numberstruct Number
{{
Val(235)Val(235)
Scale(-2),Scale(-2),
Negative(false),Negative(false),
}。}.
为了方便描述,定义了下面的符号。For convenience of description, the following symbols are defined.
数据块1:表示加法的第一个数据块;Data block 1: represents the first data block of addition;
数据块2:表示加法的第二个数据块;Data block 2: represents the second data block of addition;
数据块3:表示结果数据块;Data block 3: represents the result data block;
Pmax1:数据块1数据的最大精度;Pmax1: Maximum precision of data block 1;
Pmax2:数据块2数据的最大精度;Pmax2: Maximum precision of data block 2;
scale1:如果数据块1有相同的scale,表示数据块1数据的scale;scale1: If data block 1 has the same scale, it indicates the scale of data block 1;
scale2:如果数据块2有相同的scale,表示数据块2数据的scale;scale2: If data block 2 has the same scale, it indicates the scale of data block 2;
negative1:如果数据块1有相同的符号位,表示数据块1数据的符号位;negative1: If data block 1 has the same sign bit, it indicates the sign bit of data block 1;
negative2:如果数据块2有相同的符号位,表示数据块2数据的符号位;negative2: If data block 2 has the same sign bit, it indicates the sign bit of data block 2;
value1:表示数据块1的一个数值;value1: represents a value of data block 1;
value2:表示数据块2的一个数值;value2: represents a value of data block 2;
Value3:表示数据块2的一个数值。Value3: represents a value of data block 2.
一、两个数据块数的加法,根据数据块的提示信息,具有以下的特化。1. The addition of two data block numbers has the following specializations according to the prompt information of the data blocks.
特化1:如果scale1和scale2相等,结果的precision{MAX(Pmax1,Pmax2)+1}没有超过19位,数据块1有相同的符号位,数据块2有相同的符号位,Negative1=Negative2,数据块1和数据块2都无空值。Specialization 1: If scale1 and scale2 are equal, the precision {MAX(Pmax1, Pmax2) + 1} of the result does not exceed 19 bits, data block 1 has the same sign bit, data block 2 has the same sign bit, Negative1 = Negative2, and there are no null values in data block 1 and data block 2.
此时两个数据块的val相加只需要转换成u64相加即可,因为19位(19个9组成的整数)的整数可以用u64(64位无符号整数)来表示,且两个19位的整数相加,其结果最多是20位,且其结果不可能超过u64的最大值。且结果的scale和原来数据块的scale相同,结果的最大精度为{MAX(Pmax1,Pmax2)+1},其中最大精度为评估值,不需要是精确值,结果的符号位为原来数据块的符号位。At this time, the addition of the val of the two data blocks only needs to be converted into u64 and added, because a 19-bit integer (an integer consisting of 19 9s) can be represented by u64 (a 64-bit unsigned integer), and the result of adding two 19-bit integers is at most 20 bits, and the result cannot exceed the maximum value of u64. The scale of the result is the same as the scale of the original data block, and the maximum precision of the result is {MAX(Pmax1,Pmax2)+1}, where the maximum precision is the evaluation value, which does not need to be an exact value, and the sign bit of the result is the sign bit of the original data block.
通过遍历数据块1,数据块2,数据块3,并取出里面的值;By traversing data block 1, data block 2, data block 3, and taking out the values inside;
for(value1 in数据块1,value2 in数据块2,value3 in数据块3){for(value1 in data block 1, value2 in data block 2, value3 in data block 3){
value3.val=(value1.val as u64)+(value2.val as u64);value3.val=(value1.val as u64)+(value2.val as u64);
value3.scale=value1.scale;value3.scale = value1.scale;
value3.negative=value1.negative;value3.negative = value1.negative;
}。}.
例如:For example:
数据块1有数值(2.22,1.11,33.33),数据块1的最大精度是4,scale都为2;Data block 1 has values (2.22, 1.11, 33.33), the maximum precision of data block 1 is 4, and the scale is 2;
数据块2有数值(4.01,999.02,6.04),数据块2的最大精度是5,scale都为2;Data block 2 has values (4.01, 999.02, 6.04), the maximum precision of data block 2 is 5, and the scale is 2;
数据块3用于存放结果。Data block 3 is used to store the results.
数据块1和数据块2的scale都是2,其结果的最大精度为6(注意这里是评估精度,在有些场景也可能是5,例如999.02变成998.02),没有超过19,其结果的scale为2,符号都为正,结果也为正。The scales of data blocks 1 and 2 are both 2, and the maximum precision of the results is 6 (note that this is the evaluation precision, and it may also be 5 in some scenarios, for example, 999.02 becomes 998.02), which does not exceed 19. The scale of the results is 2, the signs are positive, and the results are also positive.
遍历数据块1,数据块2,数据块3;Traverse data block 1, data block 2, data block 3;
第一次取到:First time to get:
value1:number{val(222),scale(2),negative(false)}和value2:number{val(401),scale(2),negative(false)};value1:number{val(222),scale(2),negative(false)} and value2:number{val(401),scale(2),negative(false)};
value3.val=222+401(这里采用u64加法);value3.val = 222 + 401 (u64 addition is used here);
value3.scale=2;value3.scale = 2;
value3.negative=false;value3.negative = false;
结果为number{val(623),scale(2),negative(false)},即6.23。The result is number{val(623), scale(2), negative(false)}, which is 6.23.
第二次取到:The second time I got:
value1:number{val(111),scale(2),negative(false)}和value2:number{val(99902),scale(2),negative(false)};value1:number{val(111),scale(2),negative(false)} and value2:number{val(99902),scale(2),negative(false)};
value3.val=111+99902;value3.val = 111 + 99902;
value3.scale=2;value3.scale = 2;
value3.negative=false;value3.negative = false;
结果为number{val(100013),scale(2),,negative(false)},即1000.13。The result is number{val(100013), scale(2), negative(false)}, which is 1000.13.
第三次取到:The third time I got:
value1:number{val(3333),scale(2),negative(false)}和value2:number{val(604),scale(2),negative(false)};value1:number{val(3333),scale(2),negative(false)} and value2:number{val(604),scale(2),negative(false)};
value3.val=3333+604;value3.val = 3333 + 604;
value3.scale=2;value3.scale = 2;
value3.negative=false;value3.negative = false;
结果为number{val(3937),scale(2),negative(false)},即39.37。The result is number{val(3937),scale(2),negative(false)}, which is 39.37.
数据块3数据为(6.23,1000.13,39.37),其最大精度为6,scale都为2,符号都为正。The data of data block 3 is (6.23, 1000.13, 39.37), with a maximum precision of 6, a scale of 2, and a positive sign.
这种特化可以减少大数加法的开销,因为目前大多数CPU都是64位的,只有u64相加是硬件就支持的,u128需要软件实现。This specialization can reduce the overhead of large number addition, because most current CPUs are 64-bit, and only u64 addition is supported by hardware, while u128 needs to be implemented in software.
特化2:如果scale1和scale2相等,结果的precision{MAX(Pmax1,Pmax2)+1},超过19位,但是没有超过38位,数据块1有相同的符号位,数据块2有相同的符号位,Negative1=Negative2,数据块1和数据块2都无空值。此时两个数据块的val相加即可,其结果不可能超过u128的最大值。且结果的scale和原来数据块的scale相同,结果的最大精度为{MAX(Pmax1,Pmax2)+1},其中最大精度为评估值,不需要是精确值,结果的符号位为原来数据块的符号位。Specialization 2: If scale1 and scale2 are equal, the precision of the result is {MAX(Pmax1, Pmax2) + 1}, which exceeds 19 bits but does not exceed 38 bits, data block 1 has the same sign bit, data block 2 has the same sign bit, Negative1 = Negative2, and there is no null value in data block 1 and data block 2. At this time, the val of the two data blocks can be added, and the result cannot exceed the maximum value of u128. And the scale of the result is the same as the scale of the original data block, and the maximum precision of the result is {MAX(Pmax1, Pmax2) + 1}, where the maximum precision is the evaluation value, which does not need to be an exact value, and the sign bit of the result is the sign bit of the original data block.
for(value1 in数据块1,value2 in数据块2,value3 in数据块3){for(value1 in data block 1, value2 in data block 2, value3 in data block 3){
value3.val=value1.val+value2.val;value3.val=value1.val+value2.val;
value3.scale=value1.scale;value3.scale = value1.scale;
value3.negative=value1.negative;value3.negative = value1.negative;
}。}.
例如:For example:
数据块1有数值(2.22,1.11,33.33),数据块1的最大精度是4,scale都为2;Data block 1 has values (2.22, 1.11, 33.33), the maximum precision of data block 1 is 4, and the scale is 2;
数据块2有数值(4.01,99999999999999999.02,6.04),数据块2的最大 精度是19,scale都为2;Data block 2 has values (4.01, 999999999999999999.02, 6.04), the maximum precision of data block 2 is 19, and the scale is 2;
数据块3用于存放结果。Data block 3 is used to store the results.
数据块1和数据块2的scale都是2,其结果的最大精度为20(这里最大精度是评估精度,在有些场景也可能是19),没有超过19,其结果的scale为2,符号都为正,结果也为正;都没有NULL。The scale of data block 1 and data block 2 is 2, and the maximum precision of the result is 20 (the maximum precision here is the evaluation precision, which may also be 19 in some scenarios). It does not exceed 19. The scale of the result is 2, the sign is positive, and the result is also positive; there is no NULL.
遍历数据块1,数据块2,数据块3;Traverse data block 1, data block 2, data block 3;
第一次取到:First time to get:
value1:number{val(222),scale(2),negative(false)}和value2:number{val(401),scale(2),negative(false)};value1:number{val(222),scale(2),negative(false)} and value2:number{val(401),scale(2),negative(false)};
value3.val=222+401(这里采用u128加法);value3.val = 222 + 401 (u128 addition is used here);
value3.scale=2,value3.scale = 2,
value3.negative=false,value3.negative = false,
结果为number{val(623),scale(2),negative(false)},即6.23。The result is number{val(623),scale(2),negative(false)}, which is 6.23.
第二次取到:The second time I got:
value1:number{val(111),scale(2),negative(false)}和value2:number{val(9999999999999999902),scale(2),negative(false)};value1:number{val(111),scale(2),negative(false)}and value2:number{val(99999999999999999902),scale(2),negative(false)};
value3.val=111+9999999999999999902;value3.val = 111 + 999999999999999999902;
value3.scale=2;value3.scale = 2;
value3.negative=false;value3.negative = false;
结果为number{val(10000000000000000013),scale(2),negative(false)},即100000000000000000.13。The result is number{val(10000000000000000013),scale(2),negative(false)}, which is 100000000000000000.13.
第三次取到:The third time I got:
value1:number{val(3333),scale(2),negative(false)}和value2:number{val(604),scale(2),negative(false)};value1:number{val(3333),scale(2),negative(false)} and value2:number{val(604),scale(2),negative(false)};
value3.val=3333+604;value3.val = 3333 + 604;
value3.scale=2;value3.scale = 2;
value3.negative=false;value3.negative = false;
结果为number{val(3937),scale(2),negative(false)},即39.37。The result is number{val(3937),scale(2),negative(false)}, which is 39.37.
数据块3数据为(6.23,100000000000000000.13,39.37),其最大精度为20,scale都为2,符号都为正,没有NULL值。The data in data block 3 is (6.23,1000000000000000000.13,39.37), with a maximum precision of 20, a scale of 2, a sign of positive, and no NULL value.
特化3:如果scale1和scale2相等,结果的precision{MAX(Pmax1,Pmax2)+1}没有超过19位,数据块1有相同的符号位,数据块2有相同的符号位,Negative1=Negative2,数据块1和数据块2有空值。Specialization 3: If scale1 and scale2 are equal, the precision {MAX(Pmax1, Pmax2) + 1} of the result does not exceed 19 bits, data block 1 has the same sign bit, data block 2 has the same sign bit, Negative1 = Negative2, and data block 1 and data block 2 have null values.
此时如果有一个值为NULL即空值,其结果为NULL即空值,对于非空值,其处理逻辑和特化1相同。At this time, if there is a value that is NULL, the result is NULL. For non-null values, the processing logic is the same as specialization 1.
for(value1 in数据块1,value2 in数据块2,value3 in数据块3){for(value1 in data block 1, value2 in data block 2, value3 in data block 3){
If(value1.val is NULL or value2.val is NULL){If (value1.val is NULL or value2.val is NULL) {
NOT NULL数组标识对应值为NULL;The corresponding value of NOT NULL array identifier is NULL;
}}
Else{Else{
NOT NULL数组标识对应值为Not NULL;The corresponding value of the NOT NULL array identifier is Not NULL;
value3.val=(value1.val as u64)+(value2.val as u64);value3.val=(value1.val as u64)+(value2.val as u64);
}}
value3.scale=value1.scale;value3.scale = value1.scale;
value3.negative=value1.negative;value3.negative = value1.negative;
}。}.
例如:For example:
数据块1有数值(2.22,1.11,33.33),数据块1的最大精度是4,其没有NULL。scale都为2;Data block 1 has values (2.22, 1.11, 33.33). The maximum precision of data block 1 is 4, and there is no NULL. The scale is 2.
数据块2有数值(4.01,999.02,NULL),数据块2的最大精度是5,scale都为2,NOT NULL数组为(true,true,false),true表示数据不为NULL,false表示数据为NULL;Data block 2 has the value (4.01,999.02,NULL), the maximum precision of data block 2 is 5, the scale is 2, and the NOT NULL array is (true,true,false), true means the data is not NULL, false means the data is NULL;
数据块3用于存放结果。Data block 3 is used to store the results.
数据块1和数据块2的scale都是2,其结果的最大精度为6(这里最大精度是评估精度,在有些场景也可能是5,例如999.02变成998.02),没有 超过19,其结果的scale为2,符号都为正,结果也为正,有NULL值,计算过程中需要判断值是否为NULL。The scale of data block 1 and data block 2 is 2, and the maximum precision of the result is 6 (the maximum precision here is the evaluation precision, which may also be 5 in some scenarios, for example, 999.02 becomes 998.02), and it does not exceed 19. The scale of the result is 2, the signs are positive, and the results are also positive. There are NULL values. During the calculation process, it is necessary to determine whether the value is NULL.
遍历数据块1,数据块2,数据块3;Traverse data block 1, data block 2, data block 3;
第一次取到:First time to get:
value1:number{val(222),scale(2),negative(false)}和value2:number{val(401),scale(2),negative(false)},根据数据块的Not NULL数组判断两个数为不为NULL,结果为Not NULL;value1:number{val(222),scale(2),negative(false)} and value2:number{val(401),scale(2),negative(false)}, according to the Not NULL array of the data block, it is judged whether the two numbers are NULL or not, and the result is Not NULL;
value3.val=222+401(这里采用u64加法);value3.val = 222 + 401 (u64 addition is used here);
value3.scale=2;value3.scale = 2;
value3.negative=false;value3.negative = false;
结果为number{val(623),scale(2),negative(false)},即6.23。The result is number{val(623),scale(2),negative(false)}, which is 6.23.
第二次取到:The second time I got:
value1:number{val(111),scale(2),negative(false)}和Value2:number{val(99902),scale(2),negative(false)},根据数据块的Not NULL数组判断两个数为不为NULL,结果为Not NULL;value1:number{val(111),scale(2),negative(false)} and Value2:number{val(99902),scale(2),negative(false)}, according to the Not NULL array of the data block, it is judged whether the two numbers are NULL or not, and the result is Not NULL;
value3.val=111+99902;value3.val = 111 + 99902;
value3.scale=2;value3.scale = 2;
value3.negative=false;value3.negative = false;
结果为number{val(100013),scale(2),negative(false)},即1000.13。The result is number{val(100013),scale(2),negative(false)}, which is 1000.13.
第三次取到:The third time I got:
value1:number{val(3333),scale(2),negative(false)}和Value2:number(NULL),根据数据块的Not NULL数组判断有一个数为NULL,在Not Null数组里面标识结果为NULLvalue1:number{val(3333),scale(2),negative(false)} and Value2:number(NULL), according to the Not NULL array of the data block, it is determined that there is a number that is NULL, and the result is marked as NULL in the Not Null array.
数据块3数据为(6.23,1000.13,NULL),其最大精度为6,scale都为2,符号都为正。Not NULL数组为(true,true,false)。The data of data block 3 is (6.23,1000.13,NULL), with a maximum precision of 6, a scale of 2, and a positive sign. The Not NULL array is (true,true,false).
特化4:如果scale1和scale2相等,结果的precision{MAX(Pmax1,Pmax2)+1}超过19位,但是没有超过38位,数据块1有相同的符号位,数据块2 有相同的符号位,Negative1=Negative2,数据块1和数据块2有空值。Specialization 4: If scale1 and scale2 are equal, the precision {MAX(Pmax1, Pmax2) + 1} of the result exceeds 19 bits but does not exceed 38 bits, data block 1 has the same sign bit, data block 2 has the same sign bit, Negative1 = Negative2, and data block 1 and data block 2 have null values.
此时如果有一个值为NULL即空值,其结果为NULL即空值,对于非空值,其处理逻辑和特化2相同。At this time, if there is a value that is NULL, the result is NULL. For non-null values, the processing logic is the same as specialization 2.
for(value1 in数据块1,value2 in数据块2,value3 in数据块3){for(value1 in data block 1, value2 in data block 2, value3 in data block 3){
If(value1.val is NULL or value2.val is NULL){If (value1.val is NULL or value2.val is NULL) {
NOT NULL数组标识对应值为NULL;The corresponding value of NOT NULL array identifier is NULL;
}}
Else{Else{
NOT NULL数组标识对应值为Not NULL;The corresponding value of the NOT NULL array identifier is Not NULL;
value3.val=value1.val+value2.val;value3.val=value1.val+value2.val;
}}
value3.scale=value1.scale;value3.scale = value1.scale;
value3.negative=value1.negative。value3.negative=value1.negative.
例如:For example:
数据块1有数值(2.22,1.11,33.33),数据块1的最大精度是4,scale都为2;Data block 1 has values (2.22, 1.11, 33.33), the maximum precision of data block 1 is 4, and the scale is 2;
数据块2有数值(4.01,99999999999999999.02,NULL),数据块2的最大精度是19,scale都为2,NOT NULL数组为(true,true,false),true表示数据不为NULL,false表示数据为NULL;Data block 2 has the value (4.01, 999999999999999999.02, NULL), the maximum precision of data block 2 is 19, scale is 2, and the NOT NULL array is (true, true, false), true means the data is not NULL, false means the data is NULL;
数据块3用于存放结果。Data block 3 is used to store the results.
数据块1和数据块2的scale都是2,其结果的最大精度为20(评估精度),没有超过19,其结果的scale为2,符号都为正,结果也为正。都没有NULL。The scale of data block 1 and data block 2 is 2, the maximum precision of the result is 20 (evaluation precision), and it does not exceed 19. The scale of the result is 2, the sign is positive, and the result is also positive. There is no NULL.
遍历数据块1,数据块2,数据块3;Traverse data block 1, data block 2, data block 3;
第一次取到:First time to get:
value1:number{val(222),scale(2),negative(false)}和value2:number{val(401),scale(2),negative(false)},根据数据块的Not NULL数组判断两个数为不为NULL,结果为Not NULL;value1:number{val(222),scale(2),negative(false)} and value2:number{val(401),scale(2),negative(false)}, according to the Not NULL array of the data block, it is judged whether the two numbers are NULL or not, and the result is Not NULL;
value3.val=222+401(这里采用u128加法);value3.val = 222 + 401 (u128 addition is used here);
value3.scale=2;value3.scale = 2;
value3.negative=false;value3.negative = false;
结果为number{val(623),scale(2),negative(false)},即6.23。The result is number{val(623),scale(2),negative(false)}, which is 6.23.
第二次取到:The second time I got:
value1:number{val(111),scale(2),negative(false)}和value2:number{val(9999999999999999902),scale(2),negative(false)},根据数据块的Not NULL数组判断两个数为不为NULL,结果为Not NULL;value1:number{val(111),scale(2),negative(false)} and value2:number{val(99999999999999999902),scale(2),negative(false)}, according to the Not NULL array of the data block, it is judged whether the two numbers are NULL or not, and the result is Not NULL;
value3.val=111+9999999999999999902;value3.val = 111 + 999999999999999999902;
value3.scale=2;value3.scale = 2;
value3.negative=false;value3.negative = false;
结果为number{val(10000000000000000013),scale(2),negative(false)},即100000000000000000.13。The result is number{val(10000000000000000013),scale(2),negative(false)}, which is 100000000000000000.13.
第三次取到:The third time I got:
value1:number{val(3333),scale(2),negative(false)}和value2:number(NULL),根据数据块的Not NULL数组判断value2为NULL,结果为NULL;value1:number{val(3333),scale(2),negative(false)} and value2:number(NULL), according to the Not NULL array of the data block, value2 is judged to be NULL, and the result is NULL;
数据块3数据为(6.23,100000000000000000.13,NULL),其最大精度为20,scale都为2,符号都为正。Not NULL数组为(true,true,false)。The data of data block 3 is (6.23,100000000000000000.13,NULL), with a maximum precision of 20, a scale of 2, and a sign of positive. The Not NULL array is (true,true,false).
二、根据数据块是否有NULL,数据块是否有相同的符号值,精度的范围不同还可以组合出来其他的特化,这里不再一一描述。下面描述一下所有的快速路径都无法使用时,需要用到常规的计算方法。Second, other specializations can be combined based on whether the data block has NULL, whether the data block has the same symbol value, and the range of precision. We will not describe them one by one here. The following describes the conventional calculation method that needs to be used when all fast paths cannot be used.
常规流程:General process:
1、Value1.negative是否和value2.negative相等,如果不相等,就要把加法变减法了。否则还是加法。这里不展开减法的逻辑。1. Is Value1.negative equal to value2.negative? If not, change addition to subtraction. Otherwise, it is still addition. The logic of subtraction is not expanded here.
2、如果negative是相同,就用加法。那么要看scale1和scale2是否相等,如果不相等需要调整成scale相同的number,在调整的过程中可能需要 丢失精度来避免溢出。2. If the negatives are the same, use addition. Then check if scale1 and scale2 are equal. If they are not equal, they need to be adjusted to the same scale number. In the process of adjustment, it may be necessary to lose precision to avoid overflow.
3、两个value相加之后,要检查value是否超过了u128,如果超过了,需要判断结果是否超过了number的最大值,如果超过了就报错溢出,否则需要调整scale。通过丢失精度来保证数据不溢出。3. After adding two values, check whether the value exceeds u128. If so, check whether the result exceeds the maximum value of number. If so, report overflow error. Otherwise, adjust scale. Losing precision ensures that data does not overflow.
三、两个数据块数的减法,根据数据块的统计信息,具有以下的特化。3. The subtraction of two data block numbers has the following specializations based on the statistical information of the data blocks.
特化1:如果scale1和scale2相等,结果的precision{MAX(Pmax1,Pmax2)+1}没有超过19位,数据块1有相同的符号位,数据块2有相同的符号位,Negative1=Negative2,数据块1和数据块2都无null值。Specialization 1: If scale1 and scale2 are equal, the precision of the result {MAX(Pmax1, Pmax2)+1} does not exceed 19 bits, data block 1 has the same sign bit, data block 2 has the same sign bit, Negative1 = Negative2, and neither data block 1 nor data block 2 has a null value.
此时两个数据块的val相减只需要转换成u64相减即可,因为19位(19个9组成的整数)的整数可以用u64(64位无符号整数)来表示,且两个19位的整数相减,其结果最多是20位,且其结果不可能超过u64的最大值。结果的scale和原来数据块的scale相同,结果的最大精度为{MAX(Pmax1,Pmax2)+1},其中,最大精度是评估值,不需要是精确值,结果的符号位由两个数的大小来决定。At this time, the subtraction of the val of the two data blocks only needs to be converted into u64 subtraction, because a 19-bit integer (an integer consisting of 19 9s) can be represented by u64 (a 64-bit unsigned integer), and the result of subtracting two 19-bit integers is at most 20 bits, and the result cannot exceed the maximum value of u64. The scale of the result is the same as the scale of the original data block, and the maximum precision of the result is {MAX(Pmax1, Pmax2)+1}, where the maximum precision is an evaluation value and does not need to be an exact value. The sign bit of the result is determined by the size of the two numbers.
遍历数据块1,数据块2,数据块3;Traverse data block 1, data block 2, data block 3;
Figure PCTCN2022137867-appb-000001
Figure PCTCN2022137867-appb-000001
例如:For example:
数据块1有数值(4.22,1.11,33.33),数据块1的最大精度是4,scale都 为2;Data block 1 has values (4.22, 1.11, 33.33), the maximum precision of data block 1 is 4, and the scale is 2;
数据块2有数值(2.01,3.31,6.11),数据块2的最大精度是3,scale都为2;Data block 2 has values (2.01, 3.31, 6.11), the maximum precision of data block 2 is 3, and the scale is 2;
数据块3用于存放结果。Data block 3 is used to store the results.
数据块1和数据块2的scale都是2,其结果的评估最大精度为5(由于计算精度的开销比较大,所以用评估精度),没有超过19,其结果的scale为2,符号都为正。The scales of data blocks 1 and 2 are both 2, and the maximum evaluation accuracy of the results is 5 (due to the large overhead of calculation accuracy, evaluation accuracy is used), which does not exceed 19. The scale of the results is 2 and the signs are all positive.
遍历数据块1,数据块2,数据块3;Traverse data block 1, data block 2, data block 3;
第一次取到:First time to get:
value1:number{val(422),scale(2),negative(false)}和value2:number{val(201),scale(2),negative(false)};value1: number{val(422), scale(2), negative(false)} and value2: number{val(201), scale(2), negative(false)};
value1.val比value2.val大;value1.val is greater than value2.val;
value3.val=422-201(这里采用u64减法);value3.val = 422-201 (u64 subtraction is used here);
value3.negative=false,value3.negative = false,
value3.scale=2;value3.scale = 2;
结果为number{val(221),scale(2),negative(false)},即2.21。The result is number{val(221),scale(2),negative(false)}, which is 2.21.
第二次取到:The second time I got:
value1:number{val(111),scale(2),negative(false)}和value2:number{val(331),scale(2),negative(false)};value1:number{val(111),scale(2),negative(false)} and value2:number{val(331),scale(2),negative(false)};
value1.val比value2.val小;value1.val is smaller than value2.val;
value3.val=331-111;value3.val = 331-111;
value3.negative=true;value3.negative = true;
value3.scale=2;value3.scale = 2;
结果为number{val(220),scale(2),negative(true)},即2.20。The result is number{val(220),scale(2),negative(true)}, which is 2.20.
第三次取到:The third time I got:
value1:number{val(3333),scale(2),negative(false)}和value2:number{val(611),scale(2),negative(false)};value1:number{val(3333),scale(2),negative(false)} and value2:number{val(611),scale(2),negative(false)};
value1.val比value2.val大;value1.val is greater than value2.val;
value3.val=3333-611;value3.val = 3333-611;
value3.negative=false;value3.negative = false;
value3.scale=2;value3.scale = 2;
结果为number{val(2722),scale(2),negative(false)},即27.22。The result is number{val(2722),scale(2),negative(false)}, which is 27.22.
数据块3数据为(2.21,2.20,27.22),其最大精度为5(评估值),scale都为2。The data of data block 3 is (2.21, 2.20, 27.22), its maximum precision is 5 (evaluation value), and the scale is 2.
四、两个数据块数的乘法,根据数据块的统计信息,具有以下的特化。4. The multiplication of two data block numbers has the following specializations according to the statistical information of the data blocks.
特化1:如果两个数据块的scale在其数据块内是一样的,结果的scale没有超过Scale规格(scale一般都会限定其最大和最小值),结果的precision(Pmax1+Pmax2)没有超过19位,数据块1和数据块2都无null值。Specialization 1: If the scales of two data blocks are the same within their data blocks, the scale of the result does not exceed the scale specification (the scale generally has its maximum and minimum values limited), the precision of the result (Pmax1+Pmax2) does not exceed 19 bits, and there are no null values in data block 1 and data block 2.
此时两个数据块的val相乘只需要转换成u64相乘即可,因为19位(19个9组成的整数)的整数可以用u64(64位无符号整数)来表示。结果的scale为Scale1+scale2,结果的最大精度为(Pmax1+Pmax2),其中,最大精度是评估值,不需要是精确值。At this time, the multiplication of the val of the two data blocks only needs to be converted into u64 multiplication, because a 19-bit integer (an integer consisting of 19 9s) can be represented by u64 (a 64-bit unsigned integer). The scale of the result is Scale1+scale2, and the maximum precision of the result is (Pmax1+Pmax2), where the maximum precision is an evaluation value and does not need to be an exact value.
Figure PCTCN2022137867-appb-000002
Figure PCTCN2022137867-appb-000002
例如:For example:
数据块1有数值(4.02,1.11,3.33),数据块1的最大精度是3,scale都为2;Data block 1 has values (4.02, 1.11, 3.33), the maximum precision of data block 1 is 3, and the scale is 2;
数据块2有数值(2.1,3.1,6.2),数据块2的最大精度是2,scale都为1;Data block 2 has values (2.1, 3.1, 6.2), the maximum precision of data block 2 is 2, and the scale is 1;
数据块3用于存放结果。Data block 3 is used to store the results.
数据块1和数据块2的scale都是2,其结果的评估最大精度为5(由于计算精度的开销比较大,所以用评估精度),没有超过19,其结果的scale 为2,符号都为正。The scales of data blocks 1 and 2 are both 2, and the maximum evaluation precision of the results is 5 (due to the large cost of calculation precision, the evaluation precision is used), which does not exceed 19. The scale of the results is 2, and the signs are all positive.
遍历数据块1,数据块2,数据块3;Traverse data block 1, data block 2, data block 3;
第一次取到:First time to get:
value1:number{val(402),scale(2),negative(false)}和value2:number{val(2.1),scale(1),negative(false)};value1:number{val(402),scale(2),negative(false)} and value2:number{val(2.1),scale(1),negative(false)};
value3.val=402*21(这里采用u64减法);value3.val = 402*21 (u64 subtraction is used here);
value3.negative=false;value3.negative = false;
value3.scale=2+1;value3.scale = 2 + 1;
结果为number{val(8442),scale(3),negative(false)},即8.442。The result is number{val(8442),scale(3),negative(false)}, which is 8.442.
第二次取到:The second time I got:
value1:number{val(111),scale(2),negative(false)}和value2:number{val(31),scale(1),negative(false)};value1:number{val(111),scale(2),negative(false)} and value2:number{val(31),scale(1),negative(false)};
value3.val=111*31;value3.val = 111*31;
value3.negative=false;value3.negative = false;
value3.scale=2+1;value3.scale = 2 + 1;
结果为number{val(3441),scale(),negative(true)},即3.441。The result is number{val(3441),scale(),negative(true)}, which is 3.441.
第三次取到:The third time I got:
value1:number{val(333),scale(2),negative(false)}和value2:number{val(62),scale(1),negative(false)};value1:number{val(333),scale(2),negative(false)} and value2:number{val(62),scale(1),negative(false)};
value3.val=333*62;value3.val = 333*62;
value3.negative=false;value3.negative = false;
value3.scale=2+1;value3.scale = 2 + 1;
结果为number{val(20646),scale(2),negative(false)},即20.646。The result is number{val(20646),scale(2),negative(false)}, which is 20.646.
数据块3数据为(8.442,3.441,20.646),其最大精度为5(评估值),scale都为3。The data of data block 3 is (8.442, 3.441, 20.646), its maximum precision is 5 (evaluation value), and the scale is 3.
当前技术方案的优点:1、可以动态的选择最优的算法对每个数据块进行处理。2、用户无感知,也不需要改变现有的计算框架,只需对相关算子 进行逐步改造。Advantages of the current technical solution: 1. The optimal algorithm can be dynamically selected to process each data block. 2. Users do not perceive it and do not need to change the existing computing framework. They only need to gradually transform the relevant operators.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
参照图2,示出了本申请一实施例提供的一种数据处理方法装置的结构框图;2, a structural block diagram of a data processing method and device provided by an embodiment of the present application is shown;
一种数据处理装置,所述装置应用于对列式存储数据的计算,所述装置包括:A data processing device, the device is applied to calculation of column-type stored data, the device comprising:
第一获取模块210,用于获取目标列数据块和所述目标列数据块内对应的提示信息;A first acquisition module 210 is used to acquire a target column data block and corresponding prompt information in the target column data block;
匹配模块220,用于依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法;A matching module 220, configured to match a target preferred algorithm that can satisfy the prompt information in a preset algorithm set according to the prompt information by a preferred degree;
处理模块230,用于依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。The processing module 230 is used to optimize the operator according to the target optimization algorithm, and process the target data in the target column data block through the optimized operator.
在本发明一实施例中,所述第一获取模块210之前,包括:In one embodiment of the present invention, before the first acquisition module 210, the following steps are included:
第一生成模块,用于获取初始数据,依据所述初始数据生成待处理列数据块集合;A first generating module, used for acquiring initial data, and generating a set of column data blocks to be processed according to the initial data;
第一确定模块,用于确定所述待处理列数据块集合中的目标列数据块;A first determining module, configured to determine a target column data block in the set of column data blocks to be processed;
第二获取模块,用于获取所述目标列数据块内的所述提示信息。The second acquisition module is used to acquire the prompt information in the target column data block.
在本发明一实施例中,所述第一生成模块,包括:In one embodiment of the present invention, the first generating module includes:
第一获取子模块,用于获取对应于所述初始数据的数据类型;A first acquisition submodule, used to acquire a data type corresponding to the initial data;
第一确定子模块,用于依据所述数据类型确定对应于所述数据类型的预处理函数;A first determination submodule, configured to determine a preprocessing function corresponding to the data type according to the data type;
第一生成子模块,用于依据所述初始数据和所述预处理函数生成若干个初始列数据块;A first generating submodule, used for generating a plurality of initial column data blocks according to the initial data and the preprocessing function;
第二生成子模块,用于依据若干个所述初始列数据块生成所述待处理列数据块集合。The second generating submodule is used to generate the to-be-processed column data block set according to a plurality of the initial column data blocks.
本发明一实施例中,所述第一确定模块,包括:In one embodiment of the present invention, the first determining module includes:
第二确定子模块,用于依据预设查询条件在所述待处理列数据块集合中 确定目标列;A second determination submodule is used to determine a target column in the set of column data blocks to be processed according to a preset query condition;
第三确定子模块,用于依据所述预设查询条件和所述目标列在所述待处理列数据块集合中确定所述目标列数据块。The third determining submodule is used to determine the target column data block in the set of column data blocks to be processed according to the preset query condition and the target column.
本发明一实施例中,所述匹配模块220,包括:In one embodiment of the present invention, the matching module 220 includes:
第三生成子模块,用于在所述预设算法集合中对所有算法进行所述优选程度排序生成带有优选排位序号的优选算法集合,其中,所述优选算法集合中包括位于首位的第一算法、位于末位的标准算法以及位于所述第一算法和所述标准算法的若干个具有优选排位序号的中间算法;A third generation submodule is used to sort all algorithms in the preset algorithm set according to the degree of preference to generate a preferred algorithm set with a preferred ranking sequence number, wherein the preferred algorithm set includes a first algorithm at the first position, a standard algorithm at the last position, and a plurality of intermediate algorithms with preferred ranking sequences between the first algorithm and the standard algorithm;
第四确定子模块,用于依据所述提示信息在所述第一算法、所述标准算法和若干个所述中间算法中确定所述目标优选算法。The fourth determination submodule is used to determine the target preferred algorithm among the first algorithm, the standard algorithm and the plurality of intermediate algorithms according to the prompt information.
本发明一实施例中,所述第四确定子模块,包括:In one embodiment of the present invention, the fourth determining submodule includes:
生成单元,用于依据所述第一算法和若干个所述中间算法生成对应于所述第一算法的第一条件以及对应于若干个所述中间算法的若干个子条件;A generating unit, configured to generate a first condition corresponding to the first algorithm and a plurality of sub-conditions corresponding to the plurality of intermediate algorithms according to the first algorithm and the plurality of intermediate algorithms;
匹配单元,用于将所述提示信息与所述第一条件和若干个所述子条件进行匹配;A matching unit, used for matching the prompt information with the first condition and the plurality of sub-conditions;
第一确定单元,用于当所述提示信息不满足所述第一条件时,则在若干个所述子条件中获取位于所述第一算法之后的第二算法以及所述第二算法的第二子条件;A first determining unit, configured to obtain, from among the plurality of sub-conditions, a second algorithm following the first algorithm and a second sub-condition of the second algorithm when the prompt information does not satisfy the first condition;
第二确定单元,用于当所述提示信息不满足所述第二子条件时,则依次确定所述提示信息在若干个所述子条件是否存在具有满足所述提示信息对应的目标子条件;A second determining unit, configured to determine in sequence whether the prompt information has a target sub-condition that satisfies the prompt information among several sub-conditions when the prompt information does not satisfy the second sub-condition;
第三确定单元,用于当所述第一条件和若干个所述子条件中均不存在满足所述提示信息的目标算法时,则确定所述标准算法为所述目标优选算法。The third determining unit is used to determine the standard algorithm as the target preferred algorithm when there is no target algorithm that satisfies the prompt information in the first condition and the plurality of sub-conditions.
参照图3,示出了本发明的一种数据处理方法的计算机设备,具体可以包括如下:3, a computer device of a data processing method of the present invention is shown, which may specifically include the following:
上述计算机设备12以通用计算设备的形式表现,计算机设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。The computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
总线18表示几类总线18结构中的一种或多种,包括存储器总线18或者存储器控制器,外围总线18,图形加速端口,处理器或者使用多种总线18结构中的任意总线18结构的局域总线18。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线18,微通道体系结构(MAC)总线18,增强型ISA总线18、音视频电子标准协会(VESA)局域总线18以及外围组件互连(PCI)总线18。The bus 18 represents one or more of several types of bus 18 structures, including a memory bus 18 or memory controller, a peripheral bus 18, an accelerated graphics port, a processor or a local bus 18 using any of a variety of bus 18 architectures. These architectures include, by way of example, but are not limited to, an Industry Standard Architecture (ISA) bus 18, a Micro Channel Architecture (MAC) bus 18, an Enhanced ISA bus 18, an Audio Video Electronics Standards Association (VESA) local bus 18, and a Peripheral Component Interconnect (PCI) bus 18.
计算机设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)30和/或高速缓存存储器32。计算机设备12可以进一步包括其他移动/不可移动的、易失性/非易失性计算机体统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(通常称为“硬盘驱动器”)。尽管图3中未示出,可以提供用于对可移动非易失性磁盘(如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其他光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质界面与总线18相连。存储器可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块42,这些程序模块42被配置以执行本发明各实施例的功能。The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as "hard drives"). Although not shown in Figure 3, a disk drive for reading and writing removable non-volatile disks (such as "floppy disks"), and an optical disk drive for reading and writing removable non-volatile optical disks (such as CD-ROMs, DVD-ROMs or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42 that are configured to perform the functions of various embodiments of the present invention.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器中,这样的程序模块42包括——但不限于——操作系统、一个或者多个应用程序、其他程序模块42以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本发明所描述的实施例中的功能和/或方法。A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and/or methods of the embodiments described herein.
计算机设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24、摄像头等)通信,还可与一个或者多个使得操作人员能与该计算机设备12交互的设备通信,和/或与使得该计算机设备12能与一个或多个其他计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种 通信可以通过输入/输出(I/O)界面22进行。并且,计算机设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(LAN)),广域网(WAN)和/或公共网络(例如因特网)通信。如图所示,网络适配器20通过总线18与计算机设备12的其他模块通信。应当明白,尽管图3中未示出,可以结合计算机设备12使用其他硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元16、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统34等。The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), may communicate with one or more devices that enable an operator to interact with the computer device 12, and/or may communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input/output (I/O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and/or public networks (e.g., the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 via a bus 18. It should be understood that, although not shown in FIG. 3 , other hardware and/or software modules may be used in conjunction with the computer device 12, including, but not limited to, microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34, etc.
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现本发明实施例所提供的数据处理方法。The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the data processing method provided by the embodiment of the present invention.
也即,上述处理单元16执行上述程序时实现:获取目标列数据块和所述目标列数据块内对应的提示信息;依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法;依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。That is, when the processing unit 16 executes the program, it achieves: obtaining the target column data block and the corresponding prompt information in the target column data block; matching the target optimization algorithm corresponding to the prompt information in the preset algorithm set through the degree of preference; optimizing the operator according to the target optimization algorithm, and processing the target data in the target column data block through the optimized operator.
在本发明实施例中,本发明还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请所有实施例提供的数据处理方法:In an embodiment of the present invention, the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the data processing method provided in all embodiments of the present application is implemented:
也即,给程序被处理器执行时实现:获取目标列数据块和所述目标列数据块内对应的提示信息;依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法;依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。That is, when the program is executed by the processor, it is implemented as follows: obtaining the target column data block and the corresponding prompt information in the target column data block; according to the prompt information, a target optimization algorithm corresponding to the prompt information can be satisfied by matching the degree of preference in a preset algorithm set; according to the target optimization algorithm, the operator is optimized, and the target data in the target column data block is processed by the optimized operator.
可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读 存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言——诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在操作人员计算机上执行、部分地在操作人员计算机上执行、作为一个独立的软件包执行、部分在操作人员计算机上部分在远程计算机上执行或者完全在远程计算机或者服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到操作人员计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The computer program code for performing the operation of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as an independent software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the operator's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求 或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
以上对本申请所提供的一种数据处理方法、装置、设备及存储介质,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The above is a detailed introduction to a data processing method, device, equipment and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for a person skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims (10)

  1. 一种数据处理方法,其特征在于,所述方法应用于对列式存储数据的计算,所述方法包括:A data processing method, characterized in that the method is applied to calculation of column-type stored data, and the method comprises:
    获取目标列数据块和所述目标列数据块内对应的提示信息;Obtaining a target column data block and corresponding prompt information in the target column data block;
    依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法;According to the prompt information, a target preferred algorithm corresponding to the prompt information can be matched in a preset algorithm set through a preferred degree;
    依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。The operator is optimized according to the target optimization algorithm, and the target data in the target column data block is processed by the optimized operator.
  2. 根据权利要求1所述的方法,其特征在于,所述获取目标列数据块和所述目标列数据块内的提示信息的步骤之前,包括:The method according to claim 1, characterized in that before the step of obtaining the target column data block and the prompt information in the target column data block, it comprises:
    获取初始数据,依据所述初始数据生成待处理列数据块集合;Acquire initial data, and generate a set of column data blocks to be processed according to the initial data;
    确定所述待处理列数据块集合中的目标列数据块;Determine a target column data block in the set of column data blocks to be processed;
    获取所述目标列数据块内的所述提示信息。The prompt information in the target column data block is obtained.
  3. 根据权利要求2所述的方法,其特征在于,所述依据所述初始数据生成待处理列数据块集合的步骤,包括:The method according to claim 2, characterized in that the step of generating a set of column data blocks to be processed based on the initial data comprises:
    获取对应于所述初始数据的数据类型;Acquire the data type corresponding to the initial data;
    依据所述数据类型确定对应于所述数据类型的预处理函数;Determining a preprocessing function corresponding to the data type according to the data type;
    依据所述初始数据和所述预处理函数生成若干个初始列数据块;generating a plurality of initial column data blocks according to the initial data and the preprocessing function;
    依据若干个所述初始列数据块生成所述待处理列数据块集合。The to-be-processed column data block set is generated according to a plurality of the initial column data blocks.
  4. 根据权利要求2所述的方法,其特征在于,所述确定所述待处理列数据块集合中的目标列数据块的步骤,包括:The method according to claim 2, characterized in that the step of determining the target column data block in the set of column data blocks to be processed comprises:
    依据预设查询条件在所述待处理列数据块集合中确定目标列;Determine a target column in the set of column data blocks to be processed according to a preset query condition;
    依据所述预设查询条件和所述目标列在所述待处理列数据块集合中确定所述目标列数据块。The target column data block is determined in the set of column data blocks to be processed according to the preset query condition and the target column.
  5. 根据权利要求1所述的方法,其特征在于,所述依据所述提示信息 在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法的步骤,包括:The method according to claim 1 is characterized in that the step of matching the target preferred algorithm corresponding to the prompt information in the preset algorithm set by the degree of preference according to the prompt information comprises:
    在所述预设算法集合中对所有算法进行所述优选程度排序生成带有优选排位序号的优选算法集合,其中,所述优选算法集合中包括位于首位的第一算法、位于末位的标准算法以及位于所述第一算法和所述标准算法的若干个具有优选排位序号的中间算法;Sorting all algorithms in the preset algorithm set according to the degree of preference to generate a preferred algorithm set with a preferred ranking sequence number, wherein the preferred algorithm set includes a first algorithm at the first position, a standard algorithm at the last position, and a plurality of intermediate algorithms with preferred ranking sequences between the first algorithm and the standard algorithm;
    依据所述提示信息在所述第一算法、所述标准算法和若干个所述中间算法中确定所述目标优选算法。The target preferred algorithm is determined among the first algorithm, the standard algorithm and several intermediate algorithms according to the prompt information.
  6. 根据权利要求5所述的方法,其特征在于,所述依据所述提示信息在所述第一算法、所述标准算法和若干个所述中间算法中确定所述目标优选算法的步骤,包括:The method according to claim 5, characterized in that the step of determining the target preferred algorithm among the first algorithm, the standard algorithm and the plurality of intermediate algorithms according to the prompt information comprises:
    依据所述第一算法和若干个所述中间算法生成对应于所述第一算法的第一条件以及对应于若干个所述中间算法的若干个子条件;generating a first condition corresponding to the first algorithm and a plurality of sub-conditions corresponding to the plurality of intermediate algorithms according to the first algorithm and the plurality of intermediate algorithms;
    将所述提示信息与所述第一条件和若干个所述子条件进行匹配;Matching the prompt information with the first condition and the plurality of sub-conditions;
    当所述提示信息不满足所述第一条件时,则在若干个所述子条件中获取位于所述第一算法之后的第二算法以及所述第二算法的第二子条件;When the prompt information does not satisfy the first condition, a second algorithm located after the first algorithm and a second sub-condition of the second algorithm are obtained from the plurality of sub-conditions;
    当所述提示信息不满足所述第二子条件时,则依次确定所述提示信息在若干个所述子条件是否存在具有满足所述提示信息对应的目标子条件;When the prompt information does not satisfy the second sub-condition, determining in sequence whether the prompt information has a target sub-condition satisfying the prompt information among several sub-conditions;
    当所述第一条件和若干个所述子条件中均不存在满足所述提示信息的目标算法时,则确定所述标准算法为所述目标优选算法。When there is no target algorithm satisfying the prompt information in the first condition and the plurality of sub-conditions, the standard algorithm is determined as the target preferred algorithm.
  7. 一种数据处理装置,其特征在于,所述装置应用于对列式存储数据的计算,所述装置包括:A data processing device, characterized in that the device is applied to calculation of column-type stored data, and the device comprises:
    第一获取模块,用于获取目标列数据块和所述目标列数据块内对应的提示信息;A first acquisition module, used for acquiring a target column data block and corresponding prompt information in the target column data block;
    匹配模块,用于依据所述提示信息在预设算法集合中通过优选程度匹配能够满足对应于所述提示信息的目标优选算法;A matching module, configured to match a target preferred algorithm that can satisfy the prompt information in a preset algorithm set according to the prompt information through a preferred degree;
    处理模块,用于依据所述目标优选算法对算子进行优化,并通过优化后的算子对所述目标列数据块内的目标数据进行处理。The processing module is used to optimize the operator according to the target optimization algorithm, and process the target data in the target column data block through the optimized operator.
  8. 根据权利要求7所述的装置,其特征在于,所述第一获取模块之前,包括:The device according to claim 7, characterized in that before the first acquisition module, it comprises:
    第一生成模块,用于获取初始数据,依据所述初始数据生成待处理列数据块集合;A first generating module, configured to obtain initial data and generate a set of column data blocks to be processed according to the initial data;
    第一确定模块,用于确定所述待处理列数据块集合中的目标列数据块;A first determining module, configured to determine a target column data block in the set of column data blocks to be processed;
    第二获取模块,用于获取所述目标列数据块内的所述提示信息。The second acquisition module is used to acquire the prompt information in the target column data block.
  9. 一种计算机设备,其特征在于,包括处理器、存储器及存储在所述存储器上并能够在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至6中任一项所述的方法。A computer device, characterized in that it comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 6 is implemented.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6中任一项所述的方法。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
PCT/CN2022/137867 2022-11-30 2022-12-09 Data processing method and apparatus, device, and storage medium WO2024113405A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211519211.7 2022-11-30
CN202211519211.7A CN115905236B (en) 2022-11-30 2022-11-30 Data processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2024113405A1 true WO2024113405A1 (en) 2024-06-06

Family

ID=86472589

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/137867 WO2024113405A1 (en) 2022-11-30 2022-12-09 Data processing method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN115905236B (en)
WO (1) WO2024113405A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150095341A1 (en) * 2013-09-27 2015-04-02 International Business Machines Corporation System and a method for hierarchical data column storage and efficient query processing
CN108491274A (en) * 2018-04-02 2018-09-04 深圳市华傲数据技术有限公司 Optimization method, device, storage medium and the equipment of distributed data management
CN112948413A (en) * 2019-12-10 2021-06-11 阿里巴巴集团控股有限公司 Data processing method, device, equipment and storage medium
CN114925067A (en) * 2022-05-20 2022-08-19 阿里云计算有限公司 Data processing method, device, equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294702A (en) * 2012-02-27 2013-09-11 上海淼云文化传播有限公司 Data processing method, device and system
CN109471893B (en) * 2018-10-24 2022-05-20 上海连尚网络科技有限公司 Network data query method, equipment and computer readable storage medium
CN111309757B (en) * 2020-05-14 2020-09-01 深圳市赢时胜信息技术股份有限公司 SQL interpreter and optimization method of HBase
CN112988802B (en) * 2021-04-29 2022-07-15 电子科技大学 Relational database query optimization method and system based on reinforcement learning
CN113297860A (en) * 2021-06-24 2021-08-24 上海携旅信息技术有限公司 Method, system, electronic device and storage medium for optimizing machine translation model
CN114297258B (en) * 2021-12-28 2023-01-06 上海右云信息技术有限公司 Method and equipment for acquiring comprehensive arrangement data of multi-column data
CN114328606B (en) * 2021-12-30 2022-11-29 星环信息科技(上海)股份有限公司 Method, device and storage medium for improving SQL execution efficiency

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150095341A1 (en) * 2013-09-27 2015-04-02 International Business Machines Corporation System and a method for hierarchical data column storage and efficient query processing
CN108491274A (en) * 2018-04-02 2018-09-04 深圳市华傲数据技术有限公司 Optimization method, device, storage medium and the equipment of distributed data management
CN112948413A (en) * 2019-12-10 2021-06-11 阿里巴巴集团控股有限公司 Data processing method, device, equipment and storage medium
CN114925067A (en) * 2022-05-20 2022-08-19 阿里云计算有限公司 Data processing method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HATON J-P, ET AL.: "INTERACTION BETWEEN STOCHASTIC MODELING AND KNOWLEDGE-BASED TECHNIQUES IN ACOUSTIC-PHONETIC DECODING OF SPEECH", INTERNATIONAL CONFERENCE ON ACOUSTICS, SPEECH & SIGNAL PROCESSING. ICASSP. DALLAS, APRIL 6 - 9, 1987., NEW YORK, IEEE., US, vol. 02, no. 02, 6 April 1987 (1987-04-06), US , pages 868 - 871, XP000955534 *
YAO JIANHUA, LI ZUHUA: "Research on query optimization of distributed column-based database based on memory", COMPUTER PRODUCTS AND DISTRIBUTION, no. 8, 31 August 2017 (2017-08-31), pages 27 - 28, XP009557173, ISSN: 1671-1939 *

Also Published As

Publication number Publication date
CN115905236B (en) 2023-08-22
CN115905236A (en) 2023-04-04

Similar Documents

Publication Publication Date Title
US9870341B2 (en) Memory reduction method for fixed point matrix multiply
US9547674B2 (en) Normalizing data for fast superscalar processing
JP3509027B2 (en) Formula processor and method for constructing a plurality of formulas using the formula processor
US7127463B2 (en) Optimization of database network traffic based upon data-use analysis
WO2021047373A1 (en) Big data-based column data processing method, apparatus, and medium
KR20160141675A (en) Highly efficient inexact computing storage device
CN110837584A (en) Method and system for constructing suffix array in block parallel manner
Fujiki et al. Near-memory data transformation for efficient sparse matrix multi-vector multiplication
Soltaniyeh et al. An accelerator for sparse convolutional neural networks leveraging systolic general matrix-matrix multiplication
Zhu et al. Massive Files Prefetching Model Based on LSTM Neural Network with Cache Transaction Strategy.
US20190205133A1 (en) Efficient conversion of numbers from database floating point format to binary integer format
JP7200299B2 (en) METHOD, APPARATUS, ELECTRONIC DEVICE, STORAGE MEDIUM AND PROGRAM FOR OPTIMIZING SEARCH SYSTEM
WO2022007596A1 (en) Image retrieval system, method and apparatus
WO2024113405A1 (en) Data processing method and apparatus, device, and storage medium
CN114064729B (en) Data retrieval method, device, equipment and storage medium
CN115811317A (en) Stream processing method and system based on self-adaptive non-decompression direct calculation
Heo et al. Boss: Bandwidth-optimized search accelerator for storage-class memory
CN118503204B (en) Hardware accelerator card, acceleration system, method, apparatus, medium, and program product
CN112328960B (en) Optimization method and device for data operation, electronic equipment and storage medium
US20240119008A1 (en) Optimal deployment of embeddings tables across heterogeneous memory architecture for high-speed recommendations inference
US20230418878A1 (en) Multi-model enrichment memory and catalog for better search recall with granular provenance and lineage
CN118409802A (en) Data processing method, device, electronic equipment and storage medium
Zhang et al. Data-Aware Adaptive Compression for Stream Processing
Falahati et al. Cross-Core Data Sharing for Energy-Efficient GPUs
CN117501256A (en) Complex filter hardware accelerator for large data sets

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22966991

Country of ref document: EP

Kind code of ref document: A1