Feature processing method, device and system, electronic equipment and storage medium
By obtaining the leaf feature nodes in the topology graph during feature processing and using operators to perform real-time calculations, the problem of slow feature processing speed in the existing technology is solved, and efficient feature processing that returns results immediately when the user configuration is completed is realized.
Patent Information
- Application Number
- CN202310212318.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2024-08-27
AI Technical Summary
Existing feature processing methods have slow calculation speed when the topological graph structure is complex and the amount of data is huge, resulting in slow feature processing speed.
By obtaining the leaf feature nodes in the topology map, using the current operator to calculate and process them, and updating the results as child nodes, it is possible to build the topology map and perform calculations in one pass, using user configuration time to perform calculations and improve feature processing speed.
Results are returned immediately when the user completes the configuration, which significantly improves feature processing speed and reduces user waiting time.
Smart Images

Figure CN118551192A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a feature processing method, device, system, electronic device and storage medium. Background Art
[0002] Features have a direct impact on the prediction model and the results obtained, and feature engineering is the process of converting the original features into features that better represent their essence, so that applying these features to the prediction model can improve the prediction accuracy of the model. Among them, feature engineering includes feature crosses, synthetic features, etc., that is, one or more features are calculated by operators according to certain rules and sequences to obtain a new feature.
[0003] However, the current method of constructing feature engineering and calculation is to traverse the entire configured topology map. When the topology map has a complex structure and a huge amount of data, this method will consume a lot of time for calculation, so the current feature processing speed is slow. Summary of the invention
[0004] The embodiments of the present application provide a feature processing method, device, system, electronic device and storage medium, which can improve the feature processing speed.
[0005] The present application provides a feature processing method, including:
[0006] Obtain a topological graph, the topological graph includes leaf feature nodes, the leaf feature nodes are feature nodes with an out-degree of 0, and the feature nodes represent features;
[0007] In response to obtaining the current operator, the current operator is used as a child node of the leaf feature node;
[0008] The current operator is used to calculate the features represented by the leaf feature node to obtain the current result feature, and the current result feature is updated in the topology graph as a child node of the current operator;
[0009] Return and execute the steps: obtain the topology map, until the configuration completion instruction of the user is obtained, and return the features represented by the leaf feature nodes of the topology map to the user.
[0010] The present application also provides a feature processing device, including:
[0011] A feature unit, used to obtain a topological graph, wherein the topological graph includes a leaf feature node, wherein the leaf feature node is a feature node with an out-degree of 0, and the feature node represents a feature;
[0012] An operator unit, configured to, in response to acquiring a current operator, use the current operator as a child node of the leaf feature node;
[0013] A computing unit, configured to use the current operator to perform computational processing on the features represented by the leaf feature node to obtain a current result feature, and update the current result feature as a child node of the current operator in the topology map;
[0014] The completion unit is used to return and execute the steps of: obtaining a topology map, until obtaining the user's configuration completion instruction, and returning the features represented by the leaf feature nodes of the topology map to the user.
[0015] In some embodiments, the feature unit includes:
[0016] A feature subunit, used to obtain a candidate feature set, the candidate feature set includes a plurality of candidate features;
[0017] A feature selection subunit, configured to determine a current feature in a candidate feature set in response to a feature selection operation;
[0018] The feature node subunit is used to generate a feature node corresponding to the current feature in the topology graph.
[0019] In some embodiments, the feature selection subunit includes:
[0020] Display the feature nodes corresponding to the candidate features in the candidate feature set;
[0021] In response to a selection operation on a feature node corresponding to a candidate feature, a feature node corresponding to the current feature is determined.
[0022] In some embodiments, after the computing unit uses the current operator to compute the feature represented by the leaf feature node to obtain the current result feature, it is further used to:
[0023] Add the current result feature to the candidate feature set.
[0024] In some embodiments, the operator unit includes:
[0025] An operator subunit, used to obtain a candidate operator set, where the candidate operator set includes multiple candidate operators;
[0026] An operator selection subunit, configured to determine a current operator from a candidate operator set in response to an operator selection operation;
[0027] The operator node subunit is used to use the operator node corresponding to the current operator as a child node of the leaf feature node.
[0028] In some embodiments, the operator selection subunit is used to:
[0029] Display the operator nodes corresponding to the candidate operators in the candidate operator set;
[0030] In response to a selection operation on an operator node corresponding to a candidate operator, an operator node corresponding to a current operator is determined.
[0031] In some embodiments, the computing unit includes:
[0032] The type subunit is used to determine the data format supported by the current operator and the data format of the features represented by the leaf feature node;
[0033] The calculation subunit is used to use the current operator to calculate the features represented by the leaf feature node when the data format supported by the current operator is the same as the data format of the features represented by the leaf feature node.
[0034] In some embodiments, the data formats supported by the current operator include a left data format and a right data format, and the computing subunit is used to:
[0035] When the leaf feature node is the left parent node of the current operator, and the left data format is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate the feature represented by the leaf feature node;
[0036] When the leaf feature node is the right parent node of the current operator, and the right data format is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate and process the feature represented by the leaf feature node.
[0037] In some embodiments, the computing unit further comprises:
[0038] When the data format supported by the current operator is different from the data format represented by the leaf feature node, the features represented by the leaf feature node are converted to obtain a leaf feature node with the same data format as supported by the current operator, or a format mismatch is prompted.
[0039] The embodiment of the present application further provides a feature processing system, including a front end, a back end, and a computing engine, wherein the front end is used to:
[0040] Acquire a topology graph, the topology graph includes a leaf feature node, the leaf feature node is a feature node with an out-degree of 0, and the feature node represents a feature; in response to acquiring the current operator, use the current operator as a child node of the leaf feature node; send the leaf feature node and the current operator to the backend to obtain the current result feature returned by the backend;
[0041] The backend is used to:
[0042] Obtain and store the leaf feature node and the current operator from the front end, and obtain and store the current result feature from the computing engine; send the leaf feature node and the current operator to the computing engine, and send the current result feature to the front end;
[0043] The calculation engine is used to:
[0044] Obtain the leaf feature node and the current operator from the backend; use the current operator to calculate the features represented by the leaf feature node to obtain the current result features; and return the current result features to the backend.
[0045] In some embodiments, the leaf feature node and the current operator are sent to the backend, including:
[0046] Generate operator configuration events;
[0047] In response to the operator configuration event, the leaf feature node and the current operator are sent to the backend.
[0048] In some embodiments, the topology graph includes multiple computing groups, each computing group includes an operator node, all parent nodes of the operator node, and child nodes, and the leaf feature node and the current operator are sent to the backend, including:
[0049] Converting the topology map into a topology chart, the topology chart including the identifier of the topology map, the identifier of the computing group, the identifier of the operator node, the identifier of the parent node of the operator node, and the identifier of the child node of the operator node;
[0050] Send the topology diagram to the backend.
[0051] An embodiment of the present application also provides an electronic device, including a memory storing multiple instructions; the processor loads instructions from the memory to execute the steps in any one of the feature processing methods provided in the embodiment of the present application.
[0052] An embodiment of the present application also provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in any feature processing method provided in the embodiment of the present application.
[0053] The embodiment of the present application can obtain a topological map, which includes leaf feature nodes, which are feature nodes with an out-degree of 0, and the feature nodes represent features; in response to obtaining the current operator, the current operator is used as a child node of the leaf feature node; the current operator is used to calculate and process the features represented by the leaf feature node to obtain the current result features, and the current result features are updated in the topological map as child nodes of the current operator; return and execute the steps of: obtaining the topological map until the user's configuration completion instruction is obtained, and returning the features represented by the leaf feature nodes of the topological map to the user.
[0054] In the process of constructing a topology map, each time an operator is added to the topology map, the operator can be immediately used to calculate the features corresponding to its parent node, and the result of the operator obtained is used as its child node until the topology map is completed, thereby realizing the construction of the topology map while calculating. Compared with the prior art, the embodiment of the present application can utilize the time consumed by the user for each configuration operation in the topology map, so that the result can be immediately returned to the user when the user completes the configuration. Therefore, this solution can improve the feature processing speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0056] Figure 1a is a data interaction diagram of a feature processing system provided in an embodiment of the present application;
[0057] Figure 1b It is a flowchart of a feature processing method provided in an embodiment of the present application;
[0058] Figure 1c is a topological diagram of the feature processing method provided in the embodiment of the present application;
[0059] Figure 1d is a topological diagram of the feature processing method provided in the embodiment of the present application;
[0060] Figure 1e Schematic diagram of candidate feature sets and candidate operator sets of the feature processing method provided in the embodiment of the present application;
[0061] Figure 2 It is a schematic diagram of the data interaction flow of the feature processing system provided in an embodiment of the present application;
[0062] Figure 3 is a schematic diagram of the structure of a feature processing device provided in an embodiment of the present application;
[0063] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0065] Embodiments of the present application provide a feature processing method, device, system, electronic device, and storage medium.
[0066] The feature processing device may be integrated in an electronic device, which may be a terminal, a server, or other equipment. The terminal may be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC); the server may be a single server or a server cluster consisting of multiple servers.
[0067] In some embodiments, the feature processing device may also be integrated into multiple electronic devices. For example, the feature processing device may be integrated into multiple servers, and the feature processing method of the present application may be implemented by multiple servers.
[0068] In some embodiments, the server may also be implemented in the form of a terminal.
[0069] In some embodiments, the feature processing method can be applied in a feature processing system, for example, Figure 1a , the feature processing system may include a front-end, a back-end and a computing engine. Users can complete the configuration of features and operators through the front-end, the back-end can store the configuration information in a database, and the computing engine can read the configuration information from the back-end in real time and perform calculations. Among them:
[0070] The front end is used to obtain a topological map, which includes a leaf feature node, which is a feature node with an out-degree of 0, and the feature node represents a feature; in response to obtaining the current operator, the current operator is used as a child node of the leaf feature node; the leaf feature node and the current operator are sent to the back end, so as to obtain the current result feature returned by the back end;
[0071] The backend is used to obtain and store leaf feature nodes and current operators from the frontend, and obtain and store current result features from the computing engine; send leaf feature nodes and current operators to the computing engine, and send current result features to the frontend;
[0072] The calculation engine is used to obtain the leaf feature node and the current operator from the backend; use the current operator to calculate the features represented by the leaf feature node to obtain the current result features; and return the current result features to the backend.
[0073] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0074] Artificial Intelligence (AI) is a technology that uses digital computers to simulate human perception of the environment, acquire knowledge, and use knowledge. This technology can enable machines to have functions similar to human perception, reasoning, and decision-making. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation, and other major directions.
[0075] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0076] The feature processing method proposed in the embodiment of the present application can be applied in machine learning scenarios, and can perform good nonlinear feature fitting on multidimensional feature data sets, thereby improving the prediction accuracy of the model in the machine learning scenario.
[0077] In this embodiment, a feature processing method is provided, such as Figure 1b As shown, the specific process of the feature processing method can be as follows:
[0078] 101. Obtain a topological map, where the topological map includes leaf feature nodes. The leaf feature nodes are feature nodes with an out-degree of 0, and the feature nodes represent features.
[0079] In this embodiment, the topology graph may be composed of nodes and edges, wherein the nodes may be divided into feature nodes and operator nodes, wherein each feature node may represent a feature, and each operator node may represent an operator. Therefore, the following may contain expressions that interchangeably use features and feature nodes, and interchangeably use operator nodes and operators.
[0080] In some embodiments, the child nodes of a feature node can only be operator nodes; in some embodiments, the child nodes of an operator node can only be feature nodes.
[0081] In some embodiments, an operator node can have only one child node; in some embodiments, an operator node can have one or more parent nodes at the same time; in some embodiments, a feature child node can have at most one child node and at most one parent node.
[0082] For example, refer to Figure 1c In the topological diagram, feature nodes are represented by squares, and operator nodes are represented by ovals. Feature nodes may include feature1, feature3, Rfeature1, feature8, feature18, Rfeature2, Rfeature3, and Rfeature4; operator nodes may include op1, op14, op12, and op8.
[0083] In some embodiments, the concept of operator group can be introduced. Operator group refers to an operator and all parent nodes and child nodes of the operator. The embodiment of the present application supports that each time a user configures an operator in an operator group, the child nodes of the operator can be immediately generated, that is, the current result features of the operator group.
[0084] For example, refer to Figure 1c , the topology diagram may include four operator groups, wherein operator group 001 may include op1, feature1, feature3, and Rfeature1; operator group 002 may include op14, Rfeature1, feature8, and Rfeature2; operator group 003 may include op12, feature8, feature18, and Rfeature3; operator group 004 may include op8, Rfeature2, Rfeature3, and Rfeature4.
[0085] Among them, a leaf feature node refers to a feature node without child nodes, that is, a feature node with an out-degree of 0. For example, Figure 1c In the example, the leaf feature node is only Rfeature4; for example, in Figure 1d In , the leaf feature nodes are Rfeature2, feature8, and feature18.
[0086] It should be noted that every time the topology map is updated, the leaf feature nodes in the topology map may change. That is, if a child node is added to the original leaf feature node, the child node of the original leaf feature node will be the new leaf feature node.
[0087] When a topology graph is first established or a new operator group is created in a topology graph, the feature nodes added are naturally feature nodes with an out-degree of 0, i.e., leaf nodes. Correspondingly, in some embodiments, obtaining a topology graph may include the following steps:
[0088] Obtaining a candidate feature set, where the candidate feature set may include multiple candidate features;
[0089] In response to the feature selection operation, determining a current feature in a set of candidate features;
[0090] Generate a feature node corresponding to the current feature in the topology graph.
[0091] In some embodiments, the topology map can be constructed by the user, and the user can manually select feature nodes and operator nodes and configure them in the topology map. Figure 1e , the user can select any feature node in the preset candidate feature set and place it in the topological map. Therefore, in some embodiments, in response to the feature selection operation, determining the current feature in the candidate feature set may include the following steps:
[0092] Display the feature nodes corresponding to the candidate features in the candidate feature set;
[0093] In response to a selection operation on a feature node corresponding to a candidate feature, a feature node corresponding to the current feature is determined.
[0094] The selection operation may include dragging, clicking, double-clicking, long pressing, etc. For example, the user may drag the features or operators of the candidate feature set and the candidate operator set onto the canvas to complete the configuration of the cross-features in the form of a topological diagram.
[0095] 102. In response to obtaining the current operator, the current operator is used as a child node of a leaf feature node.
[0096] Similarly, refer to Figure 1e In some embodiments, step 102 may include the following steps:
[0097] Obtain a candidate operator set, which may include multiple candidate operators;
[0098] In response to the operator selection operation, determining a current operator in a set of candidate operators;
[0099] The operator node corresponding to the current operator is used as the child node of the leaf feature node.
[0100] In some embodiments, in response to the operator selection operation, determining the current operator in the candidate operator set may include the following steps:
[0101] Display the operator nodes corresponding to the candidate operators in the candidate operator set;
[0102] In response to a selection operation on an operator node corresponding to a candidate operator, an operator node corresponding to a current operator is determined.
[0103] The selection operation may include dragging, clicking, double-clicking, long pressing, etc. For example, the user may drag the features or operators of the candidate feature set and the candidate operator set onto the canvas to complete the configuration of the cross-features in the form of a topological diagram.
[0104] In some embodiments, whenever step 102 is completed, step 103 may be executed in an event-driven manner, that is, whenever a user configures an operator in the topology map, an operator configuration event is triggered, thereby triggering step 103 .
[0105] 103. Use the current operator to calculate and process the features represented by the leaf feature node to obtain the current result feature, and update the current result feature as a child node of the current operator in the topology map.
[0106] For example, the current operator may be a multiplication operator, and thus the computational processing of using the current operator to respond to the features represented by the leaf feature nodes may be to multiply the leaf feature nodes, and use the product of the leaf feature nodes as the current result feature.
[0107] Through step 103, it can be achieved that each time an operator in an operator group is configured, the computer can automatically generate the current result characteristics of the operator group.
[0108] In some embodiments, using the current operator to calculate the features represented by the leaf feature node may include the following steps:
[0109] Determine the data format supported by the current operator and the data format of the features represented by the leaf feature nodes;
[0110] When the data format supported by the current operator is the same as the data format of the features represented by the leaf feature node, the current operator is used to calculate and process the features represented by the leaf feature node.
[0111] In the embodiment of the present application, features can only be connected to operators, and operators can only be connected to features. Each operator node can be connected to one child node, and each operator node can be connected to n parent nodes, where n is a positive integer.
[0112] In order to ensure the accuracy of calculation, in some embodiments, the data format supported by the operator must be the same as the data format of its parent node. For example, the data format may include string format, int format, bigint format, etc.
[0113] For example, in some embodiments, an operator node may be connected to two parent nodes and one child node, the two parent nodes may include a left parent node left feature and a right parent node right feature; the data format of the left parent node must be the same as the left data format left feature format supported by the operator; the data format of the right parent node must be the same as the right data format right feature format supported by the operator.
[0114] Therefore, in some embodiments, the data format supported by the current operator may include a left data format and a right data format. When the data format supported by the current operator is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate the feature represented by the leaf feature node, which may include the following steps:
[0115] When the leaf feature node is the left parent node of the current operator, and the left data format is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate the feature represented by the leaf feature node;
[0116] When the leaf feature node is the right parent node of the current operator, and the right data format is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate and process the feature represented by the leaf feature node.
[0117] In some embodiments, if the data formats do not match, the mismatch may be indicated by message display, sound effect prompt, or highlight display, or the data format of the feature may be converted before calculation. Therefore, in some embodiments, the following may also be included:
[0118] When the data format supported by the current operator is different from the data format represented by the leaf feature node, the features represented by the leaf feature node are converted to obtain a leaf feature node with the same data format as supported by the current operator, or a format mismatch is prompted.
[0119] In some embodiments, the generated current result feature can be continuously used for the configuration of the next operator group. Therefore, after the current operator is used to calculate and process the feature represented by the leaf feature node, the following may be further included after the current result feature is obtained:
[0120] Add the current result feature to the candidate feature set.
[0121] In some embodiments, the data format of the current result feature can be automatically set to Rfeature.
[0122] In some embodiments, a user can register new features to the candidate feature set, and register new operators to the candidate operator set.
[0123] The feature information required to register a new feature to the candidate feature set includes the feature name Featurename, the feature data format Feature format, the name of the database table where the feature is stored Data source, and the field name Field name corresponding to the feature in the original table.
[0124] The operator information that needs to be provided when registering a new operator to the candidate operator set includes the operator name Operatorname, the left data format supported by the operator Left feature format, the right data format supported by the operator Right feature format, and the operator calculation formula Cross rule.
[0125] 104. Return and execute the steps: obtain the topology map, until the configuration completion instruction of the user is obtained, and return the features represented by the leaf feature nodes of the topology map to the user.
[0126] In some embodiments, the user can complete the configuration of the topology map by clicking a "Finish" button on the canvas.
[0127] As can be seen from the above, the embodiment of the present application can obtain a topological map, which includes leaf feature nodes, which are feature nodes with an out-degree of 0, and the feature nodes represent features; in response to obtaining the current operator, the current operator is used as a child node of the leaf feature node; the current operator is used to calculate and process the features represented by the leaf feature node to obtain the current result features, and the current result features are updated in the topological map as child nodes of the current operator; return and execute the steps of: obtaining the topological map until the user's configuration completion instruction is obtained, and returning the features represented by the leaf feature nodes of the topological map to the user.
[0128] Therefore, this solution can use this time to calculate the current result features in each operator group when the user configures an operator group, and can realize the calculation of some instances in the topology map without waiting for the configuration to be completed. Compared with the existing technology, this solution breaks down the entire calculation of the topology map into the calculation of multiple operator groups, and uses the time consumed by the user to configure each calculation group to calculate the calculation group, reducing the waiting time required for the user to wait for the entire traversal of the topology map, thereby improving the feature processing speed.
[0129] The method described in the above embodiment will be further described in detail below.
[0130] This embodiment proposes a management information system (MIS) for managing configuration information such as features and operators. The MIS can implement a feature processing method. The system is described in detail below.
[0131] refer to Figure 1c , the data interaction process of the feature processing system is as follows Figure 2 As shown, where:
[0132] The front end is used to obtain a topology map configured by the user. The topology map may include a leaf feature node. The leaf feature node is a feature node with an out-degree of 0, and the feature node represents a feature. In response to obtaining the current operator, the current operator is used as a child node of the leaf feature node. The leaf feature node and the current operator are sent to the back end to obtain the current result feature returned by the back end.
[0133] The backend is used to obtain and store leaf feature nodes and the current operator from the frontend, and to obtain and store the current result features from the computing engine; send leaf feature nodes and the current operator to the computing engine, and send the current result features to the frontend.
[0134] The calculation engine is used to obtain the leaf feature node and the current operator from the backend; use the current operator to calculate the features represented by the leaf feature node to obtain the current result features; and return the current result features to the backend.
[0135] Among them, every time the user configures an operator in a calculation group, the front end can generate an operator configuration event; and in response to the operator configuration event, the leaf feature node and the current operator are sent to the back end; while the back end writes the leaf feature node and the current operator into the database, it will continue to send the leaf feature node and the current operator to the calculation engine. After the calculation engine completes the calculation, it will return the current result features to the front end through the back end and display them in the front end canvas until the user completes the configuration of all calculation groups. The front end can notify the calculation engine of the configuration completion instruction through the back end so that the back end can obtain and store the final calculation result from the calculation engine, and send the final calculation result to the front end to realize the display of the final calculation result.
[0136] In some embodiments, the front end may convert the topology map into a topology chart so as to store it in the back end database. The table structure of the topology chart is shown in Table 1.
[0137] Cross ID Op instant id Left feature Right feature Cross op Out feature 1 001 Feature1 Feature3 Op1 Rfeature1 1 002 Rfeature1 Feature8 Op14 Rfeature2 1 003 Feature8 Feature18 Op12 Rfeature3 1 004 Rfeature2 Rfeature4 Op8 Rfeature8
[0138] Table 1
[0139] Among them, cross id refers to the topology map, and one topology map corresponds to a unique cross id; Op instant id refers to the computing group; Left feature refers to the left parent node of the operator in the computing group; Right feature refers to the right parent node of the operator in the computing group; Cross op refers to the operator in the computing group; Out feature refers to the feature output by the operator.
[0140] Therefore, the topology graph may include multiple computing groups, and the computing groups may include operator nodes, all parent nodes of the operator nodes, and child nodes. In some embodiments, sending the leaf feature node and the current operator to the backend may include the following steps:
[0141] Converting the topology map into a topology graph, where the topology graph may include an identifier of the topology map, an identifier of a computing group, an identifier of an operator node, an identifier of a parent node of the operator node, and an identifier of a child node of the operator node;
[0142] Send the topology diagram to the backend.
[0143] In the above configuration process of the embodiment of the present application, the configuration and calculation of each operator are executed in sequence, but different operators are completely asynchronous, which means that after the user completes the configuration, the results of all upstream operators have basically been calculated, so only a very short computing time is required to complete the calculation of the final result, and the user can obtain the result of the topology map immediately without waiting.
[0144] As can be seen from the above, the embodiment of the present application provides a feature processing framework that can be applied in feature crossover scenarios. Based on this framework, users can perform feature crossovers arbitrarily through MIS. Users can complete crossover feature configuration by simply dragging through MIS. The configuration method is simple and efficient; calculation and configuration are performed synchronously, and users can obtain crossover results in milliseconds after completing crossover configuration. Therefore, the embodiment of the present application improves the feature processing speed.
[0145] In order to better implement the above method, the embodiment of the present application also provides a feature processing device, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.
[0146] For example, in this embodiment, the method of the embodiment of the present application is described in detail by taking the feature processing device being specifically integrated in the server as an example.
[0147] For example, Figure 3As shown, the feature processing device may include a feature unit 301, an operator unit 302, a calculation unit 303 and a completion unit 304, as follows:
[0148] (a) Feature unit 301.
[0149] The feature unit 301 is used to obtain a topological graph, wherein the topological graph includes leaf feature nodes, wherein the leaf feature nodes are feature nodes with an out-degree of 0, and the feature nodes represent features.
[0150] In some embodiments, the feature unit 301 includes:
[0151] A feature subunit, used to obtain a candidate feature set, the candidate feature set includes a plurality of candidate features;
[0152] A feature selection subunit, configured to determine a current feature in a candidate feature set in response to a feature selection operation;
[0153] The feature node subunit is used to generate a feature node corresponding to the current feature in the topology graph.
[0154] In some embodiments, the feature selection subunit includes:
[0155] Display the feature nodes corresponding to the candidate features in the candidate feature set;
[0156] In response to a selection operation on a feature node corresponding to a candidate feature, a feature node corresponding to the current feature is determined.
[0157] In some embodiments, after the calculation unit 303 uses the current operator to calculate the feature represented by the leaf feature node to obtain the current result feature, it is also used to:
[0158] Add the current result feature to the candidate feature set.
[0159] (ii) Operator unit 302.
[0160] The operator unit 302 is used for, in response to obtaining the current operator, taking the current operator as a child node of the leaf feature node.
[0161] In some embodiments, the operator unit 302 includes:
[0162] An operator subunit, used to obtain a candidate operator set, where the candidate operator set includes multiple candidate operators;
[0163] An operator selection subunit, configured to determine a current operator from a candidate operator set in response to an operator selection operation;
[0164] The operator node subunit is used to use the operator node corresponding to the current operator as a child node of the leaf feature node.
[0165] In some embodiments, the operator selection subunit is used to:
[0166] Display the operator nodes corresponding to the candidate operators in the candidate operator set;
[0167] In response to a selection operation on an operator node corresponding to a candidate operator, an operator node corresponding to a current operator is determined.
[0168] (iii) Calculation unit 303.
[0169] The calculation unit 303 is used to use the current operator to calculate the features represented by the leaf feature node to obtain the current result feature, and update the current result feature as a child node of the current operator in the topology map.
[0170] In some embodiments, the computing unit 303 includes:
[0171] The type subunit is used to determine the data format supported by the current operator and the data format of the features represented by the leaf feature node;
[0172] The calculation subunit is used to use the current operator to calculate the features represented by the leaf feature node when the data format supported by the current operator is the same as the data format of the features represented by the leaf feature node.
[0173] In some embodiments, the data formats supported by the current operator include a left data format and a right data format, and the computing subunit is used to:
[0174] When the leaf feature node is the left parent node of the current operator, and the left data format is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate the feature represented by the leaf feature node;
[0175] When the leaf feature node is the right parent node of the current operator, and the right support data format is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate and process the feature represented by the leaf feature node.
[0176] In some embodiments, the calculation unit 303 further includes:
[0177] When the data format supported by the current operator is different from the data format represented by the leaf feature node, the features represented by the leaf feature node are converted to obtain a leaf feature node with the same data format as supported by the current operator, or a format mismatch is prompted.
[0178] (iv) Complete Unit 304.
[0179] The completion unit 304 is used to return and execute the steps of: obtaining a topology map, until obtaining a configuration completion instruction from the user, and returning the features represented by the leaf feature nodes of the topology map to the user.
[0180] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0181] As can be seen from the above, the feature processing device of this embodiment obtains a topological map by a feature unit, and the topological map includes a leaf feature node, and the leaf feature node is a feature node with an out-degree of 0, and the feature node represents a feature; the operator unit responds to obtaining the current operator and uses the current operator as a child node of the leaf feature node; the calculation unit uses the current operator to calculate and process the feature represented by the leaf feature node to obtain the current result feature, and updates the current result feature as a child node of the current operator in the topological map; the completion unit returns and executes the steps of obtaining the topological map until the user's configuration completion instruction is obtained, and the features represented by the leaf feature nodes of the topological map are returned to the user. Therefore, the embodiment of the present application can improve the feature processing speed.
[0182] The embodiment of the present application also provides an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc. The server can be a single server or a server cluster composed of multiple servers, etc.
[0183] In some embodiments, the feature processing device may also be integrated into multiple electronic devices. For example, the feature processing device may be integrated into multiple servers, and the feature processing method of the present application may be implemented by multiple servers.
[0184] In this embodiment, the electronic device of this embodiment is a server as an example for detailed description, for example, Figure 4 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0185] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0186] The processor 401 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0187] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0188] The electronic device also includes a power supply 403 for supplying power to various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0189] The electronic device may further include an input module 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0190] The electronic device may further include a communication module 405. In some embodiments, the communication module 405 may include a wireless module. The electronic device may perform short-range wireless transmission through the wireless module of the communication module 405, thereby providing the user with wireless broadband Internet access. For example, the communication module 405 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0191] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:
[0192] Obtain a topological graph, the topological graph includes leaf feature nodes, the leaf feature nodes are feature nodes with an out-degree of 0, and the feature nodes represent features;
[0193] In response to obtaining the current operator, the current operator is used as a child node of the leaf feature node;
[0194] The current operator is used to calculate the features represented by the leaf feature node to obtain the current result feature, and the current result feature is updated in the topology graph as a child node of the current operator;
[0195] Return and execute the steps: obtain the topology map, until the configuration completion instruction of the user is obtained, and return the features represented by the leaf feature nodes of the topology map to the user. The specific implementation of the above operations can be referred to the previous embodiment, and will not be repeated here.
[0196] It can be seen from the above that the embodiments of the present application can improve the feature processing speed.
[0197] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0198] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any feature processing method provided in the embodiment of the present application. For example, the instructions can execute the following steps:
[0199] Obtain a topological graph, the topological graph includes leaf feature nodes, the leaf feature nodes are feature nodes with an out-degree of 0, and the feature nodes represent features;
[0200] In response to obtaining the current operator, the current operator is used as a child node of the leaf feature node;
[0201] The current operator is used to calculate the features represented by the leaf feature node to obtain the current result feature, and the current result feature is updated in the topology graph as a child node of the current operator;
[0202] Return and execute the steps: obtain the topology map, until the configuration completion instruction of the user is obtained, and return the features represented by the leaf feature nodes of the topology map to the user. The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0203] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional implementations of the feature engineering aspect or feature intersection aspect provided in the above embodiments.
[0204] Since the instructions stored in the storage medium can execute the steps in any feature processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any feature processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0205] The above is a detailed introduction to a feature processing method, device, electronic device and computer-readable storage medium provided in the embodiments of 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 technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A feature processing method, characterized in that: include: Acquire a topological graph, wherein the topological graph includes a leaf feature node, wherein the leaf feature node is a feature node with an out-degree of 0, and the feature node represents a feature; In response to acquiring the current operator, taking the current operator as a child node of the leaf feature node; Using the current operator to calculate the features represented by the leaf feature node to obtain a current result feature, and updating the current result feature as a child node of the current operator in the topology map; Return and execute the steps: obtain a topology map, until the configuration completion instruction of the user is obtained, and return the features represented by the leaf feature nodes of the topology map to the user.
2. The feature processing method according to claim 1, characterized in that: The obtaining of the topology map comprises: Acquire a candidate feature set, wherein the candidate feature set includes a plurality of candidate features; In response to a feature selection operation, determining a current feature in the candidate feature set; A feature node corresponding to the current feature is generated in the topological graph.
3. The feature processing method according to claim 2, characterized in that: In response to the feature selection operation, determining the current feature in the candidate feature set includes: Display the feature nodes corresponding to the candidate features in the candidate feature set; In response to a selection operation on a feature node corresponding to the candidate feature, a feature node corresponding to the current feature is determined.
4. The feature processing method according to claim 2, characterized in that: After the current operator is used to calculate and process the feature represented by the leaf feature node to obtain the current result feature, the method further includes: The current result feature is added to the candidate feature set.
5. The feature processing method according to claim 1, characterized in that: In response to acquiring the current operator, taking the current operator as a child node of the leaf feature node includes: Acquire a candidate operator set, where the candidate operator set includes multiple candidate operators; In response to an operator selection operation, determining a current operator in the candidate operator set; The operator node corresponding to the current operator is used as a child node of the leaf feature node.
6. The feature processing method according to claim 5, characterized in that: The step of determining the current operator in the candidate operator set in response to the operator selection operation includes: Display the operator nodes corresponding to the candidate operators in the candidate operator set; In response to the selection operation of the operator node corresponding to the candidate operator, the operator node corresponding to the current operator is determined.
7. The feature processing method according to claim 1, characterized in that: The using the current operator to perform calculation processing on the feature represented by the leaf feature node includes: Determine the data format supported by the current operator and the data format of the features represented by the leaf feature node; When the data format supported by the current operator is the same as the data format of the features represented by the leaf feature node, the current operator is used to calculate and process the features represented by the leaf feature node.
8. The feature processing method according to claim 7, characterized in that: The data format supported by the current operator includes a left data format and a right data format. When the data format supported by the current operator is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate the feature represented by the leaf feature node, including: When the leaf feature node is the left parent node of the current operator, and the left data format is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate the feature represented by the leaf feature node; When the leaf feature node is the right parent node of the current operator, and the right data format is the same as the data format of the feature represented by the leaf feature node, the current operator is used to calculate and process the feature represented by the leaf feature node.
9. The feature processing method according to claim 7, characterized in that: Also includes: When the data format supported by the current operator is different from the data format of the features represented by the leaf feature node, the features represented by the leaf feature node are format converted to obtain a leaf feature node with the same data format as supported by the current operator, or a prompt is given that the format does not match.
10. A feature processing system, characterized in that: It includes the front-end, back-end and computing engine, including: The front end is used to: Acquire a topology graph, the topology graph including a leaf feature node, the leaf feature node being a feature node with an out-degree of 0, the feature node representing a feature; in response to acquiring a current operator, use the current operator as a child node of the leaf feature node; send the leaf feature node and the current operator to a backend, so as to acquire a current result feature returned by the backend; The backend is used to: Acquire and store the leaf feature node and the current operator from the front end, and acquire and store the current result feature from the computing engine; send the leaf feature node and the current operator to the computing engine, and send the current result feature to the front end; The computing engine is used to: The leaf feature node and the current operator are obtained from the backend; the features represented by the leaf feature node are calculated and processed using the current operator to obtain the current result features; and the current result features are returned to the backend.
11. The feature processing system according to claim 10, characterized in that: The sending the leaf feature node and the current operator to a backend includes: Generate operator configuration events; In response to the operator configuration event, the leaf feature node and the current operator are sent to a backend.
12. The feature processing system according to claim 10, characterized in that: The topology graph includes a plurality of computing groups, each of which includes an operator node, all parent nodes and child nodes of the operator node, and the sending of the leaf feature node and the current operator to a backend includes: Converting the topology map into a topology graph, wherein the topology graph includes an identifier of the topology map, an identifier of the computing group, an identifier of the operator node, an identifier of a parent node of the operator node, and an identifier of a child node of the operator node; The topology graph is sent to the backend.
13. A feature processing device, characterized in that: include: A feature unit, used to obtain a topological graph, wherein the topological graph includes a leaf feature node, wherein the leaf feature node is a feature node with an out-degree of 0, and the feature node represents a feature; An operator unit, configured to, in response to acquiring a current operator, use the current operator as a child node of the leaf feature node; A computing unit, configured to use the current operator to perform computational processing on the features represented by the leaf feature node to obtain a current result feature, and update the current result feature as a child node of the current operator in the topology map; The completion unit is used to return and execute the steps of: obtaining a topology map, until obtaining the user's configuration completion instruction, and returning the features represented by the leaf feature nodes of the topology map to the user.
14. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the feature processing method according to any one of claims 1 to 9.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the feature processing method according to any one of claims 1 to 9.
