A method for sample classification and related apparatus

By sampling and gridding the initial dataset, and combining it with a neural network model, the problem of low accuracy in identifying virtual game reservation intentions was solved, and efficient identification of target objects was achieved.

CN116881759BActive Publication Date: 2025-12-02TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210298515.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-24
Publication Date
2025-12-02
Estimated Expiration
2042-03-24

AI Technical Summary

Technical Problem

In the identification of virtual game reservation intentions, existing technologies cannot capture high-dimensional feature information by relying on data recognition rules determined by human experience, and data mining methods based on non-deep learning are difficult to express complex reservation behavior features, resulting in low recognition accuracy.

Method used

The initial dataset is sampled using a pre-defined sampling algorithm. By gridding and determining cluster center objects, target objects with reservation intentions are identified, and feature processing and recognition are performed using a neural network model.

Benefits of technology

It improves the accuracy of identifying virtual game reservation intentions, reduces the false recognition rate, and can accurately identify target individuals with reservation intentions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116881759B_ABST
    Figure CN116881759B_ABST
Patent Text Reader

Abstract

A method and related apparatus for sample classification are disclosed. Embodiments of this application can be applied to scenarios such as cloud technology and artificial intelligence. Embodiments of this application are applicable to scenarios involving the prediction of willingness to make reservations for virtual games, accurately identifying target objects with reservation intentions and improving recognition accuracy. The method includes: classifying samples from an initial dataset to be processed using a preset sampling algorithm to obtain a processed dataset; performing gridding processing on the feature vector of each sample in the processed dataset to obtain at least two grid objects; determining the grid density of each grid object; determining the weight of the cluster center object corresponding to each grid object based on the grid density of each grid object; determining the cluster center object in each grid object based on the weight of each cluster center object; and obtaining the sample type of each sample based on the distance between each sample and each cluster center object in the processed dataset.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method and related apparatus for sample classification. Background Technology

[0002] Virtual game reservation intention primarily refers to the target audience's willingness to reserve virtual games or purchase virtual goods. For example, in the scenario of virtual game reservation intention, this intention can typically include, but is not limited to, real-name registration, paid purchase, and download, and can be categorized as either having the intention to reserve or not. Currently, industry solutions for identifying virtual game reservation intention generally fall into two categories. One category is based on human experience to determine data recognition rules, and then uses these rules to identify whether a target audience has the intention to reserve virtual games. The other category is based on non-deep learning data mining methods, which predict the probability of a target audience's intention to reserve virtual games by constructing multi-dimensional features and training models.

[0003] However, relying on human experience to determine data recognition rules not only limits the number of rules used but also fails to capture the high-dimensional features of interactions between rules and determine the optimal parameters for each rule. Furthermore, non-deep learning-based data mining methods, when predicting the willingness to book virtual games, suffer from complex and difficult-to-express booking behavior characteristics, leading to poor identification of potential booking targets. Summary of the Invention

[0004] This application provides a sample classification method and related apparatus, which can solve the problem that the current methods of identifying target objects with reservation intentions for virtual games are relatively complex due to the characteristics of reservation behavior or manual identification, resulting in low accuracy. It can be applied to the scenario of predicting the intention to make reservations for virtual games, accurately identifying target objects with reservation intentions and improving the recognition accuracy.

[0005] Firstly, embodiments of this application provide a method for sample classification. This method can be applied to scenarios such as predicting virtual game reservation intentions or predicting product purchase intentions, etc., and this application does not limit its application. The method includes: performing sample sampling processing on an initial dataset to be processed based on a preset sampling algorithm to obtain a processed dataset; performing gridding processing on the feature vector of each sample in the processed dataset to obtain at least two grid objects; determining the grid density of each grid object; determining the weight of the cluster center object corresponding to each grid object based on the grid density of each grid object; determining the cluster center object in each grid object based on the weight of each cluster center object; and obtaining the sample type of each sample based on the distance between each sample and each cluster center object in the processed dataset.

[0006] Secondly, embodiments of this application provide a sample processing apparatus. This sample processing apparatus may include a processing unit. Exemplarily, the sample processing apparatus may further include an acquisition unit. The processing unit is configured to: perform sample sampling processing on an initial dataset to be processed based on a preset sampling algorithm to obtain a processed dataset; perform gridding processing on the feature vector of each sample in the processed dataset to obtain at least two grid objects; determine the grid density of each grid object; determine the weight of the cluster center object corresponding to each grid object based on the grid density of each grid object; determine the cluster center object in each grid object based on the weight of each cluster center object; and obtain the sample type of each sample based on the distance between each sample and each cluster center object in the processed dataset.

[0007] In one possible implementation, the processing unit is configured to: calculate the distance between a first sample and each second sample based on a preset distance algorithm, wherein the first sample is any positive class sample in the initial dataset, and each second sample is another positive class sample in the initial dataset besides the first sample; perform feature processing on the third sample to obtain the target feature vector corresponding to the third sample, wherein the third sample is the second sample corresponding to the distance satisfying a preset condition; calculate the distance between the feature vector of each sample in the initial dataset and the target feature vector, and select target positive class samples from the samples based on the distance between the feature vector of each sample and the target feature vector, the samples including the first sample and each second sample; add the target positive class samples to the initial dataset to obtain the processed dataset.

[0008] In another possible implementation, the acquisition unit is used to: acquire the feature vector corresponding to the first sample and the feature vector corresponding to each second sample. The processing unit is used to: perform vector processing on the feature vector corresponding to the first sample and the feature vector corresponding to each second sample to obtain the distance between the first sample and each second sample.

[0009] In another possible implementation, the processing unit is configured to: determine the highest grid density from the grid densities of each grid object, and calculate a first distance, wherein the first distance is the distance between the grid density of each grid object and the highest grid density; and multiply the grid density of each grid object and the corresponding first distance to obtain the weight of the cluster center object in each grid object.

[0010] In another possible implementation, the processing unit is used to: count the number of samples in each grid object; and use the number of samples in each grid object as the grid density of each grid object.

[0011] In another possible implementation, the processing unit is further configured to: before determining the weight of the cluster center object corresponding to each grid object based on the grid density of each grid object, average the feature vectors corresponding to the samples in each grid object to obtain the cluster center object of each grid object.

[0012] In another possible implementation, the processing unit is used to: determine a target weight from the weights of each cluster center object, wherein the sample corresponding to the target weight is the critical point with the largest deviation change in the weight curve corresponding to the weight of each cluster center object; and determine the cluster center object with a weight greater than the target weight as the cluster center object in each grid object.

[0013] In another possible implementation, the acquisition unit is also used to: acquire the initial dataset to be processed before performing sample classification processing on the initial dataset to be processed based on a preset sampling algorithm to obtain the processed dataset.

[0014] In another possible implementation, the acquisition unit is used to: acquire a sample to be processed carrying a type label; the processing unit is used to extract business data features of the sample to be processed; the acquisition unit is used to acquire object data features of the target object, where the target object is an object when applying business data; the processing unit is used to aggregate the business data features and object data features based on a preset aggregation algorithm to obtain aggregated data features; the aggregated data features are normalized and discretized to obtain processed data features; and the processed data features are processed based on a preset neural network model to obtain the initial dataset to be processed.

[0015] In another possible implementation, the processing unit is further configured to: after acquiring the sample to be processed carrying a type label, perform anomaly processing on the sample to be processed carrying a type label based on a preset anomaly rule, so as to filter out the sample to be processed with anomalies in type.

[0016] In another possible implementation, the processing unit is configured to: calculate the standard deviation of each sample to be processed carrying a type label; compare each standard deviation with a preset error range; and if the standard deviation is not included in the preset error range, delete the sample to be processed carrying a type label corresponding to the standard deviation that is not included in the preset error range, so as to filter out samples to be processed with abnormal types.

[0017] A third aspect of this application provides a sample processing apparatus, including: a memory, an input / output (I / O) interface, and a processor. The memory stores program instructions. The processor executes the program instructions in the memory to perform the methods corresponding to the first aspect and any possible implementation thereof.

[0018] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method corresponding to the first aspect and any possible implementation thereof.

[0019] The fifth aspect of this application provides a computer program product containing instructions that, when run on a computer or processor, causes the computer or processor to execute the method described above for performing the first aspect and any possible implementation thereof.

[0020] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0021] In this embodiment, a preset sampling algorithm is used to classify the initial dataset to be processed, resulting in a processed dataset. The feature vector of each sample in the processed dataset is then gridded to obtain at least two grid objects. Next, the grid density of each grid object is determined, and the weight of the cluster center object corresponding to each grid object is determined based on the grid density. Finally, the cluster center object in each grid object is determined based on the weight of each cluster center object, and the sample type of each sample is obtained based on the distance between each sample and each cluster center object in the processed dataset. This method solves the problem of low accuracy in identifying target objects with reservation intentions in virtual games due to the complexity of reservation behavior characteristics or manual identification methods. It is applicable to scenarios involving the prediction of reservation intentions in virtual games, accurately identifying target objects with reservation intentions. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A system flowchart of data processing provided in an embodiment of this application is shown;

[0024] Figure 2 A flowchart of a sample classification method provided in an embodiment of this application is shown;

[0025] Figure 3 A schematic diagram of a feature aggregation provided in an embodiment of this application is shown;

[0026] Figure 4 A flowchart illustrating a sample sampling method provided in an embodiment of this application is shown;

[0027] Figure 5 This illustration shows a scene diagram of the meshing processing provided in an embodiment of this application;

[0028] Figure 6 A flowchart illustrating one method for determining cluster center objects, as provided in an embodiment of this application, is shown.

[0029] Figure 7 This illustration shows another flowchart of the sample classification method provided in an embodiment of this application;

[0030] Figure 8 This paper presents a comparison chart showing the effectiveness of different methods in identifying target objects with reservation intentions according to embodiments of this application.

[0031] Figure 9 A schematic diagram of one embodiment of the sample processing apparatus provided in this application is shown;

[0032] Figure 10 A schematic diagram of the sample processing apparatus provided in an embodiment of this application is shown. Detailed Implementation

[0033] This application provides a sample classification method and related apparatus, which can solve the problem that the current methods of identifying target objects with reservation intentions for virtual games are not accurate due to the complexity of reservation behavior characteristics or manual identification. It can be applied to the scenario of predicting the intention to make reservations for virtual games and accurately identify target objects with reservation intentions.

[0034] It is understood that in the specific implementation of this application, user information, object data and other related data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0036] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0037] The sample classification method provided in this application is based on artificial intelligence (AI). Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, artificial intelligence is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making functions.

[0038] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0039] In the embodiments of this application, the main artificial intelligence technologies involved include the aforementioned natural language processing, machine learning, and other related fields. For example, it may involve deep learning in machine learning (ML), including positive-unlabeled learning (PU learning), etc.

[0040] The sample classification method provided in this application can be applied to sample processing devices with data processing capabilities, such as terminal devices and servers. Terminal devices may include, but are not limited to, smartphones, desktop computers, laptops, tablets, smart speakers, in-vehicle devices, smartwatches, smart voice interaction devices, smart home appliances, and aircraft. Servers may be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services; this application does not impose specific limitations. Furthermore, the mentioned terminal devices and servers can be directly or indirectly connected via wired or wireless communication; this application does not impose specific limitations.

[0041] This identification device can also possess machine learning capabilities. Machine learning is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and many other disciplines. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include technologies such as neural networks. The sample classification method provided in this application uses an artificial intelligence model, mainly involving the application of neural networks to identify and classify data in a dataset. For example, in a virtual game application (APP), it identifies and classifies whether the target object in the APP has the intention to book a virtual game.

[0042] Furthermore, the data processing method provided in this application embodiment can also be applied to application scenarios such as cloud technology and security, and this application does not impose specific limitations. For example, the embodiments provided in this application embodiment can also be applied to application scenarios such as cloud technology and cloud security. In the mentioned cloud technology and cloud security application scenarios, the data processing device provided in this application embodiment needs to have cloud computing capabilities. Cloud computing refers to the delivery and usage model of IT infrastructure, or the delivery and usage model of services. It involves obtaining required resources on demand and in a scalable manner through a network. This service can be IT and software, internet-related, or other services. Cloud computing is a product of the development of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, virtualization, and load balancing. Unlike previous parallel and distributed computing, the emergence of cloud computing will, conceptually, drive a revolutionary change in the entire internet model.

[0043] Currently, industry solutions for identifying the willingness to book virtual games generally fall into two categories. One category relies on human experience to determine data recognition rules, which are then used to identify whether a target individual intends to book a virtual game. The other category uses non-deep learning data mining methods, predicting the probability of a target individual's willingness to book a virtual game by constructing multi-dimensional features and training a model. However, the method based on human experience has limitations: it uses a limited number of rules, fails to capture the high-dimensional features of interactions between rules, and cannot determine the optimal parameters for each rule. Furthermore, in scenarios involving predicting the willingness to book virtual games, the characteristics of booking behavior are complex and difficult to express explicitly, leading to poor identification results for potential booking targets.

[0044] Therefore, to address the aforementioned technical problems, this application provides a sample classification method. This method can be applied to scenarios such as predicting virtual game reservation intentions, and also to predicting product purchase intentions, enabling accurate identification of the reservation and purchase intentions of target individuals and reducing the false identification rate. For example, Figure 1 A system flowchart for data processing according to an embodiment of this application is shown. Figure 1As shown, this sample classification method can include a sample preparation stage, a feature construction stage, a sample sampling stage, and a sample type classification stage. Specifically, an initial dataset to be processed can be prepared first, which may include minority class positive samples. Then, feature vectors are constructed for the minority class positive samples in the initial dataset. A preset sampling algorithm is then used to sample these minority class positive samples to adjust the number of positive samples in the initial dataset, thus obtaining the processed dataset. Finally, clustering is performed on each sample in the processed dataset to determine the sample type of each sample.

[0045] Figure 2 A schematic flowchart of a sample classification method provided in an embodiment of this application is shown. Figure 2 As shown, the method for classifying samples may include the following steps:

[0046] 201. Based on the preset sampling algorithm, perform sample classification processing on the initial dataset to be processed to obtain the processed dataset.

[0047] In this example, the initial dataset to be processed is an imbalanced dataset. This initial dataset includes minority class positive samples. Exemplarily, it may also include majority class unlabeled samples. In other words, an imbalanced initial dataset can be understood as one where the number of positive class samples and the number of unlabeled samples are not balanced. For example, the initial dataset may contain 1000 samples, with 5 positive class samples and 995 unlabeled samples; specific limitations are not specified here.

[0048] In some alternative embodiments, an initial dataset to be processed may be obtained before performing step 201. Exemplarily, obtaining the initial dataset to be processed may include: obtaining samples to be processed carrying type labels; extracting business data features from the samples to be processed; obtaining object data features of the target object, where the target object is an object used in applying business data; aggregating the business data features and object data features based on a preset aggregation algorithm to obtain aggregated data features; normalizing and discretizing the aggregated data features to obtain processed data features; and processing the processed data features based on a preset neural network model to obtain the initial dataset to be processed.

[0049] In this example, samples carrying type labels can be obtained through manual annotation, business logic, or other methods. Then, business data features are extracted from these samples to obtain their specific business data characteristics. It is understood that these business data characteristics are sometimes referred to as business vertical type features, and the specific name is not limited. Furthermore, the mentioned business data features may include, but are not limited to, the target object's purchase data characteristics, product characteristics, and advertising characteristics; this application does not impose specific limitations. Additionally, the target object's purchase data characteristics include, but are not limited to, the number of clicks and purchases by the target object, click-through-purchase conversion rates, etc. Product characteristics include the product category, the number of times the product has been clicked and purchased, etc. Advertising characteristics include information such as ad placement and the product category to which the ad belongs.

[0050] Alternatively, after obtaining samples carrying type labels, the object data features of the target object can be extracted and sampled from these type-labeled samples to obtain the object data features of the target object. The described object data features include, but are not limited to, target object information, advertising information, target object click logs, target object historical purchase data, and some non-privacy behavioral data of the target object within the application (APP). The described non-privacy behavioral data includes, but is not limited to, whether the target object's terminal has a mobile security app installed or whether it uses the mobile security app's harassment blocking function; this application does not limit this.

[0051] Then, the business data features and object data features can be aggregated using a preset aggregation algorithm to obtain the aggregated data features. For example, Figure 3 A schematic diagram of feature aggregation is shown. For example... Figure 3 As shown, aggregation algorithms can be used to aggregate object data features and business vertical type features across different time spans. The described aggregation algorithms may include, but are not limited to, summation, median, and standard deviation algorithms. For example, the time dimension can be combined, and a preset aggregation algorithm can be used to aggregate object data features and business data features of target objects across different time spans.

[0052] Subsequently, feature engineering processing is further performed on the aggregated data features. For example, normalization is applied to data-type features, and discretization is performed on non-numerical features. Discretization methods can include, but are not limited to, one-hot encoding, count encoding, consolidation encoding, category embedding, and not-a-number embedding (NaN Embedding), etc., and this application does not impose any limitations. It should be noted that the NaN Embedding mentioned is used to handle missing values ​​of features; transforming missing values ​​into embedded representations has the greatest positive impact on model performance.

[0053] In this way, the features after normalization and discretization can be combined to obtain the processed data features. Next, these processed data features are input into a neural network model (such as a deep neural network (DNN) model) to train the features of the embedding layer, thus obtaining the corresponding initial dataset to be processed. In this initial dataset, each feature can represent a sample to be processed.

[0054] In some alternative embodiments, since there may be instances of manipulation by fake target objects in real-world business scenarios such as virtual game prediction, after obtaining the samples to be processed carrying type labels, the method further includes: performing anomaly processing on the samples to be processed carrying type labels based on preset anomaly rules to filter out samples to be processed with type anomalies.

[0055] For example, anomaly processing is performed on samples carrying type labels based on preset anomaly rules to filter out samples with type anomalies, including: calculating the standard deviation of each sample carrying type labels; comparing each standard deviation with a preset error range; and deleting the sample carrying type labels corresponding to the standard deviation that is not included in the preset error range to filter out samples with type anomalies.

[0056] In this example, anomaly detection indicators for sample types of abnormal target objects can also be pre-set based on business experience, such as including but not limited to the target object's traffic usage in the product and the time distribution of traffic generation; this application does not impose specific limitations. Then, the standard deviation of each sample to be processed is calculated, and each standard deviation is compared with a preset error range. If it is determined that the standard deviation exceeds the preset error range, the corresponding sample to be processed that exceeds the preset error range is directly removed, thereby completing the filtering of samples with anomalies. It should be noted that the standard deviation exceeding the preset error range can be understood as not belonging to random error, but rather to gross error. Therefore, samples belonging to gross error can be removed.

[0057] For example, after obtaining the initial dataset to be processed, it can also be stored offline in the Hadoop Distributed File System (HDFS) for easy access in subsequent processes. Additionally, for each sample, the data input to the subsequent model is an N×1 numerical vector, such as (1, 0, 31, 4, 0, 2, 9, 3, 8, 8, ..., 0, 0, 1, 2, 34).

[0058] It should be noted that the preset sampling algorithm may include, but is not limited to, the PU learning algorithm, etc., and this application does not specify any particular limitation. The following description of the sampling process will only use the PU learning algorithm as an example. The PU learning described is a research direction in semi-supervised learning, aiming to train a binary classifier when only positive class samples or unlabeled samples are available. For example, after obtaining the initial dataset, the initial dataset can be sampled based on the PU learning algorithm to obtain the processed dataset.

[0059] Specifically, the following will be done through Figure 4 The flowchart shown illustrates how the PU learning algorithm performs sample sampling on the initial dataset to be processed, resulting in the processed dataset. Figure 4 As shown, the sample sampling process is implemented through the following steps:

[0060] S401. Calculate the first distance between the first sample and each second sample based on the preset distance algorithm, wherein the first sample is any positive class sample in the initial dataset, and each second sample is any other positive class sample in the initial dataset other than the first sample.

[0061] In this example, since the initial dataset includes minority class positive samples and majority class unlabeled samples, a positive sample can be randomly selected from the minority class positive samples in the initial dataset as the first sample. Then, from the minority class positive samples in the initial dataset, all positive samples other than the first sample are determined as the second samples. That is, the second samples are all the other positive samples in the initial dataset excluding the first sample.

[0062] In this way, the distance between the first sample and each of the second samples is calculated using a preset distance algorithm. It should be noted that the preset distance algorithm may include, but is not limited to, [other algorithms]. Among them, P j Let U be the feature vector of the j-th second sample, where j is a positive integer greater than 1, and let D be the feature vector of the first sample. j Let be the distance between the j-th second sample and the first sample. In other words, we can first obtain the feature vector U corresponding to the first sample, and then obtain the feature vector P corresponding to each second sample. j Then, by performing vector processing on the feature vector corresponding to the first sample and the feature vector corresponding to each second sample, the distance between the first sample and each sample, i.e., D, is obtained. j .

[0063] It should be understood that the first and second samples mentioned above can be target objects in a virtual game reservation scenario, or target objects in a product purchase scenario, etc., and this application does not limit their description. Furthermore, the feature vectors corresponding to the first and second samples can also be WiFi connection data when making a virtual game reservation, or WiFi connection data when purchasing a product, etc., and this application does not limit their description.

[0064] S402. After performing feature processing on the third sample, the target feature vector corresponding to the third sample is obtained, where the third sample is the second sample corresponding to the distance satisfying the preset condition.

[0065] In this example, after determining the distance between the first sample and each second sample, the third sample can be selected from the plurality of second samples based on the calculated distance between the first sample and each second sample, provided that the distance satisfies a preset condition. Exemplarily, in some possible examples, the third sample can also be added to an empty dataset. It should be understood that the preset condition for the described distance can be interpreted as the distance being less than or equal to a preset distance, etc., and this application does not impose any limitation on this interpretation.

[0066] In this way, the initial feature vector of each third sample can be calculated first, and the above step S401 can be repeatedly iterated until the feature vector of the third sample no longer changes, thus obtaining the target feature vector corresponding to the third sample.

[0067] For example, in some alternative examples, the determination of the target feature vector corresponding to the third sample can be understood as follows: first calculate the sum of the feature vectors of all the third samples, such as: Where P is the third sample, and Cluster is the dataset consisting of all the third samples.

[0068] Then, calculate the total number of all third-party samples, e.g., A. A can be understood as the total number of third-party samples in the cluster. Then, based on the sum of the feature vectors of all third-party samples and the total number of third-party samples, determine the target feature vector corresponding to each third-party sample. Among them, U · This is the target feature vector corresponding to the third sample.

[0069] S403. Calculate the distance between the feature vector of each sample in the initial dataset and the target feature vector, and select the target positive class sample from the samples based on the distance between the feature vector of each sample and the target feature vector. The samples include the first sample and each second sample.

[0070] In this example, the target feature vector U of the third sample is calculated. · Then, the feature vector P of each sample in the initial dataset can be obtained using a preset distance algorithm. j With the target feature vector U of the third sample · Perform vector processing to obtain the distance d between the feature vector of each sample and the target feature vector of the third sample, i.e. In this way, after obtaining the distance d between the feature vector of each sample and the target feature vector, these distances d can be sorted in ascending order, so as to select the first t samples in the initial dataset that meet the distance condition as the target positive class samples.

[0071] S404. Add the target positive class samples to the initial dataset to obtain the processed dataset.

[0072] In this example, after obtaining the target positive class sample, the target positive class sample can be added to the initial dataset to obtain the processed dataset.

[0073] It should be noted that the above Figure 4This paper primarily describes a scheme for sampling minority class positive samples from an initial dataset using the PU learning algorithm. In practical applications, other sampling methods may also be used to sample minority class positive samples; this application does not specify any particular method.

[0074] 202. Perform gridding on the feature vector of each sample in the processed dataset to obtain at least two grid objects.

[0075] In this example, the samples in the processed dataset can be divided into grids using a preset gridding algorithm. For instance, the feature vectors of each sample in the processed dataset are divided into grids with the same dimension, creating at least two grids. Figure 5 A schematic diagram of a scene with mesh processing is shown. For example... Figure 5 As shown, if the processed dataset is displayed in a two-dimensional format, it can be exemplarily divided into a 7×7 grid. Then, these at least two grids are looped through, and the number of samples in each grid is counted. Furthermore, after deleting grids with zero samples, the remaining non-empty grids are grouped into at least two grid objects. For example, Figure 5 The number of non-empty grids shown is 20. For example, if N < n / 6, the grid is re-divided, where N is the number of non-empty grids and n is the number of data objects.

[0076] It should be noted that Figure 5 The grid number shown is merely illustrative; in practical applications, the specific grid division can be determined based on the data structure of the processed dataset. This application does not impose any specific limitations. Furthermore, the samples within the aforementioned grid can also be understood as data objects or data points; the name of these samples is not limited in this embodiment.

[0077] 203. Determine the mesh density for each mesh object.

[0078] In this example, after obtaining at least two grid objects, all samples within the same grid object can be considered as a whole. Then, the number of samples in each grid object is counted, and this number is used as the grid density of each grid object.

[0079] For example, if the sample in the i-th grid object is P i ={P i1 P i2 ., ..., .P ij} can be achieved through preset statistical algorithms, such as: in Calculate the number of samples in the i-th grid object. Then the mesh density ρ of the i-th mesh object can be obtained. i It should be noted that X j Let G be a sample in the i-th grid object. i It is represented as the i-th grid object.

[0080] 204. Determine the weight of the cluster center object corresponding to each grid object based on the grid density of each grid object.

[0081] In this example, the cluster center object can be understood as a representative point in the corresponding grid object. For example, in some alternative examples, before determining the weight of the cluster center object for each grid object based on the grid density of each grid object, the cluster center object in each grid object can be determined first. For example, after obtaining the feature vectors corresponding to all samples in each grid object, the average of the sum of the feature vectors corresponding to all samples can be used to obtain the cluster center object P of each grid object. i ',Right now Among them G i For the i-th grid object, For G i All samples X i The sum of eigenvectors, ρ i For G i The grid density.

[0082] In some alternative embodiments, determining the weight of the cluster center object corresponding to each grid object based on the grid density of each grid object includes: determining the highest grid density from the grid densities of each grid object and calculating a first distance, wherein the first distance is the distance between the grid density of each grid object and the highest grid density; and multiplying the grid density of each grid object and the corresponding first distance to obtain the weight of the cluster center object in each grid object.

[0083] In this example, the mesh density ρ of each mesh object is calculated. i and cluster center object P i Then, the mesh density of all mesh objects can be sorted in ascending or descending order to determine the highest mesh density.

[0084] Then, the distance between the grid density of each grid object and the highest grid density is calculated based on a preset algorithm, i.e., the first distance δ. i It should be noted that the described preset algorithm can be understood as follows:

[0085]

[0086] Furthermore, the weight of the cluster center object in each grid object is determined based on the grid density of each grid object and the corresponding first distance, thus obtaining the first weight. For example, the grid density ρ of each grid object can be... i With the corresponding first distance δ i Perform a product operation to calculate the weight of the cluster center object in the i-th grid object, i.e., γ. i =ρ i ×δ i .

[0087] 205. Determine the cluster center object in each grid object based on the weight of each cluster center object.

[0088] In this example, after determining the weight of the cluster center object in each grid object, the cluster center object in each grid object can be determined based on the weight of each cluster center object.

[0089] For example, in some other optional examples, determining the cluster center object in each grid object based on the weight of each cluster center object includes: determining a target weight from the weight of each cluster center object, wherein the sample corresponding to the target weight is the critical point in the weight curve corresponding to the weight of each cluster center object where the deviation changes the most; and determining the cluster center object whose weight is greater than the target weight as the cluster center object.

[0090] In this example, after obtaining the weights of the cluster center objects in each grid object, the weights of all cluster center objects are sorted in descending order. The slope of the weight curve formed by the weights of all cluster center objects is calculated, and this slope represents the downward trend of the weight curve, thus determining the target weight. That is, the target weight can be understood as the inflection point in the weight curve. In other words, the sample corresponding to the target weight is the critical point in the weight curve where the deviation changes the most.

[0091] In this way, the comparison result is obtained by comparing the weight of each cluster center object with the target weight. Then, based on the comparison result, all cluster center objects whose weights are greater than the target weights are used as the cluster center objects in the corresponding grid objects.

[0092] For example, in some alternative examples, after finding the cluster center objects corresponding to all weights greater than the target weight based on the comparison results, the cluster center objects corresponding to weights greater than the target weight can be first determined as the target cluster center objects, and then the cluster center objects can be obtained from the target cluster center objects. For example, obtaining the cluster center objects from the target cluster center objects includes: processing the target cluster center objects using a preset representative point algorithm to obtain the cluster center objects. It should be noted that the preset representative point algorithm can be understood as calculating the distance between all data objects in each grid object and the cluster center object, arranging them in ascending order, selecting the first data object as the initial cluster center object, and continuing until all cluster center objects have selected their corresponding initial distance center objects.

[0093] 206. Based on the distance between each sample and each cluster center object in the processed dataset, the sample type of each sample is obtained.

[0094] In this example, identifying the cluster center objects in each grid object can be understood as performing K-Means clustering on the samples in each grid object, resulting in K clusters. Then, for each sample, the distance between each sample and each cluster center object can be calculated, and this distance is used to determine the sample type of the data object. For example, after obtaining all the distances, they can be normalized to convert them into probability values ​​within the range [0, 1]. Thus, the sample type of the data object is determined by the probability.

[0095] For example, the process of determining cluster center objects can also refer to Figure 6 Please understand the flowchart shown. Figure 6 As shown, firstly, the processed dataset is gridded. Then, the number of samples in each non-empty grid object is used as the corresponding grid density, and the distance between each grid density and the highest grid density is calculated. Next, the corresponding downward trend is calculated using the weights of the cluster center objects, and the inflection point y = i is determined. The K grid center points before i are used as the cluster center objects of the grid object. Furthermore, K initial cluster center objects are obtained from the K initial cluster center objects, and K-Means clustering is performed using these K initial cluster center objects to form K clusters.

[0096] Figure 7 Another flowchart illustrating the sample classification method provided in this application is shown. Figure 7As shown, the sample classification method may include the following steps: First, obtain samples to be processed carrying type labels, and perform anomaly processing on these samples based on preset anomaly rules to filter out samples with type anomalies. Then, extract the business data features of the samples to be processed; obtain the object data features of the target objects, where the target objects are objects used in applying business data. Next, aggregate the business data features and object data features based on a preset aggregation algorithm to obtain aggregated data features, and then normalize and discretize the aggregated data features to obtain processed data features; finally, process the processed data features based on a preset neural network model to obtain the initial dataset to be processed.

[0097] Then, the feature vector corresponding to the first sample and the feature vector corresponding to each second sample are obtained, and vector processing is performed on the feature vector corresponding to the first sample and the feature vector corresponding to each second sample to obtain the distance between the first sample and each second sample. Here, the first sample is any positive class sample in the initial dataset, and each second sample is another positive class sample in the initial dataset besides the first sample. After feature processing of the third sample, the target feature vector corresponding to the third sample is obtained. Here, the third sample is the second sample corresponding to the distance that meets the preset condition. The distance between the feature vector of each sample in the initial dataset and the target feature vector is calculated, and the target positive class sample is selected from the samples based on the distance between the feature vector of each sample and the target feature vector. The samples include the first sample and each second sample. The target positive class sample is added to the initial dataset to obtain the processed dataset.

[0098] Next, the feature vector of each sample in the processed dataset is gridded to obtain at least two grid objects; the number of samples in each grid object is counted; the number of samples in each grid object is used as the grid density of each grid object. Then, the average value of the feature vectors corresponding to the samples in each grid object is calculated to obtain the cluster center objects of each grid object. Next, the highest grid density is determined from the grid densities of each grid object, and a first distance is calculated, where the first distance is the distance between the grid density of each grid object and the highest grid density. The grid density of each grid object and the corresponding first distance are multiplied to obtain the weight of the cluster center objects in each grid object. Then, a target weight is determined from the weights of each cluster center object; the sample corresponding to the target weight is the critical point with the largest deviation change in the weight curve corresponding to the weight of each cluster center object. The cluster center objects with weights greater than the target weights are determined as the cluster center objects in each grid object.

[0099] Finally, based on the distance between each sample and each cluster center object in the processed dataset, the sample type of each sample is obtained.

[0100] It should be noted that the above Figure 7 The content shown can be referred to in the foregoing. Figure 2 , Figure 4 as well as Figure 6 The content in the text will be understood in detail here, and will not be elaborated upon further.

[0101] In this embodiment, a preset sampling algorithm performs sample classification on the initial dataset to be processed, obtaining a processed dataset. The feature vector of each sample in the processed dataset is then gridded to obtain at least two grid objects. Next, the grid density of each grid object is determined, and the weight of the cluster center object corresponding to each grid object is determined based on the grid density. Finally, the cluster center object in each grid object is determined based on the weight of each cluster center object, and the sample type of each sample is obtained based on the distance between each sample and each cluster center object in the processed dataset. This method solves the problem of low accuracy in identifying target objects with reservation intentions for virtual games due to the complexity of reservation behavior characteristics or manual identification methods. It is applicable to scenarios involving the prediction of reservation intentions for virtual games, accurately identifying target objects with reservation intentions and significantly improving the accuracy of ad click-through rate prediction. For example, Figure 8 This chart shows a comparison of the effectiveness of different methods in identifying target individuals with appointment intentions. From Figure 8 It can be seen that, compared with the currently used methods of manually formulating recognition rules and non-deep learning recognition methods, the sample classification method provided in this application embodiment can significantly improve the ad click-through rate and ad conversion rate in the scenario of predicting the willingness to make reservations for virtual games.

[0102] The foregoing primarily describes the solutions provided by the embodiments of this application from a methodological perspective. It is understood that to achieve the above functions, corresponding hardware structures and / or software modules are included to execute each function. Those skilled in the art should readily recognize that, based on the modules and algorithm steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0103] This application embodiment can divide the device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0104] The sample processing apparatus in the embodiments of this application will now be described in detail. Figure 9 This is a schematic diagram of one embodiment of the sample processing apparatus provided in this application. Figure 9 As shown, the sample processing device may include an acquisition unit 901 and a processing unit 902.

[0105] The processing unit 902 is used to: perform sample sampling processing on the initial dataset to be processed based on a preset sampling algorithm to obtain the processed dataset; perform gridding processing on the feature vector of each sample in the processed dataset to obtain at least two grid objects; determine the grid density of each grid object; determine the weight of the cluster center object corresponding to each grid object based on the grid density of each grid object; determine the cluster center object in each grid object based on the weight of each cluster center object; and obtain the sample type of each sample based on the distance between each sample and each cluster center object in the processed dataset.

[0106] In one possible implementation, the processing unit 902 is configured to: calculate the distance between the first sample and each second sample based on a preset distance algorithm, wherein the first sample is any positive class sample in the initial dataset, and each second sample is another positive class sample in the initial dataset besides the first sample; perform feature processing on the third sample to obtain the target feature vector corresponding to the third sample, wherein the third sample is the second sample corresponding to the distance satisfying the preset condition; calculate the distance between the feature vector of each sample in the initial dataset and the target feature vector, and select the target positive class sample from the samples based on the distance between the feature vector of each sample and the target feature vector, wherein the samples include the first sample and each second sample; and add the target positive class sample to the initial dataset to obtain the processed dataset.

[0107] In another possible implementation, the acquisition unit 901 is used to: acquire the feature vector corresponding to the first sample and the feature vector corresponding to each second sample. The processing unit 902 is used to: perform vector processing on the feature vector corresponding to the first sample and the feature vector corresponding to each second sample to obtain the distance between the first sample and each second sample.

[0108] In another possible implementation, the processing unit 902 is configured to: determine the highest grid density from the grid densities of each grid object, and calculate a first distance, wherein the first distance is the distance between the grid density of each grid object and the highest grid density; and multiply the grid density of each grid object and the corresponding first distance to obtain the weight of the cluster center object in each grid object.

[0109] In another possible implementation, the processing unit 902 is used to: count the number of samples in each grid object; and use the number of samples in each grid object as the grid density of each grid object.

[0110] In another possible implementation, the processing unit 902 is further configured to: before determining the weight of the cluster center object corresponding to each grid object based on the grid density of each grid object, average the feature vectors corresponding to the samples in each grid object to obtain the cluster center object of each grid object.

[0111] In another possible implementation, the processing unit 902 is used to: determine a target weight from the weights of each cluster center object, wherein the sample corresponding to the target weight is the critical point with the largest deviation change in the weight curve corresponding to the weight of each cluster center object; and determine the cluster center object with a weight greater than the target weight as the cluster center object in each grid object.

[0112] In another possible implementation, the acquisition unit 901 is further configured to: acquire the initial dataset to be processed before performing sample classification processing on the initial dataset to be processed based on a preset sampling algorithm to obtain the processed dataset.

[0113] In another possible implementation, the acquisition unit 901 is used to: acquire a sample to be processed carrying a type label; the processing unit 902 is used to extract the business data features of the sample to be processed; the acquisition unit 901 is used to acquire the object data features of the target object, where the target object is the object when applying business data; the processing unit 902 is used to aggregate the business data features and object data features based on a preset aggregation algorithm to obtain aggregated data features; after normalizing and discretizing the aggregated data features, the processed data features are obtained; and the processed data features are processed based on a preset neural network model to obtain the initial dataset to be processed.

[0114] In another possible implementation, the processing unit 902 is further configured to: after acquiring the sample to be processed carrying a type label, perform anomaly processing on the sample to be processed carrying a type label based on a preset anomaly rule, so as to filter out the sample to be processed with anomalies in type.

[0115] In another possible implementation, the processing unit 902 is used to: calculate the standard deviation of each sample to be processed carrying a type label; compare each standard deviation with a preset error range; and if the standard deviation is not included in the preset error range, delete the sample to be processed carrying a type label corresponding to the standard deviation that is not included in the preset error range, so as to filter out samples to be processed with abnormal types.

[0116] The sample processing device in the embodiments of this application has been described above from the perspective of modular functional entities. The sample processing device in the embodiments of this application will now be described below from the perspective of hardware processing. Figure 10 This is a schematic diagram of the sample processing device provided in an embodiment of this application. The sample processing device can vary considerably due to differences in configuration or performance. The sample processing device may include at least one processor 1001, a communication line 1007, a memory 1003, and at least one communication interface 1004.

[0117] The processor 1001 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (server IC), or one or more integrated circuits used to control the execution of the program of the present application.

[0118] The communication line 1007 may include a path for transmitting information between the aforementioned components.

[0119] Communication interface 1004 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.

[0120] The memory 1003 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions. The memory can exist independently and be connected to the processor via communication line 1007. The memory can also be integrated with the processor.

[0121] The memory 1003 stores computer execution instructions for implementing the scheme of this application, and its execution is controlled by the processor 1001. The processor 1001 executes the computer execution instructions stored in the memory 1003, thereby implementing the sample classification method provided in the above embodiments of this application.

[0122] Optionally, the computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.

[0123] In a specific implementation, as one example, the computer device may include multiple processors, for example... Figure 10 Processors 1001 and 1002 are described herein. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0124] In a specific implementation, as one embodiment, the computer device may further include an output device 1005 and an input device 1006. The output device 1005 communicates with the processor 1001 and can display information in various ways. The input device 1006 communicates with the processor 1001 and can receive user input in various ways. For example, the input device 1006 may be a mouse, a touchscreen device, or a sensing device, etc.

[0125] The aforementioned computer device can be a general-purpose device or a special-purpose device. In specific implementations, the computer device can be a microscope or something similar. Figure 10 A device with a similar structure. The embodiments of this application do not limit the type of computer device.

[0126] It should be noted that Figure 10 The processor 1001 can invoke computer execution instructions stored in the memory 1003 to cause the sample processing device to perform actions such as... Figures 2-7 The method in the corresponding method embodiment.

[0127] Specifically, Figure 9 The function / implementation process of the processing unit 902 in the middle can be achieved through Figure 10 The processor 1001 in the memory calls computer execution instructions stored in the memory 1003 to achieve this. Figure 9 The function / implementation process of the acquisition unit 901 can be achieved through... Figure 10 It is implemented using the communication interface 1004.

[0128] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0129] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0130] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0131] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0132] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0133] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0134] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, they can be implemented in whole or in part in the form of a computer program product.

[0135] A computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, they generate, in whole or in part, the processes or functions according to embodiments of this application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., SSDs), etc.

[0136] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for classifying samples, characterized in that, include: The initial dataset to be processed is sampled based on a preset sampling algorithm to obtain the processed dataset. The feature vector of each sample in the processed dataset is gridded to obtain at least two grid objects; Determine the grid density for each of the grid objects; The highest mesh density is determined from the mesh densities of each mesh object, and a first distance is calculated, wherein the first distance is the distance between the mesh density of each mesh object and the highest mesh density; The weight of the cluster center object in each of the grid objects is obtained by multiplying the grid density of each grid object with the corresponding first distance. The cluster center object in each grid object is determined based on the weight of each cluster center object; The sample type of each sample is obtained based on the distance between each sample and each cluster center object in the processed dataset.

2. The method according to claim 1, characterized in that, The initial dataset to be processed is sampled based on a preset sampling algorithm to obtain a processed dataset, including: The distance between the first sample and each second sample is calculated based on a preset distance algorithm, wherein the first sample is any positive class sample in the initial dataset, and each second sample is another positive class sample in the initial dataset other than the first sample. After performing feature processing on the third sample, the target feature vector corresponding to the third sample is obtained, wherein the third sample is the second sample corresponding to the distance satisfying the preset condition; Calculate the distance between the feature vector of each sample in the initial dataset and the target feature vector, and select target positive class samples from the samples based on the distance between the feature vector of each sample and the target feature vector; The target positive class sample is added to the initial dataset to obtain the processed dataset.

3. The method according to claim 2, characterized in that, The calculation of the distance between the first sample and each second sample based on the preset distance algorithm includes: Obtain the feature vector corresponding to the first sample and the feature vector corresponding to each of the second samples; Vector processing is performed on the feature vector corresponding to the first sample and the feature vector corresponding to each second sample to obtain the distance between the first sample and each second sample.

4. The method according to any one of claims 1 to 3, characterized in that, Determining the grid density of each of the grid objects includes: Count the number of samples in each of the grid objects; The number of samples in each grid object is used as the grid density of each grid object.

5. The method according to claim 1, characterized in that, Before determining the weight of the cluster center object corresponding to each of the grid objects based on the grid density of each grid object, the method further includes: After averaging the feature vectors corresponding to the samples in each grid object, the cluster center object of each grid object is obtained.

6. The method according to claim 1, characterized in that, The step of determining the cluster center object in each grid object based on the weight of each cluster center object includes: The target weight is determined from the weight of each cluster center object, and the sample corresponding to the target weight is the critical point with the largest deviation change in the weight curve corresponding to the weight of each cluster center object; The cluster center objects whose weights are greater than the target weights are determined as the cluster center objects in each of the grid objects.

7. The method according to claim 1, characterized in that, Before performing sample classification processing on the initial dataset to be processed based on a preset sampling algorithm to obtain the processed dataset, the method further includes: Obtain the initial dataset to be processed.

8. The method according to claim 7, characterized in that, The process of obtaining the initial dataset to be processed includes: Obtain the sample to be processed, which carries type labels; Extract the business data features of the sample to be processed; Obtain the object data characteristics of the target object, where the target object is the object when the business data is applied; After aggregating the business data features and the object data features based on a preset aggregation algorithm, the aggregated data features are obtained. After normalizing and discretizing the aggregated data features, the processed data features are obtained. The processed data features are processed based on a preset neural network model to obtain the initial dataset to be processed.

9. The method according to claim 8, characterized in that, After obtaining the sample to be processed carrying type labels, the method further includes: Based on preset anomaly rules, the samples to be processed carrying type labels are subjected to anomaly processing to filter out samples with type anomalies.

10. The method according to claim 9, characterized in that, The step of performing anomaly processing on the samples carrying type labels based on preset anomaly rules to filter out samples with type anomalies includes: Calculate the standard deviation of each of the samples to be processed that carry type labels; Each standard deviation is compared with a preset error range; If the standard deviation is not included in the preset error range, the sample to be processed corresponding to the standard deviation that is not included in the preset error range and carries the type label will be deleted to filter out samples to be processed with abnormal type.

11. A sample processing apparatus, characterized in that, include: The processing unit is used to perform sample classification processing on the initial dataset to be processed based on a preset sampling algorithm to obtain the processed dataset. The processing unit is used to perform gridding processing on the feature vector of each sample in the processed dataset to obtain at least two grid objects. The processing unit is used to determine the grid density of each of the grid objects; The processing unit is configured to determine the highest grid density from the grid densities of each grid object and calculate a first distance, wherein the first distance is the distance between the grid density of each grid object and the highest grid density; and to multiply the grid density of each grid object and the corresponding first distance to obtain the weight of the cluster center object in each grid object. The processing unit is configured to determine the cluster center object in each grid object based on the weight of each cluster center object. The processing unit is used to obtain the sample type of each sample based on the distance between each sample in the processed dataset and each cluster center object.

12. A sample processing device, characterized in that, The sample processing device includes: an input / output (I / O) interface, a processor, and a memory. The memory stores program instructions; The processor is configured to execute program instructions stored in the memory to perform the method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on a computer device, cause the computer device to perform the method as described in any one of claims 1 to 10.

14. A computer program product, characterized in that, The computer program product includes instructions that, when executed on a computer device or processor, cause the computer device or processor to perform the method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • High-voltage circuit breaker operating characteristic analysis method based on grid multi-density clustering

    CN104713714A

  • Sample data classifying method, model training method, electronic equipment and storage medium

    CN108595585A