Method and apparatus for acquiring time series features

By adding a unique ID to the input table to process time-series feature attribute values ​​in parallel, and utilizing a distributed cluster for parallel computation and concatenation, the problem of low efficiency in serial computation in the SQL execution engine is solved, thereby improving computational efficiency and resource utilization.

CN115827664BActive Publication Date: 2026-04-03THE FOURTH PARADIGM BEIJING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-17
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing technologies, SQL execution engines process multiple time-series features sequentially, resulting in low computational efficiency. The computation time increases with the number of time-series features, hardware resources cannot be fully utilized, and project costs increase.

Method used

By adding a unique ID to the input table, the required attribute values ​​of time series features are processed in parallel using preset instructions. After parallel computation, the feature table is concatenated by ID. Parallel computation is performed using a distributed cluster, and the results are finally summarized through the concatenation operation.

Benefits of technology

Parallel processing of multiple time-series features was achieved, reducing computation time, improving hardware resource utilization, and reducing feature extraction time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115827664B_ABST
    Figure CN115827664B_ABST
Patent Text Reader

Abstract

This disclosure provides a method and apparatus for obtaining temporal features. The method includes: determining at least one temporal feature for training a machine learning model; obtaining attribute values ​​required to obtain each of the at least one temporal feature from an input table, wherein the input table includes raw data required for training the machine learning model, each row in the input table corresponds to a training data point and has a unique ID, and each column in the input table corresponds to different attributes of the training data; obtaining at least one temporal feature through parallel processing based on preset operation instructions and the attribute values ​​required for each temporal feature; and concatenating the at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning, and the following description relates to a method and apparatus for obtaining temporal features. Background Technology

[0002] In machine learning scenarios, temporal feature computation is a crucial feature extraction process. Typically, a model's features include multiple temporal features, often expressed using SQL's `window` function. However, most SQL execution engines, such as the Spark big data processing framework, process multiple temporal features sequentially. The computation of each temporal feature must wait for the computation of the previous one to complete before it can begin. This sequential approach is not only computationally inefficient—the overall feature engineering and machine learning time increases significantly with the number of temporal features—but also fails to effectively utilize cluster hardware resources, leading to a substantial increase in project costs. Summary of the Invention

[0003] The exemplary embodiments disclosed herein may at least solve the above-described problems, or may not solve the above-described problems.

[0004] According to a first aspect of this disclosure, a method for obtaining temporal features is provided, comprising: determining at least one temporal feature for training a machine learning model; obtaining attribute values ​​required to obtain each of the at least one temporal feature from an input table, wherein the input table includes raw data required for training the machine learning model, each row in the input table corresponds to a training data and has a unique ID, and each column in the input table corresponds to different attributes of the training data; obtaining at least one temporal feature through parallel processing based on preset operation instructions and the attribute values ​​required for each temporal feature; and concatenating the at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model.

[0005] Optionally, obtaining the attribute values ​​required to obtain each time series feature from the input table includes: filtering the columns required to obtain each time series feature from the input table based on a preset filtering instruction, wherein the preset filtering instruction indicates the attributes required for each time series feature; and obtaining the attribute values ​​required for each time series feature based on the filtered columns required for each time series feature.

[0006] Optionally, at least one temporal feature is concatenated according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model, including: arranging the values ​​corresponding to each temporal feature in the at least one temporal feature according to the ID of each row in the input table to obtain a column vector corresponding to each temporal feature; and concatenating the column vectors corresponding to each temporal feature to obtain a temporal feature table for training the machine learning model.

[0007] Optionally, after concatenating at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model, the method further includes: extracting target columns from the temporal feature table and the input table and concatenating them to obtain a sample table based on preset extraction instructions, wherein the preset extraction instructions indicate the attributes and temporal features required for training the machine learning model; and training the machine learning model based on the sample table.

[0008] Optionally, the preset operation instructions, preset filtering instructions, and preset extraction instructions are obtained by parsing a pre-encoded structured query language.

[0009] According to a second aspect of this disclosure, a temporal feature acquisition apparatus is provided, comprising: a determination node configured to determine at least one temporal feature for training a machine learning model; a filtering node configured to obtain attribute values ​​required to obtain each of the at least one temporal feature from an input table, wherein the input table includes raw data required for training the machine learning model, each row in the input table corresponds to a training data and has a unique ID, and each column in the input table corresponds to different attributes of the training data; a temporal feature calculation node configured to process in parallel based on preset operation instructions and the attribute values ​​required for each temporal feature to obtain at least one temporal feature; and a data merging node configured to concatenate the at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model.

[0010] Optionally, the filtering node is also configured to filter the columns required to obtain each time series feature from the input table based on preset filtering instructions, wherein the preset filtering instructions indicate the attributes required for each time series feature; and to obtain the attribute values ​​required for each time series feature based on the filtered columns required for each time series feature.

[0011] Optionally, the data merging node is further configured to arrange the values ​​corresponding to each time series feature in at least one time series feature according to the ID of each row in the input table to obtain a column vector corresponding to each time series feature; and to concatenate the column vectors corresponding to each time series feature to obtain a time series feature table for training machine learning models.

[0012] Optionally, the data merging node is configured to, after concatenating at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model, extract target columns from the temporal feature table and the input table based on preset extraction instructions and concatenate them to obtain a sample table, wherein the preset extraction instructions indicate the attributes and temporal features required for training the machine learning model; and train the machine learning model based on the sample table.

[0013] Optionally, the preset operation instructions, preset filtering instructions, and preset extraction instructions are obtained by parsing a pre-encoded structured query language.

[0014] According to a third aspect of this disclosure, a computer-readable storage medium for storing instructions is provided, wherein when the instructions are executed by at least one computing device, they cause at least one computing device to perform the timing feature acquisition method described above.

[0015] According to a fourth aspect of this disclosure, a system is provided that includes at least one computing device and at least one storage device for storing instructions, wherein the instructions, when executed by at least one computing device, cause at least one computing device to perform the timing feature acquisition method described above.

[0016] According to the temporal feature acquisition method and apparatus of this exemplary embodiment, the processing of multiple temporal features is performed in parallel, which can reduce the overall computation time and make full use of hardware resources. Furthermore, a unique identifier is added to each row of the input table to ensure that the data in each row is not serial when the multiple temporal features obtained by parallel execution are concatenated, that is, to ensure that the temporal features obtained by parallel execution are consistent with the temporal features obtained by serial execution, and can be directly used for subsequent machine learning training. Attached Figure Description

[0017] These and / or other aspects and advantages of the invention will become clear and more readily understood from the following description of the embodiments, taken in conjunction with the accompanying drawings, wherein:

[0018] Figure 1 This is an architecture diagram of time-series feature acquisition methods in related technologies;

[0019] Figure 2 A flowchart illustrating a method for obtaining timing features according to an exemplary embodiment of the present disclosure is provided.

[0020] Figure 3 This is an architecture diagram illustrating a timing feature acquisition method according to exemplary embodiments of the present disclosure;

[0021] Figure 4 A block diagram of a timing feature acquisition apparatus according to an exemplary embodiment of the present disclosure is shown. Detailed Implementation

[0022] The following description, provided with reference to the accompanying drawings, is intended to aid in a full understanding of embodiments of the invention as defined by the claims and their equivalents. Various specific details are included to aid understanding, but these details are to be considered exemplary only. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Furthermore, for clarity and brevity, descriptions of well-known functions and structures are omitted.

[0023] It should be noted that the phrase "at least one of several items" in this disclosure refers to three parallel cases: "any one of the several items", "a combination of any number of the several items", and "all of the several items". For example, "including at least one of A and B" includes the following three parallel cases: (1) including A; (2) including B; (3) including A and B. As another example, "performing at least one of step one and step two" indicates the following three parallel cases: (1) performing step one; (2) performing step two; (3) performing both step one and step two.

[0024] Currently, mainstream SQL execution engines, such as the Spark big data execution engine, generate a SQL plan graph based on the SQL content and perform resource scheduling and computation based on the SQL plan graph. The architecture diagram is as follows: Figure 1 As shown, mainstream SQL execution engines generate execution plans serially for the calculation of multiple time-series features. The calculation of each time-series feature must wait for the calculation of the previous time-series feature to be completed before it can begin. Although this ensures the correctness of the final calculation of multiple time-series features, it also leads to a long overall calculation time and cannot fully utilize hardware resources.

[0025] To address the aforementioned problems, this disclosure proposes a method and apparatus for acquiring time-series features, which will be described below with reference to the appendix. Figures 2 to 4 This is to illustrate, in order to explain, this disclosure.

[0026] Figure 2 A flowchart illustrating a method for obtaining timing features according to an exemplary embodiment of this disclosure is shown. Figure 2 As shown, the time series feature acquisition method includes the following steps:

[0027] In step S201, at least one temporal feature is determined for training the machine learning model. For example, an SQL command statement can be used to determine at least one temporal feature. Specifically, to determine two temporal features, the following command statement can be used:

[0028] SELECT

[0029] min(age)OVER w1 as w1_min_age,

[0030] min(age)OVER w2 as w2_min_age

[0031] FROM t1

[0032] WINDOW

[0033] w1 as(PARTITION BY name ORDER by age ROWS BETWEEN 10PRECEDING ANDCURRENT ROW),

[0034] w2 as(PARTITION BY age ORDER by age ROWS BETWEEN 10PRECEDING ANDCURRENT ROW)"

[0035] The SQL command above defines two time-series features, which are calculated for different window definitions. The resulting two time-series features can be applied to the model training stage of machine learning.

[0036] In step S202, the attribute values ​​required to obtain each time-series feature from at least one time-series feature are retrieved from the input table. The input table includes the raw data required for training the machine learning model. Each row in the input table corresponds to one training data point and has a unique ID. Each column in the input table corresponds to different attributes of the training data. Specifically, a unique ID can be pre-added to each row in the input table, such as using an SQL function, to ensure that each row in the input table has a unique ID for identification, facilitating subsequent result concatenation. It should be noted that the above operation of adding unique IDs can also be implemented in other ways, such as using the function of adding an auto-incrementing primary key according to the database type.

[0037] According to an exemplary embodiment of this disclosure, obtaining the attribute values ​​required to obtain each time-series feature from an input table includes: filtering columns required to obtain each time-series feature from the input table based on a preset filtering instruction, wherein the preset filtering instruction indicates the attribute required for each time-series feature; and obtaining the attribute values ​​required for each time-series feature based on the filtered columns required for each time-series feature. Through this embodiment, only the corresponding columns are filtered from the input table to obtain the corresponding elements, reducing the data transmission and data encoding overhead during the calculation of each time-series feature.

[0038] For example, one option is to add a SimpleProject node before the computation nodes corresponding to multiple time series features. The SimpleProject node can be used to perform column filtering in advance, that is, to filter out the columns required to obtain each time series feature from the input table in advance.

[0039] In step S203, at least one time-series feature is obtained through parallel processing based on preset operation instructions and the attribute values ​​required for each time-series feature. For example, to obtain the two time-series features w1 and w2 mentioned above, the attribute values ​​required for w1 and w2 and the processing of the attribute values ​​are performed in parallel. In other words, they are performed simultaneously and do not affect each other. For example, the input table stores a student's past math scores. To obtain the student's accurate math score trend, we can calculate the average of each score and the previous score as the first score for each score, and the average of each score and the two previous scores as the second score for each score. By comparing the trends of the first and second scores, we can determine the student's overall score trend. Specifically, we can obtain the data needed to calculate the first and second scores from the input table, and then obtain the first and second scores based on the required data. If there are no other scores before the first score, the first score can be directly used as the first and second scores. If there is only the first score before the second score, the average of the two scores can be used as the first and second scores. Subsequent scores are calculated using the average of each score and the previous score as the first score, and the average of each score and the two previous scores as the second score. Moreover, the first and second scores are obtained in parallel.

[0040] In step S204, at least one temporal feature is concatenated according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model.

[0041] According to an exemplary embodiment of this disclosure, at least one temporal feature is concatenated based on the ID of each row in the input table to obtain a temporal feature table for machine learning model training. This includes: arranging the values ​​corresponding to each temporal feature in the at least one temporal feature according to the ID of each row in the input table to obtain a column vector corresponding to each temporal feature; and concatenating the column vectors corresponding to each temporal feature to obtain the temporal feature table for machine learning model training. In this embodiment, each row of the temporal features is sorted by row ID before concatenation, ensuring that the obtained temporal features are consistent with those obtained sequentially, thus allowing direct application to the subsequent model training stage.

[0042] Specifically, one option is to add a data merging node. This node concatenates the results of multiple time-series feature calculation nodes based on the previously added unique ID column information. Since each row has a unique ID to identify it, the results can be correctly concatenated using left outer join or inner join in the SQL specification. Alternatively, right outer join or full outer join can also be used. This disclosure does not limit the specific method used.

[0043] According to an exemplary embodiment of this disclosure, after concatenating at least one temporal feature based on the ID of each row in the input table to obtain a temporal feature table for machine learning model training, the method further includes: extracting target columns from the temporal feature table and the input table based on preset extraction instructions and concatenating them to obtain a sample table, wherein the preset extraction instructions indicate the attributes and temporal features required for machine learning model training; and training the machine learning model based on the sample table. This embodiment allows for convenient and rapid acquisition of a sample table for machine learning model training. During the process of concatenating the sample table, the IDs of each row in the input table and the temporal feature table can be used to complete the concatenation, or the concatenation can be performed directly while maintaining the consistent row order of the input table and the temporal feature table.

[0044] According to an exemplary embodiment of this disclosure, the preset operation instructions, preset filtering instructions, and preset extraction instructions are obtained by parsing a pre-encoded structured query language. It should be noted that the structured query language is only an optional solution, and this disclosure is not limited to this language.

[0045] To facilitate understanding of the above embodiments, the following is in conjunction with... Figure 3 A systematic explanation will be provided. Figure 3 This is an architecture diagram illustrating a timing feature acquisition method according to exemplary embodiments of the present disclosure, such as... Figure 3 As shown, this architecture can support parallel computing.

[0046] First, to ensure the results of parallel computation of multiple time-series features are consistent with those of serial computation, a unique ID is added to each row of the input table in the common node (DataProvider node) for parallel computation. This adds a unique ID column, which can be implemented using SQL functions. This operation ensures that each row of the input table has a unique ID, facilitating subsequent result concatenation. Second, after adding the unique ID column, the computation nodes for multiple time-series features (WindowAgg nodes) can be computed in parallel. Since the number of columns required for window computation varies, a simple column filtering node (SimpleProject node) can be used to pre-filter the columns. Window computation only depends on the necessary data columns and does not need to depend on all columns of the input table, thus optimizing data transmission and encoding overhead. Third, after the computation nodes for multiple time-series features have completed their computations, a data merging node needs to be added. This node concatenates the results of the multiple time-series feature computation nodes based on the previously added unique ID column information. Because each row has a unique ID, the results can be correctly concatenated using a left outer join or inner join as defined in SQL. Finally, since the concatenated output retains multiple columns storing unique IDs—meaning each concatenated time series feature has its own unique ID column—to ensure consistency with the pre-optimization results, a simple column filtering node (SimpleProject node) can be added after the concatenation node. This simply filters out the newly added columns containing unique IDs. This completes the entire process of optimizing parallel computation for multiple time series features. By modifying the serial execution plan and adding extra nodes, parallel computation of multiple time series features can be achieved. The computational overhead of the added nodes is much smaller than that of the time series feature computation itself. Parallel computation significantly improves overall hardware resource utilization and reduces the overall task runtime.

[0047] In summary, this disclosure provides an optimized scheme for parallel computation of time-series features. This involves splitting the computation into multiple parallelizable models, performing parallel computation using a distributed cluster, and then aggregating the results of the multiple time-series feature computations through a concatenation operation. This achieves the optimization effect of improving resource utilization and reducing feature extraction time. It should be noted that the concatenation operation for aggregating feature extraction results can be further optimized semantically and in terms of implementation to further improve the performance of parallel computation of time-series features, but this disclosure does not delve into this aspect.

[0048] Figure 4 A block diagram of a timing feature acquisition apparatus according to an exemplary embodiment of the present disclosure is shown. Figure 4 As shown, the time series feature acquisition device includes: a determination node 40, a filtering node 42, a time series feature calculation node 46, and a data merging node 48.

[0049] Node 40 is configured to determine at least one temporal feature for training a machine learning model; Node 42 is configured to retrieve attribute values ​​required to obtain each temporal feature from an input table, wherein the input table includes the raw data required for training the machine learning model, each row in the input table corresponds to a training data point with a unique ID, and each column in the input table corresponds to different attributes of the training data; Node 46 is configured to process in parallel based on preset operation instructions and the attribute values ​​required for each temporal feature to obtain at least one temporal feature; Node 48 is configured to concatenate at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model.

[0050] According to an exemplary embodiment of the present disclosure, the filtering node 42 is further configured to filter columns required to obtain each time series feature from the input table based on a preset filtering instruction, wherein the preset filtering instruction indicates the attribute required for each time series feature; and to obtain the attribute value required for each time series feature based on the filtered columns required for each time series feature.

[0051] According to an exemplary embodiment of this disclosure, the data merging node 48 is further configured to arrange the values ​​corresponding to each time series feature in at least one time series feature according to the ID of each row in the input table to obtain a column vector corresponding to each time series feature; and to concatenate the column vectors corresponding to each time series feature to obtain a time series feature table for training a machine learning model.

[0052] According to an exemplary embodiment of this disclosure, the data merging node 48 is configured to, after concatenating at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training a machine learning model, extract target columns from the temporal feature table and the input table based on preset extraction instructions and concatenate them to obtain a sample table, wherein the preset extraction instructions indicate the attributes and temporal features required for training the machine learning model; and train the machine learning model based on the sample table.

[0053] According to an exemplary embodiment of this disclosure, the preset operation instructions, preset filtering instructions, and preset extraction instructions are obtained by parsing a pre-encoded structured query language.

[0054] The above has been referred to Figures 1 to 4 A method and apparatus for acquiring timing features according to exemplary embodiments of the present disclosure are described.

[0055] Figure 4The units in the timing feature acquisition device shown can be configured as software, hardware, firmware, or any combination thereof to perform specific functions. For example, each unit may correspond to a dedicated integrated circuit, pure software code, or a module combining software and hardware. Furthermore, one or more functions implemented by each unit may also be uniformly executed by components in a physical entity device (e.g., a processor, client, or server).

[0056] In addition, refer to Figure 1 The described timing feature acquisition method can be implemented by a program (or instructions) recorded on a computer-readable storage medium. For example, according to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions may be provided, wherein when the instructions are executed by at least one computing device, the at least one computing device is caused to perform the timing feature acquisition method according to the present disclosure.

[0057] The computer program in the aforementioned computer-readable storage medium can run in an environment deployed in computer devices such as clients, hosts, agent devices, and servers. It should be noted that the computer program can also be used to perform additional steps beyond those described above, or to perform more specific processing while performing the above steps. The details of these additional steps and further processing are already described in the reference... Figure 1 The relevant methods were mentioned in the description of the process, so they will not be repeated here to avoid repetition.

[0058] It should be noted that each unit in the timing feature acquisition apparatus according to the exemplary embodiments of the present disclosure can rely entirely on the operation of a computer program to realize its corresponding function. That is, each unit corresponds to each step in the functional architecture of the computer program, so that the entire system is called through a special software package (e.g., a lib library) to realize its corresponding function.

[0059] on the other hand, Figure 4 The units shown can also be implemented using hardware, software, firmware, middleware, microcode, or any combination thereof. When implemented in software, firmware, middleware, or microcode, the program code or code segment used to perform the corresponding operation can be stored in a computer-readable medium such as a storage medium, so that the processor can perform the corresponding operation by reading and running the corresponding program code or code segment.

[0060] For example, an exemplary embodiment of the present disclosure can also be implemented as a computing device, which includes a storage component and a processor, wherein the storage component stores a set of computer-executable instructions, and when the set of computer-executable instructions is executed by the processor, a timing feature acquisition method according to an exemplary embodiment of the present disclosure is executed.

[0061] Specifically, the computing device can be deployed on a server or client, or on node devices in a distributed network environment. Furthermore, the computing device can be a PC, tablet, personal digital assistant, smartphone, web application, or other device capable of executing the aforementioned set of instructions.

[0062] Here, the computing device is not necessarily a single computing device, but can be any collection of devices or circuits capable of executing the aforementioned instructions (or instruction sets) individually or in combination. The computing device can also be part of an integrated control system or system manager, or can be configured to interconnect with a portable electronic device locally or remotely (e.g., via wireless transmission) through an interface.

[0063] In a computing device, a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, a processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.

[0064] Some operations described in the timing feature acquisition method according to exemplary embodiments of this disclosure can be implemented in software, some operations can be implemented in hardware, and these operations can also be implemented in a combination of software and hardware.

[0065] The processor can execute instructions or code stored in one of the storage components, which can also store data. Instructions and data can also be sent and received over a network via a network interface device, which can employ any known transport protocol.

[0066] Storage components can be integrated with the processor, for example, by placing RAM or flash memory within an integrated circuit microprocessor. Alternatively, storage components can include separate devices, such as external disk drives, storage arrays, or other storage devices that can be used by any database system. Storage components and the processor can be operatively coupled, or can communicate with each other, for example, via I / O ports, network connections, etc., enabling the processor to read files stored in the storage component.

[0067] In addition, the computing device may include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the computing device may be interconnected via a bus and / or network.

[0068] The timing feature acquisition method according to exemplary embodiments of this disclosure can be described as various interconnected or coupled functional blocks or functional diagrams. However, these functional blocks or functional diagrams can be equally integrated into a single logic device or operated according to non-precise boundaries.

[0069] Therefore, refer to Figure 1 The described method for obtaining timing features can be implemented by a system comprising at least one computing device and at least one storage device containing at least one storage instruction.

[0070] According to an exemplary embodiment of the present disclosure, at least one computing device is a computing device for executing a timing feature acquisition method according to an exemplary embodiment of the present disclosure, and a storage device stores a set of computer-executable instructions. When the set of computer-executable instructions is executed by at least one computing device, a reference is executed. Figure 1 The method for obtaining time-series features is described.

[0071] The foregoing has described various exemplary embodiments of this disclosure. It should be understood that the foregoing description is exemplary only and not exhaustive, and this disclosure is not limited to the disclosed exemplary embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A method for obtaining time-series features, wherein, The method includes: Identify at least one temporal feature for training a machine learning model; Obtain the attribute values ​​required to obtain each of the at least one time-series features from the input table, wherein the input table includes the raw data required for training the machine learning model, each row in the input table corresponds to a training data and has a unique ID, and each column in the input table corresponds to a different attribute of the training data; Based on preset operation instructions and the attribute values ​​required for each time series feature, at least one time series feature is obtained through parallel processing. The at least one temporal feature is concatenated according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model; The step of obtaining the attribute values ​​required to obtain each of the at least one time-series features from the input table includes: Based on preset filtering instructions, columns required to obtain each time series feature are filtered from the input table, wherein the preset filtering instructions indicate the required attributes for each time series feature; Based on the columns required for each time series feature after filtering, obtain the attribute values ​​required for each time series feature; The process further includes, after concatenating the at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model: Based on preset extraction instructions, target columns are extracted from the temporal feature table and the input table and concatenated to obtain a sample table. The preset extraction instructions indicate the attributes and temporal features required for training the machine learning model. The machine learning model is trained based on the sample table.

2. The method according to claim 1, wherein, The step of concatenating the at least one temporal feature based on the ID of each row in the input table to obtain a temporal feature table for training the machine learning model includes: The values ​​corresponding to each time series feature in the at least one time series feature are arranged according to the ID of each row in the input table to obtain the column vector corresponding to each time series feature; The column vectors corresponding to each time-series feature are concatenated to obtain a time-series feature table for training the machine learning model.

3. The method according to claim 1, wherein, The preset operation instructions, preset filtering instructions, and preset extraction instructions are obtained by parsing a pre-encoded structured query language.

4. A time-series feature acquisition device, wherein, The device includes: The node is determined and configured to identify at least one temporal feature for training a machine learning model. A filtering node is configured to retrieve attribute values ​​from an input table required to obtain each of the at least one time-series features, wherein the input table includes raw data required for training a machine learning model, each row in the input table corresponds to a training data and has a unique ID, and each column in the input table corresponds to a different attribute of the training data; The time-series feature calculation node is configured to process the at least one time-series feature in parallel based on preset operation instructions and the attribute values ​​required for each time-series feature. The data merging node is configured to concatenate at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model. The filtering node is further configured to filter columns required to obtain each time series feature from the input table based on a preset filtering instruction, wherein the preset filtering instruction indicates the attribute required for each time series feature; and to obtain the attribute value required for each time series feature based on the filtered columns required for each time series feature. The data merging node is configured to, after concatenating at least one temporal feature according to the ID of each row in the input table to obtain a temporal feature table for training the machine learning model, extract target columns from the temporal feature table and the input table based on a preset extraction instruction and concatenate them to obtain a sample table. The preset extraction instruction indicates the attributes and temporal features required for training the machine learning model. The machine learning model is then trained based on the sample table.

5. The apparatus according to claim 4, wherein, The data merging node is further configured to arrange the values ​​corresponding to each time series feature in the at least one time series feature according to the ID of each row in the input table to obtain a column vector corresponding to each time series feature; and to concatenate the column vectors corresponding to each time series feature to obtain a time series feature table for training the machine learning model.

6. The apparatus according to claim 4, wherein, The preset operation instructions, preset filtering instructions, and preset extraction instructions are obtained by parsing a pre-encoded structured query language.

7. A computer-readable storage medium for storing instructions, wherein, When the instruction is executed by at least one computing device, it causes the at least one computing device to perform the timing feature acquisition method as described in any one of claims 1 to 3.

8. A system comprising at least one computing device and at least one storage device for storing instructions, wherein, When the instruction is executed by the at least one computing device, it causes the at least one computing device to perform the timing feature acquisition method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Vertical union of feature-based datasets

    US20200226130A1