Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
Fig. 1 is a schematic diagram of a process of mining involving a user in a practical application scenario according to the solution of the present specification. In order to accurately obtain an overseas user positive sample for training the classification model, screening is required according to user type characteristics. For example, it is necessary to screen out a group of student retention who has entry and exit behaviors, the group of users has two prominent features, one is a characteristic of student retention consumption behavior, such as: overseas acquiring system data and account numbers for paying the toll to the outside; the other is a student location feature, which is active most of the time on a relatively fixed campus. Based on this, the user positive sample used for training the classification model can be obtained more accurately. Further, partial negative samples are screened out from unlabeled samples based on Positive samples by using a PULearing (Positive and negative labeled learning) algorithm, and the classification model is trained by using the Positive and negative samples, so that a classification model with more accurate and efficient classification can be obtained; the required student users can be obtained by the classification model.
It should be noted that, in practical applications, since the number of the overseas user groups to be mined is large, a high labor cost is required if manual mining is adopted, and mining rules for different types of groups are different, and manual repeated work is required. In addition, the workload of selecting and classifying a large number of samples is also large. Therefore, based on the embodiment of the present specification, after selecting a part of positive samples, a classification model is used to screen out negative samples of another model for training excavation; furthermore, the classification model is used for mining the overseas user groups to be mined, so that the mining efficiency can be effectively improved, the labor cost is reduced, and the method has a wider application range.
Based on the above-described scenarios, the following describes the embodiments of the present specification in detail.
Fig. 2 is a schematic flow chart of a user mining method provided in an embodiment of the present specification, where the method specifically includes the following steps:
s202: and determining the overseas user according to the outbound behavior characteristics of the user.
The outbound behavior feature may be an inbound record of a user (e.g., a student, an outbound visitor, a merchant, or a proxy), and a complete outbound process from home to abroad to home may include information about the country, time, longitude and latitude, etc. that the user has gone through during the outbound process.
S204: and determining a user positive sample for training according to the consumption behavior characteristics or the position characteristics of the overseas user.
In the case that specific identity information of an overseas user is not mastered, if the overseas user wants to determine which type of group the overseas user belongs to, the group to which the overseas user belongs can be determined by behavior characteristics, location characteristics, and the like of the overseas user. Of course, if the identity information of an outbound user is known, it can be directly determined to which class of group the outbound user belongs.
The behavioral characteristics referred to herein may include: foreign user consumption behavior characteristics, etc.; the positional features referred to herein include: the out-of-home user registers the home location characteristics, location characteristics of the out-of-home user's frequent activity areas.
The designated area to which the foreign user belongs can be understood as: the activity areas where the overseas user frequently appears, such as the residence of a person, a relatively fixed consumption place, the work place of a worker, the school of a student, and the like, may be designated areas to which the user belongs. The time during which the outbound user appears in the designated area may be the length of time during which the outbound user continuously or cumulatively appears in the designated area, or the number of times the outbound user appears in the designated area.
The user positive sample referred to herein may be understood as an overseas user sample of the same type as an overseas user that needs to be obtained, for example, the user positive sample may be a student, a visitor, or a proxy, and a specific selection of the user positive sample needs to be determined according to an actual application scenario.
S204: training a first classifier based on features of the user positive sample.
In practical application, a small amount of positive samples can be obtained according to requirements, and the positive samples are used for classifying the unclassified samples to obtain the required negative samples. For example, assuming that a bayesian classifier is obtained by training with an I-EM (latent variable-expectation maximization) algorithm, a required user negative sample can be obtained.
S206: and mining the required overseas users by utilizing the first classifier.
The required foreign users referred to herein are user types specified according to the requirements of the actual application scenario. And classifying all the overseas users to be classified by utilizing a first classifier (for example, a PULEARING algorithm), and mining to obtain the required overseas users.
Based on the above embodiments, it is easy to understand that a user positive sample for training can be obtained by extracting the overseas consumption behavior features of the overseas user group or extracting the location features of the overseas user group in a specified area; and further, mining the user to be mined by using a classification model obtained by training based on the user positive sample and the user negative sample. The method can accurately mine the user types required by the overseas user groups, is beneficial to improving the working efficiency of mining the overseas user groups, and has wider application range.
In one or more embodiments of the present description, the position feature includes: a designated area to which an outbound user belongs, and a time at which the outbound user appears within the designated area; determining a user positive sample for training according to the location characteristics of the overseas user, which may specifically include: determining the fence of the designated area according to the obtained coordinates of the center point of the designated area; determining the designated area to which the overseas user belongs according to the position relation between the position coordinates of the overseas user and the designated area fence; determining a positive sample of the user for training based on the time that the overseas user appears within the designated area fence.
For example, assuming that the designated area is a foreign campus, the latitude and longitude of LBS (Location based service) of each university may be acquired, for example, the latitude and longitude may be acquired using GPS. Further, a university fence with the radius R is established according to the area of the campus or the area of matching places around the campus.
Typically, there may be multiple adjacent university campuses simultaneously in a university city, requiring a separate university fence to be determined for each campus. Further, at least one piece of LBS information of the student keeping is obtained, and the university fence closest to the position of the student keeping is determined to be the university campus of the student keeping. For example, as shown in fig. 3, it is assumed that adjacent university a, university B, and university C coexist in a university city, the central points of the campuses are a1, B1, and C1, respectively, and the areas of the campuses are sorted from large to small as university a, university B, and university C; it is assumed that the order of the distances between the LBS information of the student S and the central points of the campuses from large to small is SA (distance from the student S to a 1), SB (distance from the student S to B1), and SC (distance from the student S to C1), but the longitude and latitude corresponding to the LBS information of the student S is in the electronic fence of university a, so that the student S can be preliminarily determined as the student of university a. Of course, it is not necessary to precisely distinguish which school the student belongs to A, B, C, and it is only necessary to confirm that the student is the identity type of the student.
Furthermore, in order to accurately confirm whether the student S belongs to the student at university A, LBS information of the student S at different time points can be collected; meanwhile, the accumulated time of the student S appearing in the fence of university A is judged, and if the accumulated time is more than 30 days, the student S can be regarded as a student reserved for university A, and the student S is regarded as a user positive sample.
In one or more embodiments of the present specification, training the first classifier based on the feature of the user positive sample may specifically include: classifying based on the classification threshold of the user positive sample to obtain a user negative sample; extracting feature vectors of specified features in the user positive sample and the user negative sample; wherein the user negative examples are determined based on a classification threshold classification of user positive examples; training the first classifier based on the feature vectors; wherein the feature vector comprises: user attribute feature vectors, location feature vectors, account behavior feature vectors.
Different user groups have different types of feature vectors. For example, as shown in fig. 5, it can be seen that, assuming that a student population needs to be mined, the specified features of the student population include: user attributes, university LBS behavior, outbound behavior, and account behavior.
Specifically, as shown in table 1 below:
TABLE 1
The user behaviors comprise user _ age, user _ gender and the like; university LBS behavior includes: overreads _ day _ cnt (number of outbound stay days), overreads _ day _ rate (percentage of outbound days), unity _ days (frequented, number of recent college days), etc.; the outbound behaviors include: count _ num (the number of foreign countries to which the user has visited), session _ id _ num (the number of outbound times), and the like; the account behavior includes: payment of issue (whether to pay a fee for the outside), and the like. Further, based on the feature vector of the specified feature, a first classifier is obtained through training.
In one or more embodiments of the present specification, the classifying the user negative sample based on the classification threshold of the user positive sample may specifically include: based on the user positive sample, extracting a part of samples to define a positive sample subset, and defining an unextracted part as a first user positive sample; combining the positive sample subset and the unlabeled user sample to obtain a first unlabeled sample; training a second classifier based on the first user positive sample and the first unlabeled sample; and acquiring the user negative sample in the first unlabeled sample according to the classification threshold determined by the trained second classifier.
In practical application, because the sample data required by training the classifier is large in size and the cost for labeling the samples is often high, in order to improve the efficiency of classifying or mining users, only some positive samples can be labeled, and further, the Bayesian classifier based on the I-EM algorithm is trained based on the positive samples and the unlabeled samples.
To facilitate understanding of the user negative example acquisition process, the following is an example:
for example, as shown in fig. 4, a reliable negative sample set RN is found in the unlabeled sample set U according to the labeled user positive sample P. Supposing that the RN set is extracted by using the SPy algorithm, the method specifically comprises the following steps:
s400: the RN set is null;
s402: randomly selecting a positive sample subset S from P to obtain a new first user positive sample PS (P-S) and a first unlabeled sample US (U + S), wherein each sample category in the PS is marked as 1, and each sample category in the US is marked as-1;
s404: PS and US are used as training sets, and an I-EM (latent variable-approximation knowledge hidden variable maximum likelihood estimation) algorithm is used for training to obtain a Bayesian classifier;
s406: determining a classification threshold th using the subset S;
s408: for each sample d in US, a bayesian classifier is used to calculate the probability P (1| d) that it belongs to a positive sample, and if less than a threshold probability th, it is added to the RN set.
It should be noted that P represents a labeled user positive sample set, U represents an unlabeled user sample set, RN (Reliable Negative samples) represents a Reliable user Negative sample set, and S represents a positive sample subset of P.
In one or more embodiments of the present description, the user includes: leaving the student; determining a user positive sample for training according to the consumption behavior feature or the location feature of the overseas user, which may specifically include: according to the characteristic of the payment behavior of the student; or, according to a designated university fence to which the student belongs, and a time of occurrence within the designated university fence; determining a student positive sample for training the first classifier.
For example, information (latitude and longitude) of the LBS information of the foreign famous university can be crawled as a central point, the central point is taken as a center, and a university LBS fence is established with the radius r of 1000 m; and extracting the nearest college distance according to LBS information of the student. Calculate the most recent, most commonly occurring university fence data within a certain time window (e.g., half a year): calculating the number of days of occurrence of the student (the number of days is equal to the number of days of occurrence/180) and the average distance from the boundary of the university fence (assuming that the student is positive when appearing in the university fence and negative when appearing outside the fence); and selecting the hit students according to an artificially defined threshold value. For example, if a student has a number of days in a designated university pen >0.8, and the average distance from the campus center point is less than 1000 meters, then the student is a student reserved for the designated university.
Based on the above embodiments, it can be understood that a user positive sample for training can be obtained by extracting the overseas consumption behavior features of the overseas user group, or extracting the location features of the overseas user group in a specified area; and further, mining the user to be mined by using a classification model obtained by training based on the user positive sample and the user negative sample. The method can accurately mine the user types required by the overseas user groups, is beneficial to improving the working efficiency of mining the overseas user groups, and has wider application range.
Based on the same idea, an embodiment of the present specification further provides a user mining device, and as shown in fig. 6, the schematic diagram of the user mining device provided in the embodiment of the present specification is shown, and the device may specifically include:
the outbound confirmation module 601 is used for determining the outbound users according to the outbound behavior characteristics of the users;
a positive sample confirmation module 602, configured to determine a user positive sample for training according to a behavior feature or a location feature of a user; wherein the location features include: a designated area to which a user belongs, and a time when the user appears in the designated area;
a training module 603 for training a first classifier based on the characteristics of the user positive sample;
a mining module 604 that mines the desired overseas users using the first classifier.
Further, the location features include: a designated area to which an outbound user belongs, and a time at which the outbound user appears within the designated area; the positive sample confirmation module 602, determining a user positive sample for training according to the location characteristics of the overseas user, may specifically include: the positive sample confirming module 602 determines the fence of the designated area according to the obtained coordinates of the center point of the designated area; determining the designated area to which the overseas user belongs according to the position relation between the position coordinates of the overseas user and the designated area fence;
determining a positive sample of the user for training based on the time that the overseas user appears within the designated area fence.
Further, the training module 603, based on the feature of the positive sample of the user, trains the first classifier, which may specifically include: classifying based on the classification threshold of the user positive sample to obtain a user negative sample; the training module 603 extracts feature vectors of specified features in the user positive sample and the user negative sample; training the first classifier based on the feature vectors; wherein the feature vector comprises: user attribute feature vectors, location feature vectors, account behavior feature vectors.
Further, the user excavating device further comprises: a user negative example confirmation module 605; a user negative sample confirmation module 605, which extracts a part of samples based on the user positive samples to define a positive sample subset, and an unextracted part to define a first user positive sample; combining the positive sample subset and the unlabeled user sample to obtain a first unlabeled sample; training a second classifier based on the first user positive sample and the first unlabeled sample; and acquiring the user negative sample in the first unlabeled sample according to the classification threshold determined by the trained second classifier.
Further, the user includes: leaving the student; the positive sample confirmation module 602, determining a user positive sample for training according to the consumption behavior feature or the location feature of the overseas user, may specifically include: the positive sample confirmation module 602 is configured to pay the behavior characteristics according to the toll of the student; or,
determining an on-student positive sample for training the first classifier based on a designated university fence to which the on-student belongs and a time of occurrence within the designated university fence.
Based on the same idea, an embodiment of this specification further provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
determining an overseas user according to the outbound behavior characteristics of the user;
determining a user positive sample for training according to the consumption behavior characteristics or the position characteristics of the overseas user;
training a first classifier based on features of the user positive sample;
and mining the required overseas users by utilizing the first classifier.
The method comprises the steps that an oversea consumption behavior feature of an oversea user group is extracted, or a position feature of the oversea user group in a specified area is extracted, so that a user positive sample for training can be obtained; and further, mining the user to be mined by using a classification model obtained by training based on the user positive sample and the user negative sample. The method can accurately mine the user types required by the overseas user groups, is beneficial to improving the working efficiency of mining the overseas user groups, and has wider application range.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and the relevant points can be referred to the partial description of the embodiments of the method.
The apparatus, the electronic device, the nonvolatile computer storage medium and the method provided in the embodiments of the present description correspond to each other, and therefore, the apparatus, the electronic device, and the nonvolatile computer storage medium also have similar advantageous technical effects to the corresponding method.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), Lava, Lola, HDL, PALASM, rhyd (Hardware Description Language), and the like, which are currently used in the field-Hardware Language. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.