A method, device and storage medium for detecting abnormal objects
By generating adversarial networks and sequence-to-sequence models, and combining behavioral sequence data for abnormal object detection, the problem of low abnormal object detection efficiency in online live broadcasts is solved, unsupervised identification and dynamic adjustment are achieved, and detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202210133868.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-14
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-02-14
AI Technical Summary
In online live broadcast scenarios, abnormal objects such as trolls and zombie fans disrupt normal order through false popularity and false information, affecting user experience. Existing detection methods are inefficient and rely on a large number of abnormal user samples, making it impossible to model end-to-end. Unable to capture sequence data.
Generative adversarial networks (GAN) are used combined with sequence-to-sequence models to obtain behavioral sequence data in interactive scenarios, perform vector representation and generate feature vectors, and use the discriminator to train based on noise samples and normal samples to achieve unsupervised abnormal object detection. Reduce labeling costs and improve detection efficiency.
It realizes the object recognition of unsupervised algorithms, reduces labeling costs, improves the efficiency of abnormal object detection, and can dynamically adjust the model according to changes in object behavior to adapt to the dynamic environment of the live broadcast platform.
Smart Images

Figure CN116644367B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and storage medium for detecting abnormal objects. Background Art
[0002] Online social and entertainment platforms are developing rapidly. Live streaming is an emerging industry born with the development of Internet technology. However, there are abnormal objects in live streaming, such as online water army, zombie fans, witch nodes, etc. These abnormal objects create false popularity and spread false information for illegal interests, which seriously disrupts the normal order of the live streaming platform and affects the user experience. How to detect these abnormal users is very important for purifying the cyberspace.
[0003] Generally, abnormal object detection can be modeled by extracting object features, that is, by marking abnormal objects and then collecting their corresponding features for model training, thereby identifying the objects.
[0004] However, in live broadcast scenarios, the number of users is huge and the features are dynamic, so the workload of extracting abnormal objects from them is large, which affects the efficiency of abnormal object detection. Summary of the invention
[0005] In view of this, the present application provides a method for detecting abnormal objects, which can effectively improve the efficiency of abnormal object detection.
[0006] The first aspect of the present application provides a method for detecting an abnormal object, which can be applied to a system or program including an abnormal object detection function in a terminal device, and specifically includes:
[0007] Obtaining behavior sequence data of the object to be identified in the interactive scene;
[0008] Performing vector representation based on the behavior sequence data to obtain an object feature vector corresponding to the object to be identified;
[0009] The feature vector is input into a discriminator to obtain an abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the discriminator is trained based on noise samples and normal samples, the noise samples are samples with similar feature distribution generated based on the normal samples, and the abnormal object detection result is determined based on the similarity between the object to be identified and the normal samples.
[0010] Optionally, in some possible implementations of the present application, performing vector representation based on the behavior sequence data to obtain an object feature vector corresponding to the object to be identified includes:
[0011] Extracting data from the behavior sequence data based on a preset behavior to determine an object behavior sequence, wherein the preset behavior is set based on a characteristic behavior included in the interaction scenario;
[0012] Inputting the object behavior sequence into a target encoder to obtain a behavior sequence vector;
[0013] Obtaining an associated feature vector corresponding to the object to be identified, wherein the associated feature vector is determined based on an image feature, a position feature or a text feature of the object;
[0014] The associated feature vector is concatenated with the behavior sequence vector to obtain an object feature vector corresponding to the object to be identified.
[0015] Optionally, in some possible implementations of the present application, the method further includes:
[0016] Obtain training behavior sequence;
[0017] Inputting the training behavior sequence into an initial encoder to obtain hidden state information of the training behavior sequence;
[0018] Inputting the hidden state information into a decoder to reconstruct the training behavior sequence;
[0019] Determining corresponding loss information during the reconstruction of the training behavior sequence;
[0020] The initial encoder is trained based on the loss information to obtain the target encoder.
[0021] Optionally, in some possible implementations of the present application, the acquiring of the training behavior sequence includes:
[0022] Determine the parameter update cycle based on the exception handling information in the live broadcast scenario;
[0023] The training behavior sequence is acquired according to the parameter update cycle.
[0024] Optionally, in some possible implementations of the present application, the method further includes:
[0025] Acquire a normal sample in the interaction scene;
[0026] Determining characteristic distribution information of the normal sample;
[0027] configuring sample distribution information corresponding to the generator based on the abnormal probability indicated in the feature distribution information;
[0028] Configure a generator function according to the distance between the sample distribution information and the feature distribution information;
[0029] Performing loss calculation based on the generator function to train the generator;
[0030] Generate noise samples based on the trained generator;
[0031] The noise sample is input into a discriminator so that the discriminator distinguishes the normal sample from the noise sample, and updates the parameters of the discriminator.
[0032] Optionally, in some possible implementations of the present application, inputting the noise sample into a discriminator so that the discriminator distinguishes the normal sample from the noise sample, and updating the parameters of the discriminator includes:
[0033] Inputting the noise sample into the middle layer of the discriminator to obtain noise abstract information;
[0034] Acquire normal abstract information extracted by the intermediate layer according to the normal sample;
[0035] The noise abstract information and the normal abstract information are distinguished based on the discriminator, and the parameters of the discriminator are updated.
[0036] Optionally, in some possible implementations of the present application, the method for detecting abnormal objects is applied to a blockchain device, and the blockchain device is a node in a blockchain.
[0037] A second aspect of the present application provides a detection device for abnormal objects, comprising: an acquisition unit, configured to acquire behavior sequence data of an object to be identified in an interactive scene;
[0038] A determination unit, configured to perform vector representation based on the behavior sequence data to obtain an object feature vector corresponding to the object to be identified;
[0039] A detection unit is used to input the feature vector into a discriminator to obtain an abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the discriminator is trained based on noise samples and normal samples, the noise samples are samples with similar feature distribution generated based on the normal samples, and the abnormal object detection result is determined based on the similarity between the object to be identified and the normal samples.
[0040] Optionally, in some possible implementations of the present application, the determining unit is specifically configured to extract data from the behavior sequence data based on a preset behavior to determine the object behavior sequence, wherein the preset behavior is set based on a characteristic behavior included in the interaction scenario;
[0041] The determining unit is specifically configured to input the object behavior sequence into a target encoder to obtain a behavior sequence vector;
[0042] The determination unit is specifically used to obtain an associated feature vector corresponding to the object to be identified, wherein the associated feature vector is determined based on an object portrait feature, a position feature or a text feature;
[0043] The determining unit is specifically configured to concatenate the associated feature vector with the behavior sequence vector to obtain an object feature vector corresponding to the object to be identified.
[0044] Optionally, in some possible implementations of the present application, the determining unit is specifically used to obtain a training behavior sequence;
[0045] The determining unit is specifically configured to input the training behavior sequence into an initial encoder to obtain hidden state information of the training behavior sequence;
[0046] The determining unit is specifically configured to input the hidden state information into a decoder to reconstruct the training behavior sequence;
[0047] The determining unit is specifically used to determine the corresponding loss information in the process of reconstructing the training behavior sequence;
[0048] The determining unit is specifically configured to train the initial encoder based on the loss information to obtain the target encoder.
[0049] Optionally, in some possible implementations of the present application, the determining unit is specifically configured to determine a parameter update cycle based on exception handling information in a live broadcast scenario;
[0050] The determining unit is specifically configured to obtain the training behavior sequence according to the parameter updating cycle.
[0051] Optionally, in some possible implementations of the present application, the discriminator is a discriminator in a generative adversarial network, the generative adversarial network includes the discriminator and a generator, the generator is used to generate noise samples with similar feature distribution based on normal samples in the interaction scene, and the detection unit is specifically used to obtain normal samples in the interaction scene;
[0052] The detection unit is specifically used to determine the characteristic distribution information of the normal sample;
[0053] The detection unit is specifically configured to configure the sample distribution information corresponding to the generator based on the abnormal probability indicated in the feature distribution information;
[0054] The detection unit is specifically used to configure a generator function according to the distance between the sample distribution information and the feature distribution information;
[0055] The detection unit is specifically used to perform loss calculation based on the generator function to train the generator;
[0056] The detection unit is specifically configured to generate a noise sample based on the trained generator;
[0057] The detection unit is specifically configured to input the noise sample into a discriminator, so that the discriminator distinguishes the normal sample from the noise sample, and updates the parameters of the discriminator.
[0058] Optionally, in some possible implementations of the present application, the detection unit is specifically configured to input the noise sample into an intermediate layer of the discriminator to obtain noise abstract information;
[0059] The detection unit is specifically used to obtain the normal abstract information extracted by the intermediate layer according to the normal sample;
[0060] The detection unit is specifically configured to distinguish the noise abstract information from the normal abstract information based on the discriminator, and update the parameters of the discriminator.
[0061] The third aspect of the present application provides a computer device, including: a memory, a processor and a bus system; the memory is used to store program code; the processor is used to execute the abnormal object detection method described in the first aspect or any one of the first aspects according to the instructions in the program code.
[0062] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method for detecting abnormal objects described in the first aspect or any one of the first aspects.
[0063] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the abnormal object detection method provided in the first aspect or various optional implementations of the first aspect.
[0064] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0065] By obtaining the behavior sequence data of the object to be identified in the interactive scene, and performing vector representation based on the behavior sequence data, to obtain the object feature vector corresponding to the object to be identified, and then inputting the feature vector into the discriminator, to obtain the abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the discriminator is trained based on noise samples and normal samples, the noise samples are samples with similar feature distributions generated based on normal samples, and the abnormal object detection result is determined based on the similarity between the object to be identified and the normal sample. Thus, the object recognition process of the unsupervised algorithm is realized, because the discriminator is trained based on noise samples similar to normal samples, and the detection result is determined based on the similarity between the object to be identified and the normal sample, which reduces the annotation cost and improves the detection efficiency of abnormal objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0067] Figure 1 A diagram of the network architecture that operates the abnormal object detection system;
[0068] Figure 2 A flow chart of abnormal object detection provided in an embodiment of the present application;
[0069] Figure 3 A flowchart of a method for detecting abnormal objects provided in an embodiment of the present application;
[0070] Figure 4 A schematic diagram of a scenario of a method for detecting abnormal objects provided in an embodiment of the present application;
[0071] Figure 5 A schematic diagram of another abnormal object detection method provided in an embodiment of the present application;
[0072] Figure 6 A schematic diagram of another abnormal object detection method provided in an embodiment of the present application;
[0073] Figure 7 A schematic diagram of another abnormal object detection method provided in an embodiment of the present application;
[0074] Figure 8 A schematic diagram of another abnormal object detection method provided in an embodiment of the present application;
[0075] Fig. 9A schematic diagram of the structure of a detection device for abnormal objects provided in an embodiment of the present application;
[0076] Fig.10 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0077] Fig.11 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0078] Fig. 12A A data sharing system provided in an embodiment of the present application;
[0079] Fig. 12B A block composition of a blockchain provided in an embodiment of the present application;
[0080] Fig. 12C Input information of a blockchain node provided in an embodiment of the present application. DETAILED DESCRIPTION
[0081] The embodiment of the present application provides a detection method and related device for abnormal objects, which can be applied to a system or program in a terminal device that includes a detection function for abnormal objects, by obtaining the behavior sequence data of the object to be identified in the interactive scene; and performing vector representation based on the behavior sequence data to obtain the object feature vector corresponding to the object to be identified; and then inputting the feature vector into a discriminator to obtain the abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the discriminator is trained based on noise samples and normal samples, the noise samples are samples with similar feature distributions generated based on normal samples, and the abnormal object detection result is determined based on the similarity between the object to be identified and the normal sample. Thus, the object recognition process of the unsupervised algorithm is realized, because the discriminator is trained based on noise samples similar to normal samples, and the detection result is determined based on the similarity between the object to be identified and the normal sample, which reduces the annotation cost and improves the detection efficiency of abnormal objects.
[0082] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0083] First, some terms that may appear in the embodiments of the present application are explained.
[0084] Generative Adversarial Networks (GAN): A generative adversarial network is a network structure consisting of a generator and a discriminator, in which the generator generates data through a machine in order to "fool" the discriminator; the discriminator is used to determine whether the image is real or machine-generated, in order to find out the "fake data" made by the generator.
[0085] Location Based Service (LBS): By determining the geographic location of a mobile device or user, information about various location-related service systems is determined.
[0086] It should be understood that the abnormal object detection method provided in the present application can be applied to a system or program in a terminal device that includes an abnormal object detection function, such as a live broadcast application. Specifically, the abnormal object detection system can be run on Figure 1 In the network architecture shown in Figure 1 As shown in FIG. 1 , it is a network architecture diagram of the abnormal object detection system. As can be seen from the figure, the abnormal object detection system can provide a detection process of abnormal objects with multiple information sources, that is, the interactive operation of the terminal side during the live broadcast process triggers the server to identify the characteristics of the corresponding user; it can be understood that Figure 1 A variety of terminal devices are shown in FIG. 1 . The terminal devices may be computer devices. In actual scenarios, more or fewer types of terminal devices may participate in the process of detecting abnormal objects. The specific number and type depend on the actual scenario and are not limited here. In addition, Figure 1 One server is shown in the figure, but in an actual scenario, multiple servers may be involved, and the specific number of servers depends on the actual scenario.
[0087] In this embodiment, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop, a desktop computer, an intelligent voice interaction device, a smart home appliance, a car terminal, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and the terminal and the server can be connected to form a blockchain network, which is not limited in this application. Specifically, the embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.
[0088] It can be understood that the above-mentioned abnormal object detection system can run on a personal mobile terminal, for example, as an application such as a live broadcast application, it can also run on a server, and it can also run on a third-party device to provide abnormal object detection to obtain the detection and processing results of abnormal objects in the information source; the specific abnormal object detection system can be run in the above-mentioned device in the form of a program, it can also be run as a system component in the above-mentioned device, and it can also be used as a cloud service program. The specific operation mode depends on the actual scenario and is not limited here.
[0089] Online social and entertainment platforms are developing rapidly. Live streaming is an emerging industry born with the development of Internet technology. However, there are abnormal objects in live streaming, such as online water army, zombie fans, witch nodes, etc. These abnormal objects create false popularity and spread false information for illegal interests, which seriously disrupts the normal order of the live streaming platform and affects the user experience. How to detect these abnormal users is very important for purifying the cyberspace.
[0090] Generally, abnormal object detection can be modeled by extracting object features, that is, by marking abnormal objects and then collecting their corresponding features for model training, thereby identifying the objects.
[0091] However, in live broadcast scenarios, the number of users is huge and the features are dynamic. The workload of extracting abnormal objects from them is large, which affects the efficiency of abnormal object detection. In addition, the features of abnormal accounts change dynamically, and manual data annotation needs to be carried out continuously. Moreover, the feature extraction process is mostly unable to capture the sequence information of the object's behavior, and it is impossible to dynamically adjust the model and make predictions based on the changes in the object's behavior, while the behavior of abnormal users is varied. Moreover, the effect of feature construction has a great impact on the model's prediction performance, and it is necessary to rely on expert experience to capture the features that best reflect the characteristics of the data.
[0092] The abnormal object detection in this embodiment uses artificial intelligence technology. Artificial Intelligence (AI) 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 knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.
[0093] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0094] In order to solve the above problems, this application proposes a method for detecting abnormal objects. Figure 2 In the process framework of abnormal object detection shown in Figure 2 As shown, it is a flow architecture diagram of abnormal object detection provided by an embodiment of the present application. Through the live interactive operation on the terminal side, the user enables the server to collect the user's behavior sequence data, and then extract the object behavior sequence to obtain a high-order vector representation, and combine it with other information such as the user's basic portrait to obtain a user's feature vector. And use the generative adversarial network technology to train a discriminator to distinguish normal users from abnormal users. The behavior sequence of normal users is used as input in training to solve the problems of the current technical solution that relies on a large number of abnormal user samples, cannot be modeled end-to-end, and cannot capture sequence data.
[0095] In this embodiment, only normal users are used as samples for training. By combining a sequence-to-sequence model with a generative adversarial network (GAN), an end-to-end training and prediction method is performed on the input sequence data. This solves the problems of current technical solutions, such as reliance on a large number of abnormal user samples, inability to model end-to-end (an end-to-end model is to use a single model to model and solve a task that can be solved by multiple steps / modules), and inability to capture sequence data.
[0096] It is understandable that the method provided by the present application can be written as a program to serve as a processing logic in a hardware system, or as a detection device for abnormal objects, and the above processing logic is implemented in an integrated or external manner. As an implementation method, the detection device for abnormal objects obtains the behavior sequence data of the object to be identified in the interactive scene; and performs vector representation based on the behavior sequence data to obtain the object feature vector corresponding to the object to be identified; and then inputs the feature vector into the discriminator to obtain the abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the discriminator is trained based on noise samples and normal samples, and the noise samples are samples with similar feature distributions generated based on normal samples, and the abnormal object detection result is determined based on the similarity between the object to be identified and the normal sample. Thus, the object recognition process of the unsupervised algorithm is realized. Since the discriminator is trained based on noise samples similar to normal samples, and the detection result is determined based on the similarity between the object to be identified and the normal sample, the annotation cost is reduced and the detection efficiency of abnormal objects is improved.
[0097] The solution provided in the embodiments of the present application involves the deep learning technology of artificial intelligence, which is specifically described by the following embodiments:
[0098] Combined with the above process architecture, the following will introduce the detection method of abnormal objects in this application. Please refer to Figure 3 , Figure 3 A flowchart of a method for detecting abnormal objects provided in an embodiment of the present application. The management method can be executed by a terminal or a server. The embodiment of the present application at least includes the following steps:
[0099] 301. Obtain behavior sequence data of an object to be identified in an interactive scene.
[0100] In this embodiment, the interaction scenario can be a live broadcast scenario, and can also be applied to other scenarios such as abnormal user detection in video websites and short video apps. The following embodiment uses the live broadcast process of the live broadcast platform as an example for explanation, and is not limited to this. Figure 4 As shown, Figure 4A scenario diagram of a method for detecting abnormal objects provided for an embodiment of the present application is shown in the figure, which shows a mobile phone page of a live broadcast platform. Users can watch the host's real-time broadcast content on the live broadcast page and perform interactive behaviors at the same time, which are behavioral sequence data. Interactive behaviors include sending barrage comments, giving gifts, following the host, interacting with other fans, participating in lotteries, and so on. Abnormal users are mixed in, such as Spam accounts that send advertisements and pornographic barrages, and zombie accounts created by the host to increase popularity. In this application scenario, the user's behavior will be recorded and reported by the background. This embodiment uses the user's behavior data and other information that the platform can obtain to predict abnormal users and impose measures such as muteness and banning to purify the network environment of the live broadcast platform and improve the user experience.
[0101] It is understandable that the object to be identified may be a user, an account corresponding to the user, or a terminal for watching a live broadcast. The following description will take a user as an example without limitation.
[0102] 302. Perform vector representation based on the behavior sequence data to obtain an object feature vector corresponding to the object to be identified.
[0103] In this embodiment, the process of vectorizing the behavior sequence data is a process of high-dimensional representation of data with a time series relationship. Figure 5 The model scenario shown, Figure 5 A schematic diagram of another abnormal object detection method provided in an embodiment of the present application, that is, extracting a user vector representation (object feature vector) through a user vector extraction module, and training a generative adversarial network to distinguish between real normal samples and samples generated by a generator. The trained discriminator can be put into the production environment as a reasoning model to distinguish normal users from abnormal users.
[0104] Specifically, the representation of the object feature vector can be obtained by splicing the behavior sequence data with related data such as the object portrait, that is, firstly extracting data from the behavior sequence data based on the preset behavior to determine the object behavior sequence, and the preset behavior is set based on the characteristic behavior contained in the live broadcast scene, such as recharge, withdrawal, purchase of gifts, gift giving, attention, barrage sending, participation in interactive activities, advertisement clicks, blacklisting, deletion, complaint, etc.; then the object behavior sequence is input into the target encoder to obtain the behavior sequence vector; further obtain the related feature vector corresponding to the object to be identified, the related feature vector is determined based on the object portrait feature, location feature or text feature, wherein the object portrait feature vector includes real-name authentication status, card binding status, basic information status, blacklisting status, etc., the LBS feature vector includes multi-device login, login location, etc., and the text vector Embedding includes text word embedding processing of user barrage or comments, etc.; then the related feature vector is spliced with the behavior sequence vector to obtain the object feature vector corresponding to the object to be identified, thereby improving the accuracy of the vector representation.
[0105] It should be noted that the object portrait in this embodiment can be a carrier for indicating user, terminal or other object data, and the specific object form depends on the actual scenario.
[0106] It can be understood that the target encoder used for vector representation can be trained based on training data, that is, the embedding extraction module of the user vector representation is mainly composed of an encoder and a decoder, where the encoder is responsible for encoding the object behavior sequence into a vector representation of a latent space. The specific training process is to first obtain the training behavior sequence; then input the training behavior sequence into the initial encoder to obtain the hidden state information of the training behavior sequence; then input the hidden state information into the decoder to reconstruct the training behavior sequence; and determine the corresponding loss information in the process of reconstructing the training behavior sequence; thereby training the initial encoder based on the loss information to obtain the target encoder.
[0107] Specifically, for the training framework of encoder and decoder, such as Figure 6 As shown, Figure 6A scenario diagram of another abnormal object detection method provided in an embodiment of the present application, showing that the user vector representation of the model input is mainly composed of the user's behavior vector Embedding at a certain moment, the object portrait feature vector, the LBS feature vector, the text vector Embedding, etc. Its behaviors include recharging, withdrawing, buying gifts, giving gifts, following, sending bullet screens, participating in interactive activities, clicking on advertisements, blacklisting, deleting, complaining, etc. The object portrait feature vector includes real-name authentication, card binding, basic information, blacklisting, etc. The LBS feature vector includes multi-device login, login location, etc. The text vector Embedding includes text word embedding processing of user bullet screens or comments, etc. The preprocessing step includes bucketing discretization of non-discrete continuous features, and encoding categorical features using One Hot Encoding and other methods. The user's behavior sequence vector over a period of time can be expressed as S=(x1, x2,..., x t ).
[0108] In this embodiment, the encoder is responsible for encoding the object behavior sequence into a vector representation of a latent space. The encoder is mainly composed of an LSTM (Long short-term memory) model:
[0109]
[0110]
[0111]
[0112] Among them, x t Represents the user's behavior sequence vector at time t. The input of the LSTM model at each moment is the output of the previous moment and the behavior sequence vector at that moment. The output of LSTM at each moment is expressed as Also called hidden state. The hidden layer dimension used in this embodiment is 200, and the specific dimension depends on the actual scenario.
[0113] After the encoder is processed, the last hidden state The (hidden state information) output contains the information of the entire input user sequence S, which can also be regarded as an abstract processing of the user sequence, mapping it into a hidden space, capturing the connection between different behaviors and information in high-dimensional space. As the input of the decoder, it is used to reconstruct the user input information. The output of the decoder is Then it passes through a forward neural network and is restored to the space of the input sequence. In addition, the training goal of the encoder is to restore the information of the input sequence S as much as possible, and the loss function can be defined as:
[0114]
[0115] The encoder output hidden state obtained after training is That is the behavior vector embedding. The object portrait feature vector, LBS feature vector, text vector embedding, etc. are preprocessed and concatenated with the behavior vector embedding as the user's feature vector representation for training in subsequent steps.
[0116] In one possible scenario, the user vector representation module (encoder-decoder structure) uses offline calculation to perform real-time parameter updates. That is, first determine the parameter update cycle based on the exception handling information in the live broadcast scenario; then obtain the training behavior sequence according to the parameter update cycle. For example, the parameter update cycle is calculated and updated in units of days, thereby improving the accuracy of the user vector representation.
[0117] 303. Input the feature vector into the discriminator to obtain an abnormal object detection result corresponding to the object to be identified based on the discriminator.
[0118] In this embodiment, the discriminator is used to extract features from input data to obtain discriminant information, such as classification, detection, etc. Specifically, the discriminator can be a discriminator in a generative adversarial network, or other models using a discriminator. The specific model form depends on the actual scenario. This embodiment takes a generative adversarial network as an example for explanation.
[0119] In one possible scenario, the generative adversarial network includes a discriminator and a generator, wherein the generator is used to generate noise samples with similar feature distribution based on normal samples in the live broadcast scene, and the discriminator is trained based on the noise samples and the normal samples; that is, this embodiment only uses normal users as samples for training, and combines a sequence-to-sequence model (encoder-decoder) with a generative adversarial network to perform end-to-end training and prediction on the input sequence data, thereby solving the problems of the current technical solution that rely on a large number of abnormal user samples, cannot be end-to-end modeled, and cannot capture sequence data.
[0120] Specifically, the determination of the abnormal object detection result can be based on the similarity between the object to be identified and the normal sample, that is, the similarity between the object feature vector corresponding to the object to be identified and the object feature vector corresponding to the normal sample output by the discriminator is less than the similarity threshold, then it can be regarded as an abnormal object, thereby achieving the process of abnormal object identification without abnormal object labeling.
[0121] Optionally, after the abnormal probability is calculated by the model, users with high abnormal probability can be further ranked and manually reviewed to confirm whether their behavior violates community regulations or laws.
[0122] The following is an explanation of the training process of the Generative Adversarial Network. The idea of the Generative Adversarial Network comes from the Nash equilibrium of game theory. Like the two parties involved in the game, GAN contains a generator and a discriminator, which are usually composed of a forward neural network. The purpose of the conventional generator is to learn the distribution of real data, while the purpose of the discriminator is to correctly determine whether the input data comes from the generator or from real data. During the training optimization process, the discriminator and the generator constantly compete and try to find the Nash equilibrium between the two.
[0123] However, the training goal of the generator in this embodiment is different from the conventional one. GAN is often used to generate data samples that are consistent with the distribution of real data, such as solving the problem of insufficient labeled data, generating dialogues, etc. In anomaly detection, the generator is often trained to learn the distribution of abnormal samples, which can solve the problem of insufficient abnormal sample data, but the disadvantage is that when there are fewer abnormal samples, their distribution is quite different from the online scenario. The training of the model in this embodiment only uses the data of normal users as samples. The generator does not directly learn the distribution of real samples, but learns a distribution that is close to the distribution of real samples, but does not overlap with the distribution of real samples, and falls in the vicinity of the distribution of real samples. The samples generated by the generator are in the low-density space of real samples, that is, the space with sparse features.
[0124] Specifically, the training process of the generative adversarial network is to first obtain normal samples in the interaction scene; then determine the feature distribution information of the normal samples; and configure the sample distribution information corresponding to the generator based on the abnormal probability indicated in the feature distribution information; thereby configuring the generator function according to the distance between the sample distribution information and the feature distribution information; then calculate the loss based on the generator function to train the generator; that is, define the vector generated by the generator as z, and its distribution as p gen (z), the distribution of the real sample vector is p real (z). When the abnormal probability of the sample vector p real When (z) is less than a certain threshold, p gen (z) is defined as a very small constant C; when the abnormal probability p of the sample vector real When (z) is greater than a certain threshold, p gen (z) is defined as p real The inverse of (z), as p real (z) gradually decreases as it increases. The objective function is expressed as the distance between the two distributions, which is implemented using the KL divergence (Kullback-Leibler Divergence). gen ) Cosine distance can also be used in applications.
[0125]
[0126]
[0127] Among them, p real (z) is the feature distribution information, p gen (z) is the sample distribution information.
[0128] The training of the discriminator is based on the noise samples generated by the trained generator; then the noise samples are input into the discriminator so that the discriminator can distinguish between normal samples and noise samples, and update the parameters of the discriminator. Specifically, the input of the discriminator is the vector z generated by the generator and the vector v of the normal user. The discriminator in this embodiment is composed of a forward neural network. The goal of the discriminator training is to distinguish the vector generated by the generator from the real vector representation. The training of the discriminator is to minimize a cross entropy. The loss function of the discriminator is:
[0129]
[0130] Among them, z is the vector representation generated by the generator, and v is the vector representation of a normal user.
[0131] In one possible scenario, the above training process for the generative adversarial network can be performed through the following pseudo code.
[0132] Input: training set Model hyperparameters, LSTM-Autoencoder training epoch M1, GAN training epoch M2
[0133] Output: F trained encoder Encoder(x) and discriminator Discriminator(x)
[0134] Initialize model parameters
[0135] For i=1to M1do:
[0136] For user S=(x1,x2,……,x t ) in training set D:
[0137] Input to the LSTM-Autoencoder model
[0138]
[0139]
[0140]
[0141] Using loss function LossLSTM-Autoencoder
[0142] Gradient descent updates parameters
[0143] End for
[0144] End for
[0145] For user S=(x1,x2,……,x t )in training set D:
[0146] Use the trained encoder to calculate the user vector representation v
[0147] End for
[0148] End for
[0149] For user S=(x1,x2,……,x t )in training set D:
[0150] Use the trained encoder to calculate the user vector representation v
[0151] End for
[0152] For j=1to M2do:
[0153] For user v in the training set, the vector representation of the user is V = (v1, v2, ..., v t ):
[0154]
[0155]
[0156] Gradient descent updates the discriminator and generator parameters
[0157] End for
[0158] End for
[0159] It is understandable that in the above training process, the user vector representation extraction module and the generative adversarial network module need to be trained separately. The user's behavior data is reported through the background and stored in the database. Only the object behavior of the specified behavior is retained as training data. The relevant behavior vector features include but are not limited to recharge, withdrawal, purchase of gifts, gift giving, attention, barrage sending, participation in interactive activities, ad clicks, blacklisting, deletion, complaints, etc. The non-discrete continuous features are discretized by bucketing, and the categorical features are encoded using methods such as One Hot Encoding. The encoding result Embedding is spliced with object portrait features and LBS features. The object behavior sequence with a sequence length of 10 to 100 is retained, and the short sequence is padded to 100. The window sliding of the overly long object behavior sequence generates multiple samples. The user vector representation module adopts an offline calculation method to calculate and update the model in units of days. For the LSTM-Autoencoder model in the user vector representation extraction module, its hidden layer dimension is 200, the training epoch is 50, and the final output user vector representation embedding is 200 dimensions.
[0160] It should be noted that the Autoencoder-LSTM structure is used in this embodiment, and the forward neural network is used in the generative adversarial network, and the forward network adopts a two-layer multi-layer perceptron structure. However, the present invention does not specifically limit the model type and topological structure of the deep neural network, and can be replaced by various other effective new model structures, for example, a model combining CNN and other network structures, or other network structures, such as the number of hidden layers in the network, the dimension of the hidden layer, etc., can be adjusted according to specific data and scenarios. In addition, the topological structure of the deep neural network and the forward network can be expanded or simplified according to the actual application restrictions on the model memory usage and the requirements for detection accuracy.
[0161] In one possible scenario, the structure of the generative adversarial network is as follows Figure 7 , Figure 7 A schematic diagram of another abnormal object detection method provided in an embodiment of the present application. In the generative adversarial network module in the figure, both the generator and the discriminator have two hidden layers. The generator uses 50-dimensional random noise as input and uses a random uniform distribution to generate random noise between -1 and 1. The hidden layer dimensions of the generator are 100 and 200 dimensions, respectively, and the final output is a 200-dimensional generated sample vector representing the embedding. The hidden layer dimensions of the discriminator are 200 and 100 dimensions, and the output layer is a softmax function; wherein, the training epoch is 50, and the optimizer used in the training is the ADAM optimizer.
[0162] In one possible scenario, in order to solve the mode collapse problem that occurs in actual training and improve the stability of training, feature matching can also be introduced. Where f represents the output of the middle layer of the discriminator. That is, first input the noise sample into the middle layer of the discriminator to obtain the noise abstract information; then obtain the normal abstract information extracted by the middle layer based on the normal sample; and distinguish the noise abstract information from the normal abstract information based on the discriminator, and update the parameters of the discriminator. Specifically, the abstract features extracted by f from the samples generated by the generator and the abstract features extracted by f in the real samples are in the same space, thereby ensuring the correlation of features in different spaces and improving the stability of training.
[0163] In addition, this embodiment may also use training techniques such as minibatch discrimination, which is not limited here.
[0164] In combination with the above embodiments, it can be known that by obtaining the behavior sequence data of the object to be identified in the interactive scene; and performing vector representation based on the behavior sequence data to obtain the object feature vector corresponding to the object to be identified; and then inputting the feature vector into the discriminator to obtain the abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the discriminator is trained based on noise samples and normal samples, the noise samples are samples with similar feature distributions generated based on normal samples, and the abnormal object detection result is determined based on the similarity between the object to be identified and the normal sample. Thus, the object recognition process of the unsupervised algorithm is realized, because the discriminator is trained based on noise samples similar to normal samples, and the detection result is determined based on the similarity between the object to be identified and the normal sample, which reduces the annotation cost and improves the detection efficiency of abnormal objects.
[0165] The following describes the abnormal object identification process of this embodiment in conjunction with the live broadcast scenario. Figure 8 , Figure 8 A schematic diagram of another abnormal object detection method provided in an embodiment of the present application shows that the object behavior sequence is first obtained and other features such as other user portrait features are pulled, and the data is preprocessed and spliced into training samples. The training sample is used as the input of the encoder in the user vector representation extraction module to calculate the user's vector representation. Then the user's feature vector representation is used as the input of the discriminator in the generative adversarial network to predict the user's abnormal probability.
[0166] This embodiment takes into account the weak social connection of users in the live broadcast platform and focuses on using the object behavior sequence and portrait information. In addition, this embodiment adopts an unsupervised algorithm to reduce the cost of annotation, and uses the sequence information of the object behavior in this embodiment as the model input, and can iterate the model according to the object behavior; in addition, this embodiment adopts an end-to-end deep learning solution, that is, a task that can be solved by multiple steps / modules is solved by a single model ( Figure 5 The encoder + discriminator architecture is used to model the problem and improve efficiency and accuracy.
[0167] In order to better implement the above solution of the embodiment of the present application, the following also provides related devices for implementing the above solution. Fig. 9 , Fig. 9 The schematic diagram of the structure of an abnormal object detection device provided in an embodiment of the present application is as follows. The abnormal object detection device 900 includes:
[0168] An acquisition unit 901 is used to acquire behavior sequence data of an object to be identified in an interactive scene;
[0169] A determination unit 902 is used to perform vector representation based on the behavior sequence data to obtain an object feature vector corresponding to the object to be identified;
[0170] The detection unit 903 is used to input the feature vector into a discriminator to obtain an abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the discriminator is trained based on noise samples and normal samples, the noise samples are samples with similar feature distribution generated based on the normal samples, and the abnormal object detection result is determined based on the similarity between the object feature vector corresponding to the object to be identified and the object feature vector corresponding to the normal sample.
[0171] Optionally, in some possible implementations of the present application, the determining unit 902 is specifically configured to extract data from the behavior sequence data based on a preset behavior to determine an object behavior sequence, wherein the preset behavior is set based on a characteristic behavior included in the interaction scenario;
[0172] The determining unit 902 is specifically configured to input the object behavior sequence into a target encoder to obtain a behavior sequence vector;
[0173] The determining unit 902 is specifically configured to obtain an associated feature vector corresponding to the object to be identified, wherein the associated feature vector is determined based on an object portrait feature, a position feature, or a text feature;
[0174] The determining unit 902 is specifically configured to concatenate the associated feature vector with the behavior sequence vector to obtain an object feature vector corresponding to the object to be identified.
[0175] Optionally, in some possible implementations of the present application, the determining unit 902 is specifically used to obtain a training behavior sequence;
[0176] The determining unit 902 is specifically configured to input the training behavior sequence into an initial encoder to obtain hidden state information of the training behavior sequence;
[0177] The determining unit 902 is specifically configured to input the hidden state information into a decoder to reconstruct the training behavior sequence;
[0178] The determining unit 902 is specifically configured to determine the corresponding loss information during the process of reconstructing the training behavior sequence;
[0179] The determining unit 902 is specifically configured to train the initial encoder based on the loss information to obtain the target encoder.
[0180] Optionally, in some possible implementations of the present application, the determining unit 902 is specifically configured to determine a parameter update cycle based on the exception handling information in the interaction scenario;
[0181] The determining unit 902 is specifically configured to obtain the training behavior sequence according to the parameter updating period.
[0182] Optionally, in some possible implementations of the present application, the detection unit 903 is specifically used to obtain a normal sample in the interaction scene;
[0183] The detection unit 903 is specifically used to determine the characteristic distribution information of the normal sample;
[0184] The detection unit 903 is specifically configured to configure the sample distribution information corresponding to the generator based on the abnormal probability indicated in the feature distribution information;
[0185] The detection unit 903 is specifically configured to configure a generator function according to the distance between the sample distribution information and the feature distribution information;
[0186] The detection unit 903 is specifically used to perform loss calculation based on the generator function to train the generator;
[0187] The detection unit 903 is specifically configured to generate a noise sample based on the trained generator;
[0188] The detection unit 903 is specifically configured to input the noise sample into a discriminator, so that the discriminator distinguishes the normal sample from the noise sample, and updates the parameters of the discriminator.
[0189] Optionally, in some possible implementations of the present application, the detection unit 903 is specifically configured to input the noise sample into an intermediate layer of the discriminator to obtain noise abstract information;
[0190] The detection unit 903 is specifically used to obtain the normal abstract information extracted by the intermediate layer according to the normal sample;
[0191] The detection unit 903 is specifically configured to distinguish the noise abstract information from the normal abstract information based on the discriminator, and update the parameters of the discriminator.
[0192] By obtaining the behavior sequence data of the object to be identified in the interactive scene; then performing vector representation based on the behavior sequence data to obtain the object feature vector corresponding to the object to be identified; and then inputting the feature vector into the discriminator in the generative adversarial network to obtain the abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the generative adversarial network includes a discriminator and a generator, the generator is used to generate noise samples with similar feature distribution based on normal samples in the live broadcast scene, the discriminator is trained based on noise samples and normal samples, and the abnormal object detection result is determined based on the similarity between the object to be identified and the normal sample. Thus, the object recognition process of the unsupervised algorithm is realized. Since the discriminator is trained based on noise samples similar to normal samples, and the detection result is determined based on the similarity between the object to be identified and the normal sample, the process does not need to mark abnormal samples, which reduces the labeling cost and improves the detection efficiency of abnormal objects.
[0193] The present application also provides a terminal device, such as Fig.10 The figure is a schematic diagram of the structure of another terminal device provided by the embodiment of the present application. For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The terminal can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), a car computer, etc., taking the mobile phone as an example:
[0194] Fig.10 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. Fig.10The mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090. Those skilled in the art will appreciate that Fig.10 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0195] Combine the following Fig.10 A detailed introduction to the various components of the mobile phone:
[0196] The RF circuit 1010 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 1080 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 1010 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 1010 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to the global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.
[0197] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 1020 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0198] The input unit 1030 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1031 or near the touch panel 1031 using any suitable object or accessory such as a finger, stylus, etc., and the air touch operation within a certain range on the touch panel 1031), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1031, the input unit 1030 can also include other input devices 1032. Specifically, the other input devices 1032 can include but are not limited to one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc.
[0199] The display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Optionally, the display panel 1041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of touch event. Although in Fig.10 In the embodiment, the touch panel 1031 and the display panel 1041 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.
[0200] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1041 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0201] The audio circuit 1060, the speaker 1061, and the microphone 1062 can provide an audio interface between the user and the mobile phone. The audio circuit 1060 can transmit the received audio data to the speaker 1061 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, and then the audio data is output to the processor 1080 for processing, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for further processing.
[0202] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access. Fig.10 A WiFi module 1070 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0203] The processor 1080 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1020 and calling data stored in the memory 1020. Optionally, the processor 1080 may include one or more processing units; optionally, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1080.
[0204] The mobile phone also includes a power supply 1090 (such as a battery) for supplying power to various components. Optionally, the power supply can be logically connected to the processor 1080 through a power management system, thereby managing functions such as charging, discharging, and power consumption management through the power management system.
[0205] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0206] In the embodiment of the present application, the processor 1080 included in the terminal also has the function of executing each step of the above-mentioned page processing method.
[0207] The present application also provides a server. Fig.11 , Fig.111 is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1100 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1122 (for example, one or more processors) and memory 1132, and one or more storage media 1130 (for example, one or more mass storage devices) storing application programs 1142 or data 1144. Among them, the memory 1132 and the storage medium 1130 can be short-term storage or permanent storage. The program stored in the storage medium 1130 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1122 can be configured to communicate with the storage medium 1130 to execute a series of instruction operations in the storage medium 1130 on the server 1100.
[0208] The server 1100 may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1158, and / or one or more operating systems 1141, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0209] The steps performed by the management device in the above embodiment can be based on the Fig.11 The server structure shown.
[0210] In an embodiment of the present application, a computer-readable storage medium is also provided. The computer-readable storage medium stores an abnormal object detection instruction. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned Figures 3 to 8 The illustrated embodiment describes the steps performed by the abnormal object detection device in the method.
[0211] The present application also provides a computer program product including an abnormal object detection instruction, which, when executed on a computer, enables the computer to execute the above Figures 3 to 8 The illustrated embodiment describes the steps performed by the abnormal object detection device in the method.
[0212] The embodiment of the present application also provides a detection system for abnormal objects, and the detection system for abnormal objects may include: Fig. 9 The abnormal object detection device in the described embodiment, or Fig.10 The terminal device in the described embodiment, or Fig.11 The server being described.
[0213] In a possible scenario, the method of network resource management in the present application is applied to a blockchain device, that is, the authoritative DNS, LDNS or terminal is a blockchain device, and the blockchain device is a node in the blockchain, which is described below in conjunction with the accompanying drawings; see Fig. 12A The data sharing system shown, the data sharing system 1200 refers to a system for sharing data between nodes, and the data sharing system may include multiple nodes 1201, and the multiple nodes 1201 may refer to each client in the data sharing system. Each node 1201 can receive input information when performing normal work, and maintain the shared data in the data sharing system based on the received input information. In order to ensure the information intercommunication within the data sharing system, there may be an information connection between each node in the data sharing system, and information can be transmitted between nodes through the above information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.
[0214] Each node in the data sharing system has a corresponding node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so that the generated blocks can be broadcast to other nodes in the data sharing system according to the node identifiers of other nodes. A node identifier list as shown in the following table can be maintained in each node, and the node name and node identifier are stored in the node identifier list accordingly. Among them, the node identifier can be an IP (Internet Protocol, a protocol for interconnecting networks) address and any other information that can be used to identify the node. Table 1 only takes the IP address as an example for illustration.
[0215] Table 1 Correspondence between node names and node identifiers
[0216] Node Name Node ID Node 1 117.114.151.174 Node 2 117.116.189.145 … … Node N 119.123.789.258
[0217] Each node in the data sharing system stores the same blockchain. The blockchain consists of multiple blocks, see Fig. 12BThe blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information characteristic value, version number, timestamp and difficulty value, and the block body stores the input information; the next block of the genesis block takes the genesis block as the parent block, and the next block also includes a block header and a block body. The block header stores the input information characteristic value of the current block, the block header characteristic value, version number, timestamp and difficulty value of the parent block, and so on, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.
[0218] When generating each block in the blockchain, see Fig. 12C When the node where the blockchain is located receives the input information, it verifies the input information. After the verification is completed, the input information is stored in the memory pool and the hash tree used to record the input information is updated. After that, the update timestamp is updated to the time when the input information is received, and different random numbers are tried to calculate the eigenvalue multiple times so that the calculated eigenvalue can satisfy the following formula:
[0219] SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
[0220] Among them, SHA256 is the eigenvalue algorithm used to calculate the eigenvalue; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header eigenvalue of the parent block of the current block; merkle_root is the eigenvalue of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value within a period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the eigenvalue threshold, which can be determined based on nbits.
[0221] In this way, when the random number that satisfies the above formula is calculated, the information can be stored accordingly, the block header and block body can be generated, and the current block can be obtained. Subsequently, the node where the blockchain is located sends the newly generated block to other nodes in the data sharing system according to the node identification of other nodes in the data sharing system. Other nodes verify the newly generated block and add the newly generated block to the blockchain stored in them after the verification is completed.
[0222] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0223] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0224] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0225] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0226] If the integrated unit is implemented in the form of 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 the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a detection device for abnormal objects, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0227] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting abnormal objects, characterized in that: include: Obtaining behavior sequence data of the object to be identified in the interactive scene; Performing vector representation based on the behavior sequence data to obtain an object feature vector corresponding to the object to be identified, including: extracting data from the behavior sequence data based on a preset behavior to determine an object behavior sequence, wherein the preset behavior is set based on a characteristic behavior included in the interaction scene; inputting the object behavior sequence into a target encoder to obtain a behavior sequence vector; obtaining an associated feature vector corresponding to the object to be identified, wherein the associated feature vector is determined based on an object portrait feature, a position feature, or a text feature; and concatenating the associated feature vector with the behavior sequence vector to obtain an object feature vector corresponding to the object to be identified; The object feature vector is input into a discriminator to obtain an abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the discriminator is trained based on noise samples and normal samples, the noise samples are samples with similar feature distribution generated based on the normal samples, and the abnormal object detection result is determined based on the similarity between the object feature vector corresponding to the object to be identified and the object feature vector corresponding to the normal samples; The discriminator is a discriminator in a generative adversarial network, the generative adversarial network includes the discriminator and a generator, the generator is used to generate noise samples with similar feature distribution based on normal samples in the interaction scene, and the training process of the generative adversarial network includes: Acquire a normal sample in the interaction scene; Determining characteristic distribution information of the normal sample; configuring sample distribution information corresponding to the generator based on the abnormal probability indicated in the feature distribution information; Configure a generator function according to the distance between the sample distribution information and the feature distribution information; Performing loss calculation based on the generator function to train the generator; Generate noise samples based on the trained generator; The noise sample is input into a discriminator so that the discriminator distinguishes the normal sample from the noise sample, and updates the parameters of the discriminator.
2. The method according to claim 1, characterized in that The method further comprises: Obtain training behavior sequence; Inputting the training behavior sequence into an initial encoder to obtain hidden state information of the training behavior sequence; Inputting the hidden state information into a decoder to reconstruct the training behavior sequence; Determining corresponding loss information during the reconstruction of the training behavior sequence; The initial encoder is trained based on the loss information to obtain the target encoder.
3. The method according to claim 2, characterized in that The step of obtaining a training behavior sequence comprises: Determining a parameter update cycle based on the exception handling information in the interaction scenario; The training behavior sequence is acquired according to the parameter update cycle.
4. The method according to claim 1, characterized in that The step of inputting the noise sample into a discriminator so that the discriminator distinguishes the normal sample from the noise sample and updating the parameters of the discriminator includes: Inputting the noise sample into the middle layer of the discriminator to obtain noise abstract information; Acquire normal abstract information extracted by the intermediate layer according to the normal sample; The noise abstract information and the normal abstract information are distinguished based on the discriminator, and the parameters of the discriminator are updated.
5. A detection device for abnormal objects, characterized in that: include: An acquisition unit, used to acquire behavior sequence data of an object to be identified in an interactive scene; A determination unit is used for performing vector representation based on the behavior sequence data to obtain an object feature vector corresponding to the object to be identified, which includes: extracting data from the behavior sequence data based on a preset behavior to determine an object behavior sequence, wherein the preset behavior is set based on a characteristic behavior included in the interaction scene; inputting the object behavior sequence into a target encoder to obtain a behavior sequence vector; obtaining an associated feature vector corresponding to the object to be identified, wherein the associated feature vector is determined based on an object portrait feature, a position feature, or a text feature; and concatenating the associated feature vector with the behavior sequence vector to obtain an object feature vector corresponding to the object to be identified; a detection unit, configured to input the object feature vector into a discriminator, so as to obtain an abnormal object detection result corresponding to the object to be identified based on the discriminator, wherein the discriminator is trained based on noise samples and normal samples, the noise samples are samples with similar feature distribution generated based on the normal samples, and the abnormal object detection result is determined based on the similarity between the object feature vector corresponding to the object to be identified and the object feature vector corresponding to the normal samples; The discriminator is a discriminator in a generative adversarial network, the generative adversarial network includes the discriminator and a generator, the generator is used to generate noise samples with similar feature distribution based on normal samples in the interaction scene, and the training process of the detection unit generative adversarial network includes: Acquire a normal sample in the interaction scene; Determining characteristic distribution information of the normal sample; configuring sample distribution information corresponding to the generator based on the abnormal probability indicated in the feature distribution information; Configure a generator function according to the distance between the sample distribution information and the feature distribution information; Performing loss calculation based on the generator function to train the generator; Generate noise samples based on the trained generator; The noise sample is input into a discriminator so that the discriminator distinguishes the normal sample from the noise sample, and updates the parameters of the discriminator.
6. The device according to claim 5, characterized in that The determining unit is specifically configured to: Obtain training behavior sequence; Inputting the training behavior sequence into an initial encoder to obtain hidden state information of the training behavior sequence; Inputting the hidden state information into a decoder to reconstruct the training behavior sequence; Determining corresponding loss information during the reconstruction of the training behavior sequence; The initial encoder is trained based on the loss information to obtain the target encoder.
7. The device according to claim 6, characterized in that The determining unit is specifically configured to: Determining a parameter update cycle based on the exception handling information in the interaction scenario; The training behavior sequence is acquired according to the parameter update cycle.
8. The device according to claim 5, characterized in that The detection unit is specifically used for: Inputting the noise sample into the middle layer of the discriminator to obtain noise abstract information; Acquire normal abstract information extracted by the intermediate layer according to the normal sample; The noise abstract information and the normal abstract information are distinguished based on the discriminator, and the parameters of the discriminator are updated.
9. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store program codes; the processor is used to execute the abnormal object detection method according to any one of claims 1 to 4 according to instructions in the program codes.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the abnormal object detection method according to any one of claims 1 to 4 are implemented.
11. A computer-readable storage medium storing executable instructions, characterized in that: When the executable instructions are executed by a processor, the abnormal object detection method according to any one of claims 1 to 4 is implemented.
