CN110704742B - Feature extraction method and device - Google Patents

Feature extraction method and device Download PDF

Info

Publication number
CN110704742B
CN110704742B CN201910942449.2A CN201910942449A CN110704742B CN 110704742 B CN110704742 B CN 110704742B CN 201910942449 A CN201910942449 A CN 201910942449A CN 110704742 B CN110704742 B CN 110704742B
Authority
CN
China
Prior art keywords
feature
tree structure
expression
feature extraction
characteristic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910942449.2A
Other languages
Chinese (zh)
Other versions
CN110704742A (en
Inventor
朱纪乐
张立文
程佳
柳明海
张涛
杜宇亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201910942449.2A priority Critical patent/CN110704742B/en
Publication of CN110704742A publication Critical patent/CN110704742A/en
Application granted granted Critical
Publication of CN110704742B publication Critical patent/CN110704742B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Landscapes

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

Abstract

The specification discloses a feature extraction method and a feature extraction device, wherein at least one feature expression configured for a prediction model is determined in the method, for each feature expression, factors are added at nodes of a preset tree structure according to incidence relations among the factors in the feature expression, a first tree structure corresponding to the feature expression is determined, the first tree structures determined for each feature expression are combined to obtain a second tree structure, the second tree structure is analyzed according to a preset analysis mode to generate feature extraction codes, and feature extraction is performed on target data by executing the feature extraction codes to obtain feature data needing to be input into the prediction model. After at least one characteristic expression preset by the prediction model is determined, the characteristic extraction codes are automatically obtained according to factors contained in the characteristic expressions, so that the generation efficiency of the characteristic extraction codes is greatly improved.

Description

Feature extraction method and device
Technical Field
The present disclosure relates to the field of computers, and in particular, to a method and an apparatus for feature extraction.
Background
In order to provide better service experience for users, each service platform can analyze the service preference and habit of the users based on the information of historical service records, historical browsing records and the like of the users so as to carry out target recommendation for the users.
When the business platform provides information recommendation service for users, the information recommendation service is generally realized through a plurality of set prediction models. Specifically, when the service platform recommends information to the user, one prediction model may be randomly selected from the multiple prediction models, and according to the feature dimension of the data required by the selected prediction model, features may be extracted from the attribute data of the user and the attribute data of each optional information, and the obtained feature data may be input into the prediction model to obtain a prediction result. And the subsequent service platform can recommend information to the user based on the prediction result. The feature dimensions of data required by different prediction models are different, and the main purpose of setting a plurality of prediction models is to determine which feature dimension combination corresponds to a better prediction result.
In order to provide better information recommendation service for users, the service platform needs to further train the prediction model to update the prediction model. However, because the feature dimensions of data required by different prediction models are different, in the prior art, a worker of a service platform needs to set different feature extraction codes in advance for different prediction models, and the service platform can extract data used for being input into each prediction model from attribute data of a user and attribute data of each optional information through the different feature extraction codes.
However, in practical applications, the staff of the service platform needs to update each prediction model based on the actual situation and also needs to adjust the feature extraction code corresponding to each prediction model. And the adjustment of the feature extraction codes consumes the great time cost and labor cost of workers, thereby bringing great inconvenience to the workers.
Disclosure of Invention
The present specification provides a feature extraction method and apparatus to partially solve the above problems in the prior art.
The technical scheme adopted by the specification is as follows:
the present specification provides a feature extraction method including:
determining at least one characteristic expression configured aiming at the prediction model, wherein each characteristic expression comprises a plurality of factors;
adding factors at nodes of a preset tree structure according to the incidence relation among the factors in each characteristic expression, and determining a first tree structure corresponding to the characteristic expression;
combining the first tree structures determined by aiming at each feature expression to obtain a second tree structure for generating a feature extraction code;
analyzing the second tree structure according to a preset analysis mode to generate a feature extraction code;
and performing feature extraction on target data by executing the feature extraction code to obtain feature data needing to be input into the prediction model.
Optionally, the factor comprises: and the operator is used for determining data of a specified characteristic dimension from the metadata and/or the attribute data corresponding to the metadata.
Optionally, for each feature expression, adding each factor at each node of a preset tree structure according to an association relationship between each factor in the feature expression, and determining a first tree structure corresponding to the feature expression, specifically including:
and determining a first tree structure corresponding to the characteristic expression by taking an operator contained in the characteristic expression as a father node and taking a factor directly taken as an independent variable of the operator as a child node of the father node.
Optionally, combining the first tree structures determined for each feature expression to obtain a second tree structure for generating a feature extraction code, specifically including:
and combining the first tree structures determined by aiming at each characteristic expression by using a common root node according to the preset arrangement sequence of each characteristic dimension in the characteristic data to obtain the second tree structure.
Optionally, analyzing the second tree structure according to a preset analysis mode to generate a feature extraction code, which specifically includes:
determining each code generation template corresponding to each factor at each node in the second tree structure according to the corresponding relation between each preset code generation template and each factor;
generating each sub-feature extraction code corresponding to each factor at each node in the second tree structure according to each code generation template;
and combining the sub-feature extraction codes according to the parent-child relationship among the nodes in the tree structure to generate the feature extraction codes.
The present specification provides an apparatus for feature extraction, comprising:
the device comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for determining at least one characteristic expression configured aiming at a prediction model, and each characteristic expression comprises a plurality of factors;
the second determining module is used for adding factors at nodes of a preset tree structure according to the incidence relation among the factors in each characteristic expression aiming at each characteristic expression, and determining a first tree structure corresponding to the characteristic expression;
the tree structure module is used for combining the first tree structures determined by aiming at each feature expression to obtain a second tree structure used for generating a feature extraction code;
the generating module is used for analyzing the second tree structure according to a preset analyzing mode to generate a feature extraction code;
and the extraction module is used for extracting the characteristics of the target data by executing the characteristic extraction codes to obtain the characteristic data needing to be input into the prediction model.
Optionally, the factor comprises: and the operator is used for determining data of a specified characteristic dimension from the metadata and/or the attribute data corresponding to the metadata.
Optionally, the second determining module is specifically configured to determine the first tree structure corresponding to the feature expression by using an operator included in the feature expression as a parent node, and using a factor directly serving as an argument of the operator as a child node of the parent node.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described feature extraction method.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above feature extraction method when executing the program.
The technical scheme adopted by the specification can achieve the following beneficial effects:
in the feature extraction method provided in this specification, at least one feature expression configured for a prediction model may be determined, for each feature expression, each factor is added at each node of a preset tree structure according to an association relationship between the factors in the feature expression, a first tree structure corresponding to the feature expression is determined, the first tree structures determined for each feature expression are combined to obtain a second tree structure used for generating a feature extraction code, the second tree structure is analyzed according to a preset analysis manner to generate the feature extraction code, and the feature extraction code is executed to perform feature extraction on target data to obtain feature data to be input to the prediction model.
It can be seen from the above method that, after at least one feature expression configured for the prediction model is determined, the feature extraction code is automatically obtained according to each factor included in each feature expression, so that the generation efficiency of the feature extraction code is greatly improved. Moreover, even if the feature extraction code for extracting the feature data required by the prediction model needs to be changed due to the adjustment of the prediction model, the corresponding feature extraction code can be automatically generated after at least one feature expression configured by the adjusted prediction model is determined, so that the maintenance cost of the feature extraction code is greatly reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
fig. 1 is a schematic flow chart of feature extraction provided in the present specification;
FIG. 2 is a diagram illustrating a first tree structure corresponding to certain feature expressions provided herein;
FIG. 3 is a schematic diagram of obtaining a second tree structure from each first tree structure provided in the present specification;
FIG. 4 is a schematic diagram of a feature extraction apparatus provided herein;
fig. 5 is a schematic diagram of an electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present specification clearer, the technical solutions in the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of feature extraction provided in this specification, and specifically includes the following steps:
s101: at least one characteristic expression configured for the prediction model is determined, and each characteristic expression comprises a plurality of factors.
Before feature extraction is performed on a training sample used by a prediction model, a feature extraction code for extracting feature data from the training sample needs to be determined. For this reason, in the present specification, at least one feature expression configured for a prediction model may be determined for the prediction model. The execution main body for implementing the feature extraction method provided in the present specification may be a server, or may be a terminal device such as a computer. For convenience of description, the feature extraction method provided in the present specification will be described in detail below, taking only the server as an execution subject as an example.
At least one feature expression of the above-mentioned prediction model configuration may be configured by an artificial manner, that is, in order to be able to generate a feature extraction code suitable for extracting feature data from a training sample of the prediction model, a plurality of suitable feature expressions may be artificially configured for the prediction model. The subsequent server can automatically generate corresponding feature extraction codes according to at least one feature expression preset by the prediction model.
It can be seen from this point that, if the feature dimension of the required data has changed to some extent after the prediction model is adjusted, the feature expression configured for the prediction model can be modified manually, and compared with a manner in which the feature extraction code is modified manually in the prior art, the method can greatly simplify manual operation and improve the generation efficiency of the feature extraction code. In addition, in the prior art, the feature extraction code for extracting the features of the training samples used by the prediction model has a close coupling relationship with the prediction model and the services to which the prediction model is applied, so that a large amount of labor cost and time cost are consumed for manually modifying the feature extraction code. In the feature extraction method provided by the present specification, only the corresponding feature expression needs to be configured for the prediction model manually, and the limit of the prediction model and the service to which the prediction model is applicable to configuring the feature expression is low, so that the coupling between the feature extraction code and the service can be greatly reduced.
And aiming at each characteristic expression configured by the prediction model, the characteristic expression comprises a plurality of factors, and the factors actually specify the data related to the characteristic expression and the relation among the data. Specifically, in this specification, the factor may include an operator, metadata, and attribute data corresponding to the metadata. The operator is mainly used for determining data of the specified characteristic dimension from the metadata and the attribute data corresponding to the metadata. Metadata may be understood as actual data. For example, in an information recommendation scenario, the server may send recommendation information to the user based on the user information of the user, where the user information and the recommendation information mentioned herein may be regarded as metadata. And the attribute data corresponding to the metadata may refer to a specific value, field, and the like in the metadata. For example, when the metadata is user information, the attribute data corresponding to the metadata may refer to a user identifier (e.g., a user ID) included in the user information.
Of course, the above-mentioned factors may also include other forms of data, for example, if an operator is used to mainly determine whether the specified data exists in the metadata, the factor included in the operator also includes the specified data in addition to the metadata.
In this specification, a server stores a plurality of operators, each of which has different functions, and the operators stored in the server may be some conventional operators or operators set by a worker to implement a specific function. Here, the operator used is not particularly limited.
S102: and aiming at each characteristic expression, adding each factor at each node of a preset tree structure according to the incidence relation among the factors in the characteristic expression, and determining a first tree structure corresponding to the characteristic expression.
After the server determines at least one feature expression configured for the prediction model, each factor may be added at each node of the preset tree structure according to the association relationship between the factors in the feature expression for each feature expression, so as to determine that the feature expression corresponds to the first tree structure. For a feature expression, an operator included in the feature expression may serve as a parent node, and a factor directly serving as an argument of the operator may serve as a child node of the parent node, as shown in fig. 2.
Fig. 2 is a schematic diagram of determining that a feature expression corresponds to a first tree structure provided in this specification.
In fig. 2, the feature expression is: MatchIn ({ poi.type _ id }, { user.type _ prefer }), which is an operator in the feature expression, poi.type _ id and user.type _ prefer are factors included in the operator. The main role of the operator is to determine whether the category id of the Point of Interest (Point of Interest, Poi) appears in the user's favorite category id. As can be seen from the feature expression, the poi, type _ id and the user, type _ prediction are arguments of the operator MatchIn, so that the poi, type _ id and the user, type _ prediction are two child nodes respectively, and the parent nodes corresponding to the two child nodes, i.e., the nodes where the operator MatchIn is located as shown in fig. 2.
It should be noted that the main function of the parent node is to mark metadata, attribute data corresponding to the metadata, or the specified data on the child node corresponding to the parent node, and the computation needs to be performed by an operator from the parent node, and finally, the output of the parent node is actually data obtained by performing a child computation on the parent node.
S103: and combining the first tree structures determined according to each feature expression to obtain a second tree structure for generating the feature extraction code.
As can be seen from the above process, each feature expression corresponds to a first tree structure, and there may be multiple feature expressions configured for the prediction model, that is, the feature extraction code for performing feature extraction on the training sample applicable to the prediction model is often not determined by only one feature expression, but needs multiple feature expressions and logical relationships between the multiple feature expressions to determine the feature expressions. Therefore, after determining the first tree structures corresponding to the feature expressions configured for the prediction model, the server may combine the first tree structures according to the relationship between the feature expressions configured for the prediction model to obtain the second tree structure.
Specifically, for a feature expression, calculating each factor in the feature expression through an operator in the feature expression can obtain a corresponding output, and the output can actually be used as a factor in other feature expressions. Based on this, in the present specification, the server may determine, from at least one feature expression configured for the prediction model, a relationship between feature expressions, that is, for one feature expression, as a factor in which feature expression an output result of the feature expression obtained by an operator in the feature expression is used. The server may combine the first tree structures corresponding to the feature expressions according to the determined relationship between the feature expressions to obtain a second tree structure, as shown in fig. 3.
Fig. 3 is a schematic diagram of obtaining a second tree structure through each first tree structure provided in this specification.
In fig. 3, data a and data B are factors included in operator 1, and therefore, a node where data a is located and a node where data B is located are two child nodes when operator 1 is a parent node with respect to operator 1. Similarly, the node where the data C is located and the node where the data D is located are two child nodes when the operator 2 is used as a parent node. And it can be determined by the feature expression including the operator 3 that the factor included in the operator 3 is the result output by the operator 1 and the operator 2, so that the node where the operator 1 is located and the node where the operator 2 is located are two child nodes when the node where the operator 3 is located is a parent node.
It should be noted that the second tree structure obtained by the server includes a root node, which is not shown in fig. 3, and actually the root node indicates a final result obtained by computing each feature expression.
Further, due to the feature data input as a prediction model, it tends to be fixed in the order of its feature dimensions. In other words, the format of the feature data input into the prediction model is often fixed, which accordingly determines the arrangement order of feature dimensions in the feature data. The server extracts data from the training samples or the information acquired during the service execution process, and finally arranges the extracted data according to the preset order of the feature dimensions to obtain the final feature data. Therefore, in this specification, the server may combine the first tree structures determined for each feature expression with a common root node according to an arrangement order preset in the feature data (i.e., the feature data input to the prediction model) for each feature dimension to obtain the second tree structure.
S104: and analyzing the second tree structure according to a preset analysis mode to generate a feature extraction code.
After obtaining the second tree structure, the server may analyze the second tree structure according to a preset analysis method, so as to obtain a feature extraction code for extracting feature data from a training sample applied to the prediction model.
Specifically, the server stores in advance a correspondence relationship between each code generation template and each factor, so the server can determine each code generation template corresponding to each factor in each node in the second tree structure according to the correspondence relationship, and then the server can generate each sub-feature extraction code corresponding to each factor in each node in the second tree structure according to each code generation template, and further combine each sub-feature extraction code according to a parent-child relationship between each node in the tree structures (i.e., the first tree structure and the second tree structure), thereby finally generating a feature extraction code for extracting feature data from a training sample suitable for the prediction model. The server may combine the determined sub-feature extraction codes according to a preset combination logic. The combination logic mentioned here may be a logic sequence that is artificially executed according to the codes and a logic relationship between the codes that is configured in the server in advance.
S105: and performing feature extraction on target data by executing the feature extraction code to obtain feature data needing to be input into the prediction model.
After obtaining the feature extraction code for performing feature extraction on the training sample of the prediction model, the server may store the feature extraction code. In this way, when the prediction model needs to be trained, the server can extract corresponding feature data from the training samples applied to the prediction model through the feature extraction code corresponding to the prediction model, and then train the prediction model based on the extracted feature data.
According to the method, after at least one feature expression preset by the prediction model is determined, the feature extraction codes are automatically obtained according to factors contained in the feature expressions, so that the generation efficiency of the feature extraction codes is greatly improved.
In practical applications, workers often need to adjust the prediction model used on the line based on actual business requirements. In this specification, after the prediction model is determined and adjusted, the feature extraction code applicable to the adjusted prediction model may be determined based on at least one feature expression configured by an employee and a witness for the adjusted prediction model, and when the adjusted prediction model is trained, the corresponding feature data may be extracted from the training sample applicable to the adjusted prediction model according to the feature extraction code, so that the purpose of training the adjusted prediction model is achieved based on the extracted feature data.
That is, even if the feature extraction code for extracting the feature data required by the prediction model needs to be changed due to the adjustment of the prediction model, the corresponding feature extraction code can be automatically generated after at least one feature expression configured by the adjusted prediction model is determined, so that the maintenance cost of the feature extraction code is greatly reduced.
It should be noted that, a service platform is often combined by two parts, one is an online service system, the other is an offline test system, and a prediction model is provided in the online service system, so that actual services can be provided to users through the prediction model. And a mirror image model corresponding to the prediction model is arranged in the offline test system. The mirror image model has the function that the updating of each parameter of the prediction model in the online service system can be realized by training the mirror image model.
Based on this, the feature extraction method provided by the present specification can be used for feature extraction of a training sample used by a mirror image model set in an offline testing system. Of course, the input of the prediction model in the online service system or the mirror model in the offline test system is the feature data extracted from the information (the feature data input into the prediction model is the information acquired during the business execution process, and the feature data input into the mirror model is the feature data extracted from the training sample). Since the prediction model and the mirror model are actually the same model, the feature dimensions of the feature data input into the two models should be the same.
Accordingly, the feature extraction codes used by the two models should also be the same. Since the feature extraction code determined for the prediction model is stored, the server in the online service system and the server in the offline test system can call the same feature extraction code for feature extraction of data required by the prediction model and the mirror model, no matter whether the service execution is performed in the online service system or the model training is performed in the offline test system.
It should be further noted that the training samples for training may be obtained by filling samples to be filled, which are pre-stored, with samples. Specifically, for each piece of recommendation information sent to the user by the online service system, the recommendation information corresponds to a corresponding sample to be filled. The offline testing system can generate and store the to-be-filled sample corresponding to the recommendation information according to the user identifier of the user, the data identifier of the recommendation information and the acquired operation result of the user for the recommendation information. In the model training process, the offline testing system can inquire the user information of the user through the user identification recorded in the sample to be filled, inquire the recommendation information through the data identification recorded in the sample to be filled, and then fill the sample to be filled through the inquired user information and the recommendation information, so that the training sample corresponding to the recommendation information is obtained.
The offline testing system can extract the code through the determined features, extract the feature data from the training sample, and then train the mirror image model in the offline testing system based on the feature data and the sample label recorded in the training sample.
Because the to-be-filled sample stored in the offline testing system does not contain detailed data content, the storage space can be effectively saved by storing the to-be-filled sample. And for all training samples, corresponding samples to be filled can be generated firstly and filled during training, so that the same maintenance mode of the training samples is realized, and great convenience is brought to the maintenance of the training samples.
Based on the same idea, the feature extraction method provided above for one or more embodiments of the present specification further provides a corresponding feature extraction device, as shown in fig. 4.
Fig. 4 is a schematic diagram of a feature extraction apparatus provided in this specification, which specifically includes:
a first determining module 401, configured to determine at least one feature expression configured for the prediction model, where each feature expression includes multiple factors;
a second determining module 402, configured to add, for each feature expression, each factor at each node of a preset tree structure according to an association relationship between the factors in the feature expression, and determine a first tree structure corresponding to the feature expression;
a tree structure module 403, configured to combine the first tree structures determined for each feature expression to obtain a second tree structure for generating a feature extraction code;
a generating module 404, configured to analyze the second tree structure according to a preset analysis manner, and generate a feature extraction code;
an extracting module 405, configured to perform feature extraction on the target data by executing the feature extraction code, so as to obtain feature data that needs to be input into the prediction model.
Optionally, the factor comprises: and the operator is used for determining data of a specified characteristic dimension from the metadata and/or the attribute data corresponding to the metadata.
Optionally, the second determining module 402 is specifically configured to determine the first tree structure corresponding to the feature expression by using an operator included in the feature expression as a parent node, and using a factor directly serving as an argument of the operator as a child node of the parent node.
Optionally, the tree structure module 403 is specifically configured to combine the first tree structures determined for each feature expression with a common root node according to an arrangement order preset in the feature data by each feature dimension, so as to obtain the second tree structure.
Optionally, the generating module 404 is specifically configured to determine, according to a preset correspondence between each code generation template and each factor, each code generation template corresponding to each factor at each node in the second tree structure; generating each sub-feature extraction code corresponding to each factor at each node in the second tree structure according to each code generation template; and combining the sub-feature extraction codes according to the parent-child relationship among the nodes in the tree structure to generate the feature extraction codes.
The present specification also provides a computer-readable storage medium storing a computer program operable to execute the above-described feature extraction method.
This specification also provides a schematic block diagram of the electronic device shown in fig. 5. As shown in fig. 5, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to realize the feature extraction method. Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (8)

1. A method of feature extraction, comprising:
determining at least one characteristic expression configured for the prediction model, wherein each characteristic expression comprises a plurality of factors, and the factors comprise: at least one of an operator, metadata and attribute data corresponding to the metadata, wherein the operator is used for determining data of a specified characteristic dimension from the metadata and/or the attribute data corresponding to the metadata;
adding factors at nodes of a preset tree structure according to the incidence relation among the factors in each characteristic expression, and determining a first tree structure corresponding to the characteristic expression;
combining the first tree structures determined by aiming at each feature expression to obtain a second tree structure for generating a feature extraction code;
analyzing the second tree structure according to a preset analysis mode to generate a feature extraction code;
and performing feature extraction on target data by executing the feature extraction code to obtain feature data needing to be input into the prediction model.
2. The feature extraction method of claim 1, wherein, for each feature expression, according to an association relationship between factors in the feature expression, adding the factors at nodes of a preset tree structure, and determining a first tree structure corresponding to the feature expression specifically includes:
and determining a first tree structure corresponding to the characteristic expression by taking an operator contained in the characteristic expression as a father node and taking a factor directly taken as an independent variable of the operator as a child node of the father node.
3. The feature extraction method according to claim 2, wherein combining the first tree structures determined for each feature expression to obtain a second tree structure used for generating a feature extraction code, specifically comprises:
and combining the first tree structures determined by aiming at each characteristic expression by using a common root node according to the preset arrangement sequence of each characteristic dimension in the characteristic data to obtain the second tree structure.
4. The feature extraction method according to claim 3, wherein analyzing the second tree structure according to a preset analysis mode to generate a feature extraction code specifically includes:
determining each code generation template corresponding to each factor at each node in the second tree structure according to the corresponding relation between each preset code generation template and each factor;
generating each sub-feature extraction code corresponding to each factor at each node in the second tree structure according to each code generation template;
and combining the sub-feature extraction codes according to the parent-child relationship among the nodes in the second tree structure to generate the feature extraction codes.
5. A feature extraction device characterized by comprising:
a first determining module, configured to determine at least one feature expression configured for the prediction model, where each feature expression includes a plurality of factors, and the factors include: at least one of an operator, metadata and attribute data corresponding to the metadata, wherein the operator is used for determining data of a specified characteristic dimension from the metadata and/or the attribute data corresponding to the metadata;
the second determining module is used for adding factors at nodes of a preset tree structure according to the incidence relation among the factors in each characteristic expression aiming at each characteristic expression, and determining a first tree structure corresponding to the characteristic expression;
the tree structure module is used for combining the first tree structures determined by aiming at each feature expression to obtain a second tree structure used for generating a feature extraction code;
the generating module is used for analyzing the second tree structure according to a preset analyzing mode to generate a feature extraction code;
and the extraction module is used for extracting the characteristics of the target data by executing the characteristic extraction codes to obtain the characteristic data needing to be input into the prediction model.
6. The feature extraction device according to claim 5, wherein the second determining module is specifically configured to determine the first tree structure corresponding to the feature expression by using an operator included in the feature expression as a parent node and using a factor directly as an argument of the operator as a child node of the parent node.
7. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1 to 4.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 4 when executing the program.
CN201910942449.2A 2019-09-30 2019-09-30 Feature extraction method and device Active CN110704742B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910942449.2A CN110704742B (en) 2019-09-30 2019-09-30 Feature extraction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910942449.2A CN110704742B (en) 2019-09-30 2019-09-30 Feature extraction method and device

Publications (2)

Publication Number Publication Date
CN110704742A CN110704742A (en) 2020-01-17
CN110704742B true CN110704742B (en) 2021-04-27

Family

ID=69197439

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910942449.2A Active CN110704742B (en) 2019-09-30 2019-09-30 Feature extraction method and device

Country Status (1)

Country Link
CN (1) CN110704742B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112949763A (en) * 2021-04-01 2021-06-11 北京奇艺世纪科技有限公司 Data extraction method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301080A (en) * 2017-06-30 2017-10-27 上海自仪泰雷兹交通自动化***有限公司 C language Code automatic build system based on data configuration in trackside control unit
CN108304166A (en) * 2018-01-18 2018-07-20 北京航空航天大学 A kind of method that artificial intelligence program person describes to write source program according to formula
CN109284088A (en) * 2018-08-02 2019-01-29 北京天元创新科技有限公司 A kind of signaling big data processing method and electronic equipment
CN110008349A (en) * 2019-02-01 2019-07-12 阿里巴巴集团控股有限公司 The method and device for the event risk assessment that computer executes

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933104A (en) * 2015-05-29 2015-09-23 数据堂(北京)科技股份有限公司 Method and system for collecting metadata
US11500635B2 (en) * 2017-06-05 2022-11-15 The Trustees Of Princeton University Heterogeneous microprocessor for energy-scalable sensor inference using genetic programming

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301080A (en) * 2017-06-30 2017-10-27 上海自仪泰雷兹交通自动化***有限公司 C language Code automatic build system based on data configuration in trackside control unit
CN108304166A (en) * 2018-01-18 2018-07-20 北京航空航天大学 A kind of method that artificial intelligence program person describes to write source program according to formula
CN109284088A (en) * 2018-08-02 2019-01-29 北京天元创新科技有限公司 A kind of signaling big data processing method and electronic equipment
CN110008349A (en) * 2019-02-01 2019-07-12 阿里巴巴集团控股有限公司 The method and device for the event risk assessment that computer executes

Also Published As

Publication number Publication date
CN110704742A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN110674408B (en) Service platform, and real-time generation method and device of training sample
CN111881019B (en) User interface testing method and device
CN110717536A (en) Method and device for generating training sample
CN110968601A (en) Data query processing method and device
CN108268289B (en) Parameter configuration method, device and system for web application
CN109241026B (en) Data management method, device and system
CN110569428A (en) recommendation model construction method, device and equipment
CN115238826B (en) Model training method and device, storage medium and electronic equipment
CN115203394A (en) Model training method, service execution method and device
CN116167670A (en) Model, service processing method, device and equipment
CN115455166A (en) Method, device, medium and equipment for detecting abnormality of intelligent dialogue system
CN115146601A (en) Method and device for executing language processing task, readable storage medium and equipment
CN110704742B (en) Feature extraction method and device
CN113641894A (en) Information recommendation method and device
CN111338655A (en) Installation package distribution method and system
CN110874322A (en) Test method and test server for application program
CN113343085B (en) Information recommendation method and device, storage medium and electronic equipment
CN115018866A (en) Boundary determining method and device, storage medium and electronic equipment
CN114331602A (en) Model training method based on transfer learning, information recommendation method and device
CN113626342A (en) Model online testing method and device
CN114449063A (en) Message processing method, device and equipment
CN112559346A (en) Service testing method and device
CN113344590A (en) Method and device for model training and complaint rate estimation
CN111967767A (en) Business risk identification method, device, equipment and medium
CN112732252A (en) Method and device for dynamically generating UI (user interface) and electronic equipment

Legal Events

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