[go: up one dir, main page]

CN111797423B - Model training method, data authorization method, device, storage medium and equipment - Google Patents

Model training method, data authorization method, device, storage medium and equipment Download PDF

Info

Publication number
CN111797423B
CN111797423B CN201910282468.7A CN201910282468A CN111797423B CN 111797423 B CN111797423 B CN 111797423B CN 201910282468 A CN201910282468 A CN 201910282468A CN 111797423 B CN111797423 B CN 111797423B
Authority
CN
China
Prior art keywords
authorization
data
application program
model
application
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
CN201910282468.7A
Other languages
Chinese (zh)
Other versions
CN111797423A (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.)
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 CN201910282468.7A priority Critical patent/CN111797423B/en
Publication of CN111797423A publication Critical patent/CN111797423A/en
Application granted granted Critical
Publication of CN111797423B publication Critical patent/CN111797423B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Technology Law (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a model training method, a data authorization method, a device, a storage medium and equipment, wherein in the model training method provided by the application, the joint feature vector of an application program and data required by the operation of the application program is obtained; and training a model according to the joint feature vector and the historical authorization strategy to obtain a data authorization model of the authorization strategy, wherein the data authorization model is used for predicting the application program to be authorized of the user. In the data authorization method provided by the application, when a data authorization request of an application program to be authorized is received, a data authorization model is obtained by training by using the model training method provided by the application, the authorization strategy of the application program to be authorized by a user is predicted, and personalized authority management can be performed according to the habit of the user.

Description

Model training method, data authorization method, device, storage medium and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a model training method, a data authorization method, a device, a storage medium, and a storage device.
Background
Currently, electronic devices such as mobile phones and tablet computers are necessary for life, and the electronic devices can provide different functions by installing various application programs. Such as video playback functions provided by video-type applications, audio playback functions provided by audio-type applications, etc. However, the premise of an application on an electronic device to realize its function is to obtain access rights to corresponding data, but a part of the application requests access rights to a part of private data of a user in addition to the access rights necessary for the application to obtain. Therefore, rights management for applications becomes important.
Disclosure of Invention
In a first aspect, an embodiment of the present application provides a model training method, applied to an electronic device, including:
acquiring a joint feature vector of the application program and data required by the operation of the application program;
Acquiring a historical authorization policy of a user for the application program;
and carrying out model training according to the joint feature vector and the historical authorization strategy, and obtaining a data authorization model of the authorization strategy for predicting the application program to be authorized of the user.
In a second aspect, an embodiment of the present application provides a data authorization method, applied to an electronic device, including:
receiving a data authorization request of an application program to be authorized;
Acquiring the feature vector of the application program to be authorized according to the data authorization request;
predicting an authorization strategy of a user for the application program to be authorized according to the feature vector and a pre-trained data authorization model;
the data authorization model is obtained by performing model training on a historical authorization strategy of the application program according to the joint feature vector of the application program and data required by the operation of the application program and the historical authorization strategy of the user.
In a third aspect, an embodiment of the present application provides a model training apparatus, which is applied to an electronic device, including:
the vector acquisition module is used for acquiring the joint feature vector of the application program and the data required by the operation of the application program;
the strategy acquisition module is used for acquiring a historical authorization strategy of the user on the application program;
and the model training module is used for carrying out model training according to the joint feature vector and the historical authorization strategy, and the data authorization model for obtaining the authorization strategy is used for predicting the application program to be authorized of the user.
In a fourth aspect, an embodiment of the present application provides a data authorization apparatus, which is applied to an electronic device, including:
the request receiving module is used for receiving a data authorization request of an application program to be authorized;
The vector acquisition module is used for acquiring the feature vector of the application program to be authorized according to the data authorization request;
the data authorization module is used for predicting the authorization strategy of the user for the application program to be authorized according to the feature vector and a pre-trained data authorization model;
the data authorization model is obtained by performing model training on a historical authorization strategy of the application program according to the joint feature vector of the application program and data required by the operation of the application program and the historical authorization strategy of the user.
In a fifth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, where the computer program, when executed on a computer, causes the computer to perform the steps in the model training method provided by the embodiment of the present application, or causes the computer to perform the steps in the data authorization method provided by the embodiment of the present application.
In a sixth aspect, an embodiment of the present application provides an electronic device, including a memory, and a processor, where the processor is configured to execute steps in a model training method provided by the embodiment of the present application or execute steps in a data authorization method provided by the embodiment of the present application by calling a computer program stored in the memory.
The method for model training comprises the steps of obtaining a joint feature vector of an application program and data required by operation of the application program, obtaining a historical authorization strategy of a user on the application program, and carrying out model training according to the joint feature vector and the historical authorization strategy to obtain a data authorization model of the authorization strategy, wherein the data authorization model is used for predicting the application program to be authorized of the user. In the data authorization method provided by the application, when a data authorization request of an application program to be authorized is received, a data authorization model is obtained by training by using the model training method provided by the application, the authorization strategy of the application program to be authorized by a user is predicted, and personalized authority management can be performed according to the habit of the user.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a panoramic sensing architecture according to an embodiment of the present application.
Fig. 2 is a flow chart of a model training method according to an embodiment of the application.
Fig. 3 is a schematic diagram of a rights management interface provided by an electronic device in an embodiment of the present application.
Fig. 4 is another flow chart of a model training method according to an embodiment of the present application.
Fig. 5 is an application scenario schematic diagram of a model training method provided by an embodiment of the present application.
Fig. 6 is a flow chart of a data authorization method according to an embodiment of the application.
Fig. 7 is another flow chart of a data authorization method according to an embodiment of the present application.
Fig. 8 is a schematic structural diagram of a model training device according to an embodiment of the present application.
Fig. 9 is a schematic structural diagram of a data authorization device according to an embodiment of the present application.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 11 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 throughout, the principles of the present application are illustrated in an appropriate computing environment. The following description is based on illustrative embodiments of the application and should not be taken as limiting other embodiments of the application not described in detail herein.
With 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 collect more data with less power consumption by its configured sensors. Meanwhile, the electronic equipment can acquire data related to the state of the electronic equipment and data related to the state of a user in the running process, and the like. In general, an electronic device can acquire data related to an external environment, data related to a user state, and data related to a state of the electronic device. In general, the electronic device can acquire data related to external environments (such as temperature, illumination, place, sound, weather, etc.), data related to user states (such as gestures, speed, usage habits, personal basic information, etc.), and data related to electronic device states (such as power consumption, resource usage status, network status, etc.). In the embodiment of the application, the data acquired by the electronic equipment are recorded as panoramic data.
In the embodiment of the application, in order to process the data acquired by the electronic equipment, a panoramic sensing architecture is provided. Fig. 1 is a schematic structural diagram of a panoramic sensor architecture according to an embodiment of the present application, which is applied to an electronic device and includes a bottom-to-top information sensor layer, a data processing layer, a feature extraction layer, a scenario modeling layer, and an intelligent service layer.
As the lowest layer of the panorama sensing architecture, the information sensing layer is used to acquire raw data, i.e., panorama data, capable of describing various types of scenes of the user. The information sensing layer is composed of a plurality of sensors for data acquisition, including but not limited to a distance sensor for detecting the distance between the electronic equipment and an external object, a magnetic field sensor for detecting magnetic field information of the environment where the electronic equipment is located, a light sensor for detecting light information of the environment where the electronic equipment is located, an acceleration sensor for detecting acceleration data of the electronic equipment, a fingerprint sensor for acquiring fingerprint information of a user, a Hall sensor for sensing magnetic field information, a position sensor for detecting the current geographic position where the electronic equipment is located, a gyroscope for detecting angular velocity of the electronic equipment in all directions, a motion data inertial sensor for detecting motion data inertial information of the electronic equipment, a gesture sensor for sensing gesture information of the electronic equipment, a barometer for detecting air pressure of the environment where the electronic equipment is located, a heart rate sensor for detecting heart rate information of the user and the like.
The data processing layer is used for processing the original data acquired by the information sensing layer as a sub-bottom layer of the panoramic sensing architecture, and the problems of noise, inconsistency and the like of the original data are eliminated. The data processing layer can perform data cleaning, data integration, data transformation, data reduction and the like on the data acquired by the information sensing layer.
And the feature extraction layer is used for extracting features of the data processed by the data processing layer as a middle layer of the panoramic sensing architecture so as to extract the features included in the data. The feature extraction layer may extract features by filtration, packaging, integration, or the like, or process the extracted features.
Filtering means that the extracted features are filtered to delete redundant feature data. Packaging methods are used to screen the extracted features. The integration method is to integrate multiple feature extraction methods together to construct a more efficient and accurate feature extraction method for extracting features.
As a next-higher layer of the panoramic perception architecture, the scene modeling layer is configured to construct a model according to the features extracted by the feature extraction layer, and the obtained model may be used to represent a state of the electronic device or a user state or an environmental state, or the like. For example, the scenario modeling layer may construct a key value model, a pattern identification model, a graph model, a physical relationship model, an object-oriented model, and the like from the features extracted by the feature extraction layer.
As the highest layer of the panoramic sensing architecture, the intelligent service layer is used for providing intelligent service according to the model constructed by the scene modeling layer. For example, the intelligent service layer can provide basic application service for users, can perform system intelligent optimization service for electronic equipment, and can provide personalized intelligent service for users.
In addition, the panoramic sensing architecture further comprises an algorithm library, wherein the algorithm library comprises but is not limited to an illustrated Markov algorithm, an implicit 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 network, a long-term and short-term memory network, a convolutional neural network, a cyclic neural network and the like.
At present, the related technology does not grade the data per se, and does not consider the characteristics of the application program per se, so that the current authority management mechanism is too mechanized, and either the authority requested by the application program is directly refused or the authority requested by the application program is directly accepted. This results in difficulty in better protecting the privacy and data security of the user with the current rights management mechanism, and on the other hand, better data support cannot be provided for the application program. More importantly, the attitudes of different users on the data are different, part of the users are not very careful about the private data, part of the privacy is sacrificed to obtain better service, and the other part of the users are careful about the private data, so that the access right management of the data is strict, and personalized right management according to the habit of the users becomes necessary.
In order to enable personalized rights management according to user habits, embodiments of the present application provide a model training method, a data authorization method, a device, a storage medium, and an electronic device, where an execution body of the model training method may be the model training device provided by the embodiments of the present application, or an electronic device integrated with the model training device, and an execution body of the data authorization method may be the data authorization device provided by the embodiments of the present application, or an electronic device integrated with the data authorization device, where the model training device/the data authorization device may be implemented in a hardware or software manner. The electronic device may be a device with a processing capability, such as a smart phone, a tablet computer, a palm computer, a notebook computer, or a desktop computer, configured with a processor.
According to the model training method and the data authorization method provided by the embodiment of the application, the data processing layer processes panoramic data from the information sensing layer and performs authority management on the data on the electronic equipment, wherein when a data authorization request of an application program to be authorized is received, a user predicts and executes an authorization strategy of the application program to be authorized based on the data authorization model trained by the model training method provided by the embodiment of the application, so that personalized authority management is performed according to user habits.
Fig. 2 is a flow chart of a model training method according to an embodiment of the application. The model training method can be applied to the electronic equipment, and the flow of the model training method can comprise the following steps:
In 201, a joint feature vector of an application and data required for its operation is obtained.
For example, when the electronic device obtains the joint feature vectors of the application programs and the data required by the running of the application programs, the electronic device may obtain the joint feature vectors of all installed application programs and the data required by the running of the application programs, for example, the electronic device currently installs 80 application programs in total, and the electronic device may obtain the joint feature vectors of the 80 application programs and the data required by the running of the application programs, so as to obtain 80 joint feature vectors in total.
For example, when the electronic device obtains the joint feature vectors of the application program and the data required by the application program to run, the electronic device may obtain the joint feature vectors of the installed part of the application program and the data required by the application program to run, for example, the electronic device currently installs 80 application programs in total, and the electronic device may obtain the joint feature vectors of two random application programs and the data required by the application program to run in each class of application program, if the 80 application programs currently installed by the electronic device can be classified into 10 classes, the electronic device will obtain at most 20 application programs and the joint feature vectors of the data required by the application program to run, that is, at most 20 joint feature vectors.
It should be noted that the joint feature vector is used to jointly characterize the application and its data required for operation, for example, u= (U1, U2, U3,) may be used to represent the joint feature vector, which includes features of U1 to un in n dimensions.
At 202, a historical authorization policy for a user for the aforementioned application is obtained.
In the embodiment of the application, a database for recording the authorization policy is created in the electronic equipment in advance and is recorded as an authorization policy database. The electronic equipment stores the authorization strategy of the user for the application program into a pre-established authorization strategy database when receiving the authorization strategy of the user for the application program each time. Thus, when the electronic device obtains the historical authorization policy of the user for the application program, the electronic device can obtain the historical stored authorization policy corresponding to the application program, namely the historical authorization policy corresponding to the application program, from the authorization policy database.
It should be noted that, for any application program, the corresponding historical authorization policy includes at least which rights of the application program are granted and which rights of the application program are denied.
In 203, model training is performed according to the acquired joint feature vector and the historical authorization policy, and the data authorization model of the authorization policy is used for predicting the application program to be authorized of the user.
In the embodiment of the application, after the electronic equipment acquires the joint feature vector of the application program and the data required by the operation of the application program and acquires the historical authorization strategy of the user on the application program, a preset model training algorithm is adopted to carry out model training according to the acquired joint feature vector and the historical authorization strategy, and a data authorization model of the authorization strategy is obtained and is used for predicting the application program to be authorized of the user.
For example, when the electronic device trains the data authorization model, the electronic device can train the model by using a classification learning algorithm to obtain a classifier, and the classifier is used as the data authorization model. For example, training with a class learning algorithm results in a classifier whose output includes both classes 0 and 1, where 1 indicates that an application is granted a certain right and 0 indicates that the application is denied the right.
The classification algorithm may be set by those skilled in the art according to actual needs, and includes, but is not limited to, naive bayes classification algorithm, support vector machine algorithm, KNN algorithm, neural network algorithm, and the like.
It can be known from the above that, in the embodiment of the present application, the electronic device may obtain the joint feature vector of the application program and the data required for running the application program, and obtain the historical authorization policy of the user for the application program, and perform model training according to the obtained joint feature vector and the historical authorization policy, so that the data authorization model of the authorization policy is used for predicting the application program to be authorized of the user, and personalized rights management can be performed according to the habit of the user by using the data authorization model.
In an embodiment, after "performing model training according to the obtained joint feature vector and the historical authorization policy, obtaining the data authorization model of the authorization policy for predicting the application program to be authorized of the user", the method further includes:
And carrying out iterative optimization on the data authorization model by adopting a preset reinforcement learning algorithm.
It should be noted that, the iterative optimization of the data authorization model by using the preset reinforcement learning algorithm only changes the parameters of the data authorization model, but does not change the configuration of the data authorization model. In the embodiment of the application, the electronic equipment carries out iterative optimization on the trained data authorization model by adopting a preset reinforcement learning algorithm, so that the data authorization model can more accurately predict the authorization strategy of the user on the application program.
For example, when the electronic device trains the data authorization model, a classification algorithm may be used to train the acquired multiple joint feature vectors and the corresponding multiple historical authorization policies to obtain a classifier, and the classifier is used as the data authorization model for predicting the authorization policies of the user to the application program to be authorized. In this way, even if the electronic equipment adopts a preset reinforcement learning algorithm to carry out iterative optimization on the data authorization model, the configuration of the data authorization model after iterative optimization is still a classifier.
It should be noted that, in the embodiment of the present application, the reinforcement Learning algorithm is not limited, and may be selected by those skilled in the art according to actual needs, including but not limited to Q-Learning and template DIFFERENCE LEARNING.
In one embodiment, "iteratively optimizing the data authorization model using a pre-set reinforcement learning algorithm" includes:
(1) Predicting an authorization strategy of a user for the application program according to the data authorization model;
(2) Receiving and executing an adjustment instruction of a user to the predicted authorization strategy to obtain an adjusted predicted authorization strategy;
(3) And according to the adjusted predicted authorization strategy, updating parameters of the data authorization model by adopting the reinforcement learning algorithm.
An iteration process of the data authorization model by the electronic device is described below as an example.
In an iterative process, the electronic equipment predicts the authorization strategy of the user for the application program according to the data authorization model obtained through training. For example, assuming that the data authorization model is trained by the electronic device according to the obtained joint feature vectors of the 4 applications and the data required by the operation of the applications and the historical authorization policies of the 4 applications by the user, the electronic device predicts the authorization policies of the 4 applications by the user according to the trained data authorization model, thereby obtaining 4 predicted authorization policies.
Illustratively, by design, the output of the data authorization model includes two classes 0 and 1, where 1 indicates that an application is granted a right and 0 indicates that the application is denied the right, and assuming that the electronic device is provided with 4 data rights, the data authorization model predicts that the output authorization policy will appear as a 4-digit number of 0 and 1, with the first digit from the left corresponding to data right A, the second digit corresponding to data right B, the third digit corresponding to data right C, and the fourth digit corresponding to data right D. For example, for application a, if the authorization policy output by the data authorization model is "1001", it means that application a is granted data rights a and D, and data rights B and C are denied.
After obtaining the predicted authorization policy corresponding to the application program, the electronic device further receives an adjustment instruction of the user for the predicted authorization policy, and executes the received adjustment instruction, thereby obtaining the adjusted predicted authorization policy.
Illustratively, the electronic device may provide the user with adjustments to the predictive authorization policy through a graphical rights management interface. For example, referring to fig. 3, an operable sliding control is provided in a rights management interface provided by the electronic device, a user may toggle a circular slider in the sliding control to input an adjustment instruction, so as to instruct the electronic device to accept or reject a certain data right, as shown in fig. 3, for the application program a, the predicted authorization policy before adjustment is "1001", i.e. the predicted user may grant the data right a and the data right D, while rejecting the data right B and the data right C, and the predicted authorization policy after adjustment is "0101", i.e. the user actually grants the data right B and the data right D, while rejecting the data right a and the data right C.
After the adjusted predicted authorization policy is obtained, the electronic device updates the parameters of the data authorization model by adopting the reinforcement learning algorithm, so that the authorization policy predicted by the data authorization model is as close to the actual authorization policy of the user as possible.
As described above, the electronic device continues the next iteration process until the data authorization model meets the preset termination condition.
The termination condition may be set, for example, such that for any application, the authorization policy predicted by the data authorization model is consistent with the authorization policy actually given by the user.
Or the termination condition can be set such that, for a plurality of application programs, the duty ratio of the authorization policy consistent with the authorization policy actually given by the user in the authorization policies predicted by the data authorization model reaches a preset proportion, and the like.
In one embodiment, the "get joint feature vector of an application and its data needed to run" includes:
(1) Acquiring a feature vector of an application program;
(2) Acquiring characteristic parameters of data required by the running of an application program;
(3) And adopting a preset first encoder neural network to jointly characterize the acquired feature vector and the characteristic parameter to obtain a joint feature vector of the application program and data required by the operation of the application program.
Wherein the characteristic parameters are used to describe characteristics of the data, including but not limited to the degree of privacy, purpose, etc. of the data.
For example, assuming that the privacy level of the data is predefined with high, medium, and low 3-level privacy levels, the privacy level of the data may be described using arabic numerals as the characteristic parameters, for example, "1" is used to indicate that the privacy level of the data is low, "2" is used to indicate that the privacy level of the data is high, and "3" is used to indicate that the privacy level of the data is high.
In the case where 3 kinds of uses, namely, use a, use B, and use C, are defined in advance for the use of the data, the use of the data can be described by using arabic numerals as the characteristic parameters, for example, use of "1" for use a, use of "2" for use B, and use of "3" for use C.
As described above, the characteristic parameters of the data will include two dimensions, one for describing the degree of privacy of the data and the other for describing the purpose of the data.
In the embodiment of the application, when the electronic device obtains the joint feature vector of the application program and the data required by the application program to run, taking a certain application program as an example, the electronic device can obtain the feature vector of the application program and the characteristic parameter of the data required by the application program to run, and then the obtained feature vector and the characteristic parameter are jointly represented by adopting the preset first encoder neural network to obtain the joint feature vector of the application program and the data required by the application program to run.
It should be noted that, the embodiment of the present application is not limited to the specific model and topology structure of the first encoder neural network, and may be trained by using a single-layer recurrent neural network to obtain the encoder neural network, or may be trained by using a multi-layer recurrent neural network to obtain the encoder neural network, or may be trained by using a convolutional neural network, or a variant thereof, or a neural network of other network structure to obtain the encoder neural network. For example, in an embodiment of the present application, a contrast learning neural network may be used to construct the first encoder neural network.
In one embodiment, "obtaining a feature vector of an application" includes:
(1) Acquiring description information of an application program;
(2) And characterizing the acquired description information by using a preset second encoder neural network to obtain the feature vector of the application program.
Taking a certain application program as an example, when the electronic device acquires the feature vector of the application program, the electronic device may first acquire the description information of the application program, and then input the acquired description information into a preset second encoder neural network for characterization, so as to obtain the feature vector of the application program. The description information includes, but is not limited to, information such as the name of the application program, the application type, and the like.
It should be noted that, the embodiment of the present application is not limited to the specific model and topology structure of the second encoder neural network, and the encoder neural network may be obtained by training a single-layer recurrent neural network, or may be obtained by training a multi-layer recurrent neural network, or may be obtained by training a convolutional neural network, or a variant thereof, or a neural network of other network structure. For example, a recurrent neural network may be employed in embodiments of the present application to construct a second encoder neural network.
Fig. 4 is another flow chart of a model training method provided by an embodiment of the present application, and fig. 5 is an application scenario diagram of the model training method, where the model training method may be applied to an electronic device, and the flow chart of the model training method may include:
in 401, the electronic device obtains a feature vector of an application.
Taking a certain application program as an example, when the electronic device acquires the feature vector of the application program, the electronic device may first acquire the description information of the application program, and then input the acquired description information into a preset second encoder neural network for characterization, so as to obtain the feature vector of the application program. The description information includes, but is not limited to, information such as the name of the application program, the application type, and the like.
It should be noted that, the embodiment of the present application is not limited to the specific model and topology structure of the second encoder neural network, and the encoder neural network may be obtained by training a single-layer recurrent neural network, or may be obtained by training a multi-layer recurrent neural network, or may be obtained by training a convolutional neural network, or a variant thereof, or a neural network of other network structure. For example, a recurrent neural network may be employed in embodiments of the present application to construct a second encoder neural network.
In 402, the electronic device obtains characteristic parameters of data required for the running of the application.
Wherein the characteristic parameters are used to describe characteristics of the data, including but not limited to the degree of privacy, purpose, etc. of the data.
For example, assuming that the privacy level of the data is predefined with high, medium, and low 3-level privacy levels, the privacy level of the data may be described using arabic numerals as the characteristic parameters, for example, "1" is used to indicate that the privacy level of the data is low, "2" is used to indicate that the privacy level of the data is high, and "3" is used to indicate that the privacy level of the data is high.
In the case where 3 kinds of uses, namely, use a, use B, and use C, are defined in advance for the use of the data, the use of the data can be described by using arabic numerals as the characteristic parameters, for example, use of "1" for use a, use of "2" for use B, and use of "3" for use C.
As described above, the characteristic parameters of the data will include two dimensions, one for describing the degree of privacy of the data and the other for describing the purpose of the data.
It should be noted that, the execution order of 201 and 202 is not affected by the sequence number, and may be that the execution is performed after the execution is completed 201, or that the execution is performed after the execution is completed 202, or that the execution is performed 201 and 202 simultaneously.
In 403, the electronic device uses a preset first encoder neural network to jointly characterize the obtained feature vector and the characteristic parameter, so as to obtain the joint feature vector of the application program and the data required by the operation of the application program.
After the obtained characteristic vector of the application program and the corresponding multiple data characteristic parameters, the electronic equipment adopts a preset first encoder neural network to jointly characterize the obtained characteristic vector and the characteristic parameters, and a joint characteristic vector of the application program and data required by operation of the application program is obtained.
It should be noted that, the embodiment of the present application is not limited to the specific model and topology structure of the first encoder neural network, and may be trained by using a single-layer recurrent neural network to obtain the encoder neural network, or may be trained by using a multi-layer recurrent neural network to obtain the encoder neural network, or may be trained by using a convolutional neural network, or a variant thereof, or a neural network of other network structure to obtain the encoder neural network. For example, in an embodiment of the present application, a contrast learning neural network may be used to construct the first encoder neural network.
At 404, the electronic device obtains a historical authorization policy for the user for the application.
In the embodiment of the application, a database for recording the authorization policy is created in the electronic equipment in advance and is recorded as an authorization policy database. The electronic equipment stores the authorization strategy of the user for the application program into a pre-established authorization strategy database when receiving the authorization strategy of the user for the application program each time. Thus, when the electronic device obtains the historical authorization policy of the user for the application program, the electronic device can obtain the historical stored authorization policy corresponding to the application program, namely the historical authorization policy corresponding to the application program, from the authorization policy database.
It should be noted that, for any application program, the corresponding historical authorization policy includes at least which rights of the application program are granted and which rights of the application program are denied.
In 405, the electronic device performs model training according to the obtained joint feature vector and the historical authorization policies, and the data authorization model of the obtained authorization policies is used for predicting the application program to be authorized of the user.
In the embodiment of the application, after the electronic equipment acquires the joint feature vector of the application program and the data required by the operation of the application program and acquires the historical authorization strategy of the user on the application program, a preset model training algorithm is adopted to carry out model training according to the acquired joint feature vector and the historical authorization strategy, and a data authorization model of the authorization strategy is obtained and is used for predicting the application program to be authorized of the user.
For example, when the electronic device trains the data authorization model, the electronic device can train the model by using a classification learning algorithm to obtain a classifier, and the classifier is used as the data authorization model. For example, training with a class learning algorithm results in a classifier whose output includes both classes 0 and 1, where 1 indicates that an application is granted a certain right and 0 indicates that the application is denied the right.
The classification algorithm may be set by those skilled in the art according to actual needs, and includes, but is not limited to, naive bayes classification algorithm, support vector machine algorithm, KNN algorithm, neural network algorithm, and the like.
In 406, the electronic device iteratively optimizes the data authorization model using a preset reinforcement learning algorithm.
An iteration process of the data authorization model by the electronic device is described below as an example.
In an iterative process, the electronic equipment predicts the authorization strategy of the user for the application program according to the data authorization model obtained through training. For example, assuming that the data authorization model is trained by the electronic device according to the obtained joint feature vectors of the 4 applications and the data required by the operation of the applications and the historical authorization policies of the 4 applications by the user, the electronic device predicts the authorization policies of the 4 applications by the user according to the trained data authorization model, thereby obtaining 4 predicted authorization policies.
Illustratively, by design, the output of the data authorization model includes two classes 0 and 1, where 1 indicates that an application is granted a right and 0 indicates that the application is denied the right, and assuming that the electronic device is provided with 4 data rights, the data authorization model predicts that the output authorization policy will appear as a 4-digit number of 0 and 1, with the first digit from the left corresponding to data right A, the second digit corresponding to data right B, the third digit corresponding to data right C, and the fourth digit corresponding to data right D. For example, for application a, if the authorization policy output by the data authorization model is "1001", it means that application a is granted data rights a and D, and data rights B and C are denied.
After obtaining the predicted authorization policy corresponding to the application program, the electronic device further receives an adjustment instruction of the user for the predicted authorization policy, and executes the received adjustment instruction, thereby obtaining the adjusted predicted authorization policy.
For example, the electronic device may provide a graphical rights management interface for the user to adjust the predictive authorization policy. For example, referring to fig. 3, an operable sliding control is provided in a rights management interface provided by the electronic device, a user may toggle a circular slider in the sliding control to input an adjustment instruction, so as to instruct the electronic device to accept or reject a certain data right, as shown in fig. 3, for the application program a, the predicted authorization policy before adjustment is "1001", i.e. the predicted user may grant the data right a and the data right D, while rejecting the data right B and the data right C, and the predicted authorization policy after adjustment is "0101", i.e. the user actually grants the data right B and the data right D, while rejecting the data right a and the data right C.
After the adjusted predicted authorization policy is obtained, the electronic device updates the parameters of the data authorization model by adopting the reinforcement learning algorithm, so that the authorization policy predicted by the data authorization model is as close to the actual authorization policy of the user as possible.
As described above, the electronic device continues the next iteration process until the data authorization model meets the preset termination condition.
The termination condition may be set, for example, such that for any application, the authorization policy predicted by the data authorization model is consistent with the authorization policy actually given by the user.
Or the termination condition can be set such that, for a plurality of application programs, the duty ratio of the authorization policy consistent with the authorization policy actually given by the user in the authorization policies predicted by the data authorization model reaches a preset proportion, and the like.
Fig. 6 is a schematic flow chart of a data authorization method according to an embodiment of the present application, where the data authorization method may be applied to an electronic device, and the flow chart of the data authorization method may include:
in 601, a data authorization request is received for an application to be authorized.
The application program to be authorized can be an application program newly installed by the electronic equipment or a new updated application program. For example, the electronic device newly installs the application program D, and the application program D needs to access some data of the electronic device to perform normally, and generates a data authorization request at this time to request the electronic device for data permission to access the data, where the application program D is the application program to be authorized.
In 602, a feature vector for an application to be authorized is obtained based on a data authorization request.
After receiving the data authorization request of the application program to be authorized, the electronic equipment further obtains the feature vector of the application program to be authorized, and the feature vector is used for representing the application program to be authorized.
When the electronic device obtains the feature vector of the application program to be authorized, the electronic device may first obtain the description information of the application program to be authorized, and then input the obtained description information to a preset second encoder neural network for characterization, so as to obtain the feature vector of the application program to be authorized. The description information includes, but is not limited to, information such as a name of an application program to be authorized, an application type, and the like.
It should be noted that, the embodiment of the present application is not limited to the specific model and topology structure of the second encoder neural network, and the encoder neural network may be obtained by training a single-layer recurrent neural network, or may be obtained by training a multi-layer recurrent neural network, or may be obtained by training a convolutional neural network, or a variant thereof, or a neural network of other network structure. For example, a recurrent neural network may be employed in embodiments of the present application to construct a second encoder neural network.
In 603, the authorization policy of the user for the application to be authorized is predicted based on the obtained feature vector and the pre-trained data authorization model.
It should be noted that, in the embodiment of the present application, a data authorization model is further trained in advance, where the data authorization model is obtained by performing model training on a historical authorization policy of an application program according to a joint feature vector of the application program and data required for running the application program and a user. For example, when the electronic device trains the data authorization model, a classification learning algorithm can be utilized to train the combination feature vectors of a plurality of application programs and data required by the operation of the application programs, and a user carries out model training on the historical authorization strategy of the application programs, so that a classifier is obtained, and the classifier is used as the data authorization model. For example, training with a class learning algorithm results in a classifier whose output includes both classes 0 and 1, where 1 indicates that an application is granted a certain right and 0 indicates that the application is denied the right.
The classification algorithm may be set by those skilled in the art according to actual needs, and includes, but is not limited to, naive bayes classification algorithm, support vector machine algorithm, KNN algorithm, neural network algorithm, and the like.
In the embodiment of the application, after the electronic equipment acquires the feature vector of the application program to be authorized, the feature vector of the application program to be authorized is input into the data authorization model, so that the authorization strategy of the user to the application program to be authorized, which is predicted by the data authorization model, is obtained.
Illustratively, by design, the output of the data authorization model includes two classes 0 and 1, where 1 indicates that an application is granted a right and 0 indicates that the application is denied the right, and assuming that the electronic device is provided with 4 data rights, the data authorization model predicts that the output authorization policy will appear as a 4-digit number of 0 and 1, with the first digit from the left corresponding to data right A, the second digit corresponding to data right B, the third digit corresponding to data right C, and the fourth digit corresponding to data right D. For example, if the authorization policy of the to-be-authorized model predicted by the data authorization model is "1001", it means that the to-be-authorized application is granted with the data right a and the data right D, and the data right B and the data right C are denied.
As can be seen from the above, in the embodiment of the present application, the electronic device only needs to train the data authorization model for obtaining the authorization policy, and then when receiving the data authorization request of the application program to be authorized, can predict by using the data authorization model obtained by training, so as to obtain the authorization policy conforming to the habit of the user.
In one embodiment, after predicting the authorization policy of the user to the authorized application according to the feature vector and the pre-trained data authorization model, the method further includes:
(1) Receiving an adjustment instruction of a user for the predicted authorization strategy, and adjusting the predicted authorization strategy according to the adjustment instruction;
(2) And optimizing the data authorization model according to the adjusted authorization strategy.
The electronic device can provide a graphical rights management interface for a user to adjust the predicted authorization policy. For example, referring to fig. 3, an operable sliding control is provided in a rights management interface provided by the electronic device, a user may toggle a circular slider in the sliding control to input an adjustment instruction, so as to instruct the electronic device to accept or reject a certain data right, as shown in fig. 3, an application program a is an application program to be authorized, an authorization policy before adjustment is "1001", i.e. it is predicted that the user may grant the data right a and the data right D, and reject the data right B and the data right C, and an authorization policy after adjustment is "0101", i.e. the user actually grants the data right B and the data right D, and reject the data right a and the data right C.
After completing the adjustment of the predicted authorization policy, the electronic device may optimize the data authorization model according to the adjusted authorization policy based on a preset reinforcement learning algorithm.
It should be noted that, the data authorization model is optimized by adopting a preset reinforcement learning algorithm, only the parameters of the data authorization model are changed, and the configuration of the data authorization model is not changed. For example, when the electronic device trains the data authorization model, a classification algorithm may be used to train the acquired multiple joint feature vectors and the corresponding multiple historical authorization policies to obtain a classifier, and the classifier is used as the data authorization model for predicting the authorization policies of the user to the application program to be authorized. Therefore, even if the electronic equipment subsequently adopts a preset reinforcement learning algorithm to optimize the data authorization model, the configuration of the optimized data authorization model is still a classifier.
It should be noted that, in the embodiment of the present application, the reinforcement Learning algorithm is not limited, and may be selected by those skilled in the art according to actual needs, including but not limited to Q-Learning and template DIFFERENCE LEARNING.
In one embodiment, after predicting the authorization policy of the user to the authorized application according to the feature vector and the pre-trained data authorization model, the method further includes:
the predicted authorization policy is applied.
The electronic device predicts the authorization policy of the user to be authorized after predicting the authorization policy of the user to be authorized according to the data authorization model.
Fig. 7 is another flow chart of a data authorization method according to an embodiment of the present application. The data authorization method can be applied to the electronic device. The data authorization method comprises the following steps:
In 701, the electronic device obtains a joint feature vector of an application and data required for its operation.
For example, when acquiring the joint feature vector of the application program and the data required for running the application program, the electronic device may acquire the joint feature vector of all the installed application programs and the data required for running the application programs.
For example, when acquiring the joint feature vector of the application program and the data required for running the application program, the electronic device may acquire the joint feature vector of the installed part of the application program and the data required for running the application program.
It should be noted that the joint feature vector is used to jointly characterize the application and its data required for operation, for example, u= (U1, U2, U3,) may be used to represent the joint feature vector, which includes features of U1 to un in n dimensions.
At 702, the electronic device obtains a historical authorization policy for a user for the aforementioned application.
In the embodiment of the application, a database for recording the authorization policy is created in the electronic equipment in advance and is recorded as an authorization policy database. The electronic equipment stores the authorization strategy of the user for the application program into a pre-established authorization strategy database when receiving the authorization strategy of the user for the application program each time. Thus, when the electronic device obtains the historical authorization policy of the user for the application program, the electronic device can obtain the historical stored authorization policy corresponding to the application program, namely the historical authorization policy corresponding to the application program, from the authorization policy database.
It should be noted that, for any application program, the corresponding historical authorization policy includes at least which rights of the application program are granted and which rights of the application program are denied.
In 703, the electronic device performs model training according to the obtained joint feature vector and the historical authorization policy, and the data authorization model of the obtained authorization policy is used for predicting the application program to be authorized of the user.
In the embodiment of the application, after the electronic equipment acquires the joint feature vector of the application program and the data required by the operation of the application program and acquires the historical authorization strategy of the user on the application program, a preset model training algorithm is adopted to carry out model training according to the acquired joint feature vector and the historical authorization strategy, and a data authorization model of the authorization strategy is obtained and is used for predicting the application program to be authorized of the user.
For example, when the electronic device trains the data authorization model, the electronic device can train the model by using a classification learning algorithm to obtain a classifier, and the classifier is used as the data authorization model. For example, training with a class learning algorithm results in a classifier whose output includes both classes 0 and 1, where 1 indicates that an application is granted a certain right and 0 indicates that the application is denied the right.
The classification algorithm may be set by those skilled in the art according to actual needs, and includes, but is not limited to, naive bayes classification algorithm, support vector machine algorithm, KNN algorithm, neural network algorithm, and the like.
In 704, the electronic device iteratively optimizes the data authorization model using a preset reinforcement learning algorithm.
It should be noted that, the iterative optimization of the data authorization model by using the preset reinforcement learning algorithm only changes the parameters of the data authorization model, but does not change the configuration of the data authorization model. In the embodiment of the application, the electronic equipment carries out iterative optimization on the trained data authorization model by adopting a preset reinforcement learning algorithm, so that the data authorization model can more accurately predict the authorization strategy of the user on the application program.
For example, when the electronic device trains the data authorization model, a classification algorithm may be used to train the acquired multiple joint feature vectors and the corresponding multiple historical authorization policies to obtain a classifier, and the classifier is used as the data authorization model for predicting the authorization policies of the user to the application program to be authorized. In this way, even if the electronic equipment adopts a preset reinforcement learning algorithm to carry out iterative optimization on the data authorization model, the configuration of the data authorization model after iterative optimization is still a classifier.
It should be noted that, in the embodiment of the present application, the reinforcement Learning algorithm is not limited, and may be selected by those skilled in the art according to actual needs, including but not limited to Q-Learning and template DIFFERENCE LEARNING.
In 705, the electronic device receives a data authorization request for an application to be authorized.
It should be noted that, the iterative optimization of the data authorization model by using the preset reinforcement learning algorithm only changes the parameters of the data authorization model, but does not change the configuration of the data authorization model. In the embodiment of the application, the electronic equipment carries out iterative optimization on the trained data authorization model by adopting a preset reinforcement learning algorithm, so that the data authorization model can more accurately predict the authorization strategy of the user on the application program.
For example, when the electronic device trains the data authorization model, a classification algorithm may be used to train the acquired multiple joint feature vectors and the corresponding multiple historical authorization policies to obtain a classifier, and the classifier is used as the data authorization model for predicting the authorization policies of the user to the application program to be authorized. In this way, even if the electronic equipment adopts a preset reinforcement learning algorithm to carry out iterative optimization on the data authorization model, the configuration of the data authorization model after iterative optimization is still a classifier.
It should be noted that, in the embodiment of the present application, the reinforcement Learning algorithm is not limited, and may be selected by those skilled in the art according to actual needs, including but not limited to Q-Learning and template DIFFERENCE LEARNING.
In 706, the electronic device obtains a feature vector for the application to be authorized according to the data authorization request.
After receiving the data authorization request of the application program to be authorized, the electronic equipment further obtains the feature vector of the application program to be authorized, and the feature vector is used for representing the application program to be authorized.
When the electronic device obtains the feature vector of the application program to be authorized, the electronic device may first obtain the description information of the application program to be authorized, and then input the obtained description information to a preset second encoder neural network for characterization, so as to obtain the feature vector of the application program to be authorized. The description information includes, but is not limited to, information such as a name of an application program to be authorized, an application type, and the like.
It should be noted that, the embodiment of the present application is not limited to the specific model and topology structure of the second encoder neural network, and the encoder neural network may be obtained by training a single-layer recurrent neural network, or may be obtained by training a multi-layer recurrent neural network, or may be obtained by training a convolutional neural network, or a variant thereof, or a neural network of other network structure. For example, a recurrent neural network may be employed in embodiments of the present application to construct a second encoder neural network.
In 707, the electronic device predicts an authorization policy for the user to authorize the application based on the obtained feature vector and the aforementioned data authorization model.
In the embodiment of the application, after the electronic equipment acquires the feature vector of the application program to be authorized, the feature vector of the application program to be authorized is input into the data authorization model, so that the authorization strategy of the user to the application program to be authorized, which is predicted by the data authorization model, is obtained.
Illustratively, by design, the output of the data authorization model includes two classes 0 and 1, where 1 indicates that an application is granted a right and 0 indicates that the application is denied the right, and assuming that the electronic device is provided with 4 data rights, the data authorization model predicts that the output authorization policy will appear as a 4-digit number of 0 and 1, with the first digit from the left corresponding to data right A, the second digit corresponding to data right B, the third digit corresponding to data right C, and the fourth digit corresponding to data right D. For example, if the authorization policy of the to-be-authorized model predicted by the data authorization model is "1001", it means that the to-be-authorized application is granted with the data right a and the data right D, and the data right B and the data right C are denied.
Fig. 8 is a schematic structural diagram of a model training device according to an embodiment of the present application. The model training device can be applied to electronic equipment. The model training apparatus may include a vector acquisition module 801, a policy acquisition module 802, and a model training module 803, wherein,
A vector obtaining module 801, configured to obtain a joint feature vector of the application program and data required for running the application program;
A policy obtaining module 802, configured to obtain a historical authorization policy of a user for the application program;
The model training module 803 performs model training according to the acquired joint feature vector and the historical authorization strategy, and the data authorization model of the authorization strategy is obtained and used for predicting the application program to be authorized of the user.
In one embodiment, model training module 803 may also be used to:
And carrying out iterative optimization on the data authorization model by adopting a preset reinforcement learning algorithm.
In one embodiment, when the data authorization model is iteratively optimized using a preset reinforcement learning algorithm, the model training module 803 may be configured to:
predicting an authorization strategy of a user for the application program according to the data authorization model;
Receiving and executing an adjustment instruction of a user to the predicted authorization strategy to obtain an adjusted predicted authorization strategy;
and according to the adjusted predicted authorization strategy, updating parameters of the data authorization model by adopting the reinforcement learning algorithm.
In one embodiment, in acquiring the joint feature vector of the application and the data required for its operation, the vector acquisition module 801 may be configured to:
acquiring a feature vector of an application program;
acquiring characteristic parameters of data required by the running of an application program;
And adopting a preset first encoder neural network to jointly characterize the acquired feature vector and the characteristic parameter to obtain a joint feature vector of the application program and data required by the operation of the application program.
In one embodiment, in acquiring a feature vector of an application, the vector acquisition module 801 may be configured to:
Acquiring description information of an application program;
and characterizing the acquired description information by using a preset second encoder neural network to obtain the feature vector of the application program.
The model training device provided by the embodiment of the application belongs to the same conception as the model training method in the above embodiment, and any method provided in the model training method embodiment can be operated on the model training device, and the detailed implementation process of the model training method embodiment is shown in the model training method embodiment and will not be repeated here.
Fig. 9 is a schematic structural diagram of a data authorization device according to an embodiment of the present application. The data authorization device can be applied to electronic equipment. The data authorization means may comprise a request receiving module 901, a vector retrieving module 902, and a data authorization module 903, wherein,
A request receiving module 901, configured to receive a data authorization request of an application to be authorized;
the vector obtaining module 902 is configured to obtain a feature vector of an application to be authorized according to the data authorization request;
the data authorization module 903 is configured to predict an authorization policy of a user for an application to be authorized according to the obtained feature vector and a pre-trained data authorization model;
the data authorization model is obtained by model training according to the joint feature vector of the application program and the data required by the running of the application program and the historical authorization strategy of the user on the application program.
In an embodiment, the data authorization apparatus further comprises a model optimization module for:
After predicting the authorization strategy of the application program to be authorized by the user according to the feature vector and the pre-trained data authorization model, receiving an adjustment instruction of the user on the predicted authorization strategy, and adjusting the predicted authorization strategy according to the adjustment instruction;
and optimizing the data authorization model according to the adjusted authorization strategy.
In an embodiment, the data authorization apparatus further comprises a policy application module for:
the predicted authorization policy is applied.
The data authorization device provided by the embodiment of the present application belongs to the same concept as the data authorization method in the above embodiment, and any method provided in the data authorization method embodiment may be run on the data authorization device, and the specific implementation process is detailed in the data authorization method embodiment, which is not described herein again.
Embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which when executed on a computer causes the computer to perform steps in a model training method as provided by the embodiments of the present application, or causes the computer to perform steps in a data authorization method as provided by the embodiments of the present application.
The embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the processor executes the steps in the model training method provided by the embodiment of the application or executes the steps in the data authorization method provided by the embodiment of the application by calling the computer program stored in the memory.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may include a memory 1002 and a processor 1001. It will be appreciated by those of ordinary skill in the art that the electronic device structure shown in fig. 10 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
Memory 1002 may be used to store applications and data. The memory 1002 stores an application program including executable code. Applications may constitute various functional modules. The processor 1001 executes various functional applications and data processing by running application programs stored in the memory 1002.
The processor 1001 is a control center of the electronic device, connects respective parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 1002 and calling the data stored in the memory 1002, thereby performing overall monitoring of the electronic device.
In the embodiment of the present application, the processor 1001 in the electronic device loads executable codes corresponding to the processes of one or more model training programs into the memory 1002 according to the following instructions, and the executable codes are executed by the processor 1001, so as to execute:
acquiring a joint feature vector of the application program and data required by the operation of the application program;
acquiring a historical authorization strategy of a user for the application program;
and training a model according to the acquired joint feature vector and the historical authorization strategy, and obtaining a data authorization model of the authorization strategy for predicting the application program to be authorized of the user.
Or the processor 1001 in the electronic device may load executable code corresponding to the process of one or more data authorization programs into the memory 1002 according to the following instructions, and the executable code is executed by the processor 1001, so as to perform:
receiving a data authorization request of an application program to be authorized;
Acquiring a feature vector of an application program to be authorized according to the data authorization request;
predicting an authorization strategy of a user to an application program to be authorized according to the obtained feature vector and a pre-trained data authorization model;
the data authorization model is obtained by model training according to the joint feature vector of the application program and the data required by the running of the application program and the historical authorization strategy of the user on the application program.
Fig. 11 is another schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device includes a processor 1101, a memory 1102, an input unit 1103, an output unit 1104, and other components.
Memory 1102 may be used to store, among other things, applications and data. Memory 1102 stores application programs that include executable code. Applications may constitute various functional modules. The processor 1101 executes various functional applications and data processing by running application programs stored in the memory 1102.
The processor 1101 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing application programs stored in the memory 1102 and calling data stored in the memory 1102, thereby performing overall monitoring of the electronic device.
The input unit 1103 may be used to receive input numbers, character information, or user characteristic information (such as fingerprints), and to generate keyboard, mouse, joystick, optical or trackball signal inputs, etc. in connection with user settings and function control.
The output unit 1104 may be used to output information input by a user or information provided to a user, such as a speaker or the like.
In the embodiment of the present application, the processor 1101 in the electronic device loads executable codes corresponding to the processes of one or more model training programs into the memory 1102 according to the following instructions, and the processor 1101 executes the application program stored in the memory 1102, so as to execute:
acquiring a joint feature vector of the application program and data required by the operation of the application program;
acquiring a historical authorization strategy of a user for the application program;
and training a model according to the acquired joint feature vector and the historical authorization strategy, and obtaining a data authorization model of the authorization strategy for predicting the application program to be authorized of the user.
In an embodiment, after model training based on the obtained joint feature vector and the historical authorization policy, the data authorization model of the authorization policy is used to predict the application to be authorized for the user, the processor 1101 may perform:
And carrying out iterative optimization on the data authorization model by adopting a preset reinforcement learning algorithm.
In one embodiment, the processor 1101 may perform, when iteratively optimizing the data authorization model using a predetermined reinforcement learning algorithm:
in an iterative process, predicting an authorization strategy of a user for the application program according to a data authorization model;
Receiving and executing an adjustment instruction of a user to the predicted authorization strategy to obtain an adjusted predicted authorization strategy;
and according to the adjusted predicted authorization strategy, updating parameters of the data authorization model by adopting the reinforcement learning algorithm, and continuing the next iteration process until the preset termination condition is met.
In one embodiment, in acquiring the joint feature vector of the application and the data required for its operation, the processor 1101 may perform:
acquiring a feature vector of an application program;
acquiring characteristic parameters of data required by the running of an application program;
And adopting a preset first encoder neural network to jointly characterize the acquired feature vector and the characteristic parameter to obtain a joint feature vector of the application program and data required by the operation of the application program.
In one embodiment, in acquiring the feature vector of the application, the processor 1101 may perform:
Acquiring description information of an application program;
and characterizing the acquired description information by using a preset second encoder neural network to obtain the feature vector of the application program.
Or the processor 1101 in the electronic device may load executable code corresponding to the process of one or more data authorization programs into the memory 1102 according to the following instructions, and the processor 1101 executes the application program stored in the memory 1102, so as to execute:
receiving a data authorization request of an application program to be authorized;
Acquiring a feature vector of an application program to be authorized according to the data authorization request;
predicting an authorization strategy of a user to an application program to be authorized according to the obtained feature vector and a pre-trained data authorization model;
the data authorization model is obtained by model training according to the joint feature vector of the application program and the data required by the running of the application program and the historical authorization strategy of the user on the application program.
In one embodiment, after predicting the authorization policy of the user to the authorized application based on the feature vector and the pre-trained data authorization model, the processor 1101 may perform:
Receiving an adjustment instruction of a user for the predicted authorization strategy, and adjusting the predicted authorization strategy according to the adjustment instruction;
and optimizing the data authorization model according to the adjusted authorization strategy.
In one embodiment, after predicting the authorization policy of the user to the authorized application based on the feature vector and the pre-trained data authorization model, the processor 1101 may perform:
the predicted authorization policy is applied.
It should be noted that, for the model training method/data authorization method according to the embodiment of the present application, those skilled in the art will understand that all or part of the flow of implementing the model training method/data authorization method according to the embodiment of the present application may be implemented by controlling related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory, and executed by at least one processor, and the execution may include, for example, the flow of implementing the model training method/data authorization method. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), or the like.
For the model training device/data authorization device of the embodiment of the application, each functional module can be integrated in one processing chip, each module can exist alone physically, and two or more modules can be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules, if implemented as software functional modules and sold or used as a stand-alone product, may also be stored on a computer readable storage medium such as read-only memory, magnetic or optical disk, etc.
The foregoing describes in detail a model training method, a data authorization method, a device, a storage medium and an electronic apparatus provided by the embodiments of the present application, and specific examples are used herein to describe the principles and embodiments of the present application, and the foregoing examples are only for aiding in understanding of the methods and core ideas of the present application, and meanwhile, for those skilled in the art, according to the ideas of the present application, there are variations in the specific embodiments and application ranges, and in this regard, the present disclosure should not be construed as limiting the present application.

Claims (10)

1. A model training method applied to an electronic device, comprising:
Acquiring joint feature vectors of application programs of different application types and data required by operation of the application programs;
Acquiring a historical authorization policy of a user for the application program;
and carrying out model training according to the joint feature vector and the historical authorization strategy, and obtaining a data authorization model of the authorization strategy for predicting the application program to be authorized of the user.
2. The model training method according to claim 1, the model training method is characterized by further comprising the following steps:
and carrying out iterative optimization on the data authorization model by adopting a preset reinforcement learning algorithm.
3. The method of claim 2, wherein the iterative optimization of the data authorization model using a pre-set reinforcement learning algorithm comprises:
predicting an authorization strategy of a user for the application program according to the data authorization model;
Receiving and executing an adjustment instruction of a user to the predicted authorization strategy to obtain an adjusted predicted authorization strategy;
and updating parameters of the data authorization model by adopting the reinforcement learning algorithm according to the adjusted prediction authorization strategy.
4. The method for training a model according to claim 1, wherein obtaining the joint feature vector between the application programs of different application types and the data required for the running of the application programs comprises:
Acquiring a feature vector of the application program;
acquiring characteristic parameters of data required by the running of the application program;
and adopting a preset first encoder neural network to jointly characterize the characteristic vector and the characteristic parameter to obtain a joint characteristic vector of the application program and data required by the operation of the application program.
5. The model training method of claim 4, wherein the obtaining the feature vector of the application program comprises:
acquiring description information of the application program;
and characterizing the description information by adopting a preset second encoder neural network to obtain the feature vector of the application program.
6. A data authorization method applied to an electronic device, comprising:
receiving a data authorization request of an application program to be authorized;
Acquiring the feature vector of the application program to be authorized according to the data authorization request;
predicting an authorization strategy of a user for the application program to be authorized according to the feature vector and a pre-trained data authorization model;
the data authorization model is obtained by model training of the historical authorization strategy of the application programs according to the joint feature vectors of the application programs of different application types and the data required by the operation of the application programs and the historical authorization strategy of the user.
7. A model training apparatus for use in an electronic device, comprising:
The vector acquisition module is used for acquiring the joint feature vectors of the application programs of different application types and the data required by the operation of the application programs;
the strategy acquisition module is used for acquiring a historical authorization strategy of the user on the application program;
and the model training module is used for carrying out model training according to the joint feature vector and the historical authorization strategy, and the data authorization model for obtaining the authorization strategy is used for predicting the application program to be authorized of the user.
8. A data authorization apparatus for use in an electronic device, comprising:
the request receiving module is used for receiving a data authorization request of an application program to be authorized;
The vector acquisition module is used for acquiring the feature vector of the application program to be authorized according to the data authorization request;
the data authorization module is used for predicting the authorization strategy of the user for the application program to be authorized according to the feature vector and a pre-trained data authorization model;
the data authorization model is obtained by model training of the historical authorization strategy of the application programs according to the joint feature vectors of the application programs of different application types and the data required by the operation of the application programs and the historical authorization strategy of the user.
9. A storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the model training method of any one of claims 1 to 5 or causes the computer to perform the data authorization method of claim 6.
10. An electronic device comprising a processor and a memory, the memory storing a computer program, characterized in that the processor is adapted to perform the model training method according to any of claims 1 to 5 or to perform the data authorization method according to claim 6 by invoking the computer program.
CN201910282468.7A 2019-04-09 2019-04-09 Model training method, data authorization method, device, storage medium and equipment Active CN111797423B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910282468.7A CN111797423B (en) 2019-04-09 2019-04-09 Model training method, data authorization method, device, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910282468.7A CN111797423B (en) 2019-04-09 2019-04-09 Model training method, data authorization method, device, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN111797423A CN111797423A (en) 2020-10-20
CN111797423B true CN111797423B (en) 2024-12-31

Family

ID=72805332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910282468.7A Active CN111797423B (en) 2019-04-09 2019-04-09 Model training method, data authorization method, device, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN111797423B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI823641B (en) * 2022-10-20 2023-11-21 臺灣土地銀行股份有限公司 Trust personnel management device and method
CN116707987B (en) * 2023-07-10 2026-02-03 江苏易安联网络技术有限公司 Automatic authorization device and method based on flow learning
CN119337433A (en) * 2024-12-23 2025-01-21 上海易景信息科技有限公司 A real-time monitoring method and device for permissions

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106993083A (en) * 2017-02-21 2017-07-28 北京奇虎科技有限公司 A kind of method and apparatus of recommendation intelligent terminal operation prompt information
CN109325364A (en) * 2018-09-28 2019-02-12 联想(北京)有限公司 A kind of authority configuring method and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778303B (en) * 2016-12-07 2020-03-17 腾讯科技(深圳)有限公司 Authorization policy optimization method and authorization policy optimization device
CN106685933B (en) * 2016-12-08 2020-06-19 腾讯科技(深圳)有限公司 Authorization policy recommendation and device
CN107678845B (en) * 2017-09-30 2020-03-10 Oppo广东移动通信有限公司 Application program control method and device, storage medium and electronic equipment
CN107862203A (en) * 2017-11-21 2018-03-30 广东欧珀移动通信有限公司 Control method, device, storage medium and the terminal of application program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106993083A (en) * 2017-02-21 2017-07-28 北京奇虎科技有限公司 A kind of method and apparatus of recommendation intelligent terminal operation prompt information
CN109325364A (en) * 2018-09-28 2019-02-12 联想(北京)有限公司 A kind of authority configuring method and electronic equipment

Also Published As

Publication number Publication date
CN111797423A (en) 2020-10-20

Similar Documents

Publication Publication Date Title
US10776463B2 (en) Active authentication of users
CN110163611B (en) Identity recognition method, device and related equipment
US20240104570A1 (en) Risk prevention and control methods, apparatuses, and devices
US10341390B2 (en) Aggregation of asynchronous trust outcomes in a mobile device
US11422688B2 (en) Mobile terminal and method for controlling the same
US11301705B2 (en) Object detection using multiple neural network configurations
US20180218256A1 (en) Deep convolution neural network behavior generator
US20200042687A1 (en) Method and device for authenticating user using user's behavior pattern
CN111797423B (en) Model training method, data authorization method, device, storage medium and equipment
CN111797861A (en) Information processing method, device, storage medium and electronic device
CN111798019B (en) Intention prediction method, intention prediction device, storage medium and electronic equipment
CN111325444A (en) A risk prevention and control decision-making method, device, system and equipment
CN111428652B (en) Biological characteristic management method, system, equipment and medium
CN111797867A (en) System resource optimization method, device, storage medium and electronic device
CN111797381B (en) Application program rights management method, device, storage medium and electronic device
CN112912889B (en) Image template updating method, device and storage medium
KR20210156538A (en) Method and appratus for processing data using neural network
CN117708325A (en) Text analysis method and device and electronic equipment
CN118228255A (en) A method, device and equipment for detecting risk of application program
CN117612269A (en) A biological attack detection method, device and equipment
CN115131871B (en) A gesture recognition system, method and computing device
CN119013667A (en) Information processing device, information processing method, and program
CN111797075B (en) Data recovery method and device, storage medium and electronic equipment
CN111797852A (en) Algorithm model adjustment method, device, storage medium and electronic device
CN118506431B (en) Optimization method and device of face recognition model

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
GR01 Patent grant
GR01 Patent grant