URL (Uniform Resource Locator) detection method and device, electronic equipment and storage medium
Through class generation and adversarial attackers and recognizers in network model, the problems of low efficiency and poor accuracy of URL detection in CDN services are solved, and accurate identification of targeted traffic fraud is achieved, risks are reduced, and automation and intelligence are improved. Identification level.
Patent Information
- Application Number
- CN202411134544.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-19
AI Technical Summary
The URL detection efficiency in existing CDN services is low and difficult to ensure accuracy. It mainly relies on manual judgment and cannot effectively identify targeted traffic fraud.
Using class generation attackers and recognizers in the adversarial network model, through feature extraction units and fully connected units, simulate non-cooperative service URL data, determine their business types, and then identify URL detection results to achieve automated and intelligent targeted traffic. Fraud identification.
It improves the accuracy and efficiency of URL detection, reduces the risk of targeted traffic fraud by Internet content providers, and improves the level of automation and intelligent identification.
Smart Images

Figure CN118890205A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of CDN service detection, and in particular to a URL detection method, device, electronic device and storage medium. Background Art
[0002] At present, with the development of Content Delivery Network (CDN) services, the targeted traffic fraud by CDN users, namely Internet Content Providers (ICPs), is increasing.
[0003] The existing CDN directional traffic non-cooperative service Uniform Resource Locator (URL) detection method mainly relies on expert experience and manual judgment, but this method has low detection efficiency and high requirements on personnel skills. At the same time, CDN non-cooperative service URLs vary greatly, making it difficult to ensure the accuracy of URL detection. Summary of the invention
[0004] The embodiments of the present application provide a URL detection method, device, electronic device and storage medium to solve the defects of low detection efficiency and difficulty in ensuring URL detection accuracy in the prior art. The method does not require human participation and can accurately determine the business type (i.e., CDN cooperative business / CDN non-cooperative business) of simulated non-cooperative business URL data through an attacker and an identifier (including a feature extraction unit and a fully connected unit) in a class-generative adversarial network model, and then determine the URL detection result. The URL detection result can effectively characterize whether the directional traffic fraud corresponding to the CDN non-cooperative business URL occurs at this time. While ensuring the detection efficiency, it effectively improves the accuracy of URL detection, helps to accurately identify CDN non-cooperative business URLs, can reduce the risk of ICP suffering from directional traffic fraud, and lays a foundation for improving the automation and intelligence level of ICP directional traffic fraud identification.
[0005] In a first aspect, an embodiment of the present application provides a URL detection method, wherein a generative adversarial network model includes: an attacker and an identifier, wherein the identifier includes: a feature extraction unit and a fully connected unit, and the method includes the following steps.
[0006] The attacker generates simulated non-cooperative service URL data according to the cooperative service description data of the content distribution network CDN.
[0007] The feature extraction unit performs feature extraction on multiple fields of the simulated non-cooperative business URL data to obtain field feature vectors corresponding to each of the multiple fields, and performs feature extraction on the cooperative business description data to obtain a first cooperative business feature vector.
[0008] The business type of the simulated non-cooperative business URL data is determined by the fully connected unit according to a plurality of field feature vectors and the first cooperative business feature vector.
[0009] Based on the service type, a URL detection result is obtained.
[0010] In one embodiment, the fully connected unit includes: a fully connected attention layer and a first output layer; the business type of the simulated non-cooperative business URL data is determined through the fully connected unit according to multiple field feature vectors and the first cooperative business feature vector, including: for each field feature vector in the multiple field feature vectors, the correlation result between the field feature vector and the first cooperative business feature vector is determined through the attention mechanism in the fully connected attention layer; through the fully connected attention layer, the attention weight corresponding to each of the multiple field feature vectors is determined according to the correlation results corresponding to each of the multiple field feature vectors; through the fully connected attention layer, the product between each field feature vector and the corresponding attention weight is determined, and the sum of all products is determined as a weighted sum result; through the first output layer, the weighted sum result is processed to obtain the business type of the simulated non-cooperative business URL data.
[0011] In one embodiment, the identifier also includes: an input layer, which is used to split the simulated non-cooperative business URL data into multiple fields; the feature extraction unit includes: a word embedding layer and a long short-term memory network LSTM layer; the feature extraction unit performs feature extraction on multiple fields of the simulated non-cooperative business URL data to obtain field feature vectors corresponding to each of the multiple fields, including: converting the multiple fields into corresponding numerical vectors through the word embedding layer; and performing feature extraction on multiple numerical vectors through the LSTM layer to obtain field feature vectors corresponding to each of the multiple numerical vectors.
[0012] In one embodiment, the attacker includes: a business description encoder, a noise encoder, a merging layer, a decoder and a second output layer; the attacker generates simulated non-cooperative business URL data according to the cooperative business description data of the content distribution network CDN, including: determining the second cooperative business feature vector corresponding to the cooperative business description data through the business description encoder; determining the noise feature vector corresponding to the acquired random noise data through the noise encoder; merging the second cooperative business feature vector and the noise feature vector through the merging layer to obtain a spliced vector; extracting features from the spliced vector through the decoder to generate initial simulated non-cooperative business URL data; processing the initial simulated non-cooperative business URL data through the second output layer to obtain the simulated non-cooperative business URL data.
[0013] In one embodiment, the original class generative adversarial network model includes: an original attacker and an original identifier; the class generative adversarial network model is trained based on the following steps: S1, using the original attacker, generating simulated non-cooperative business URL data according to cooperative business description data samples and random noise data samples; S2, using the original identifier, determining the predicted business type corresponding to the simulated non-cooperative business URL data according to the simulated non-cooperative business URL data and the cooperative business description data samples; S3, updating the model parameters of the original identifier according to the predicted business type and the business type sample corresponding to the non-cooperative business URL data sample to obtain an updated identifier; updating the model parameters of the original attacker according to the predicted business type to obtain an updated attacker; S4, using the updated identifier as the new original identifier, and using the updated attacker as the new original attacker, repeating the above steps S1-S3 until it is determined that the final identifier meets the convergence conditions, and determining the final identifier and the corresponding attacker as the trained class generative adversarial network model.
[0014] In one embodiment, the method further includes: acquiring initial cooperative business description data; and serializing the initial cooperative business description data through a preset text preprocessor to obtain the cooperative business description data.
[0015] In a second aspect, an embodiment of the present application provides a URL detection device, which is similar to a generative adversarial network model and includes: an attacker and an identifier, and the identifier includes: a feature extraction unit and a fully connected unit, and the device includes the following modules.
[0016] A business type determination module is used to generate simulated non-cooperative business URL data through the attacker according to the cooperative business description data of the content distribution network CDN; perform feature extraction on multiple fields of the simulated non-cooperative business URL data through the feature extraction unit to obtain field feature vectors corresponding to each of the multiple fields, and perform feature extraction on the cooperative business description data to obtain a first cooperative business feature vector; and determine the business type of the simulated non-cooperative business URL data according to multiple field feature vectors and the first cooperative business feature vector through the fully connected unit.
[0017] The detection result determination module is used to obtain the URL detection result based on the business type.
[0018] In a third aspect, an embodiment of the present application provides a terminal, including a memory, a transceiver, and a processor.
[0019] A memory is used to store a computer program; a transceiver is used to send and receive data under the control of the processor; and a processor is used to read the computer program in the memory and perform the following operations.
[0020] Through the attacker, simulated non-cooperative business URL data is generated according to the cooperative business description data of the content distribution network CDN; through the feature extraction unit, feature extraction is performed on multiple fields of the simulated non-cooperative business URL data to obtain field feature vectors corresponding to each of the multiple fields, and feature extraction is performed on the cooperative business description data to obtain a first cooperative business feature vector; through the fully connected unit, the business type of the simulated non-cooperative business URL data is determined according to multiple field feature vectors and the first cooperative business feature vector; based on the business type, a URL detection result is obtained.
[0021] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements the steps of the URL detection method described in the first aspect when executing the program.
[0022] In a fifth aspect, an embodiment of the present application further provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the URL detection method described in the first aspect are implemented.
[0023] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the URL detection method described in the first aspect when executed by a processor.
[0024] The URL detection method, device, electronic device and storage medium provided in the embodiments of the present application generate simulated non-cooperative business URL data through an attacker according to the cooperative business description data of the content distribution network CDN; perform feature extraction on multiple fields of the simulated non-cooperative business URL data through a feature extraction unit to obtain field feature vectors corresponding to each of the multiple fields, and perform feature extraction on the cooperative business description data to obtain a first cooperative business feature vector; determine the business type of the simulated non-cooperative business URL data according to the multiple field feature vectors and the first cooperative business feature vector through a fully connected unit; and obtain a URL detection result based on the business type. This method does not require human intervention. Through the attacker and identifier (including feature extraction unit and fully connected unit) in the generative adversarial network model, it can accurately determine the business type (i.e. CDN cooperative business / CDN non-cooperative business) of the simulated non-cooperative business URL data, and then determine the URL detection result. The URL detection result can effectively characterize whether the directional traffic fraud corresponding to the CDN non-cooperative business URL occurs at this time. While ensuring the detection efficiency, it effectively improves the accuracy of URL detection, helps to accurately identify CDN non-cooperative business URLs, and can reduce the risk of ICP suffering from directional traffic fraud. It lays a foundation for improving the automation and intelligence level of ICP directional traffic fraud identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 It is a schematic diagram of a CDN service system provided by the prior art.
[0027] Figure 2 It is a flowchart of the URL detection method provided in the embodiment of the present application.
[0028] Figure 3 It is a schematic diagram of the structure of the attacker provided in the embodiment of the present application.
[0029] Figure 4 It is a schematic diagram of the structure of the identifier provided in the embodiment of the present application.
[0030] Figure 5 It is a structural diagram of the URL detection device provided in an embodiment of the present application.
[0031] Figure 6 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application.
[0032] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0034] In order to better understand the embodiments of the present application, the background technology is first described in detail.
[0035] With the continuous development of mobile Internet technology and the 5th Generation mobilecommunication technology (5G) and the advent of the 5G+ era, the number of users in the mobile Internet environment has gradually increased. There are more and more high-definition live broadcasts such as 4K and 50-frame original pictures, and the network traffic has also increased significantly. The original single-site streaming service provision model can no longer meet the needs of users. At the same time, due to the limitations of the network bandwidth of a single operator and the delay in the response between cross-networks, the user experience will be affected to varying degrees. Using CDN acceleration for streaming media, pictures and other resources can bring users a better mobile Internet experience.
[0036] Based on the above background, operators provide CDN services to accelerate content in the whole network environment to improve user experience. CDN acceleration services mainly include: on-demand acceleration, live broadcast acceleration, download acceleration, and image page acceleration, providing users with nationwide mainstream Internet Service Provider (ISP) acceleration services on personal computers (PC), mobile phones, tablets and set-top boxes.
[0037] For example, Figure 1 Schematic diagram of CDN service system provided by prior art. Figure 1 As can be seen in Figure 1, content center nodes, regional nodes, and edge service nodes are the main business nodes of the CDN network. The three form a three-level network structure from top to bottom, and together constitute the CDN business system to realize the "data business" function. The data business functions in the CDN network include: access, storage / caching, processing (data slicing, transcoding, etc.) and distribution of user-accessed content.
[0038] The URL list address of CDN directional traffic data is limited to the business server URL used in the cooperative business application (Application, APP), and cannot be mixed with the server URL of non-cooperative business. The existing CDN directional traffic non-cooperative business URL detection method mainly relies on expert experience and manual judgment, but this method has low detection efficiency and high requirements on personnel skills. At the same time, CDN non-cooperative business URLs vary a lot, making it difficult to ensure the accuracy of URL detection.
[0039] To solve the above problems, the embodiments of the present application provide a URL detection method, device, electronic device and storage medium. The method does not require human participation. Through the attacker and identifier (including a feature extraction unit and a fully connected unit) in the class generative adversarial network model, it can accurately determine the business type (i.e., CDN cooperative business / CDN non-cooperative business) of the simulated non-cooperative business URL data, and then determine the URL detection result. The URL detection result can effectively characterize whether the directional traffic fraud corresponding to the CDN non-cooperative business URL occurs at this time. While ensuring the detection efficiency, it effectively improves the accuracy of URL detection, helps to accurately identify CDN non-cooperative business URLs, and can reduce the risk of ICP suffering from directional traffic fraud, laying a foundation for improving the automation and intelligence level of ICP directional traffic fraud identification.
[0040] In addition, the existing Generative Adversarial Network (GAN) model mainly consists of two parts, namely the generator (G) and the discriminator (D). The two are in a competitive relationship. Simply put, a discriminator that can distinguish between real data and generated data is added to the generation process, so that the generator and the discriminator compete with each other. The role of the discriminator is to try to distinguish between real data and generated data, and the role of the generator is to try to improve itself so as to generate data that can deceive the discriminator, that is, generated data (fake data). As time goes by, the generator and the discriminator are constantly competing. When the discriminator can no longer distinguish between real and fake data, it is considered that the generator has achieved a very good effect.
[0041] The existing conditional generative adversarial network (CGAN) adds a condition y to the GAN, and adds conditions to the generator and discriminator for training, so that the trained model can generate the required data according to the set conditions. Both the generator and the discriminator add additional information y as a condition, and y can be any information, such as category information and data of other modalities. By transmitting the additional information y to the generator and the discriminator, the conditional GAN is realized.
[0042] GAN has an obvious feature, that is, when GAN training is successful, only the generator is often retained, and the discriminator is mostly "discarded". However, in a reasonable GAN, the generator and the discriminator usually have parameters of the same order of magnitude. Discarding the discriminator means that half of the parameters are wasted. After the discriminator is modified in the embodiment of the present application, the modified discriminator (i.e., the identifier) can be used for online identification of CDN directional traffic URLs.
[0043] Figure 2 Schematic diagram of the flow of the URL detection method provided in the embodiment of the present application. Figure 2 , an embodiment of the present application provides a URL detection method, a class generative adversarial network model may include: an attacker and an identifier, the identifier may include: a feature extraction unit and a fully connected unit, and the method includes the following steps 201 and 204.
[0044] Step 201: Generate simulated non-cooperative service URL data through an attacker according to cooperative service description data of a content delivery network CDN.
[0045] Among them, the attacker can also be called a CDN non-cooperative business URL attacker; the identifier can also be called a CDN directed traffic URL fraud identifier.
[0046] Optionally, the cooperative service description data may include: description information such as content and features of the CDN cooperative service.
[0047] After obtaining the cooperative service description data of the CDN, the electronic device processes the cooperative service description data through an attacker to generate simulated non-cooperative service URL data, providing data support for a subsequent identifier to determine the service type of the simulated non-cooperative service URL data.
[0048] In one embodiment, the attacker may include: a service description encoder, a noise encoder, a merging layer, a decoder, and a second output layer; the electronic device generates simulated non-cooperative service URL data according to the cooperative service description data of the content distribution network CDN through the attacker, which may include: the electronic device determines the second cooperative service feature vector corresponding to the cooperative service description data through the service description encoder; the electronic device determines the noise feature vector corresponding to the acquired random noise data through the noise encoder; the electronic device merges the second cooperative service feature vector and the noise feature vector through the merging layer to obtain a spliced vector; the electronic device extracts features from the spliced vector through the decoder to generate initial simulated non-cooperative service URL data; the electronic device processes the initial simulated non-cooperative service URL data through the second output layer to obtain simulated non-cooperative service URL data.
[0049] Optionally, the random noise data may be randomly drawn by the electronic device from a normal distribution and may be represented by u.
[0050] It should be noted that the timing of the electronic device determining the second cooperative service feature vector through the service description encoder and the electronic device determining the noise feature vector through the noise encoder is not limited.
[0051] For example, Figure 3 Schematic diagram of the structure of the attacker provided in the embodiment of the present application. Figure 3 It can be seen that the attacker is mainly composed of an encoder and a decoder. The encoder includes: a business description encoder and a noise encoder. The business description encoder is composed of a long short-term memory network (Long Short-Term Memory, LSTM), and three layers of LSTM are set. The number of neurons in each layer of LSTM is set to 64, and the activation function is set to relu. The noise encoder is composed of LSTM, and three layers of LSTM are set. The number of neurons in each layer of LSTM is set to 32, and the activation function is set to relu. In this way, the electronic device inputs the cooperative business description data into the business description encoder, and obtains the second cooperative business feature vector C ( Figure 3 At the same time, the electronic device obtains random noise data u and inputs the random noise data u into the noise encoder to obtain the noise feature vector U ( Figure 3 It is abbreviated as the eigenvector U in the text.
[0052] Next, the electronic device inputs the second cooperative service feature vector C and the noise feature vector U into the merging layer, and the merging layer merges the second cooperative service feature vector C and the noise feature vector U to obtain a spliced vector V. Figure 3 The decoder in is composed of LSTM, and three layers of LSTM are set. The number of neurons in each layer of LSTM is set to 128, and the activation function is set to relu. In this way, the electronic device inputs the spliced vector V into the decoder, and the decoder extracts features from the spliced vector V to generate initial simulated non-cooperative business URL data. Then, the electronic device inputs the initial simulated non-cooperative business URL data into the second output layer for processing. Figure 3 The fully connected layer (Dense) in is the second output layer. The number of Dense fully connected neurons is set to the same size as the dimension of the initial simulated non-cooperative business URL data. The activation function is set to softmax. The output result of softmax is sent to the multi-class cross entropy loss function to convert the dimension of the output result into the target dimension of the final output, and the simulated non-cooperative business URL data is obtained.
[0053] In one embodiment, the method may further include: the electronic device acquires initial cooperative business description data; the electronic device performs serialization processing on the initial cooperative business description data through a preset text preprocessor to obtain the cooperative business description data.
[0054] Among them, the initial cooperation business description data is data that has not been preprocessed.
[0055] The electronic device may first receive the initial cooperative service description data sent by the CDN application party ICP and forwarded by the CDN dispatch center, and then serialize the initial cooperative service description data through a preset text preprocessor to obtain the cooperative service description data.
[0056] Step 202: Perform feature extraction on multiple fields of simulated non-cooperative business URL data through a feature extraction unit to obtain field feature vectors corresponding to each of the multiple fields, and perform feature extraction on the cooperative business description data to obtain a first cooperative business feature vector.
[0057] The electronic device can extract features from multiple fields of the simulated non-cooperative service URL data through the feature extraction unit to obtain field feature vectors corresponding to each of the multiple fields. At the same time, the electronic device can extract features from the cooperative service description data through the feature extraction unit to obtain a first cooperative service feature vector, so that the service type of the simulated non-cooperative service URL data can be determined later through the full connection unit.
[0058] In one embodiment, the identifier may also include: an input layer, the input layer is used to split the simulated non-cooperative business URL data into multiple fields; the feature extraction unit may include: a word embedding layer and a long short-term memory network LSTM layer; the electronic device performs feature extraction on multiple fields of the simulated non-cooperative business URL data through the feature extraction unit to obtain field feature vectors corresponding to each of the multiple fields, which may include: the electronic device converts the multiple fields into corresponding numerical vectors through the word embedding layer; the electronic device performs feature extraction on multiple numerical vectors through the LSTM layer to obtain field feature vectors corresponding to each of the multiple numerical vectors.
[0059] For example, a URL can generally be expressed as: <scheme>:<scheme description part>; the specific syntax rule is: scheme: / / host.domain:port / path / filename.
[0060] Among them, scheme: specifies the type of Internet service. The mainstream type is Hypertext Transfer Protocol (HTTP).
[0061] domain: specifies the Internet domain name, for example: crazyit.org, fkjava.org, etc.
[0062] host: Specifies the host in this domain. If omitted, the default host for HTTP is the World Wide Web (WWW).
[0063] port: Specifies the port number of the host. The port number can usually be omitted, and the default port number for HTTP service is 80.
[0064] path: specifies the path on the remote server. This path can also be omitted. If this path is omitted, the root directory of the website will be located by default.
[0065] filename: Specifies the name of the remote document (i.e., file name). If the file name is omitted, it will usually locate files such as index.html, index.htm, or other files set by the network (Web) server.
[0066] For example, Figure 4 Schematic diagram of the structure of the identifier provided by the embodiment of the present application. Figure 4 It can be seen that the electronic device first splits the simulated non-cooperative business URL data into 6 fields through the input layer, namely the scheme field, domain field, host field, port field, path field and filename field. Figure 4In the example, the number of neurons in the word embedding layer and the LSTM layer are both set to 32, and the activation function is set to relu. In this way, the electronic device converts the above 6 fields into their corresponding numerical vectors through the word embedding layer, and then extracts the features of the 6 numerical vectors through the LSTM layer to obtain the field feature vectors corresponding to the 6 numerical vectors, that is, to obtain the field feature vectors corresponding to the above 6 fields.
[0067] Optionally, the electronic device performs feature extraction on the cooperative business description data through a feature extraction unit to obtain a first cooperative business feature vector, which may include: the electronic device converts the cooperative business description data into a target numerical vector through a word embedding layer; the electronic device performs feature extraction on the target numerical vector through an LSTM layer to obtain a first cooperative business feature vector.
[0068] Step 203: Determine the service type of the simulated non-cooperative service URL data through the fully connected unit according to the multiple field feature vectors and the first cooperative service feature vector.
[0069] After determining multiple field feature vectors and the first cooperative service feature vector, the electronic device analyzes and processes the multiple field feature vectors and the first cooperative service feature vector through a fully connected unit to obtain a business type (CDN cooperative service / CDN non-cooperative service) of simulated non-cooperative service URL data.
[0070] In one embodiment, the fully connected unit may include: a fully connected attention layer and a first output layer; the electronic device determines the business type of the simulated non-cooperative business URL data according to multiple field feature vectors and the first cooperative business feature vector through the fully connected unit, which may include: for each field feature vector in the multiple field feature vectors, the electronic device determines the correlation result between the field feature vector and the first cooperative business feature vector through the attention mechanism in the fully connected attention layer; the electronic device determines the attention weights corresponding to each of the multiple field feature vectors according to the correlation results corresponding to each of the multiple field feature vectors through the fully connected attention layer; the electronic device determines the product between each field feature vector and the corresponding attention weight through the fully connected attention layer, and determines the sum of all products as the weighted sum result; the electronic device processes the weighted sum result through the first output layer to obtain the business type of the simulated non-cooperative business URL data.
[0071] from Figure 4It can be seen that the fully connected attention layer includes two sub-fully connected attention layers (Denseattention). The electronic device inputs the above 6 field feature vectors and the first cooperative business feature vector into the fully connected attention layer. For each of the 6 field feature vectors, the electronic device focuses on the relevant part between the field feature vector and the first cooperative business feature vector through the attention mechanism in the fully connected attention layer, that is, determines the correlation result between the field feature vector and the first cooperative business feature vector. In this way, the electronic device determines the attention weights corresponding to each of the 6 field feature vectors according to the correlation results corresponding to each of the 6 field feature vectors through the fully connected attention layer; then, the electronic device can determine the product between each field feature vector and the corresponding attention weight through the fully connected attention layer, and determine the sum of all products as the weighted sum result; then, the electronic device inputs the weighted sum result to the first output layer for processing. Figure 4 The fully connected layer (Dense) in is the first output layer, which contains 1 Dense fully connected neuron. The activation function is set to sigmoid. The output result of sigmoid is sent to the binary cross entropy loss function. The final output value of the first output layer is 1 or 0 (1 represents that the simulated non-cooperative business URL data belongs to the CDN cooperative business, and 0 represents that the simulated non-cooperative business URL data belongs to the CDN non-cooperative business). The business type of the simulated non-cooperative business URL data (CDN cooperative business / CDN non-cooperative business) can be obtained.
[0072] In one embodiment, the original class generative adversarial network model may include: an original attacker and an original recognizer; the class generative adversarial network model is trained based on the following steps.
[0073] S1. The electronic device generates simulated non-cooperative service URL data through the original attacker according to the cooperative service description data sample and the random noise data sample.
[0074] S2. The electronic device determines the predicted service type corresponding to the simulated non-cooperative service URL data through the original identifier according to the simulated non-cooperative service URL data and the cooperative service description data sample.
[0075] S3. The electronic device updates the model parameters of the original identifier according to the predicted business type and the business type sample corresponding to the non-cooperative business URL data sample to obtain an updated identifier; the electronic device updates the model parameters of the original attacker according to the predicted business type to obtain an updated attacker.
[0076] S4. The electronic device uses the updated identifier as the new original identifier and the updated attacker as the new original attacker, and repeats the above steps S1-S3 until it is determined that the final identifier meets the convergence condition, and determines the final identifier and the corresponding attacker as the trained class generative adversarial network model.
[0077] Among them, the original class generative adversarial network model is an untrained model.
[0078] Optionally, the electronic device determines that the final identifier satisfies the convergence condition, which may include: when it is determined that the final identifier cannot identify whether the simulated non-cooperative service URL data generated by the corresponding attacker is a CDN cooperative service or a CDN non-cooperative service, the electronic device determines that the final identifier satisfies the convergence condition.
[0079] Specifically, in the process of training the original class generative adversarial network model (including the original attacker and the original recognizer), the electronic device may first obtain a cooperative business description data sample, a cooperative business URL data sample corresponding to the cooperative business description data sample, a non-cooperative business URL data sample corresponding to the cooperative business description data sample, a business type sample corresponding to the cooperative business URL data sample, a business type sample corresponding to the non-cooperative business URL data sample, and a random noise sample; and the electronic device may initialize the model parameters of the original attacker and the model parameters of the original recognizer. The above-mentioned cooperative business URL data samples and non-cooperative business URL data samples may be collectively referred to as URL data samples.
[0080] Next, S1, the electronic device inputs the cooperative business description data sample and the random noise sample into the original attacker, and the original attacker can generate simulated non-cooperative business URL data (false data) corresponding to the above-mentioned non-cooperative business URL data sample (real data sample) based on the cooperative business description data sample and the random noise sample; S2, the electronic device inputs the simulated non-cooperative business URL data and the cooperative business description data sample into the original identifier, and the original identifier processes the simulated non-cooperative business URL data and the cooperative business description data sample to obtain the predicted business type corresponding to the simulated non-cooperative business URL data (for ease of representation, referred to as the first predicted business type below), and the original identifier learns to give the first predicted business type a lower first prediction score, and the electronic device can input the cooperative business URL data sample and the cooperative business description data sample into the original identifier, and the original identifier processes the cooperative business URL data sample and the cooperative business description data sample to obtain the cooperative business URL The second predicted business type corresponding to the data sample, the original identifier learns to give the second predicted business type a higher second prediction score; S3, while the model parameters of the original attacker remain unchanged, that is, the model parameters of the original attacker are fixed, and the original identifier is started to be trained: the electronic device can update the model parameters of the original identifier according to the business type samples corresponding to the first predicted business type and the non-cooperative business URL data sample, and the business type samples corresponding to the above-mentioned second predicted business type and the cooperative business URL data sample, to obtain an updated identifier; then, while the model parameters of the updated identifier remain unchanged, that is, the model parameters of the updated identifier are fixed, and the original attacker is started to be trained: the electronic device can update the model parameters of the original attacker according to the above-mentioned first predicted business type, with the goal of maximizing the first prediction score corresponding to the first predicted business type, to obtain an updated attacker. It can be understood that the first prediction score can be used as a reward in learning, thereby updating the model parameters of the original attacker.
[0081] Then, S4, the electronic device uses the updated identifier as the new original identifier and the updated attacker as the new original attacker, and repeats the above steps S1-S3 until it is determined that the final identifier meets the convergence conditions, and the final identifier and the corresponding attacker are determined as the trained class generative adversarial network model. This class of generative adversarial network model has high accuracy and strong generalization ability, and can ensure the accuracy of the output results.
[0082] It should be noted that the original identifier is responsible for determining how big the gap is between the simulated non-cooperative service URL data generated by the original attacker and the real non-cooperative service URL data sample.
[0083] Exemplarily, the cooperative business description data samples include a large number of sub-cooperative business description data samples; the cooperative business URL data samples include a large number of sub-cooperative business URL data samples, and the non-cooperative business URL data samples include a large number of sub-non-cooperative business URL data samples; the business type samples corresponding to the cooperative business URL data samples include a large number of first sub-business type samples (all belonging to CDN cooperative business, and the mark carried is 1), and the business type samples corresponding to the non-cooperative business URL data samples include a large number of second sub-business type samples (all belonging to CDN non-cooperative business, and the mark carried is 0). Among them, the sub-cooperative business description data samples correspond to the sub-cooperative business URL data samples one-to-one, the sub-cooperative business description data samples correspond to the sub-non-cooperative business URL data samples one-to-one, the sub-cooperative business URL data samples correspond to the first sub-business type samples one-to-one, and the sub-non-cooperative business URL data samples correspond to the second sub-business type samples one-to-one.
[0084] Example 1: For any cooperative service i (1≤i≤N) of CDN, N is the total number of cooperative services. Assuming that the number of sub-cooperative service description data samples included in the cooperative service description data sample is N, any sub-cooperative service description data sample is available. express, ,in, Indicates the target coding sequence length; sub-cooperative business description data sample The corresponding sub-cooperative business URL data sample is available express, ,in, Indicates the length of the first target index sequence; Sub-cooperative business description data sample The corresponding sub-non-cooperative business URL data sample is available express, ,in, Indicates the length of the second target index sequence. Optional, and They can be equal or unequal.
[0085] Optionally, the method may also include: the electronic device uniformly serializes the initial cooperative business description data sample to obtain the cooperative business description data sample; the electronic device marks the initial URL data sample corresponding to the initial cooperative business description data sample to obtain the target URL data sample; the electronic device uniformly serializes the target URL data sample to obtain the URL data sample.
[0086] Among them, the initial cooperative business description data sample and the corresponding initial URL data sample are samples that have not been preprocessed.
[0087] The above-mentioned marking and serialization processing can be referred to as a preprocessing process. Optionally, the electronic device can implement the preprocessing process through a preset text preprocessor.
[0088] The initial cooperative business description data sample includes a large number of sub-initial cooperative business description data samples; the initial URL data samples corresponding to the initial cooperative business description data sample include: initial cooperative business URL data samples and initial non-cooperative business URL data samples, the initial cooperative business URL data samples include a large number of sub-initial cooperative business URL data samples, and the initial non-cooperative business URL data samples include a large number of sub-initial non-cooperative business URL data samples; the target URL data samples include: target cooperative business URL data samples and target non-cooperative business URL data samples, the target cooperative business URL data samples include a large number of sub-target cooperative business URL data samples, and the target non-cooperative business URL data samples include a large number of sub-target non-cooperative business URL data samples. Among them, the sub-initial cooperative business description data samples correspond to the sub-initial cooperative business URL data samples one-to-one, the sub-initial cooperative business description data samples correspond to the sub-initial non-cooperative business URL data samples one-to-one, the sub-initial cooperative business URL data samples correspond to the sub-target cooperative business URL data samples one-to-one, and the sub-initial non-cooperative business URL data samples correspond to the sub-target non-cooperative business URL data samples one-to-one.
[0089] In combination with Example 1 and Example 2, the number of sub-initial cooperative business description data samples included in the initial cooperative business description data sample is N, and the electronic device takes the longest length among the N sub-initial cooperative business description data samples. As the target coding sequence length involved in Example 1, in this way, the electronic device performs uniform serialization processing on N sub-initial cooperative service description data samples, and fills the length of each sub-initial cooperative service description data sample to After unified serialization, N sub-cooperative business description data samples are obtained. Any sub-cooperative business description data sample is the one involved in Example 1. .
[0090] In combination with Example 1 and Example 2, in Example 3, the electronic device marks the initial cooperative business URL data sample (including N sub-initial cooperative business URL data samples) as 1, and the marked initial cooperative business URL data sample is the target cooperative business URL data sample (including N sub-target cooperative business URL data samples), and marks the initial non-cooperative business URL data sample (including N sub-initial non-cooperative business URL data samples) as 0, and the marked initial non-cooperative business URL data sample is the target non-cooperative business URL data sample (including N sub-target non-cooperative business URL data samples). The electronic device takes the longest length of the N sub-target cooperative business URL data samples. As the first target index sequence length involved in Example 1, in this way, the electronic device performs unified serialization processing on N sub-target cooperative service URL data samples, and fills the length of each sub-target cooperative service URL data sample with After unified serialization, N sub-cooperative business URL data samples are obtained. Any sub-cooperative business URL data sample is the one involved in Example 1. Similarly, the electronic device takes the longest length among the N sub-target non-cooperative service URL data samples. As the second target index sequence length involved in Example 1, in this way, the electronic device performs unified serialization processing on N sub-target non-cooperative service URL data samples, and fills the length of each sub-target non-cooperative service URL data sample with After unified serialization, N sub-non-cooperative service URL data samples are obtained. Any sub-non-cooperative service URL data sample is the one involved in Example 1. .
[0091] Data sample described by sub-cooperative business and simulate non-cooperative business URL data For example, the objective function of the original recognizer can be expressed as: Objective function = ;in, represents the model parameters of the original recognizer; This is the reward mentioned above. When it is positive, the model parameters are updated To increase ,when When it is a negative value, the model parameters are updated To reduce .
[0092] Step 204: Get the URL detection result based on the business type.
[0093] After determining the service type (CDN cooperative service / CDN non-cooperative service) of the simulated non-cooperative service URL data, the electronic device can obtain a URL detection result based on the service type. The URL detection result can effectively characterize whether the targeted traffic fraud corresponding to the CDN non-cooperative service URL occurs at this time.
[0094] In the embodiment of the present application, an attacker generates simulated non-cooperative service URL data according to the cooperative service description data of the content distribution network CDN; a feature extraction unit extracts features from multiple fields of the simulated non-cooperative service URL data to obtain field feature vectors corresponding to each of the multiple fields, and extracts features from the cooperative service description data to obtain a first cooperative service feature vector; a fully connected unit determines the service type of the simulated non-cooperative service URL data according to multiple field feature vectors and the first cooperative service feature vector; and a URL detection result is obtained based on the service type. The method does not require manual participation. Through the attacker and the identifier (including the feature extraction unit and the fully connected unit) in the class generation adversarial network model, the service type (i.e., CDN cooperative service / CDN non-cooperative service) of the simulated non-cooperative service URL data can be accurately determined, and then the URL detection result can be determined. The URL detection result can effectively characterize whether the directional traffic fraud behavior corresponding to the CDN non-cooperative service URL occurs at this time. While ensuring the detection efficiency, it effectively improves the accuracy of URL detection, helps to accurately identify CDN non-cooperative service URLs, can reduce the risk of ICP suffering from directional traffic fraud, and lays a foundation for improving the automation and intelligence level of ICP directional traffic fraud identification.
[0095] The URL detection device provided in the embodiment of the present application is described below. The URL detection device described below and the URL detection method described above can be referenced to each other.
[0096] Figure 5 Schematic diagram of the structure of the URL detection device provided in the embodiment of the present application. Figure 5 , an embodiment of the present application provides a URL detection device, a generative adversarial network model includes: an attacker and an identifier, the identifier includes: a feature extraction unit and a fully connected unit, and the device includes the following business type determination module 501 and detection result determination module 502.
[0097] The service type determination module 501 is used to generate simulated non-cooperative service URL data through the attacker according to the cooperative service description data of the content distribution network CDN; perform feature extraction on multiple fields of the simulated non-cooperative service URL data through the feature extraction unit to obtain field feature vectors corresponding to each of the multiple fields, and perform feature extraction on the cooperative service description data to obtain a first cooperative service feature vector; and determine the service type of the simulated non-cooperative service URL data according to multiple field feature vectors and the first cooperative service feature vector through the fully connected unit.
[0098] The detection result determination module 502 is used to obtain the URL detection result based on the business type.
[0099] Optionally, the fully connected unit may include: a fully connected attention layer and a first output layer; a business type determination module 501, which is specifically used to determine, for each field feature vector in the multiple field feature vectors, a correlation result between the field feature vector and the first cooperative business feature vector through the attention mechanism in the fully connected attention layer; through the fully connected attention layer, determine the attention weights corresponding to each of the multiple field feature vectors according to the correlation results corresponding to each of the multiple field feature vectors; through the fully connected attention layer, determine the product between each field feature vector and the corresponding attention weight, and determine the sum of all products as a weighted sum result; through the first output layer, process the weighted sum result to obtain the business type of the simulated non-cooperative business URL data.
[0100] Optionally, the identifier may also include: an input layer, which is used to split the simulated non-cooperative business URL data into multiple fields; the feature extraction unit may include: a word embedding layer and a long short-term memory network LSTM layer; a business type determination module 501, which is specifically used to convert the multiple fields into respective corresponding numerical vectors through the word embedding layer; through the LSTM layer, feature extraction is performed on the multiple numerical vectors to obtain field feature vectors corresponding to each of the multiple numerical vectors.
[0101] Optionally, the attacker may include: a business description encoder, a noise encoder, a merging layer, a decoder and a second output layer; a business type determination module 501, which is specifically used to determine the second cooperative business feature vector corresponding to the cooperative business description data through the business description encoder; determine the noise feature vector corresponding to the acquired random noise data through the noise encoder; merge the second cooperative business feature vector and the noise feature vector through the merging layer to obtain a spliced vector; extract features from the spliced vector through the decoder to generate initial simulated non-cooperative business URL data; and process the initial simulated non-cooperative business URL data through the second output layer to obtain the simulated non-cooperative business URL data.
[0102] Optionally, the original class generative adversarial network model includes: an original attacker and an original identifier; the class generative adversarial network model is trained based on the following steps: S1, using the original attacker, based on the cooperative business description data sample and the random noise data sample, generate simulated non-cooperative business URL data; S2, using the original identifier, based on the simulated non-cooperative business URL data and the cooperative business description data sample, determine the predicted business type corresponding to the simulated non-cooperative business URL data; S3, based on the predicted business type and the business type sample corresponding to the non-cooperative business URL data sample, update the model parameters of the original identifier to obtain an updated identifier; based on the predicted business type, update the model parameters of the original attacker to obtain an updated attacker; S4, use the updated identifier as the new original identifier, and use the updated attacker as the new original attacker, repeat the above steps S1-S3 until it is determined that the final identifier meets the convergence conditions, and determine the final identifier and the corresponding attacker as the trained class generative adversarial network model.
[0103] Optionally, the service type determination module 501 is further configured to obtain initial cooperative service description data; and serialize the initial cooperative service description data through a preset text preprocessor to obtain the cooperative service description data.
[0104] The terminal involved in the embodiments of the present application may be a device that provides voice and / or data connectivity to a user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem, etc. In different systems, the name of the terminal device may also be different. For example, in a 5G system, the terminal device may be called a user equipment (UE).
[0105] Figure 6 is a schematic diagram of the structure of the terminal provided in the embodiment of the present application, referring to Figure 6 , an embodiment of the present application further provides a terminal, which may include: a memory 610, a transceiver 620 and a processor 630.
[0106] The memory 610 is used to store computer programs; the transceiver 620 is used to send and receive data under the control of the processor 630; the processor 630 is used to read the computer program in the memory 610 and perform the following operations.
[0107] Through the attacker, simulated non-cooperative business URL data is generated according to the cooperative business description data of the content distribution network CDN; through the feature extraction unit, feature extraction is performed on multiple fields of the simulated non-cooperative business URL data to obtain field feature vectors corresponding to each of the multiple fields, and feature extraction is performed on the cooperative business description data to obtain a first cooperative business feature vector; through the fully connected unit, the business type of the simulated non-cooperative business URL data is determined according to multiple field feature vectors and the first cooperative business feature vector; based on the business type, a URL detection result is obtained.
[0108] Among them, Figure 6 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 630 and various circuits of memory represented by memory 610 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 620 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. For different user devices, the user interface 640 may also be an interface capable of externally connecting to the required internal devices.
[0109] The processor 630 is responsible for managing the bus architecture and general processing, and the memory 610 can store data used by the processor 630 when performing operations.
[0110] The processor 630 is used to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions by calling the computer program stored in the memory 610. The processor and the memory may also be arranged physically separately.
[0111] It should be noted here that the terminal provided in the embodiment of the present application can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0112] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call a computer program in the memory 730 to execute the steps of the URL detection method, including the following steps.
[0113] Through the attacker, simulated non-cooperative business URL data is generated according to the cooperative business description data of the content distribution network CDN; through the feature extraction unit, feature extraction is performed on multiple fields of the simulated non-cooperative business URL data to obtain field feature vectors corresponding to each of the multiple fields, and feature extraction is performed on the cooperative business description data to obtain a first cooperative business feature vector; through the fully connected unit, the business type of the simulated non-cooperative business URL data is determined according to multiple field feature vectors and the first cooperative business feature vector; based on the business type, a URL detection result is obtained.
[0114] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, 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, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0115] On the other hand, an embodiment of the present application also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the steps of the URL detection method provided in the above embodiments, including the following steps.
[0116] Through the attacker, simulated non-cooperative business URL data is generated according to the cooperative business description data of the content distribution network CDN; through the feature extraction unit, feature extraction is performed on multiple fields of the simulated non-cooperative business URL data to obtain field feature vectors corresponding to each of the multiple fields, and feature extraction is performed on the cooperative business description data to obtain a first cooperative business feature vector; through the fully connected unit, the business type of the simulated non-cooperative business URL data is determined according to multiple field feature vectors and the first cooperative business feature vector; based on the business type, a URL detection result is obtained.
[0117] On the other hand, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the steps of the URL detection method provided in the above embodiments, including the following steps.
[0118] Through the attacker, simulated non-cooperative business URL data is generated according to the cooperative business description data of the content distribution network CDN; through the feature extraction unit, feature extraction is performed on multiple fields of the simulated non-cooperative business URL data to obtain field feature vectors corresponding to each of the multiple fields, and feature extraction is performed on the cooperative business description data to obtain a first cooperative business feature vector; through the fully connected unit, the business type of the simulated non-cooperative business URL data is determined according to multiple field feature vectors and the first cooperative business feature vector; based on the business type, a URL detection result is obtained.
[0119] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0120] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0121] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. 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 URL detection method, characterized in that: The generative adversarial network model includes: an attacker and an identifier, the identifier includes: a feature extraction unit and a fully connected unit, and the method includes: Generate simulated non-cooperative service URL data based on cooperative service description data of the content distribution network CDN through the attacker; By means of the feature extraction unit, feature extraction is performed on multiple fields of the simulated non-cooperative service URL data to obtain field feature vectors corresponding to each of the multiple fields, and feature extraction is performed on the cooperative service description data to obtain a first cooperative service feature vector; Determining, by the fully connected unit, the business type of the simulated non-cooperative business URL data according to a plurality of field feature vectors and the first cooperative business feature vector; Based on the business type, a URL detection result is obtained.
2. The URL detection method according to claim 1, characterized in that: The fully connected unit includes: a fully connected attention layer and a first output layer; the business type of the simulated non-cooperative business URL data is determined by the fully connected unit according to multiple field feature vectors and the first cooperative business feature vector, including: For each field feature vector in the multiple field feature vectors, determining a correlation result between the field feature vector and the first cooperative business feature vector through an attention mechanism in the fully connected attention layer; Determining, by the fully connected attention layer, attention weights corresponding to the multiple field feature vectors according to the correlation results corresponding to the multiple field feature vectors; Determine the product between each field feature vector and the corresponding attention weight through the fully connected attention layer, and determine the sum of all products as the weighted sum result; The weighted sum result is processed through the first output layer to obtain the business type of the simulated non-cooperative business URL data.
3. The URL detection method according to claim 1, characterized in that: The identifier further includes: an input layer, the input layer is used to split the simulated non-cooperative service URL data into multiple fields; the feature extraction unit includes: a word embedding layer and a long short-term memory network LSTM layer; The feature extraction unit extracts features from multiple fields of the simulated non-cooperative service URL data to obtain field feature vectors corresponding to each of the multiple fields, including: By means of the word embedding layer, the multiple fields are converted into respective corresponding numerical vectors; Through the LSTM layer, feature extraction is performed on multiple numerical vectors to obtain field feature vectors corresponding to each of the multiple numerical vectors.
4. The URL detection method according to claim 1, characterized in that: The attacker includes: a service description encoder, a noise encoder, a merging layer, a decoder, and a second output layer; the attacker generates simulated non-cooperative service URL data according to cooperative service description data of a content distribution network CDN, including: Determine, by means of the service description encoder, a second cooperative service feature vector corresponding to the cooperative service description data; determine, by means of the noise encoder, a noise feature vector corresponding to the acquired random noise data; By means of the merging layer, the second cooperative service feature vector and the noise feature vector are merged to obtain a spliced vector; by means of the decoder, features are extracted from the spliced vector to generate initial simulated non-cooperative service URL data; The initial simulated non-cooperative service URL data is processed through the second output layer to obtain the simulated non-cooperative service URL data.
5. The URL detection method according to any one of claims 1 to 4, characterized in that: The original class generative adversarial network model includes: an original attacker and an original recognizer; the class generative adversarial network model is trained based on the following steps: S1, using the original attacker, generating simulated non-cooperative service URL data according to cooperative service description data samples and random noise data samples; S2, determining the predicted service type corresponding to the simulated non-cooperative service URL data according to the simulated non-cooperative service URL data and the cooperative service description data sample through the original identifier; S3, according to the predicted business type and the business type sample corresponding to the non-cooperative business URL data sample, update the model parameters of the original identifier to obtain an updated identifier; according to the predicted business type, update the model parameters of the original attacker to obtain an updated attacker; S4. Use the updated recognizer as the new original recognizer and the updated attacker as the new original attacker, and repeat the above steps S1-S3 until it is determined that the final recognizer meets the convergence condition, and determine the final recognizer and the corresponding attacker as the trained class generative adversarial network model.
6. The URL detection method according to any one of claims 1 to 4, characterized in that: The method further comprises: Obtain initial cooperative business description data; The initial cooperative business description data is serialized by a preset text preprocessor to obtain the cooperative business description data.
7. A URL detection device, characterized in that: The generative adversarial network model includes: an attacker and a recognizer, the recognizer includes: a feature extraction unit and a fully connected unit, and the device includes: A service type determination module is used to generate simulated non-cooperative service URL data according to the cooperative service description data of the content distribution network CDN through the attacker; perform feature extraction on multiple fields of the simulated non-cooperative service URL data through the feature extraction unit to obtain field feature vectors corresponding to each of the multiple fields, and perform feature extraction on the cooperative service description data to obtain a first cooperative service feature vector; determine the service type of the simulated non-cooperative service URL data according to multiple field feature vectors and the first cooperative service feature vector through the fully connected unit; The detection result determination module is used to obtain the URL detection result based on the business type.
8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the URL detection method according to any one of claims 1 to 6 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the URL detection method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the URL detection method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
A network access method and network device
CN109996201A
Malicious URL oversampling method based on generative adversarial network
CN110362997A
Medical image data set making method based on federated learning and generative adversarial network
CN115588487A
Data issuing method and device, equipment and storage medium
CN117216557A
Cloud service-oriented abnormal attack detection method and system based on 1D-TextCNN
CN117938494A
