An object screening method, device, electronic device and computer readable medium
By obtaining risk network information and generating indicator vectors, we build the closest search engine to screen items, solving the problems of real-time and low correlation in the existing technology, realizing timely and accurate decision-making on risk network information, and mitigating the impact of risk .
Patent Information
- Application Number
- CN202111074037.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-14
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-09-14
AI Technical Summary
In the prior art, the real-time decision-making of items corresponding to risk network information is not high, and the correlation between the items obtained from searches and the risk network information is not high.
By obtaining the updated risk network information, calling the risk information network model to generate the indicator vector of the risk network information, building the closest search engine based on the index vector, and calling the closest search engine to filter the corresponding item vector, thereby performing item screening.
It realizes timely and accurate decision-making on risk network information, reduces the impact of risk network information, avoids accidental injury to other items, and avoids the removal of other items.
Smart Images

Figure CN113780827B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an object screening method, device, electronic device and computer-readable medium. Background Art
[0002] At present, the outbreak of hot information has temporal uncertainty. When some information that is not permitted by laws and regulations appears on the Internet, the real-time nature of manual identification of such information and decision-making on related items sold on the platform is not high, and the correlation between the searched items is not high.
[0003] In the process of implementing this application, the inventors found that there are at least the following problems in the prior art:
[0004] The real-time nature of the decision on items corresponding to the risk network information is not high, and the correlation between the searched items and the risk network information is not high. Summary of the invention
[0005] In view of this, the embodiments of the present application provide an item screening method, device, electronic device and computer-readable medium, which can solve the problems that the existing decision-making on items corresponding to risk network information is not real-time and the correlation between the searched items and the risk network information is not high.
[0006] To achieve the above object, according to one aspect of an embodiment of the present application, a method for screening items is provided, comprising:
[0007] Get updated risk network information;
[0008] Calling the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information;
[0009] Construct a nearest neighbor search engine based on the indicator vector;
[0010] The nearest neighbor search engine is called to filter the corresponding item vector according to the indicator vector, and then filter the items based on the item vector to obtain the items to be processed.
[0011] Optionally, obtain updated risk network information, including:
[0012] According to the preset risk words, the corresponding risky network information is filtered from the network information.
[0013] Optionally, according to a preset risk word, corresponding risk network information is screened from the network information, including:
[0014] Segment the network information to generate network information segmentation, and then determine the network information segmentation vector corresponding to the network information segmentation;
[0015] Determine the risk word vector corresponding to the preset risk word, then match the risk word vector with each network information word segmentation vector, and determine the network information corresponding to the matched network information word segmentation vector as risky network information.
[0016] Optionally, before calling the risk information network model, the method further includes:
[0017] Obtain historical risk network information, and then generate meta-path instances based on preset meta-paths;
[0018] Concatenate metapath instances to generate a sampling sequence;
[0019] The set composed of each sampling sequence is used as the input of the initial neural network model, and the indicator vector corresponding to the risk network information corresponding to each node in the preset meta-path corresponding to each sampling sequence in the set is used as the output of the initial neural network model to train the initial neural network model and obtain the risk information network model.
[0020] Optionally, generating a meta-path instance based on a preset meta-path includes:
[0021] Determine the corresponding relationship between nodes in the preset meta-path;
[0022] Determine the weights between nodes in a preset meta-path according to the corresponding relationship;
[0023] Determine the target node among the nodes in the meta-path, and then determine the sampling node based on the target node and the weight;
[0024] Generate a meta-path instance based on the target node and the sampled nodes.
[0025] Optionally, based on the target node and the weight, determining the sampling node includes:
[0026] Determine the weights of nodes connected to the target node in a preset meta-path;
[0027] The nodes corresponding to the weights of the nodes connected to the target node that are greater than a preset weight threshold are determined as sampling nodes.
[0028] Optionally, the corresponding item vector is obtained by filtering the indicator vector, including:
[0029] Call the item vector set, and then calculate the similarity between the indicator vector and each item vector in the item vector set;
[0030] The item vector corresponding to the similarity greater than the preset similarity threshold is determined as the item vector corresponding to the indicator vector.
[0031] Optionally, after filtering the items based on the item vector to obtain the items to be processed, the method further includes:
[0032] Updates the history of filtered items based on the filtered items.
[0033] In addition, the present application also provides an object screening device, comprising:
[0034] an acquisition unit configured to acquire updated risk network information;
[0035] The indicator vector generating unit is configured to call the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information;
[0036] An engine building unit, configured to build a nearest neighbor search engine based on the indicator vector;
[0037] The screening unit is configured to call the nearest neighbor search engine to screen and obtain the corresponding item vector according to the indicator vector, and then screen the items based on the item vector to obtain the items to be processed.
[0038] Optionally, the acquisition unit is further configured to:
[0039] According to the preset risk words, the corresponding risky network information is filtered from the network information.
[0040] Optionally, the acquisition unit is further configured to:
[0041] Segment the network information to generate network information segmentation, and then determine the network information segmentation vector corresponding to the network information segmentation;
[0042] Determine the risk word vector corresponding to the preset risk word, then match the risk word vector with each network information word segmentation vector, and determine the network information corresponding to the matched network information word segmentation vector as risky network information.
[0043] Optionally, the object screening device further includes: a model training unit configured to:
[0044] Obtain historical risk network information, and then generate meta-path instances based on preset meta-paths;
[0045] Concatenate metapath instances to generate a sampling sequence;
[0046] The set composed of each sampling sequence is used as the input of the initial neural network model, and the indicator vector corresponding to the risk network information corresponding to each node in the preset meta-path corresponding to each sampling sequence in the set is used as the output of the initial neural network model to train the initial neural network model and obtain the risk information network model.
[0047] Optionally, the model training unit is further configured to:
[0048] Determine the corresponding relationship between nodes in the preset meta-path;
[0049] Determine the weights between nodes in a preset meta-path according to the corresponding relationship;
[0050] Determine the target node among the nodes in the meta-path, and then determine the sampling node based on the target node and the weight;
[0051] Generate a meta-path instance based on the target node and the sampled nodes.
[0052] Optionally, the model training unit is further configured to:
[0053] Determine the weights of nodes connected to the target node in a preset meta-path;
[0054] The nodes corresponding to the weights of the nodes connected to the target node that are greater than a preset weight threshold are determined as sampling nodes.
[0055] Optionally, the screening unit is further configured to:
[0056] Call the item vector set, and then calculate the similarity between the indicator vector and each item vector in the item vector set;
[0057] The item vector corresponding to the similarity greater than the preset similarity threshold is determined as the item vector corresponding to the indicator vector.
[0058] Optionally, the item screening device further includes an updating unit configured to:
[0059] Updates the history of filtered items based on the filtered items.
[0060] In addition, the present application also provides an item screening electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the item screening method as described above.
[0061] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned object screening method is implemented.
[0062] One embodiment of the above invention has the following advantages or beneficial effects: the present application obtains updated risk network information; calls the risk information network model to generate an index vector corresponding to the risk network information based on the risk network information; builds a nearest neighbor search engine based on the index vector; calls the nearest neighbor search engine to filter and obtain the corresponding item vector based on the index vector, and then filters the items based on the item vector to obtain the items to be processed. Therefore, after obtaining the updated risk network information, a decision can be made in a timely and accurate manner on the items corresponding to the risk network information, so as to process the corresponding items based on the decision made, thereby effectively reducing the impact of the risk network information, avoiding accidental damage to other items, and avoiding the removal of other items.
[0063] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.
[0065] Figure 1 is a schematic diagram of the main process of the object screening method according to the first embodiment of the present application;
[0066] Figure 2 is a schematic diagram of the main process of the object screening method according to the second embodiment of the present application;
[0067] Figure 3 is a schematic diagram of an application scenario of the object screening method according to the third embodiment of the present application;
[0068] Figure 4 is a schematic diagram of the main units of the object screening device according to an embodiment of the present application;
[0069] Figure 5 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;
[0070] Figure 6 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0072] Figure 1 is a schematic diagram of the main process of the object screening method according to the first embodiment of the present application, such as Figure 1 As shown, the item screening method includes:
[0073] Step S101, obtaining updated risk network information.
[0074] In this embodiment, the execution subject of the item screening method (for example, it can be a server) can call the crawler system to crawl and update the risk network information in real time. The risk network information can include network information containing risk words corresponding to news, microblogs, official website information, comments, etc. Risk words, for example, can be a collection of words that are not allowed by laws and regulations. Risk network information can be a word, a phrase or a sentence. This application does not limit the specific form of the risk network information.
[0075] Specifically, obtain updated risk network information, including:
[0076] According to the preset risk words, the corresponding risk network information is filtered from the network information, for example, a phrase or a sentence containing the risk word.
[0077] Specifically, according to the preset risk words, corresponding risk network information is screened from the network information, including:
[0078] Segment the network information (i.e., the public information on the entire network) to generate network information segmentation (e.g., word 1, word 2, ..., word n), and then call a word vector conversion tool, such as Word2Vec, to determine the network information segmentation vector (e.g., word 1 vector, word 2 vector, ..., word n vector) corresponding to the network information segmentation;
[0079] The execution entity can call a word vector conversion tool, such as Word2Vec, to determine the risk word vector (such as word vector M) corresponding to the preset risk word, and then match the risk word vector (such as word vector M) with each network information word segmentation vector (such as word 1 vector, word 2 vector, ..., word n vector), and determine the network information (such as network information containing words corresponding to one or more vectors of word 9 vector, word 12 vector, word 15 vector) corresponding to the matched network information word segmentation vector (such as word 9 vector, word 12 vector, word 15 vector) as risk network information.
[0080] Step S102, calling the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information.
[0081] Specifically, the risk information network model can be a pre-trained deep neural network model (Deep Neural Networks, DNN), which is used to output an indicator vector corresponding to a corresponding indicator based on the input network information. Specifically, the indicator vector can be a brand vector corresponding to a brand, such as the brand A vector corresponding to brand A.
[0082] In this embodiment, for each network node involved in the risk information network model, for example, a total of 4 different types of nodes may be included, for example: keywords, commodities, brands (i.e., indicators), and related personnel (e.g., employees, spokespersons, etc.). Due to the different types of nodes in the risk information network model, such a risk information network model is determined to be a heterogeneous network model. A risk information network model is constructed using historical violation information, in which nodes include 4 types: keywords, commodities, brands, and related personnel. Sampling is performed in the network using the constructed meta-path (Meta-Path), and then a sequence consisting of node instances of different types can be obtained. The sampled sequence is then trained using a word vector conversion tool (e.g., Word2Vec, fastText) to obtain a vector representation of the brand node (i.e., indicator node) in the risk information network model.
[0083] Specifically, in the risk information network model, there may or may not be a relationship between any two types of nodes. For example, the "relevant person-brand" relationship exists, which means that the relevant person endorses a brand or is a staff member of the brand; while the "keyword-relevant person" relationship may not exist, which means that the relevant person is not involved. If there is a relationship between two types of nodes, the two types can be the same (for example, "relevant person-relevant person", indicating that both people endorse the same brand) or different (for example, "brand-product", indicating a product under the brand). If there is a relationship between two types of nodes, the instance of this relationship can be a "one-to-one" relationship, for example, a "relevant person-brand" relationship, where celebrity 1 "only" endorses brand 1, and brand 1 is also "only endorsed by" celebrity 1; it can also be a "many-to-one" relationship, for example, a "product-brand" relationship, or a "one-to-many" relationship, for example, a "brand-product" relationship, where product 1 "only" will be a product under brand 1, and brand 1 may have other products; it can also be a "many-to-many" relationship, for example, a "relevant person-brand" relationship, where celebrity 2 endorses brand 2 and brand 3, and brand 2 is endorsed by celebrity 2 and celebrity 3. A specific instance of a type of relationship, for example, a relevant person-brand relationship, may be one or more of a "one-to-one", "one-to-many", "many-to-one" and "many-to-many" relationship. The risk information network model is a weighted network model, that is, the weights of the relationships between the nodes "keyword 1-brand 1" and "brand 1-keyword 2" of the risk information network model may be different. The embodiment of the present application uses the number of brands hit by keywords ("hit" can be understood as "corresponding") as the weight of the relationship (for example, it can be an edge) between different types of node instances. For example: keyword 1 hits a brand 1, keyword 2 hits 2 brands: brand 1 and brand 2, then the edge weight of "keyword 2-brand 1" is twice the edge weight of "keyword 1-brand 1". Specifically, the execution entity can construct 4 kinds of meta-paths, for example: different keywords are associated with the same brand; different keywords are associated with the same goods; different keywords involve the same brand of different related persons; different keywords involve the same brand of different goods. This is a specific description of the risk information network model.
[0084] Step S103: construct a nearest neighbor search engine based on the indicator vector.
[0085] Specifically, the nearest neighbor search engine is an engine that finds the closest point in the scale space. For example, the nearest neighbor search engine is used to find the point (i.e., the indicator vector, which can be the item corresponding to the brand vector corresponding to the brand) closest to the target point q (i.e., the indicator vector, which can be the item corresponding to the brand vector corresponding to the brand, that is, to determine the item corresponding to a risky brand) in S given a point set S (item set) and a target point q (i.e., the indicator vector) in the scale space M.
[0086] The construction method of the nearest neighbor search engine can be as follows: the execution entity can develop a Java middle layer to connect the vector similarity search function provided by Milvus to the existing SOA framework to achieve service discovery, high availability, horizontal expansion and other functions. Then the execution entity can organize data sharding and offline data updates through metadata management services, thereby completing the required links for building the entire nearest neighbor search engine.
[0087] As another implementation method of the embodiment of the present application, the execution subject can match the index vector output by the risk information network model with the vector corresponding to each search engine in the search engine set according to the corresponding relationship between each search engine in the search engine set and the vector, and determine the search engine corresponding to the matched vector as the nearest neighbor search engine. The function of this nearest neighbor search engine is to find n item vectors associated with a given vector (in actual application, the predicted output vector of the model, i.e., the index vector) through the nearest neighbor search engine within the time complexity of O(1), so that relevant items can be screened out.
[0088] Step S104, calling the nearest neighbor search engine to filter and obtain the corresponding item vector according to the indicator vector, and then filtering the items based on the item vector to obtain the items to be processed.
[0089] Specifically, the corresponding item vector is obtained by screening the indicator vector, including:
[0090] The item vector set is called to calculate the similarity between the indicator vector and each item vector in the item vector set; the item vector corresponding to the similarity greater than a preset similarity threshold is determined as the item vector corresponding to the indicator vector.
[0091] Specifically, after constructing the nearest neighbor search engine, the execution entity can call the nearest neighbor search engine to call the internal algorithm of the nearest neighbor search engine to find the closest item vector from the item vector set based on the indicator vector output by the risk information network model, that is, the item vector corresponding to the indicator vector.
[0092] Specifically, after filtering the items based on the item vector to obtain the items to be processed, the method further includes:
[0093] Updates the history of filtered items based on the filtered items.
[0094] For item updates, the executing entity can call the crawler system to capture public information on the entire network in real time. According to the changes in information (addition, modification or deletion), the input of the risk information network model will change, and the output vector of the risk information network model will also change. The corresponding n items obtained by the search will also be updated synchronously.
[0095] This embodiment obtains updated risk network information; calls the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information; builds a nearest neighbor search engine based on the indicator vector; calls the nearest neighbor search engine to filter and obtain the corresponding item vector based on the indicator vector, and then filters the items based on the item vector to obtain the items to be processed. Therefore, after obtaining the updated risk network information, a decision can be made in a timely and accurate manner on the items corresponding to the risk network information, so as to process the corresponding items based on the decision made, thereby effectively reducing the impact of the risk network information, avoiding accidental damage to other items, and avoiding the removal of other items.
[0096] Figure 2 FIG. 1 is a schematic diagram of the main process of the object screening method according to the second embodiment of the present application. Figure 2 As shown, the item screening method includes:
[0097] Step S201, obtaining updated risk network information.
[0098] The principle of step S201 is similar to that of step S101 and will not be described in detail here.
[0099] Step S202: Acquire historical risk network information, and then generate a meta-path instance based on a preset meta-path.
[0100] Specifically, generating a meta-path instance based on a preset meta-path includes:
[0101] Determine the corresponding relationship between the nodes in the preset meta-path, that is, determine whether the relationship between the nodes in the meta-path is "one-to-one", "many-to-one", "one-to-many" or "many-to-many".
[0102] The weights between the nodes in the preset meta-path are determined according to the corresponding relationship. After the execution subject determines the corresponding relationship between the nodes in the preset meta-path, for example, the weights between the nodes in the meta-path can be determined based on the number of "keyword" node hits ("hit" can be understood as "correspondence") of "brand" nodes in each node in the meta-path as the weight of the relationship between different types of node instances (for example, it can be an edge). For example: keyword 1 hits a brand 1, keyword 2 hits 2 brands: brand 1 and brand 2, then the edge weight of "keyword 2-brand 1" is twice the edge weight of "keyword 1-brand 1". Then the edge weight of "keyword 2-brand 1" can be set to 2, and the edge weight of "keyword 1-brand 1" can be set to 1. This application does not make specific limitations on the assignment of this weight.
[0103] The target node in each node in the meta-path is determined, and then the sampling node is determined based on the target node and the weight.
[0104] Specifically, the target node in each node in the meta-path may be the current node, and the sampling node may be the next node of the current node. For example, the execution subject may predetermine (for example, according to the user's settings) the weight of the edge between the target node and the sampling node. For example, when a target node (for example, a keyword node) corresponds to multiple nodes to be sampled (for example, multiple brand nodes), the execution subject may select one of the nodes to be sampled corresponding to the weight as the sampling node based on the number of nodes to be sampled outside the meta-path hit (i.e., corresponding) by the target node and the weight of the edge between the target node and the sampling node. The sampling node may not be in the meta-path where the target node is located.
[0105] Generate a meta-path instance based on the target node and the sampled nodes.
[0106] The execution subject can assign specific attribute values to the target node and the sampling node respectively. For example, the target node is "keyword 1" and the sampling node is "brand". After assigning attribute values to all nodes included in the meta-path, a meta-path instance is generated. The meta-path instance is an example of each node in the meta-path being assigned attribute values.
[0107] Specifically, based on the target node and the weight, determining the sampling node may also include:
[0108] Determine the weights of the nodes connected to the target node in the preset meta-path. The preset meta-path (for example, it can be the meta-path with the same brand associated with different keywords, such as keyword 1-brand-keyword 2) can be another meta-path other than the meta-path where the target node is located (for example, the meta-path with the same product associated with different keywords, such as keyword 3-product-keyword 4). In other words, the target node is not in the preset meta-path. The execution entity must first determine the weight of the edge when each node in the preset meta-path (for example, all nodes in the preset meta-path: keyword 3, product, keyword 4) is connected to the target node (for example, brand).
[0109] The nodes corresponding to the weights of the nodes connected to the target node that are greater than a preset weight threshold are determined as sampling nodes.
[0110] Specifically, the preset weight threshold can be the weight of the edge between the target node and the next node (that is, the sampling node) in different meta-paths set in advance by the user. When the execution subject determines that there is no weight equal to the preset weight threshold in the weight of the edge when each node in the preset meta-path is connected to the target node, the execution subject can select the node corresponding to the weight greater than the preset weight threshold in different meta-paths as the sampling node. It can be understood that there can be one or more sampling nodes corresponding to a target node. When there are multiple sampling nodes, they can all be located in the same meta-path or in different meta-paths, and this application does not make specific restrictions on this. After all nodes in the meta-path where the target node is located are sampled (all nodes in the meta-path where the target node is located can be target nodes, and after a target node (such as a brand) is sampled, the next target node (such as keyword 4) in the meta-path is sampled, and then the corresponding sampling node is determined, and the sampling nodes can all be located in other meta-paths), each node in the meta-path is sampled and then a meta-path instance is generated.
[0111] Step S203: concatenate the meta-path instances to generate a sampling sequence.
[0112] The execution subject can concatenate the obtained meta-path instances from beginning to end to obtain various sequences, namely, various sampling sequences.
[0113] In step S204, the set composed of each sampling sequence is used as the input of the initial neural network model, and the indicator vector corresponding to the risk network information corresponding to each node in the preset meta-path corresponding to each sampling sequence in the set is used as the output of the initial neural network model to train the initial neural network model and obtain the risk information network model.
[0114] This embodiment constructs a risk information network model, i.e., a deep neural network (DNN), and uses the vector representation of the brand associated with the risk network information in the risk information network model as the target output to train the model, and finally obtains a risk information network model that can timely and accurately output the indicator vector corresponding to the risk network information. Therefore, after obtaining the updated risk network information, it can be input into the trained risk information network model to obtain the corresponding indicator vector, and then the decision on the item corresponding to the risk network information can be made in a timely and accurate manner based on the indicator vector, so as to process the corresponding item based on the decision made, thereby effectively reducing the impact of the risk network information, avoiding accidental damage to other items, and avoiding the removal of other items from the shelves.
[0115] For the construction of the risk information network model, in this embodiment, for example, for a set of meta-paths, it is recorded as:
[0116] S MetaPath ={MetaPath i |i=1,2,…,c}, where c is the total number of meta-paths.
[0117] Randomly select a "keyword" from the public information on the entire network as the starting node. According to each MetaPath i The probability of selection Choose any meta-path where
[0118] MetaPath i The length (number of nodes contained) is You need to follow the meta-path and sample from the starting node Get a sequence instance corresponding to the meta-path.
[0119] For example, when the execution subject is sampling a meta-path instance, for the t-th sampling step, assuming that the node sampled in the previous step is v t-1 , and the type of the node is The node type sampled in this step is From The node type is The node sampling is directed, and the current sampling node may have a "one-to-one" or "one-to-many" relationship with the node sampled in the previous step. For the "one-to-one" case, for example, sampling the next node of type "brand" from "product 1", because the "brand" of "product 1" is fixed, you can directly select the "brand". For the "one-to-many" case, for example, sampling the next node of type "brand" from "keyword", because a "keyword" may be associated with multiple "brands", according to the weights of all "brands" connected to the "keyword", a node instance of type "brand" is sampled from them, and then a meta-path instance is generated based on each node instance obtained by sampling.
[0120] The last "keyword" node of the last sampled meta-path instance is used as the starting node, and the meta-path instance is sampled repeatedly until a preset number of meta-path instances are sampled. Then the execution subject can concatenate the preset number of sampled meta-path instances from beginning to end to obtain a sequence, that is, to obtain a sampling sequence, which can be recorded as Sequence. j .
[0121] Repeat the above process n times to obtain n sampling sequences, which are used as the sampling sequence set and recorded as S Sequence = {Sequence j |j=1,2,…,n}. The sampling sequence set can be used as a training corpus to train the initial neural network model to obtain the risk information network model used in the embodiment of the present application.
[0122] Each sequence in the training corpus can be understood as a sentence in natural language, and each node in a sequence can be understood as a word in natural language. Using this corpus and methods such as Word2Vec or fastText, the vector representation of all nodes is obtained through training. Therefore, for a brand type node, its vector representation in the risk information network model can be recorded as f:ItemID→ItemEmbedding∈R g , where g is the latitude of the risk information network vector representation, R g is a real-valued vector space of dimension g.
[0123] Step S205, calling the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information.
[0124] Step S206: construct a nearest neighbor search engine based on the indicator vector.
[0125] Step S207, calling the nearest neighbor search engine to filter and obtain the corresponding item vector according to the indicator vector, and then filter the items based on the item vector to obtain the items to be processed.
[0126] The principles of steps S205 to S207 are similar to those of steps S102 to S104 and will not be described in detail here.
[0127] Figure 3 This is a schematic diagram of the application scenario of the item screening method according to the third embodiment of the present application. The item screening method of the embodiment of the present application is used to search for items related to information that is not permitted by laws and regulations when it appears on the Internet, and to promptly respond to some information that violates the core socialist values on the Internet and remove the related items from sale. Risky network information is a collection of network information that is not permitted by laws and regulations. For example, Figure 3 As shown, the execution subject (for example, a server) can obtain the public information of the entire network in real time through the crawler system, including news, microblogs, official website information, comments and some other information. This application does not specifically limit the public information of the entire network. Then the execution subject can filter the corresponding risk network information from the public information of the entire network (i.e., network information) based on the preset risk words (for example, some words not allowed by laws and regulations). The risk network information can be a phrase or a sentence corresponding to the preset risk word, and this application does not limit this. Then, the execution subject can perform feature transformation and splicing on the risk network information obtained by screening (for example, the risk network information mainly includes some event attribute features of the information, such as news, microblogs, official website information, etc. All original features are processed by feature transformation, and the feature vector representation of the risk network information is obtained by splicing, that is, the input features of the model) to generate an input vector suitable for inputting into the risk information network model, that is, the input features of the model (for example, using the word vector conversion tool Word2Vec to map each word of the risk network information into a vector, and the input vector can be a word vector corresponding to a word, or a combination vector obtained by combining word vectors corresponding to multiple words). Then, the risk information network model can output the corresponding indicator vector according to the input vector, for example, it can be a brand vector. Then, the execution subject can build a nearest neighbor search engine according to the indicator vector output by the risk information network model. For example, when building the nearest neighbor search engine, the execution subject can develop a Java middle layer to connect the vector similarity search function provided by Milvus to the existing SOA framework to achieve service discovery, high availability, horizontal expansion and other functions. The execution entity can then organize data sharding and offline data updates through the metadata management service, thereby completing the links required to build the entire Approximate Nearest Neighbor (ANN) search engine.
[0128] After constructing the nearest neighbor search engine, the execution entity can use the nearest neighbor search engine to search and predict all items (including item 1, item 2, ..., item n, which may be, for example, some commodities related to risk information) associated with the indicator vector output by the risk information network model based on the risk network information.
[0129] Specifically, in the risk information network model of this embodiment, there may be a risk information network composed of various nodes, so as to determine the index corresponding to the risk information based on the risk information network, and then determine the vector corresponding to the index, and output it. Specifically, the risk information network may include keyword 1, item 1, relevant person 1, index 1, keyword 2, item 2, relevant person 2, index 2, keyword 3, item 3, index 3, etc. Among them, keyword 1 can be connected to item 1 and relevant person 1. Item 1 can be connected to relevant person 1 and relevant person 2. Relevant person 2 can be connected to index 1 and index 3. Index 3 can be connected to keyword 3 and item 3. Item 3 can be connected to keyword 2 and keyword 3. Keyword 2 can be connected to item 2, index 2, and relevant person 1. Relevant person 1 can be connected to index 2. Keyword 3 can be connected to index 1 and item 2. Index 1 can be connected to item 2. The connection relationship between the above nodes is only an example, and this application does not specifically limit the connection relationship between the nodes in the risk information network.
[0130] The embodiment of the present application utilizes the currently available public information on the entire network (news, official website information, microblogs, comments, etc.) to obtain historical samples of risk information, and converts it into input features of the risk information network model by means of feature transformation or vectorization. By constructing a risk information network model, namely a deep neural network (DNN), the vector representation of the brand associated with the information in the information network is used as the target training model. Therefore, after obtaining the updated risk network information, it can be input into the trained risk information network model to obtain the corresponding indicator vector, and then based on the indicator vector, a decision can be made in a timely and accurate manner on the items corresponding to the risk network information, so as to process the corresponding items based on the decision made, thereby effectively reducing the impact of the risk network information, avoiding accidental damage to other items, and avoiding the removal of other items from the shelves.
[0131] Figure 4 Schematic diagram of the main units of the object screening device according to an embodiment of the present application. Figure 4 As shown, the item screening device includes an acquisition unit 401, an indicator vector generation unit 402, an engine construction unit 403 and a screening unit 404.
[0132] The acquisition unit 401 is configured to acquire updated risk network information.
[0133] The indicator vector generating unit 402 is configured to call the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information.
[0134] The engine construction unit 403 is configured to construct a nearest neighbor search engine based on the indicator vector.
[0135] The screening unit 404 is configured to call the nearest neighbor search engine to screen the corresponding item vector according to the indicator vector, and then screen the items based on the item vector to obtain the items to be processed.
[0136] In some embodiments, the acquisition unit 401 is further configured to: filter corresponding risky network information from the network information according to preset risk words.
[0137] In some embodiments, the acquisition unit 401 is further configured to: segment the network information, generate network information segmentation, and then determine the network information segmentation vector corresponding to the network information segmentation; determine the risk word vector corresponding to the preset risk word, and then match the risk word vector with each network information segmentation vector, and determine the network information corresponding to the matched network information segmentation vector as risky network information.
[0138] In some embodiments, the object screening device further includes Figure 4 The model training unit not shown in the figure is configured to: obtain historical risk network information, and then generate a meta-path instance based on a preset meta-path; splice the meta-path instances to generate a sampling sequence; use the set composed of each sampling sequence as the input of the initial neural network model, and use the indicator vector corresponding to the risk network information corresponding to each node in the preset meta-path corresponding to each sampling sequence in the set as the output of the initial neural network model, so as to train the initial neural network model and obtain a risk information network model.
[0139] In some embodiments, the model training unit is further configured to: determine the correspondence between the nodes in the preset meta-path; determine the weights between the nodes in the preset meta-path based on the correspondence; determine the target node in each node in the meta-path, and then determine the sampling node based on the target node and the weight; generate a meta-path instance based on the target node and the sampling node.
[0140] In some embodiments, the model training unit is further configured to: determine the weights of the nodes connected to the target node in a preset meta-path; and determine the nodes corresponding to the weights of the nodes connected to the target node that are greater than a preset weight threshold as sampling nodes.
[0141] In some embodiments, the screening unit 404 is further configured to: call the item vector set, and then calculate the similarity between the indicator vector and each item vector in the item vector set; and determine the item vector corresponding to the similarity greater than a preset similarity threshold as the item vector corresponding to the indicator vector.
[0142] In some embodiments, the object screening device further includes Figure 4 The updating unit not shown in the figure is configured to update the filtered items according to the filtered items history.
[0143] It should be noted that the item screening method and the item screening device of the present application have a corresponding relationship in terms of specific implementation contents, so the repeated contents will not be described again.
[0144] Figure 5 An exemplary system architecture 500 is shown to which the method or device for screening items according to the embodiments of the present application can be applied.
[0145] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0146] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0147] The terminal devices 501 , 502 , and 503 may be various electronic devices having an item screening processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0148] Server 505 may be a server that provides various services, such as a background management server that provides support for the updated risk network information obtained by users using terminal devices 501, 502, and 503 (only as an example). The background management server may obtain updated risk network information; call the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information; build a nearest neighbor search engine based on the indicator vector; call the nearest neighbor search engine to filter and obtain the corresponding item vector based on the indicator vector, and then filter the items based on the item vector to obtain the items to be processed. Therefore, after obtaining the updated risk network information, a decision can be made in a timely and accurate manner for the items corresponding to the risk network information, so as to process the corresponding items based on the decision made, thereby effectively reducing the impact of the risk network information, avoiding accidental damage to other items, and avoiding the removal of other items.
[0149] It should be noted that the item screening method provided in the embodiment of the present application is generally executed by the server 505 , and accordingly, the item screening device is generally disposed in the server 505 .
[0150] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0151] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present application. Figure 6 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0152] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0153] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0154] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.
[0155] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0156] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0157] The units involved in the embodiments described in the present application may be implemented by software or by hardware. The units described may also be set in a processor, for example, may be described as: a processor includes an acquisition unit, an indicator vector generation unit, an engine build generation unit, and a screening unit. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0158] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device obtains updated risk network information; calls the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information; builds a nearest neighbor search engine based on the indicator vector; calls the nearest neighbor search engine to filter and obtain the corresponding item vector according to the indicator vector, and then filters the items based on the item vector to obtain the items to be processed.
[0159] According to the technical solution of the embodiment of the present application, after obtaining the updated risk network information, a decision can be made promptly and accurately on the items corresponding to the risk network information, so as to process the corresponding items based on the made decision, thereby effectively reducing the impact of the risk network information, avoiding accidental damage to other items, and avoiding the removal of other items from the shelves.
[0160] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for screening items, characterized in that: include: Get updated risk network information; The obtaining of updated risk network information includes: screening corresponding risk network information from network information according to preset risk words; Acquire historical risk network information, and then generate a meta-path instance based on a preset meta-path; the generation of the meta-path instance based on the preset meta-path includes: determining the correspondence between the nodes in the preset meta-path, wherein the nodes include: keywords, commodities, brands, and related personnel, a total of 4 types; determining the weights between the nodes in the preset meta-path according to the correspondence; determining the target node in each node in the meta-path, and then determining the sampling node based on the target node and the weight; generating a meta-path instance according to the target node and the sampling node; splicing the meta-path instance to generate a sampling sequence; using the set composed of each sampling sequence as the input of the initial neural network model, and using the indicator vector corresponding to the risk network information corresponding to each node in the preset meta-path corresponding to each sampling sequence in the set as the output of the initial neural network model, so as to train the initial neural network model and obtain a risk information network model; calling the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information; the indicator vector is a vector representation of the indicator node contained in the risk information network model in the risk information network model; constructing a nearest neighbor search engine based on the indicator vector; The nearest neighbor search engine is called to obtain a corresponding item vector according to the index vector, and then the items are filtered based on the item vector to obtain items to be processed; the filtering according to the index vector to obtain the corresponding item vector includes: calling an item vector set, and then calculating the similarity between the index vector and each item vector in the item vector set; and determining the item vector corresponding to the similarity greater than a preset similarity threshold as the item vector corresponding to the indicator vector.
2. The method according to claim 1, characterized in that: The step of screening corresponding risky network information from network information according to preset risk words includes: Segmenting the network information to generate network information segmentation, and then determining the network information segmentation vector corresponding to the network information segmentation; Determine a risk word vector corresponding to a preset risk word, then match the risk word vector with each of the network information word segmentation vectors, and determine the network information corresponding to the matched network information word segmentation vector as risky network information.
3. The method according to claim 1, characterized in that The step of determining a sampling node based on the target node and the weight includes: Determining the weights of nodes in the preset meta-path connected to the target node; The nodes corresponding to the weights of the nodes connected to the target node that are greater than a preset weight threshold are determined as sampling nodes.
4. The method according to claim 1, characterized in that After screening the items based on the item vector to obtain the items to be processed, the method further includes: Updates the history of filtered items based on the filtered items.
5. An article screening device, characterized in that: include: an acquisition unit configured to acquire updated risk network information; The obtaining of updated risk network information includes: screening corresponding risk network information from network information according to preset risk words; The indicator vector generating unit is configured to obtain historical risk network information, and then generate a meta-path instance based on a preset meta-path; the generating of the meta-path instance based on the preset meta-path includes: determining the corresponding relationship between the nodes in the preset meta-path, wherein the nodes include: keywords, commodities, brands, and related personnel, a total of 4 types; determining the weights between the nodes in the preset meta-path according to the corresponding relationship; determining the target node in each node in the meta-path, and then determining the sampling node based on the target node and the weight; generating a meta-path instance according to the target node and the sampling node; splicing the meta-path instance to generate a sampling sequence; taking the set composed of each sampling sequence as the input of the initial neural network model, and taking the indicator vector corresponding to the risk network information corresponding to each node in the preset meta-path corresponding to each sampling sequence in the set as the output of the initial neural network model, so as to train the initial neural network model and obtain a risk information network model; calling the risk information network model to generate an indicator vector corresponding to the risk network information based on the risk network information; the indicator vector is a vector representation of the indicator node contained in the risk information network model in the risk information network model; An engine construction unit, configured to construct a nearest neighbor search engine based on the indicator vector; A screening unit is configured to call the nearest neighbor search engine to obtain a corresponding item vector based on the indicator vector, and then screen the items based on the item vector to obtain items to be processed; the screening to obtain the corresponding item vector based on the indicator vector includes: calling an item vector set, and then calculating the similarity between the indicator vector and each item vector in the item vector set; and determining the item vector corresponding to a similarity greater than a preset similarity threshold as the item vector corresponding to the indicator vector.
6. An electronic device for selecting items, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
7. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Public opinion processing method and device, electronic equipment and storage medium
CN113326375A
Power grid operation risk intelligent alarm system based on big data analysis
CN113346622A
