CN111797866A - Feature extraction method and device, storage medium and electronic equipment - Google Patents

Feature extraction method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111797866A
CN111797866A CN201910282192.2A CN201910282192A CN111797866A CN 111797866 A CN111797866 A CN 111797866A CN 201910282192 A CN201910282192 A CN 201910282192A CN 111797866 A CN111797866 A CN 111797866A
Authority
CN
China
Prior art keywords
neural network
data
target service
feature extraction
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910282192.2A
Other languages
Chinese (zh)
Inventor
何明
陈仲铭
黄粟
刘耀勇
陈岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910282192.2A priority Critical patent/CN111797866A/en
Publication of CN111797866A publication Critical patent/CN111797866A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/217Validation; Performance evaluation; Active pattern learning techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The application discloses a feature extraction method, a device, a storage medium and an electronic device, wherein when the electronic device detects a feature acquisition request of a target service, the electronic device firstly determines data related to the target service according to the feature acquisition request, then acquires demand information of the target service on the feature, acquires a demand vector corresponding to the demand information, takes the data related to the target service as training input, takes the demand vector as target output, constructs a corresponding neural network, trains the constructed neural network, finally performs feature extraction on the data related to the target service according to the trained neural network, and provides the extracted feature for the target service. Therefore, the characteristics related to different services can be flexibly and efficiently provided to meet the requirements.

Description

Feature extraction method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for feature extraction, a storage medium, and an electronic device.
Background
At present, with the miniaturization and the intellectualization of sensors, electronic devices such as mobile phones and tablet computers integrate more and more sensors, such as light sensors, distance sensors, position sensors, acceleration sensors, gravity sensors, and the like. The electronic device can acquire more data with less power consumption through the configured sensor. Meanwhile, the electronic device collects system-related data and user-related data during operation. However, the data acquired by the electronic device is increasingly complex, and if the data are directly subjected to feature extraction, a large number of features are extracted, which is thousands of dimensions, and causes dimension disasters.
Disclosure of Invention
In a first aspect, an embodiment of the present application provides a feature extraction method applied to an electronic device, including:
detecting a feature acquisition request of a target service, and determining data related to the target service according to the feature acquisition request;
acquiring demand information of the target service on characteristics, and acquiring a demand vector corresponding to the demand information;
taking the data as training input and the demand vector as target output, constructing a corresponding neural network, and training the neural network;
and performing feature extraction on the data according to the trained neural network, and providing the extracted features for the target service.
In a second aspect, an embodiment of the present application provides a feature extraction apparatus, which is applied to an electronic device, and includes:
the request detection module is used for detecting a characteristic acquisition request of a target service and determining data related to the target service according to the characteristic acquisition request;
the vector acquisition module is used for acquiring the demand information of the target service for the characteristics and acquiring a demand vector corresponding to the demand information;
the network training module is used for taking the data as training input, taking the demand vector as target output, constructing a corresponding neural network and training the neural network;
and the feature extraction module is used for extracting features of the data according to the trained neural network and providing the extracted features for the target service.
In a third aspect, the present application provides a storage medium having a computer program stored thereon, where the computer program is executed on a computer, so as to make the computer execute the steps in the feature extraction method provided in the present application.
In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a memory and a processor, where the processor is configured to execute steps in a feature extraction method provided in an embodiment of the present application by calling a computer program stored in the memory.
In the application, when the electronic device detects a feature acquisition request of a target service, the electronic device firstly determines data related to the target service according to the feature acquisition request, then acquires the feature demand information of the target service, acquires a demand vector corresponding to the demand information, takes the data related to the target service as training input, takes the demand vector as target output, constructs a corresponding neural network, trains the constructed neural network, finally extracts features of the data related to the target service according to the trained neural network, and provides the extracted features for the target service. Therefore, the characteristics related to different services can be flexibly and efficiently provided to meet the requirements.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a panoramic sensing architecture provided in an embodiment of the present application.
Fig. 2 is a schematic flow chart of a feature extraction method according to an embodiment of the present application.
Fig. 3 is another schematic flow chart diagram of a feature extraction method provided in the embodiment of the present application.
Fig. 4 is a schematic view of an application scenario of the feature extraction method provided in the embodiment of the present application.
Fig. 5 is a schematic structural diagram of a feature extraction device provided in an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
With the miniaturization and intellectualization of sensors, electronic devices such as mobile phones and tablet computers integrate more and more sensors, such as light sensors, distance sensors, position sensors, acceleration sensors, gravity sensors, and the like. The electronic device can acquire more data with less power consumption through the configured sensor. Meanwhile, the electronic device can acquire data related to the state of the electronic device and data related to the state of the user during operation. In general, the electronic device can acquire data related to an external environment (such as temperature, light, place, sound, weather, and the like), data related to a user state (such as posture, speed, usage habits, personal basic information, and the like), and data related to a state of the electronic device (such as power consumption, resource usage, network conditions, and the like). In the embodiment of the application, the data which can be acquired by the electronic device is recorded as panoramic data.
In the embodiment of the application, in order to process the data acquired by the electronic device, a panoramic sensing architecture is provided. Referring to fig. 1, fig. 1 is a schematic structural diagram of a panoramic sensing architecture provided in an embodiment of the present application, and the panoramic sensing architecture is applied to an electronic device and includes, from bottom to top, an information sensing layer, a data processing layer, a feature extraction layer, a scene modeling layer, and an intelligent service layer.
As the bottom layer of the panoramic sensing architecture, the information sensing layer is used for acquiring original data, namely panoramic data, capable of describing various types of scenes of a user. Wherein the information perception layer is composed of a plurality of sensors for data acquisition, including, but not limited to, a distance sensor for detecting a distance between the electronic device and an external object, a magnetic field sensor for detecting magnetic field information of an environment in which the electronic device is located, a light sensor for detecting light information of an environment in which the electronic device is located, an acceleration sensor for detecting acceleration data of the electronic device, a fingerprint sensor for collecting fingerprint information of a user, a hall sensor for sensing magnetic field information, a position sensor for detecting a geographical position in which the electronic device is currently located, a gyroscope for detecting an angular velocity of the electronic device in various directions, an inertial sensor for detecting motion data of the electronic device, a posture sensor for sensing posture information of the electronic device, a barometer for detecting an air pressure of an environment in which the electronic device is located, a heart rate sensor for detecting heart rate information of a user, and the like, which are illustrated.
And as a secondary bottom layer of the panoramic sensing architecture, the data processing layer is used for processing the original data acquired by the information sensing layer and eliminating the problems of noise, inconsistency and the like of the original data. The data processing layer can perform data cleaning, data integration, data transformation, data reduction and other processing on the data acquired by the information perception layer.
And the characteristic extraction layer is used for extracting the characteristics of the data processed by the data processing layer to extract the characteristics included in the data as an intermediate layer of the panoramic perception architecture. The feature extraction layer may extract features or process the extracted features by a method such as a filtering method, a packing method, or an integration method.
The filtering method is to filter the extracted features to remove redundant feature data. Packaging methods are used to screen the extracted features. The integration method is to integrate a plurality of feature extraction methods together to construct a more efficient and more accurate feature extraction method for extracting features.
As a second highest level of the panoramic sensing architecture, the scene modeling layer is used for constructing a model according to the features extracted by the feature extraction layer, and the obtained model can be used for representing the state of the electronic device, the user state, the environment state and the like. For example, the scenario modeling layer may construct a key value model, a pattern identification model, a graph model, an entity relation model, an object-oriented model, and the like according to the features extracted by the feature extraction layer.
And as the highest layer of the panoramic perception architecture, the intelligent service layer is used for providing intelligent services according to the model constructed by the scene modeling layer. For example, the intelligent service layer may provide basic application services for the user, may perform system intelligent optimization services for the electronic device, and may also provide personalized intelligent services for the user.
In addition, the panoramic sensing architecture further comprises an algorithm library, and the algorithm library comprises, but is not limited to, algorithms such as a markov algorithm, a hidden dirichlet distribution algorithm, a bayesian classification algorithm, a support vector machine, a K-means clustering algorithm, a K-nearest neighbor algorithm, a conditional random field, a residual error network, a long-short term memory network, a convolutional neural network, a cyclic neural network and the like.
For data related to an external environment, data related to a user state and data related to an electronic device state, which can be acquired by an electronic device, a large number of features are extracted from the complex data, the dimensions of the features are thousands of, dimension disasters are caused, and the features are difficult to be effectively applied to related services, so that how to effectively extract the features of the data becomes necessary. To this end, embodiments of the present application provide a feature extraction method, an apparatus, a storage medium, and an electronic device, where an execution subject of the feature extraction method may be the feature extraction apparatus provided in embodiments of the present application, or an electronic device integrated with the feature extraction apparatus, where the feature extraction apparatus may be implemented in a hardware or software manner. The electronic device may be a device with processing capability configured with a processor, such as a smart phone, a tablet computer, a palm computer, a notebook computer, or a desktop computer.
According to the feature processing method provided by the embodiment of the application, the feature extraction layer performs feature extraction on data from the data processing layer, provides the extracted features for the scene modeling layer to perform modeling, detects a feature acquisition request of a target service, determines data of a related target service from panoramic data according to the feature acquisition request, acquires feature required information of the target service, acquires a required vector corresponding to the required information, uses the data of the related target service as training input, outputs the required vector as a target, constructs a corresponding neural network, trains the constructed neural network, performs feature extraction on the data of the related target service according to the trained neural network, and provides the extracted features for the target service so as to realize self functions.
Referring to fig. 2, fig. 2 is a schematic flow chart of a feature extraction method according to an embodiment of the present application. The feature extraction method can be applied to electronic equipment. The flow of the feature extraction method may include:
in 101, a feature acquisition request of a target service is detected, and data associated with the target service is determined according to the feature acquisition request.
It should be noted that the target service is not used to refer to a specific service, but is used to refer to a service that needs to obtain features for performing corresponding computing processing, including but not limited to intelligent service class services related to users (e.g., health class services, navigation class services, travel class services, voice class services, etc.), system optimization class services related to the electronic device itself (e.g., resource optimization scheduling, power saving, etc.), and the like. For example, when a system optimization service reaches a preset system optimization period, the system optimization service needs to acquire associated features to determine whether system optimization is needed or not and how to perform the system optimization, and at this time, the system optimization service generates a feature acquisition request; for another example, an intelligent service-class service may perform context modeling according to its associated features to obtain a context state of a user, thereby providing a personalized intelligent service to the user, and the intelligent service-class service may generate a feature acquisition request when it is necessary to provide a service to the user. In colloquial terms, a service-related feature is a feature that may be needed to implement a function.
For example, in the embodiment of the present application, the electronic device may detect a feature acquisition request of a "target service" in real time.
In addition, in the embodiment of the present application, a database for storing panoramic data is also established in advance in the electronic device, and is recorded as a panoramic database. The panoramic data includes environment-related data (e.g., temperature data collected by a temperature sensor, humidity data collected by a humidity sensor, and environment brightness data collected by a light sensor), self-operation-related data (e.g., the number of running processes, the remaining power, the power consumption rate, etc.), and user behavior-related data (e.g., the user starts a running application, the operating distance of the user to the application, etc.). For example, a panoramic database based on the MySQL technology may be established in the electronic device, and is used to store panoramic data acquired by the electronic device in real time, that is, data related to the environment, data related to the self-operation, and data related to the user behavior.
When the electronic equipment detects a feature acquisition request of the target service, the electronic equipment further determines data related to the target service from panoramic data stored in the panoramic database according to the feature acquisition request, and the data is used as data needing feature extraction to extract features related to the target service for the target service to realize functions of the target service.
The data associated with different types of services are different, for example, the data associated with the power saving type services include, but are not limited to, the number of processes of the electronic device system, the power consumption rate, the remaining power amount, and the like; as another example, the data associated with the navigation-type service includes, but is not limited to, satellite positioning data, wireless network positioning data, and the like; as another example, the data associated with the voice-like service includes, but is not limited to, voice data, and the like.
At 102, demand information of the target service for the features is obtained, and a demand vector corresponding to the demand information is obtained.
The requirement information is used for describing the requirements of the service on the features, including but not limited to accuracy requirements, real-time requirements, resource consumption requirements and the like. Taking the real-time requirement as an example, different types of services generally have different real-time requirements on features, some services have higher real-time requirements on features, and some services have lower real-time requirements on features, for example, navigation services have higher real-time requirements on features, and health services have lower real-time requirements on features. In the embodiment of the application, after determining data associated with a target service, that is, determining data required to be subjected to feature extraction, the electronic device further acquires information required by the target service for features.
After the acquired demand information of the target service for the features, the electronic device further acquires a demand vector corresponding to the demand information, that is, the demand of the target service for the features is expressed in a vector mode. For example, the requirement information acquired by the electronic device describes requirements of the target service for three dimensions, namely accuracy requirements, real-time requirements and resource consumption requirements of the features, and the acquired requirement vector corresponding to the requirement information is a three-dimensional vector (vi, vj, vk), wherein vi corresponds to the accuracy requirements, vj corresponds to the real-time requirements, and vk corresponds to the resource consumption requirements.
In 103, the data of the associated target service is used as training input, the demand vector is used as target output, a corresponding neural network is constructed, and the constructed neural network is trained.
After the electronic equipment acquires the demand vector corresponding to the demand information of the target service for the characteristics, the data related to the target service is used as training input, the demand vector is used as target output, a corresponding neural network is constructed, and the constructed neural network is trained. It should be noted that what kind of neural network is constructed can be configured in the electronic device in advance by experience of those skilled in the art, including but not limited to convolutional neural network, recursive neural network, cyclic neural network, and general neural network including only an input layer, a hidden layer, and an output layer.
For example, assuming that the data of the associated target service are all image-like data, the electronic device may construct a convolutional neural network of VGG16 configuration including 13 convolutional layers and 3 fully-connected layers. For another example, assuming that the data associated with the target service is data other than image-type data and time-series-type data (e.g., text data, voice data, etc.) (i.e., data other than image-type data and time-series-type data, such as temperature collected by a temperature sensor, humidity collected by a humidity sensor, etc.), the electronic device may construct a general neural network including a 1-layer input layer, a 5-layer hidden layer, and a 1-layer output layer.
At 104, feature extraction is performed on the data associated with the target service according to the trained neural network, and the extracted features are provided to the target service.
After the training of the constructed neural network is completed, the electronic equipment extracts the features of the data of the associated target service according to the trained neural network, and the extracted features are the features of the associated target service. And then, the electronic equipment provides the extracted features for the target service, and the target service performs corresponding calculation processing to realize the functions of the target service.
As can be seen from the above, in the embodiment of the application, when detecting a feature acquisition request of a target service, an electronic device first determines data associated with the target service according to the feature acquisition request, then acquires feature required information of the target service, and acquires a required vector corresponding to the required information, and then uses the data associated with the target service as a training input and the required vector as a target output, constructs a corresponding neural network, trains the constructed neural network, and finally performs feature extraction on the data associated with the target service according to the trained neural network, and provides the extracted feature for the target service. Therefore, the characteristics related to different services can be flexibly and efficiently provided to meet the requirements.
In one embodiment, "training the constructed neural network" includes:
(1) constructing a loss function corresponding to the neural network;
(2) and inputting data related to the target service into the neural network, acquiring a loss value of the neural network according to the constructed loss function, and reversely transmitting the acquired loss value to the neural network.
In the embodiment of the application, the electronic device constructs a loss function corresponding to the neural network according to a preset training target and the configuration of the neural network. And then initializing parameters of the neural network, inputting data related to target services into the neural network, acquiring loss values of the neural network according to the constructed loss function, reversely transmitting the acquired loss values to the neural network, and updating the parameters of the neural network. And training the neural network by continuously and iteratively inputting data of the associated target service to the neural network, and terminating the training until the preset training target is met.
It should be noted that training the neural network only changes the parameters of the neural network, but does not change the configuration of the neural network, for example, the constructed neural network is a convolutional neural network, and after the training is completed, the convolutional neural network is still.
In an embodiment, "inputting data related to a target service into the neural network, obtaining a loss value of the neural network according to the constructed loss function, and back-propagating the obtained loss value to the neural network", further includes:
and carrying out regularization processing on the constructed loss function.
In the embodiment of the application, before the electronic device starts to train the neural network, the structured loss function is regularized, so that the weight is limited to be increased in the training process, and overfitting is prevented.
In this embodiment, a person skilled in the art may configure the electronic device in advance according to actual needs for how the electronic device performs regularization processing on the constructed loss function, which is not specifically limited in this embodiment, for example, the electronic device may add an L1 regular term, an L2 regular term, or other types of regular terms to the constructed loss function.
In one embodiment, "feature extraction of data associated with a target service according to a trained neural network" includes:
and taking the output value of each neuron in the last hidden layer of the trained neural network as a feature extracted from the data of the associated target service.
It should be noted that, after the last hidden layer of the neural network, i.e., the hidden layer connected to the output layer, completes the training of the neural network, the parameters of the neurons in each layer are determined. In the embodiment of the application, when the electronic device performs feature extraction on data of a related target service according to a trained neural network, the output value of each neuron in the last hidden layer of the trained neural network is used as a feature extracted from the data of the related target service.
In one embodiment, the "obtaining the demand vector corresponding to the demand information" includes:
and inputting the requirement information into a preset encoder neural network for processing to obtain a requirement vector which is output by the preset encoder neural network and corresponds to the requirement information.
In the embodiment of the application, when a demand vector corresponding to demand information is obtained, the demand information is input to a preset encoder neural network for encoding processing, and a vector with a representation capability is obtained and used as the demand vector corresponding to the demand information.
It should be noted that, in the embodiment of the present application, specific models and topology structures of the encoder neural network are not limited, a single-layer recurrent neural network may be used for training to obtain the encoder neural network, a multi-layer recurrent neural network may also be used for training to obtain the encoder neural network, and a convolutional neural network, or a variant thereof, or a neural network with other network structures may also be used for training to obtain the encoder neural network. For example, in the embodiment of the present application, a recurrent neural network may be used to construct the encoder neural network.
In an embodiment, before detecting the feature obtaining request of the target service, the method further includes
The method comprises the steps that the requirements of different services for characteristics are subjected to standardized description according to preset rules, and the corresponding relation between different services and requirement information of the different services is obtained;
and "acquiring the demand information of the target service for the characteristics" includes:
and acquiring the requirement information of the target service for the characteristics according to the corresponding relation.
In the embodiment of the application, the requirements of different services on the characteristics can be described in a standardized manner according to preset rules. For example, for the real-time requirement, the real-time requirement may be divided into five levels, i.e., high, second high, medium, second low, and low, for the accuracy requirement, the accuracy requirement may be divided into five levels, i.e., high, second high, medium, second low, and low, for the resource consumption requirement, the resource consumption requirement may be divided into five levels, i.e., high, second high, medium, second low, and low.
Then, based on a manual mode, the requirement information (including the real-time requirement, the accuracy requirement and the resource consumption requirement) of all the services in the electronic equipment on the characteristics is calibrated. Therefore, the electronic equipment can establish the corresponding relation between different services and the characteristic demand information thereof according to the manually calibrated characteristic demand information of all the services. For example, service a has a "low" real-time requirement on the feature, service a has a "high" accuracy requirement on the feature, service a has a "medium" resource consumption requirement on the feature, and so on.
Therefore, when the electronic device acquires the demand information of the target service for the features, the demand information of the target service for the features can be acquired according to the corresponding relation, for example, if the service a is the target service, the electronic device acquires the real-time demand "low" of the service a for the features, the accuracy demand "high" of the service a for the features, and the resource consumption demand "medium" of the service a for the features according to the corresponding relation.
In an embodiment, "before the data of the associated target service is used as a training input, the demand vector is used as a target output, a corresponding neural network is constructed, and the constructed neural network is trained," the method further includes:
and preprocessing the data associated with the target service.
It should be noted that, in the embodiment of the present application, in consideration of the problems of noise, inconsistency, and the like in the original panoramic data, the data related to the target service is taken as a training input, the requirement vector is taken as a target output, a corresponding neural network is constructed, and before the constructed neural network is trained, the data related to the target service is further preprocessed, where the preprocessing includes, but is not limited to, performing data cleansing processing, data integration processing, data transformation processing, data reduction processing, and the like on the data related to the target service.
Among them, the data cleansing process is a process of rechecking and verifying data, and aims to delete duplicate information, correct existing errors, and provide data consistency.
The data integration processing is to integrate the data of a single dimension into a higher and more abstract dimension, and the integrated data can be more accurate, richer and more targeted.
In the data transformation process, certain conditions are required to be met when data are subjected to statistical analysis, for example, test errors are required to have independence, unbiasedness, variance homogeneity and normality when variance analysis is performed, but in actual analysis, the independence and the unbiasedness are easily met, the variance homogeneity can be met in most cases, and the normality cannot be met sometimes. In this case, the data can be subjected to appropriate conversion, such as square root conversion, logarithmic conversion, square root arcsine conversion, etc., so that the data can satisfy the requirement of analysis of variance. Such data conversion, which is performed therein, is called data transformation.
Data reduction means to reduce the data volume to the maximum extent on the premise of keeping the original appearance of the data as much as possible (the necessary premise for completing the task is to understand the content of the mining task and the familiar data). There are two main approaches to data reduction: attribute selection and data sampling, for attributes and records in the original dataset, respectively.
Referring to fig. 3 and fig. 4 in combination, fig. 3 is another schematic flow chart of a feature extraction method provided in an embodiment of the present application, and fig. 4 is a schematic application scenario diagram of the feature extraction method, where the feature extraction method may be applied to an electronic device, and a flow of the feature extraction method may include:
in 201, the electronic device performs standardized description on the requirements of different services for features according to preset rules, so as to obtain the corresponding relationship between different services and their requirement information.
In the embodiment of the application, the requirements of different services on the characteristics can be described in a standardized manner according to preset rules. For example, for the real-time requirement, the real-time requirement may be divided into five levels, i.e., high, second high, medium, second low, and low, for the accuracy requirement, the accuracy requirement may be divided into five levels, i.e., high, second high, medium, second low, and low, for the resource consumption requirement, the resource consumption requirement may be divided into five levels, i.e., high, second high, medium, second low, and low.
Then, based on a manual mode, the requirement information (including the real-time requirement, the accuracy requirement and the resource consumption requirement) of all the services in the electronic equipment on the characteristics is calibrated. Therefore, the electronic equipment can establish the corresponding relation between different services and the characteristic demand information thereof according to the manually calibrated characteristic demand information of all the services. For example, service a has a "low" real-time requirement on the feature, service a has a "high" accuracy requirement on the feature, service a has a "medium" resource consumption requirement on the feature, and so on.
At 202, the electronic device detects a feature acquisition request of the target service and determines data associated with the target service according to the feature acquisition request.
It should be noted that the target service is not used to refer to a specific service, but is used to refer to a service that needs to obtain features for performing corresponding computing processing, including but not limited to intelligent service class services related to users (e.g., health class services, navigation class services, travel class services, voice class services, etc.), system optimization class services related to the electronic device itself (e.g., resource optimization scheduling, power saving, etc.), and the like. For example, when a system optimization service reaches a preset system optimization period, the system optimization service needs to acquire associated features to determine whether system optimization is needed or not and how to perform the system optimization, and at this time, the system optimization service generates a feature acquisition request; for another example, an intelligent service-class service may perform context modeling according to its associated features to obtain a context state of a user, thereby providing a personalized intelligent service to the user, and the intelligent service-class service may generate a feature acquisition request when it is necessary to provide a service to the user. In colloquial terms, a service-related feature is a feature that may be needed to implement a function.
For example, in the embodiment of the present application, the electronic device may detect a feature acquisition request of a "target service" in real time.
In addition, in the embodiment of the present application, a database for storing panoramic data is also established in advance in the electronic device, and is recorded as a panoramic database. The panoramic data includes environment-related data (e.g., temperature data collected by a temperature sensor, humidity data collected by a humidity sensor, and environment brightness data collected by a light sensor), self-operation-related data (e.g., the number of running processes, the remaining power, the power consumption rate, etc.), and user behavior-related data (e.g., the user starts a running application, the operating distance of the user to the application, etc.). For example, a panoramic database based on the MySQL technology may be established in the electronic device, and is used to store panoramic data acquired by the electronic device in real time, that is, data related to the environment, data related to the self-operation, and data related to the user behavior.
When the electronic equipment detects a feature acquisition request of the target service, the electronic equipment further determines data related to the target service from panoramic data stored in the panoramic database according to the feature acquisition request, and the data is used as data needing feature extraction to extract features related to the target service for the target service to realize functions of the target service.
The data associated with different types of services are different, for example, the data associated with the power saving type services include, but are not limited to, the number of processes of the electronic device system, the power consumption rate, the remaining power amount, and the like; as another example, the data associated with the navigation-type service includes, but is not limited to, satellite positioning data, wireless network positioning data, and the like; as another example, the data associated with the voice-like service includes, but is not limited to, voice data, and the like.
In 203, the electronic device obtains the requirement information of the target service for the features according to the corresponding relationship, and obtains a requirement vector corresponding to the requirement information.
The requirement information is used for describing the requirements of the service on the features, including but not limited to accuracy requirements, real-time requirements, resource consumption requirements and the like. Taking the real-time requirement as an example, different types of services generally have different real-time requirements on features, some services have higher real-time requirements on features, and some services have lower real-time requirements on features, for example, navigation services have higher real-time requirements on features, and health services have lower real-time requirements on features. In the embodiment of the application, after determining data associated with a target service, that is, determining data required to be subjected to feature extraction, the electronic device further acquires information required by the target service for features. The electronic device obtains the information of the requirement of the target service for the feature according to the corresponding relationship, for example, if the service a is the target service, the electronic device obtains the real-time requirement "low" of the service a for the feature, the accuracy requirement "high" of the service a for the feature, and the resource consumption requirement "medium" of the service a for the feature according to the corresponding relationship.
After the acquired demand information of the target service for the features, the electronic device further acquires a demand vector corresponding to the demand information, that is, the demand of the target service for the features is expressed in a vector mode. For example, the requirement information acquired by the electronic device describes requirements of the target service for three dimensions, namely accuracy requirements, real-time requirements and resource consumption requirements of the features, and the acquired requirement vector corresponding to the requirement information is a three-dimensional vector (vi, vj, vk), wherein vi corresponds to the accuracy requirements, vj corresponds to the real-time requirements, and vk corresponds to the resource consumption requirements.
At 204, the electronic device takes the data of the associated target service as training input and the demand vector as target output, constructs a corresponding neural network, and trains the constructed neural network.
After the electronic equipment acquires the demand vector corresponding to the demand information of the target service for the characteristics, the data related to the target service is used as training input, the demand vector is used as target output, a corresponding neural network is constructed, and the constructed neural network is trained. It should be noted that what kind of neural network is constructed can be configured in the electronic device in advance by experience of those skilled in the art, including but not limited to convolutional neural network, recursive neural network, cyclic neural network, and general neural network including only an input layer, a hidden layer, and an output layer.
For example, assuming that the data of the associated target service are all image-like data, the electronic device may construct a convolutional neural network of VGG16 configuration including 13 convolutional layers and 3 fully-connected layers. For another example, assuming that the data associated with the target service is data other than image-type data and time-series-type data (e.g., text data, voice data, etc.) (i.e., data other than image-type data and time-series-type data, such as temperature collected by a temperature sensor, humidity collected by a humidity sensor, etc.), the electronic device may construct a general neural network including a 1-layer input layer, a 5-layer hidden layer, and a 1-layer output layer.
In 205, the electronic device takes the trained output value of each neuron in the last hidden layer of the neural network as a feature extracted from the data associated with the target service, and provides the extracted feature to the target service.
It should be noted that, after the last hidden layer of the neural network, i.e., the hidden layer connected to the output layer, completes the training of the neural network, the parameters of the neurons in each layer are determined. In the embodiment of the application, when the electronic device performs feature extraction on data of a related target service according to a trained neural network, the output value of each neuron in the last hidden layer of the trained neural network is used as a feature extracted from the data of the related target service. As can be understood by those skilled in the art from the foregoing description, the features extracted by the electronic device are features of the associated target service. And then, the electronic equipment provides the extracted features for the target service, and the target service performs corresponding calculation processing to realize the functions of the target service.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a feature extraction device according to an embodiment of the present disclosure. The feature extraction device can be applied to electronic equipment. The feature extraction means may include: a request detection module 301, a vector acquisition module 302, a network training module 303, and a feature extraction module 304.
A request detection module 301, configured to detect a feature acquisition request of a target service, and determine data associated with the target service according to the feature acquisition request;
a vector obtaining module 302, configured to obtain requirement information of a target service for a feature, and obtain a requirement vector corresponding to the requirement information;
the network training module 303 is configured to construct a corresponding neural network by using data of the associated target service as training input and using the demand vector as target output, and train the constructed neural network;
and the feature extraction module 304 is configured to perform feature extraction on the data associated with the target service according to the trained neural network, and provide the extracted features to the target service.
In an embodiment, when training the constructed neural network, the network training module 303 may be configured to:
constructing a loss function corresponding to the neural network;
and inputting data related to the target service into the neural network, acquiring a loss value of the neural network according to the constructed loss function, and reversely transmitting the acquired loss value to the neural network.
In an embodiment, before inputting data associated with a target service into the neural network, obtaining a loss value of the neural network according to the constructed loss function, and back-propagating the obtained loss value to the neural network, the network training module 303 may be configured to:
and carrying out regularization processing on the constructed loss function.
In an embodiment, when performing feature extraction on data associated with a target service according to a trained neural network, the feature extraction module 304 may be configured to:
and taking the output value of each neuron in the last hidden layer of the trained neural network as a feature extracted from the data of the associated target service.
In an embodiment, when obtaining a demand vector corresponding to demand information, the vector obtaining module 302 may be configured to:
and inputting the requirement information into a preset encoder neural network for processing to obtain a requirement vector which is output by the preset encoder neural network and corresponds to the requirement information.
In an embodiment, the feature extraction apparatus further includes a relationship establishing module configured to:
before detecting a feature acquisition request of a target service, carrying out standardized description on requirements of different services for features according to a preset rule to obtain corresponding relations between different services and requirement information thereof;
while obtaining the requirement information of the target service for the feature, the vector obtaining module 302 may be configured to:
and acquiring the requirement information of the target service for the characteristics according to the corresponding relation.
In an embodiment, the feature extraction apparatus further comprises a preprocessing module configured to:
and preprocessing the data of the associated target service before taking the data of the associated target service as training input and taking the demand vector as target output, constructing a corresponding neural network and training the constructed neural network.
It should be noted that the feature extraction device provided in the embodiment of the present application and the feature extraction method in the foregoing embodiment belong to the same concept, and any method provided in the embodiment of the feature extraction method may be run on the feature extraction device, and a specific implementation process thereof is described in detail in the embodiment of the feature extraction method, and is not described herein again.
An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the stored computer program is executed on an electronic device, the electronic device is enabled to perform the steps in the feature extraction method provided in the embodiment of the present application, for example, detecting a feature acquisition request of a target service, and determining data associated with the target service according to the feature acquisition request; acquiring demand information of a target service on characteristics, and acquiring a demand vector corresponding to the demand information; taking data of the associated target service as training input and a demand vector as target output, constructing a corresponding neural network, and training the constructed neural network; and performing feature extraction on the data associated with the target service according to the trained neural network, and providing the extracted features for the target service.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, and the processor executes the steps in the feature extraction method provided in the embodiment of the present application by calling the computer program stored in the memory.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device may include a memory 401 and a processor 402. Those of ordinary skill in the art will appreciate that the electronic device configuration shown in fig. 6 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The memory 401 may be used to store computer programs and data. The memory 401 stores a computer program containing executable code. The computer program may constitute various functional modules.
The processor 402 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and implements various functions by running or executing a computer program stored in the memory 401 and calling data stored in the memory 401.
In the embodiment of the present application, the processor 402 in the electronic device loads the executable code corresponding to one or more computer programs into the memory 401, and the processor 402 executes the executable code according to the following instructions, so as to perform:
detecting a characteristic acquisition request of a target service, and determining data related to the target service according to the characteristic acquisition request;
acquiring demand information of a target service on characteristics, and acquiring a demand vector corresponding to the demand information;
taking data of the associated target service as training input and a demand vector as target output, constructing a corresponding neural network, and training the constructed neural network;
and performing feature extraction on the data associated with the target service according to the trained neural network, and providing the extracted features for the target service.
Referring to fig. 7, fig. 7 is another schematic structural diagram of the electronic device according to the embodiment of the present disclosure, and the difference from the electronic device shown in fig. 6 is that the electronic device further includes components such as an input unit 403 and an output unit 404.
The input unit 403 may be used for receiving input numbers, character information, or user characteristic information (such as fingerprints), and generating a keyboard, a mouse, a joystick, an optical or trackball signal input, etc., related to user setting and function control, among others.
The output unit 404 may be used to output information input by the user or information provided to the user, such as a speaker, a screen, and the like.
In the embodiment of the present application, the processor 402 in the electronic device loads the executable code corresponding to one or more computer programs into the memory 401, and the processor 402 executes the executable code according to the following instructions, so as to perform:
detecting a characteristic acquisition request of a target service, and determining data related to the target service according to the characteristic acquisition request;
acquiring demand information of a target service on characteristics, and acquiring a demand vector corresponding to the demand information;
taking data of the associated target service as training input and a demand vector as target output, constructing a corresponding neural network, and training the constructed neural network;
and performing feature extraction on the data associated with the target service according to the trained neural network, and providing the extracted features for the target service.
In an embodiment, in training the constructed neural network, the processor 402 may perform:
constructing a loss function corresponding to the neural network;
and inputting data related to the target service into the neural network, acquiring a loss value of the neural network according to the constructed loss function, and reversely transmitting the acquired loss value to the neural network.
In an embodiment, before inputting data associated with a target service into the neural network, obtaining a loss value of the neural network according to the constructed loss function, and back-propagating the obtained loss value to the neural network, the processor 402 may perform:
and carrying out regularization processing on the constructed loss function.
In an embodiment, in performing feature extraction on data associated with a target service according to the trained neural network, the processor 402 may perform:
and taking the output value of each neuron in the last hidden layer of the trained neural network as a feature extracted from the data of the associated target service.
In one embodiment, in obtaining a demand vector corresponding to demand information, the processor 402 may perform:
and inputting the requirement information into a preset encoder neural network for processing to obtain a requirement vector which is output by the preset encoder neural network and corresponds to the requirement information.
In one embodiment, before detecting the feature acquisition request of the target service, the processor 402 may perform:
the method comprises the steps that the requirements of different services for characteristics are subjected to standardized description according to preset rules, and the corresponding relation between different services and requirement information of the different services is obtained;
and when acquiring the demand information of the target service for the feature, the processor 402 may perform:
and acquiring the requirement information of the target service for the characteristics according to the corresponding relation.
In an embodiment, before taking data associated with a target service as a training input, taking a demand vector as a target output, constructing a corresponding neural network, and training the constructed neural network, the processor 402 may perform:
and preprocessing the data associated with the target service.
It should be noted that the electronic device provided in the embodiment of the present application and the feature extraction method in the foregoing embodiment belong to the same concept, and any method provided in the embodiment of the feature extraction method may be run on the electronic device, and a specific implementation process thereof is described in detail in the embodiment of the feature extraction method, and is not described herein again.
It should be noted that, for the feature extraction method in the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process for implementing the feature extraction method in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, the computer program can be stored in a computer readable storage medium, such as a memory, and executed by at least one processor, and the process of executing the computer program can include the process of the embodiment of the feature extraction method. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the feature extraction device according to the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The above detailed description is provided for a feature extraction method, an apparatus, a storage medium, and an electronic device provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A feature extraction method is applied to electronic equipment, and is characterized by comprising the following steps:
detecting a feature acquisition request of a target service, and determining data related to the target service according to the feature acquisition request;
acquiring demand information of the target service on characteristics, and acquiring a demand vector corresponding to the demand information;
taking the data as training input and the demand vector as target output, constructing a corresponding neural network, and training the neural network;
and performing feature extraction on the data according to the trained neural network, and providing the extracted features for the target service.
2. The feature extraction method of claim 1, wherein the training the neural network comprises:
constructing a loss function corresponding to the neural network;
inputting the data into the neural network, obtaining the loss value of the neural network according to the loss function, and reversely propagating the loss value to the neural network.
3. The feature extraction method according to claim 2, wherein the inputting the data into the neural network, obtaining a loss value of the neural network according to the loss function, and before propagating the loss value back to the neural network, further comprises:
and carrying out regularization processing on the loss function.
4. The feature extraction method according to claim 1, wherein the feature extraction of the data according to the trained neural network comprises:
and taking the output value of each neuron in the last hidden layer of the trained neural network as the feature extracted from the data.
5. The method of claim 1, wherein the obtaining the demand vector corresponding to the demand information comprises:
and inputting the demand information into a preset encoder neural network for processing to obtain a demand vector which is output by the preset encoder neural network and corresponds to the demand information.
6. The method of claim 1, wherein detecting the feature obtaining request of the target service further comprises
The method comprises the steps that the requirements of different services for characteristics are subjected to standardized description according to preset rules, and the corresponding relation between different services and requirement information of the different services is obtained;
and acquiring the demand information of the target service for the characteristics, including:
and acquiring the demand information of the target service for the characteristics according to the corresponding relation.
7. The feature extraction method according to claim 1, wherein before the data is used as a training input and the demand vector is used as a target output, a corresponding neural network is constructed, and the neural network is trained, the method further comprises:
and preprocessing the data.
8. A feature extraction device applied to electronic equipment is characterized by comprising:
the request detection module is used for detecting a characteristic acquisition request of a target service and determining data related to the target service according to the characteristic acquisition request;
the vector acquisition module is used for acquiring the demand information of the target service for the characteristics and acquiring a demand vector corresponding to the demand information;
the network training module is used for taking the data as training input, taking the demand vector as target output, constructing a corresponding neural network and training the neural network;
and the feature extraction module is used for extracting features of the data according to the trained neural network and providing the extracted features for the target service.
9. A storage medium having stored thereon a computer program, characterized in that, when the computer program is run on a computer, it causes the computer to execute the feature extraction method according to any one of claims 1 to 7.
10. An electronic device comprising a processor and a memory, the memory storing a computer program, wherein the processor is configured to perform the feature extraction method according to any one of claims 1 to 7 by calling the computer program.
CN201910282192.2A 2019-04-09 2019-04-09 Feature extraction method and device, storage medium and electronic equipment Pending CN111797866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910282192.2A CN111797866A (en) 2019-04-09 2019-04-09 Feature extraction method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910282192.2A CN111797866A (en) 2019-04-09 2019-04-09 Feature extraction method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111797866A true CN111797866A (en) 2020-10-20

Family

ID=72805708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910282192.2A Pending CN111797866A (en) 2019-04-09 2019-04-09 Feature extraction method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111797866A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115994668A (en) * 2023-02-16 2023-04-21 浙江非线数联科技股份有限公司 Intelligent community resource management system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170346698A1 (en) * 2014-11-28 2017-11-30 Aria Networks Limited Determining bandwidth requirements for network services
CN107678799A (en) * 2017-09-30 2018-02-09 广东欧珀移动通信有限公司 Application program management-control method, device, storage medium and electronic equipment
CN108346428A (en) * 2017-09-13 2018-07-31 腾讯科技(深圳)有限公司 Voice activity detection and its method for establishing model, device, equipment and storage medium
CN109447140A (en) * 2018-10-19 2019-03-08 广州四十五度科技有限公司 A method of the image recognition based on neural network deep learning simultaneously recommends cognition

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170346698A1 (en) * 2014-11-28 2017-11-30 Aria Networks Limited Determining bandwidth requirements for network services
CN108346428A (en) * 2017-09-13 2018-07-31 腾讯科技(深圳)有限公司 Voice activity detection and its method for establishing model, device, equipment and storage medium
CN107678799A (en) * 2017-09-30 2018-02-09 广东欧珀移动通信有限公司 Application program management-control method, device, storage medium and electronic equipment
CN109447140A (en) * 2018-10-19 2019-03-08 广州四十五度科技有限公司 A method of the image recognition based on neural network deep learning simultaneously recommends cognition

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115994668A (en) * 2023-02-16 2023-04-21 浙江非线数联科技股份有限公司 Intelligent community resource management system
CN115994668B (en) * 2023-02-16 2023-06-20 浙江非线数联科技股份有限公司 Intelligent community resource management system

Similar Documents

Publication Publication Date Title
CN111027487B (en) Behavior recognition system, method, medium and equipment based on multi-convolution kernel residual error network
CN111797858A (en) Model training method, behavior prediction method, device, storage medium and equipment
CN111797078A (en) Data cleaning method, model training method, device, storage medium and equipment
CN111191136A (en) Information recommendation method and related equipment
CN111797861A (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN111368656A (en) Video content description method and video content description device
CN111797288A (en) Data screening method and device, storage medium and electronic equipment
CN111797854A (en) Scene model establishing method and device, storage medium and electronic equipment
CN111798259A (en) Application recommendation method and device, storage medium and electronic equipment
CN111797302A (en) Model processing method and device, storage medium and electronic equipment
CN111796925A (en) Method and device for screening algorithm model, storage medium and electronic equipment
CN111798367A (en) Image processing method, image processing device, storage medium and electronic equipment
CN111797874B (en) Behavior prediction method and device, storage medium and electronic equipment
CN111797866A (en) Feature extraction method and device, storage medium and electronic equipment
CN111798019B (en) Intention prediction method, intention prediction device, storage medium and electronic equipment
CN111797986A (en) Data processing method, data processing device, storage medium and electronic equipment
CN111797856A (en) Modeling method, modeling device, storage medium and electronic equipment
CN111797849A (en) User activity identification method and device, storage medium and electronic equipment
CN111797080A (en) Model training method, data recovery device, storage medium and equipment
CN111797261A (en) Feature extraction method and device, storage medium and electronic equipment
CN111797289A (en) Model processing method and device, storage medium and electronic equipment
CN111796663B (en) Scene recognition model updating method and device, storage medium and electronic equipment
CN111797863A (en) Model training method, data processing method, device, storage medium and equipment
CN111797853A (en) Feature extraction method and device, storage medium and electronic equipment
CN111797077A (en) Data cleaning method and device, storage medium and electronic equipment

Legal Events

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