CN111104980A - Method, device, equipment and storage medium for determining classification result - Google Patents

Method, device, equipment and storage medium for determining classification result Download PDF

Info

Publication number
CN111104980A
CN111104980A CN201911314951.5A CN201911314951A CN111104980A CN 111104980 A CN111104980 A CN 111104980A CN 201911314951 A CN201911314951 A CN 201911314951A CN 111104980 A CN111104980 A CN 111104980A
Authority
CN
China
Prior art keywords
classification
reference data
training
data
secondary classifier
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.)
Granted
Application number
CN201911314951.5A
Other languages
Chinese (zh)
Other versions
CN111104980B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911314951.5A priority Critical patent/CN111104980B/en
Publication of CN111104980A publication Critical patent/CN111104980A/en
Application granted granted Critical
Publication of CN111104980B publication Critical patent/CN111104980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • G06F18/2148Generating training patterns; Bootstrap methods, e.g. bagging or boosting characterised by the process organisation or structure, e.g. boosting cascade
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/254Fusion techniques of classification results, e.g. of results related to same input data

Abstract

The application discloses a method, a device, equipment and a storage medium for determining a classification result, and belongs to the field of machine learning. The method comprises the following steps: acquiring classification reference data; respectively inputting the classification reference data into a plurality of trained base classifiers to obtain a plurality of probability values, wherein the base classifiers are machine learning models formed by different algorithms; determining integrated probability information based on the plurality of probability values; and inputting the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result, wherein the secondary classifier is a machine learning model. The method and the device can classify the classified objects through the plurality of machine learning models according to various data of the classified objects, and can improve accuracy of classification results.

Description

Method, device, equipment and storage medium for determining classification result
Technical Field
The present application relates to the field of machine learning, and in particular, to a method, an apparatus, a device, and a storage medium for determining a classification result.
Background
With the development of internet technology, people can generate different data in various scenes, such as browsing data of a user on the internet, operation data of a terminal used by the user, loan data of the user at a bank, and the like. The technician may use the data as the classification reference data, classify the user according to the characteristics of the classification reference data, for example, determine whether the user swipes maliciously according to the user's praise frequency.
In the prior art, the classification reference data is generally one or more types of data directly related to the classified class, different ranges are set for the corresponding data, and the class of the classified object is determined according to the range of the data. For example, the praise times of the user in a certain time range is obtained, and whether the user has malicious praise behavior is judged according to the praise times of the user.
In the process of implementing the present application, the inventor finds that the prior art has at least the following problems:
at present, when classification is carried out, classified objects are classified only according to classification reference data directly related to the classes, so that the reference data when the objects are classified is less, and the classification accuracy is lower.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for determining a classification result, and can improve the accuracy of classification. The technical scheme is as follows:
in one aspect, a method of determining a classification result is provided, the method comprising:
acquiring classification reference data;
respectively inputting the classification reference data into a plurality of trained base classifiers to obtain a plurality of probability values, wherein the base classifiers are machine learning models formed by different algorithms;
determining integrated probability information based on the plurality of probability values;
and inputting the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result, wherein the secondary classifier is a machine learning model.
Optionally, before the obtaining of the classification reference data, the method includes:
acquiring sample data of a base classifier, wherein the sample data comprises sample classification reference data and a benchmark probability value;
and training the plurality of initial base classifiers based on the sample data of the base classifiers to obtain a plurality of trained base classifiers.
Optionally, the inputting the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result includes:
and inputting the plurality of probability values, the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result.
Optionally, before the obtaining of the classification reference data, the method includes:
acquiring sample data of a secondary classifier, wherein the sample data of the secondary classifier comprises sample classification reference data and a benchmark classification result;
respectively inputting sample classification reference data in the sample data of the secondary classifier into a plurality of trained base classifiers to obtain a plurality of training probability values;
determining training integrated probability information based on the plurality of training probability values;
training an initial secondary classifier based on the training probability values, the training comprehensive probability information, the sample classification reference data in the sample data of the secondary classifier and a benchmark classification result to obtain a trained secondary classifier.
Optionally, the integrated probability information includes one or more of a sum of squared errors, a sum of absolute errors, and a sum of expected deviations of the plurality of probability values.
Optionally, the acquiring the classification reference data includes:
and acquiring classification reference data stored based on the block chain.
Optionally, after the inputting the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result, the method further includes:
storing the classification result in a block chain.
In another aspect, an apparatus for determining a classification result is provided, the apparatus comprising:
an acquisition module configured to acquire the classification reference data;
a first input module, configured to input the classification reference data into a plurality of trained base classifiers respectively to obtain a plurality of probability values, wherein the plurality of base classifiers are machine learning models composed of different algorithms;
a determination module configured to determine integrated probability information based on the plurality of probability values;
and the second input module is configured to input the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result, wherein the secondary classifier is a machine learning model.
Optionally, before the obtaining of the classification reference data, the apparatus further includes a first training apparatus configured to:
acquiring sample data of a base classifier, wherein the sample data comprises sample classification reference data and a benchmark probability value;
and training the plurality of initial base classifiers based on the sample data of the base classifiers to obtain a plurality of trained base classifiers.
Optionally, the second input module is configured to:
and inputting the plurality of probability values, the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result.
Optionally, the apparatus further comprises a second training apparatus configured to:
acquiring sample data of a secondary classifier, wherein the sample data of the secondary classifier comprises sample classification reference data and a benchmark classification result;
respectively inputting sample classification reference data in the sample data of the secondary classifier into a plurality of trained base classifiers to obtain a plurality of training probability values;
determining training integrated probability information based on the plurality of training probability values;
training an initial secondary classifier based on the training probability values, the training comprehensive probability information, the sample classification reference data in the sample data of the secondary classifier and a benchmark classification result to obtain a trained secondary classifier.
Optionally, the obtaining module is configured to:
and acquiring classification reference data stored based on the block chain.
Optionally, the apparatus further comprises a storage module configured to:
storing the classification result in a block chain.
In yet another aspect, a computer device is provided, which includes a processor and a memory, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the operations performed by the method for determining a classification result as described above.
In yet another aspect, a computer-readable storage medium having at least one instruction stored therein is provided, which is loaded and executed by a processor to perform the operations performed by the method for determining a classification result as described above.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
through the integrated classification model formed by the plurality of machine learning models, the relevant data of the classified object is input into the integrated classification model, so that the classification result of the classified object is obtained.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an integrated classification model provided by an embodiment of the present application;
FIG. 2 is a flowchart of a method for determining classification results according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of a method for determining classification results according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for determining classification results according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a method for determining a classification result according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an apparatus for determining a classification result according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a server provided in an embodiment of the present application;
FIG. 9 is a schematic diagram of a data sharing system provided by an embodiment of the present application;
FIG. 10 is a block chain structure according to an embodiment of the present application;
fig. 11 is a schematic diagram illustrating a block generation process according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The method for determining the classification result provided by the application can be implemented by a computer device, and the computer device can be a server or a terminal. The method can be realized by the server or the terminal independently, or can be realized by the server and the terminal together. The terminal can be a mobile phone, a tablet computer, intelligent wearable equipment, a desktop computer, a notebook computer and the like. The server may be a single server or a server group, and if the server is a single server, the server may be responsible for all processing in the following scheme, and if the server is a server group, different servers in the server group may be respectively responsible for different processing in the following scheme, and the specific processing allocation condition may be arbitrarily set by a technician according to actual needs, and is not described herein again. In this embodiment, the scheme is described by taking the server to perform object detection as an example, and other cases are similar to the above and will not be described again.
The present application relates to Artificial Intelligence (AI) technology, wherein AI is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making. The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The scheme provided by the embodiment of the application relates to the Machine Learning technology of artificial intelligence, wherein Machine Learning (ML) is a multi-field cross subject and relates to multi-field subjects such as probability theory, statistics, approximation theory, convex analysis and algorithm complexity theory. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. Machine learning and deep learning generally include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and formal education learning. The following examples are intended to illustrate the details.
Fig. 1 is a schematic diagram of an integrated classification model provided in an embodiment of the present application. Referring to fig. 1, the integrated classification model may be composed of a base classifier layer and a secondary classifier layer, wherein the base classifier layer includes a plurality of base classifiers, the secondary classifier layer includes a secondary classifier, and the plurality of base classifiers and the secondary classifier may be any classifier capable of generating a classification result, such as an algorithm such as decision tree, logistic regression, naive bayes, neural network, and the like. When the method is applied, the sample data to be classified can be input into a plurality of base classifiers in a base classifier layer to obtain a plurality of classification probabilities, and then the sample data to be classified and the plurality of classification probabilities are input into a secondary classifier to obtain a classification result of the sample data to be classified. In the method for determining the classification result in the embodiment of the application, besides the sample data to be classified and the multiple classification probability values can be input into the secondary classifier, the comprehensive probability information can be obtained through the multiple classification probability values, and then the sample data to be classified and the multiple classification probability values and the comprehensive probability information are input into the secondary classifier to obtain the classification result of the sample data to be classified. The integrated probability information may be one or more of a sum of squared errors, a sum of absolute errors, and a sum of expected deviations obtained from the plurality of classification probability values. In addition, the base classifier and the secondary classifier provided in the embodiment of the present application can classify data into multiple categories, and in the embodiment of the present application, two categories are taken as an example, that is, data only has two categories, so as to describe the scheme in detail, and other situations are similar, and are not described again.
Fig. 2 is a flowchart of a method for determining a classification result according to an embodiment of the present disclosure. This embodiment is used to train multiple base classifiers in a base classifier layer in an integrated classification model, and referring to fig. 2, the embodiment includes:
step 201, obtaining sample data of a base classifier, wherein the sample data comprises sample classification reference data and a benchmark probability value.
The base classifiers to be trained are multiple, the multiple base classifiers can be different machine learning models for classification, different machine learning models can include different classification algorithms, such as decision trees, logistic regression and naive Bayes, and the machine learning models can also be machine learning models composed of the same algorithm but different set parameters in the algorithm. The base classifier sample data is sample data used for training the base classifier, and the reference probability value may be a label value of the sample data for representing true category information of each sample data.
In implementation, a large amount of sample data may be acquired to train a plurality of base classifiers, where each sample data further corresponds to a label value, and the label value is used to represent a true category of each sample data and may be 1 or 0. For example, if the acquired sample data is historical loan information of the user at a bank, a value of 1 for the tag may indicate that the user may be determined to be at risk by the historical loan information, and a value of 0 for the tag may indicate that the user may be determined to be at risk by the historical loan information. The historical loan information of the user at the bank can include information such as a loan record, age, gender, and school calendar of the user.
Step 202, training a plurality of initial base classifiers based on the sample data of the base classifiers to obtain a plurality of trained base classifiers.
In implementation, a base classifier layer in a classification framework includes a plurality of base classifiers, and a technician can train the plurality of base classifiers through the acquired sample data. The training of each base classifier can adopt a cross validation method, namely, the obtained training samples are divided into a plurality of groups of training samples, each group of training samples is divided into a plurality of training subsamples and a plurality of validation subsamples, the base classifier can be trained by the plurality of training subsamples, the precision of the trained base classifier is verified by one validation subsample, the precision value of the trained base classifier is obtained, when the precision value reaches a preset precision threshold value, the training can be completed, and the trained base classifier is obtained.
Fig. 3 is a flowchart of a method for determining a classification result according to an embodiment of the present disclosure. This embodiment is used to train the secondary classifiers in the secondary classifier layer in the ensemble classification model, and referring to fig. 3, the embodiment includes:
step 301, obtaining sample data of a secondary classifier, wherein the sample data of the secondary classifier comprises sample classification reference data and a benchmark classification result.
The secondary classifier layer may have a secondary classifier, sample data of the secondary classifier is sample data used for training the secondary classifier, and the reference classification result is used for representing real class information of each sample data, where the sample data used for training the secondary classifier may be the same as the sample data used for training the multiple reference classifiers.
Step 302, respectively inputting the sample classification reference data in the sample data of the secondary classifier into the trained multiple base classifiers to obtain multiple training probability values.
In implementation, sample data used for training the secondary classifier may be input into the trained multiple base classifiers to obtain a probability value corresponding to each sample data, where the probability value is a training probability value. It should be noted that the number of base classifiers is not limited here. And when the number of the trained base classifiers is M, inputting each sample data into the trained M base classifiers to obtain M training probability values of the sample data belonging to the target class.
Step 303, determining training integrated probability information based on the plurality of training probability values.
In practice, the training integrated probability information may be calculated from the plurality of training probability information, and may be a sum of squared errors, a sum of absolute errors, a sum of expected deviations, and the like.
The sum of squared errors may be the sum of squared errors between the training probability information obtained by the M base classifiers and the expected prediction probability, and the formula is as follows:
Figure BDA0002325591010000081
wherein the content of the first and second substances,
Figure BDA0002325591010000082
is the sum of the squared errors and is,
Figure BDA0002325591010000083
for the desired prediction probability of the sample x,
Figure BDA0002325591010000084
the probability values obtained for every ith base classifier. When training the secondary classifier, the probability of the base classifier predicting to be the positive class can be used as the input feature of the secondary classifier, and the expected prediction probability is 1, that is, the probability is 1
Figure BDA0002325591010000085
For example, the secondary classification model is trained with historical loan information for users who have been lost credit at the bank.
The sum of absolute errors may be the sum of absolute errors between the training probability information obtained by the M base classifiers and the expected prediction probability,
Figure BDA0002325591010000086
for absolute error, the formula is as follows:
Figure BDA0002325591010000087
the expected deviation sum may be an expected deviation sum using the M base classifiers described above. Sum of expected deviations
Figure BDA0002325591010000088
The formula is as follows:
Figure BDA0002325591010000089
and step 304, training the initial secondary classifier based on the plurality of training probability values, the training comprehensive probability information, the sample classification reference data and the standard classification result in the sample data of the secondary classifier, and obtaining the trained secondary classifier.
In implementation, the training samples used for training the secondary classifier include sample data, a plurality of training probability values corresponding to each sample data, and training comprehensive probability information obtained based on the plurality of training probability values. And training the secondary classifier by using the training samples, wherein the training mode for training the secondary classifier can be the same as the training mode for training the base classifier, namely the cross validation training mode is also adopted. The training samples are divided into a plurality of groups of training samples, each group of training samples is divided into a plurality of training sub-samples and a plurality of verifying sub-samples, the plurality of training sub-samples can be used for training the secondary classifier, one verifying sub-sample is used for verifying the precision of the trained secondary classifier, the precision value of the trained secondary classifier is obtained, when the precision value reaches a preset precision threshold value, the training can be completed, and the trained secondary classifier is obtained.
Fig. 4 is a flowchart of a method for determining a classification result according to an embodiment of the present application. The embodiment is an application of an integrated classification model composed of a plurality of base classifiers and secondary classifiers after the training, and referring to fig. 4, the embodiment includes:
step 401, obtaining classification reference data.
In an implementation, the classification reference data is related data of the object to be classified, and may be obtained from a database storing the related data, for example, the database of the bank obtains the loan information of the user at the bank, and then the object to be classified is the user, and the classification reference data is the loan information of the user at the bank. In addition, classification reference data stored based on the blockchain can also be acquired. When the classification reference data is pre-stored in the data sharing system based on the blockchain technology, the corresponding classification reference data can be acquired through a client capable of accessing the data sharing system.
And step 402, inputting the classification reference data into the trained base classifiers respectively to obtain a plurality of probability values.
The multiple base classifiers are multiple machine learning models composed of different algorithms in a base classifier layer in the integrated classification model, such as decision trees, logistic regression, naive Bayes, or machine learning models composed of the same algorithm but different parameters set in the algorithm.
In implementation, the acquired data information to be classified is input into the trained base classifiers to obtain a plurality of probability values. For example, the historical loan information of each user at the bank is input into a plurality of base classifiers, and the probability value of the situation that the user cannot loan is obtained after the user is loaned again.
Step 403, determining comprehensive probability information based on the plurality of probability values.
In the implementation, the comprehensive probability information is obtained based on the plurality of probability values obtained in the above step 402, wherein the calculation method of the comprehensive probability information is the same as the calculation method of the training comprehensive probability information obtained based on the plurality of probability values in the above step 303, that is, the sum of square errors, the sum of absolute errors, and the sum of expected deviations corresponding to the plurality of probability values are obtained according to the above formula.
And step 404, inputting the comprehensive probability information and the classification reference data into the trained secondary classifier to obtain a classification result.
The secondary classifier is a machine learning model used for classification in a secondary classifier layer in the integrated classification model. The input of the secondary classifier may be set by a technician, and if the input of the secondary classifier is the obtained comprehensive probability information and the classification reference data, the training data corresponding to the training of the secondary classifier in step 304 is the comprehensive probability information and the sample data.
In implementation, the obtained comprehensive probability information, that is, the sum of squared errors, the sum of absolute errors, and the expected deviation sum obtained after calculating the probability values obtained by the plurality of base classifiers, and the classification reference data may be used to form secondary input data, which is input into the secondary classifier after training to obtain a classification result corresponding to each classification reference data.
Optionally, the obtained multiple probability values, the integrated probability information, and the classification reference data may be input into a trained secondary classifier to obtain a classification result.
In implementation, the probability value and the comprehensive probability information obtained by the plurality of base classifiers and the classification reference data may be further combined into secondary input data, the secondary input data is input to the trained secondary classifier to obtain a classification result, as shown in fig. 5, the classification reference data is historical loan information of the user in the bank, the historical loan information is input to the plurality of base classifiers, a probability value is obtained based on each base classifier, the probability value is a probability value of the user that the user cannot loan again after obtaining a loan to the user, the comprehensive probability information is obtained according to the probability values, and then the probability values, the comprehensive probability information and the historical loan information of the user in the bank are input to the secondary classifier to obtain a result of whether the user cannot loan again after obtaining the user again.
Optionally, the classification result is stored in a block chain.
In implementation, the classification result may be stored in a data sharing system based on a block chain, for example, information of a user who cannot loan after existence is stored in the data sharing system, see the data sharing system shown in fig. 9, where the data sharing system 900 refers to a system for performing data sharing between nodes, the data sharing system may include a plurality of nodes 901, the plurality of nodes 901 may refer to respective clients in the data sharing system, and the clients may store data to or read data from the data sharing system. Each node 901 may receive input information during normal operation and maintain shared data within the data sharing system based on the received input information. In order to ensure information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and information transmission can be carried out between the nodes through the information connection. For example, when any node in the data sharing system receives the classification result, other nodes in the data sharing system obtain the classification result according to the consensus algorithm, and store the classification result as data in the shared data, so that the data stored on all the nodes in the data sharing system are consistent.
Each node in the data sharing system has a node identifier corresponding thereto, and each node in the data sharing system may store a node identifier of another node in the data sharing system, so that the generated block is broadcast to the other node in the data sharing system according to the node identifier of the other node in the following. Each node may maintain a node identifier list as shown in the following table, and store the node name and the node identifier in the node identifier list correspondingly. The node identifier may be an IP (Internet Protocol) address and any other information that can be used to identify the node, and table 1 only illustrates the IP address as an example.
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node N 119.123.789.258
TABLE 1
Each node in the data sharing system stores one identical blockchain. The block chain is composed of a plurality of blocks, as shown in fig. 10, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 11, when the node where the block chain is located receives the input information, the input information is verified, after the verification is completed, the input information is stored in the memory pool, and the hash tree for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version is version information of the relevant block protocol in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located respectively sends the newly generated blocks to other nodes in the data sharing system where the newly generated blocks are located according to the node identifications of the other nodes in the data sharing system, the newly generated blocks are verified by the other nodes, and the newly generated blocks are added to the block chain stored in the newly generated blocks after the verification is completed.
According to the method and the device, the relevant data of the classified object are input into the integrated classification model through the integrated classification model formed by the plurality of machine learning models, so that the classification result of the classified object is obtained.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Fig. 6 is a schematic mechanism diagram of an apparatus for determining a classification result according to an embodiment of the present application, and the apparatus includes, with reference to fig. 6:
an obtaining module 610 configured to obtain the classification reference data;
a first input module 620, configured to input the classification reference data into a plurality of trained base classifiers respectively to obtain a plurality of probability values, wherein the plurality of base classifiers are machine learning models composed of different algorithms;
a determining module 630 configured to determine, based on the plurality of probability values, integrated probability information;
a second input module 640, configured to input the comprehensive probability information and the classification reference data into a trained secondary classifier, so as to obtain a classification result, where the secondary classifier is a machine learning model.
Optionally, before the obtaining of the classification reference data, the apparatus further includes a first training apparatus configured to:
acquiring sample data of a base classifier, wherein the sample data comprises sample classification reference data and a benchmark probability value;
and training the plurality of initial base classifiers based on the sample data of the base classifiers to obtain a plurality of trained base classifiers.
Optionally, the second input module 640 is configured to:
and inputting the plurality of probability values, the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result.
Optionally, the apparatus further comprises a second training apparatus configured to:
acquiring sample data of a secondary classifier, wherein the sample data of the secondary classifier comprises sample classification reference data and a benchmark classification result;
respectively inputting sample classification reference data in the sample data of the secondary classifier into a plurality of trained base classifiers to obtain a plurality of training probability values;
determining training integrated probability information based on the plurality of training probability values;
training an initial secondary classifier based on the training probability values, the training comprehensive probability information, the sample classification reference data in the sample data of the secondary classifier and a benchmark classification result to obtain a trained secondary classifier.
Optionally, the obtaining module is configured to:
and acquiring classification reference data stored based on the block chain.
Optionally, the apparatus further comprises a storage module configured to:
storing the classification result in a block chain.
It should be noted that: in the apparatus for determining a classification result provided in the foregoing embodiment, when determining a classification result, only the division of each functional module is illustrated, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the apparatus for determining a classification result and the method for determining a classification result provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 7 is a computer device provided in an exemplary embodiment of the present application, which may be a terminal 700, and fig. 7 is a block diagram of the terminal. The terminal 700 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 700 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so on.
In general, terminal 700 includes: a processor 701 and a memory 702.
The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 701 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 701 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 702 may include one or more computer-readable storage media, which may be non-transitory. Memory 702 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 702 is used to store at least one instruction for execution by processor 701 to implement a method of determining classification results as provided by method embodiments herein.
In some embodiments, the terminal 700 may further optionally include: a peripheral interface 703 and at least one peripheral. The processor 701, the memory 702, and the peripheral interface 703 may be connected by buses or signal lines. Various peripheral devices may be connected to peripheral interface 703 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 704, touch screen display 705, camera 706, audio circuitry 707, positioning components 708, and power source 709.
The peripheral interface 703 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 701 and the memory 702. In some embodiments, processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 701, the memory 702, and the peripheral interface 703 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 704 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 704 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 704 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 704 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 704 may also include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 705 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 705 is a touch display screen, the display screen 705 also has the ability to capture touch signals on or over the surface of the display screen 705. The touch signal may be input to the processor 701 as a control signal for processing. At this point, the display 705 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 705 may be one, providing the front panel of the terminal 700; in other embodiments, the display 705 can be at least two, respectively disposed on different surfaces of the terminal 700 or in a folded design; in still other embodiments, the display 705 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 700. Even more, the display 705 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The Display 705 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), or the like.
The camera assembly 706 is used to capture images or video. Optionally, camera assembly 706 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 706 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 707 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 701 for processing or inputting the electric signals to the radio frequency circuit 704 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 700. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 701 or the radio frequency circuit 704 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 707 may also include a headphone jack.
The positioning component 708 is used to locate the current geographic position of the terminal 700 to implement navigation or LBS (location based Service). The positioning component 708 may be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 709 is provided to supply power to various components of terminal 700. The power source 709 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When power source 709 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 700 also includes one or more sensors 710. The one or more sensors 710 include, but are not limited to: acceleration sensor 711, gyro sensor 712, pressure sensor 713, fingerprint sensor 714, optical sensor 715, and proximity sensor 716.
The acceleration sensor 711 can detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the terminal 700. For example, the acceleration sensor 711 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 701 may control the touch screen 705 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 711. The acceleration sensor 711 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 712 may detect a body direction and a rotation angle of the terminal 700, and the gyro sensor 712 may cooperate with the acceleration sensor 711 to acquire a 3D motion of the terminal 700 by the user. From the data collected by the gyro sensor 712, the processor 701 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 713 may be disposed on a side bezel of terminal 700 and/or an underlying layer of touch display 705. When the pressure sensor 713 is disposed on a side frame of the terminal 700, a user's grip signal on the terminal 700 may be detected, and the processor 701 performs right-left hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 713. When the pressure sensor 713 is disposed at a lower layer of the touch display 705, the processor 701 controls the operability control on the UI interface according to the pressure operation of the user on the touch display 705. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 714 is used for collecting a fingerprint of a user, and the processor 701 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user according to the collected fingerprint. When the user identity is identified as a trusted identity, the processor 701 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, paying, changing settings, and the like. The fingerprint sensor 714 may be disposed on the front, back, or side of the terminal 700. When a physical button or a vendor Logo is provided on the terminal 700, the fingerprint sensor 714 may be integrated with the physical button or the vendor Logo.
The optical sensor 715 is used to collect the ambient light intensity. In one embodiment, the processor 701 may control the display brightness of the touch display 705 based on the ambient light intensity collected by the optical sensor 715. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 705 is increased; when the ambient light intensity is low, the display brightness of the touch display 705 is turned down. In another embodiment, processor 701 may also dynamically adjust the shooting parameters of camera assembly 706 based on the ambient light intensity collected by optical sensor 715.
A proximity sensor 716, also referred to as a distance sensor, is typically disposed on a front panel of the terminal 700. The proximity sensor 716 is used to collect the distance between the user and the front surface of the terminal 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually decreases, the processor 701 controls the touch display 705 to switch from the bright screen state to the dark screen state; when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually becomes larger, the processor 701 controls the touch display 705 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is not intended to be limiting of terminal 700 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 8 is a schematic structural diagram of a computer device, which may be a server according to an embodiment of the present disclosure, and as shown in fig. 8, the server 800 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 801 and one or more memories 802, where the memory 802 stores at least one instruction, and the at least one instruction is loaded and executed by the processors 801 to implement the methods provided by the foregoing method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, a computer-readable storage medium, such as a memory, including instructions executable by a processor in a terminal to perform the method of determining a classification result in the above embodiments is also provided. The computer readable storage medium may be non-transitory. For example, the computer-readable storage medium may be a ROM (Read-only Memory), a RAM (Random Access Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended to be exemplary only, and not to limit the present application, and any modifications, equivalents, improvements, etc. made within the spirit and scope of the present application are intended to be included therein.

Claims (10)

1. A method of determining a classification result, the method comprising:
acquiring classification reference data;
respectively inputting the classification reference data into a plurality of trained base classifiers to obtain a plurality of probability values, wherein the base classifiers are machine learning models formed by different algorithms;
determining integrated probability information based on the plurality of probability values;
and inputting the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result, wherein the secondary classifier is a machine learning model.
2. The method of claim 1, wherein prior to said obtaining classification reference data, the method comprises:
acquiring sample data of a base classifier, wherein the sample data comprises sample classification reference data and a benchmark probability value;
and training the plurality of initial base classifiers based on the sample data of the base classifiers to obtain a plurality of trained base classifiers.
3. The method of claim 1, wherein inputting the integrated probability information and the classification reference data into a trained secondary classifier to obtain a classification result comprises:
and inputting the plurality of probability values, the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result.
4. The method of claim 3, wherein prior to said obtaining classification reference data, the method comprises:
acquiring sample data of a secondary classifier, wherein the sample data of the secondary classifier comprises sample classification reference data and a benchmark classification result;
respectively inputting sample classification reference data in the sample data of the secondary classifier into a plurality of trained base classifiers to obtain a plurality of training probability values;
determining training integrated probability information based on the plurality of training probability values;
training an initial secondary classifier based on the training probability values, the training comprehensive probability information, the sample classification reference data in the sample data of the secondary classifier and a benchmark classification result to obtain a trained secondary classifier.
5. The method of any of claims 1-4, wherein the integrated probability information includes one or more of a sum of squared errors, a sum of absolute errors, and a sum of expected deviations of the plurality of probability values.
6. The method according to any one of claims 1-4, wherein the obtaining classification reference data comprises:
and acquiring classification reference data stored based on the block chain.
7. The method according to any one of claims 1-4, wherein the inputting the integrated probability information and the classification reference data into the trained secondary classifier to obtain the classification result further comprises:
storing the classification result in a block chain.
8. An apparatus for determining classification results, the apparatus comprising:
an acquisition module configured to acquire the classification reference data;
a first input module, configured to input the classification reference data into a plurality of trained base classifiers respectively to obtain a plurality of probability values, wherein the plurality of base classifiers are machine learning models composed of different algorithms;
a determination module configured to determine integrated probability information based on the plurality of probability values;
and the second input module is configured to input the comprehensive probability information and the classification reference data into a trained secondary classifier to obtain a classification result, wherein the secondary classifier is a machine learning model.
9. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction that is loaded and executed by the processor to perform operations performed by a method of determining a classification result according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to perform operations performed by a method of determining a classification result according to any one of claims 1 to 7.
CN201911314951.5A 2019-12-19 2019-12-19 Method, device, equipment and storage medium for determining classification result Active CN111104980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911314951.5A CN111104980B (en) 2019-12-19 2019-12-19 Method, device, equipment and storage medium for determining classification result

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911314951.5A CN111104980B (en) 2019-12-19 2019-12-19 Method, device, equipment and storage medium for determining classification result

Publications (2)

Publication Number Publication Date
CN111104980A true CN111104980A (en) 2020-05-05
CN111104980B CN111104980B (en) 2021-09-28

Family

ID=70422353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911314951.5A Active CN111104980B (en) 2019-12-19 2019-12-19 Method, device, equipment and storage medium for determining classification result

Country Status (1)

Country Link
CN (1) CN111104980B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111284A (en) * 2021-04-12 2021-07-13 中国铁塔股份有限公司 Classification information display method and device, electronic equipment and readable storage medium
CN113569986A (en) * 2021-08-18 2021-10-29 网易(杭州)网络有限公司 Computer vision data classification method and device, electronic equipment and storage medium
CN115827880A (en) * 2023-02-10 2023-03-21 之江实验室 Service execution method and device based on emotion classification
CN116223962A (en) * 2023-05-08 2023-06-06 中科航迈数控软件(深圳)有限公司 Method, device, equipment and medium for predicting electromagnetic compatibility of wire harness

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127198A (en) * 2016-06-20 2016-11-16 华南师范大学 A kind of image character recognition method based on Multi-classifers integrated
CN109145108A (en) * 2017-06-16 2019-01-04 贵州小爱机器人科技有限公司 Classifier training method, classification method, device and computer equipment is laminated in text
CN109324604A (en) * 2018-11-29 2019-02-12 中南大学 A kind of intelligent train resultant fault analysis method based on source signal
CN110097098A (en) * 2019-04-18 2019-08-06 腾讯科技(深圳)有限公司 Data classification method and device, medium and electronic equipment based on base classifier
CN110348523A (en) * 2019-07-15 2019-10-18 北京信息科技大学 A kind of malicious web pages based on Stacking integrate recognition methods and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127198A (en) * 2016-06-20 2016-11-16 华南师范大学 A kind of image character recognition method based on Multi-classifers integrated
CN109145108A (en) * 2017-06-16 2019-01-04 贵州小爱机器人科技有限公司 Classifier training method, classification method, device and computer equipment is laminated in text
CN109324604A (en) * 2018-11-29 2019-02-12 中南大学 A kind of intelligent train resultant fault analysis method based on source signal
CN110097098A (en) * 2019-04-18 2019-08-06 腾讯科技(深圳)有限公司 Data classification method and device, medium and electronic equipment based on base classifier
CN110348523A (en) * 2019-07-15 2019-10-18 北京信息科技大学 A kind of malicious web pages based on Stacking integrate recognition methods and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111284A (en) * 2021-04-12 2021-07-13 中国铁塔股份有限公司 Classification information display method and device, electronic equipment and readable storage medium
CN113569986A (en) * 2021-08-18 2021-10-29 网易(杭州)网络有限公司 Computer vision data classification method and device, electronic equipment and storage medium
CN113569986B (en) * 2021-08-18 2023-06-30 网易(杭州)网络有限公司 Computer vision data classification method, device, electronic equipment and storage medium
CN115827880A (en) * 2023-02-10 2023-03-21 之江实验室 Service execution method and device based on emotion classification
CN116223962A (en) * 2023-05-08 2023-06-06 中科航迈数控软件(深圳)有限公司 Method, device, equipment and medium for predicting electromagnetic compatibility of wire harness
CN116223962B (en) * 2023-05-08 2023-07-07 中科航迈数控软件(深圳)有限公司 Method, device, equipment and medium for predicting electromagnetic compatibility of wire harness

Also Published As

Publication number Publication date
CN111104980B (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN111091132B (en) Image recognition method and device based on artificial intelligence, computer equipment and medium
CN110083791B (en) Target group detection method and device, computer equipment and storage medium
CN111104980B (en) Method, device, equipment and storage medium for determining classification result
CN111182453A (en) Positioning method, positioning device, electronic equipment and storage medium
CN108288032B (en) Action characteristic acquisition method, device and storage medium
CN112069414A (en) Recommendation model training method and device, computer equipment and storage medium
CN111897996A (en) Topic label recommendation method, device, equipment and storage medium
CN112749728A (en) Student model training method and device, computer equipment and storage medium
CN111738365B (en) Image classification model training method and device, computer equipment and storage medium
CN110647881A (en) Method, device, equipment and storage medium for determining card type corresponding to image
CN114154068A (en) Media content recommendation method and device, electronic equipment and storage medium
CN113918767A (en) Video clip positioning method, device, equipment and storage medium
CN113724189A (en) Image processing method, device, equipment and storage medium
CN111353513B (en) Target crowd screening method, device, terminal and storage medium
CN111563201A (en) Content pushing method, device, server and storage medium
CN110990728A (en) Method, device and equipment for managing point of interest information and storage medium
CN110837557A (en) Abstract generation method, device, equipment and medium
CN113936240A (en) Method, device and equipment for determining sample image and storage medium
CN114328815A (en) Text mapping model processing method and device, computer equipment and storage medium
CN113762585A (en) Data processing method, account type identification method and device
CN113139614A (en) Feature extraction method and device, electronic equipment and storage medium
CN114764480A (en) Group type identification method and device, computer equipment and medium
CN113763932A (en) Voice processing method and device, computer equipment and storage medium
CN111652432A (en) Method and device for determining user attribute information, electronic equipment and storage medium
CN111259252A (en) User identification recognition method and device, computer equipment and storage medium

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