Cross-network information identification and classification method and system

By using the ReLU activation function in the cross-network information recognition and classification system to approximate one-dimensional Wasserstein gradient flow, the problem of degradation of identification and classification accuracy in high-speed and dynamically changing data flow is solved, and higher identification and classification accuracy and better model adaptability are achieved.

CN119089234BActive Publication Date: 2025-04-18BEIJING HUADANG ZHIYUAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410500194.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2024-03-21
Filing Date
2024-04-24
Publication Date
2025-04-18
Estimated Expiration
2044-04-24

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify and classify cross-network information in high-speed, dynamically changing data streams, resulting in a decrease in identification and classification accuracy.

Method used

A neural network projection scheme is adopted, especially a two-layer neural network using ReLU activation function to approximate one-dimensional Wasserstein gradient flow, thereby achieving effective fitting of data distribution.

Benefits of technology

It improves the identification and classification accuracy of cross-network information, enhances the adaptability and generalization capabilities of the model, and can better handle novel data distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089234B_ABST
    Figure CN119089234B_ABST
Patent Text Reader

Abstract

The present application discloses a method and system for cross-network information identification and classification, including: a cloud server cluster acquires real-time cross-network information; preliminarily identifies and pre-classifies the cross-network information; constructs and trains a two-layer neural network model, and uses the trained two-layer neural network model to fit the one-dimensional Wasserstein gradient flow of the cross-network information; and based on the fitting results, corrects the preliminary identification and pre-classification results of the cross-network information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a method and system for cross-network information identification and classification. Background Art

[0002] With the rapid development of Internet technology, data traffic is expected to grow at an unprecedented rate. In this context, the identification and classification of cross-network information has become one of the key challenges in big data processing, especially in terms of real-time and accuracy.

[0003] Current data processing systems often need to find a balance between processing power and cost. On the one hand, processing large data sets requires expensive computing resources and storage capacity; on the other hand, in order to maintain high efficiency, data accuracy and quality need to be sacrificed. In order to achieve high-precision data analysis, researchers need to develop new algorithms and models.

[0004] In terms of enterprise data management and archive management, as data exchange and sharing between heterogeneous enterprise systems become more frequent, the identification and classification of cross-network information also faces new challenges. For example, in electronic archive management, documents from different channels and formats need to be uniformly classified and managed; in customer relationship management, customer interaction data from multiple channels such as social networks and call centers need to be integrated to conduct user profiling and behavior analysis. This requires that the identification and classification algorithm can effectively cope with the data diversity and dynamic changes in the cross-network environment.

[0005] In the existing technology, there are data stream processing frameworks such as Apache Kafka and Apache Flink, which have significant advantages in big data processing, real-time and scalability. However, when faced with high-speed, dynamically changing data streams, the complexity of cross-network information requires classification algorithms to have strong generalization capabilities. This is because the distribution of data varies greatly in different contexts, and conventional classification algorithms cannot adapt to these changes, resulting in reduced classification accuracy. Summary of the invention

[0006] In view of this, the present application provides a cross-network information recognition and classification method and system, which uses a neural network projection scheme, especially a two-layer neural network using the ReLU activation function to approximate the one-dimensional Wasserstein gradient flow, thereby achieving effective fitting of the data distribution, solving the problem that the prior art is unable to cope with the decline in recognition and classification accuracy when high-speed, dynamically changing data streams, and improving the recognition and classification accuracy.

[0007] The present application provides a cross-network information identification and classification method, including:

[0008] The cloud server cluster obtains real-time cross-network information;

[0009] Preliminarily identifying and pre-classifying the cross-network information;

[0010] Constructing and training a two-layer neural network model, and using the trained two-layer neural network model to fit the one-dimensional Wasserstein gradient flow of the cross-network information;

[0011] Based on the fitting result, the preliminary identification and pre-classification results of the cross-network information are corrected.

[0012] Optionally, constructing and training a two-layer neural network model, and using the two-layer neural network model to fit the one-dimensional Wasserstein gradient flow of the cross-network information, includes:

[0013] Constructing a two-layer neural network model and initializing parameters of the two-layer neural network model;

[0014] Obtaining a data training set, wherein the data training set shows Wasserstein distances between different data features;

[0015] Training the two-layer neural network model based on the data training set;

[0016] Based on the cross-network information, a probability distribution model in a one-dimensional Wasserstein space is established;

[0017] Based on the probability distribution model in the one-dimensional Wasserstein space, the approximate solution of the one-dimensional Wasserstein gradient flow is calculated using the trained two-layer neural network model.

[0018] Optionally, using the trained two-layer neural network model to calculate an approximate solution of a one-dimensional Wasserstein gradient flow includes:

[0019] Obtaining a Lagrangian mapping function in the one-dimensional Wasserstein space;

[0020] Utilizing the trained two-layer neural network model to perform approximate calculation of the Lagrangian mapping function, and checking the fitting of the data distribution in the calculation result;

[0021] The parameters of the two-layer neural network model are optimized by gradient descent method.

[0022] Optionally, using the trained two-layer neural network model to perform approximate calculation of the Lagrangian mapping function and checking the fitting of data distribution in the calculation result includes:

[0023] Using the trained two-layer neural network model to approximate the Lagrangian mapping function, and outputting the approximate calculation result;

[0024] The Wasserstein distance between the approximate calculation result and the actual distribution is calculated to determine the quality of the fit of the data distribution in the check calculation result.

[0025] Optionally, constructing a two-layer neural network model and initializing parameters of the two-layer neural network model include:

[0026] Design a two-layer neural network with an input layer, one or more hidden layers, and an output layer using the ReLU activation function;

[0027] Determine the number of neurons in each layer, where the number of neurons in the input layer is equal to the number of features, and the number of neurons in the output layer corresponds to the number of categories for classification tasks or the output of regression tasks;

[0028] Choose cross entropy loss or mean square error loss function according to the training task;

[0029] Choose an SGD optimizer or an Adam optimizer for adjusting network weights;

[0030] Set the batch size, learning rate, and regularization term.

[0031] Optionally, training the two-layer neural network model based on the data training set includes:

[0032] Initialize network weights;

[0033] Calculate the predicted output under the initialized network weights;

[0034] Evaluate the error between the prediction and the true label using the cross entropy loss or mean squared error loss function;

[0035] Calculate the gradient of the loss with respect to the weights of the initialized network;

[0036] The network weights are updated using the SGD optimizer or the Adam optimizer.

[0037] Optionally, based on the cross-network information, a probability distribution model in a one-dimensional Wasserstein space is established, including:

[0038] Define a one-dimensional Wasserstein space;

[0039] Estimate the probability of distribution parameters in one-dimensional Wasserstein space using maximum likelihood estimation or Bayesian;

[0040] The Wasserstein distance between the probability distributions of adjacent distribution parameters is calculated sequentially.

[0041] Optionally, preliminarily identifying and preclassifying the cross-network information includes:

[0042] Using Spark Streaming to process the cross-network information so as to capture real-time data streams;

[0043] Designing discrete stream conversion logic to pre-process the real-time data stream;

[0044] The pre-processed real-time data stream is initially identified and pre-classified using a pre-trained machine learning model.

[0045] Optionally, based on the fitting result, the preliminary identification and pre-classification results of the cross-network information are corrected, including:

[0046] Based on the fitting result, the identification and classification result of the cross-network information is updated.

[0047] The present application also provides a cross-network information identification and classification system, including:

[0048] The cloud server cluster obtains real-time cross-network information;

[0049] Preliminarily identifying and pre-classifying the cross-network information;

[0050] Constructing and training a two-layer neural network model, and using the trained two-layer neural network model to fit the one-dimensional Wasserstein gradient flow of the cross-network information;

[0051] Based on the fitting result, the preliminary identification and pre-classification results of the cross-network information are corrected.

[0052] The embodiment of the present application provides a cross-network information identification and classification method and system. Through the neural network model, a variety of data in the cross-network environment are introduced in the model training process, so that the model has better adaptability and generalization ability. In addition, the use of a two-layer neural network based on the ReLU activation function to approximate the Lagrangian mapping function of the Wasserstein gradient flow can expand the capabilities of the existing model to better understand and process novel data distributions. Therefore, by encoding such distribution information in the model, it is possible to respond quickly to new data patterns, thereby improving the accuracy and quality of information identification and classification. The embodiment of the present application can not only be widely used in the fields of enterprise data management, electronic archive management, customer relationship management, etc., but also help enterprises better integrate and utilize information resources scattered in different systems and networks to maximize data value. Moreover, the embodiment of the present application can also be used in dynamic and complex cross-network environments such as social networks and the Internet of Things to improve the processing and analysis capabilities of real-time data streams. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the disclosed embodiments in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0054] Figure 1 A flowchart of a cross-network information identification and classification method provided in an embodiment of the present application;

[0055] Figure 2 A schematic diagram of the structure of a cross-network information identification and classification system provided in one embodiment. DETAILED DESCRIPTION

[0056] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0057] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0058] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0059] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The illustrations only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout type is also more complicated.

[0060] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0061] Embodiment 1

[0062] Embodiment 1 is to use data stream processing and real-time data analysis technology to effectively identify and classify cross-network information, and combine it with a neural network projection scheme, especially using a two-layer neural network with a ReLU activation function to approximate the one-dimensional Wasserstein gradient flow. The core idea is to use the term in deep learning - the neural network structure of the ReLU activation function - to map the Lagrangian flow function, thereby achieving effective fitting of the data distribution.

[0063] The embodiment of the present application can use a cloud server cluster for data processing, wherein the cloud server cluster is a cluster formed by multiple cloud servers, and tasks are distributed through a load balancer to ensure processing speed and system stability. Exemplarily, the cloud server cluster includes high-performance computing servers, storage servers, and network interconnection devices.

[0064] In the cloud server cluster, you need to build a data stream processing framework, for example:

[0065] Apache Kafka: As a message queue middleware, it processes high-throughput data streams. It includes Producer API for data publishing, Consumer API for data subscription, Streams API for stream processing, and Connector API for connecting to databases.

[0066] Apache Flink: An integrated stream-batch processing architecture that processes and analyzes data streams in real time. It provides advanced features such as event time processing, window functions, and state management.

[0067] In this embodiment, the following is an explanation of the technical terms to be adopted:

[0068] Cloud server cluster: A cluster composed of multiple servers that collaboratively processes data and has the characteristics of elastic expansion and fault tolerance.

[0069] Apache Kafka / Flink: They are frameworks for processing real-time data streams. Kafka, as a message queue system, provides high-throughput data transmission; Flink supports complex event processing and is more suitable for real-time analysis.

[0070] NLP: Natural Language Processing, a technique designed to understand and parse human language.

[0071] Spark Streaming: A stream processing framework for micro-batch processing, suitable for real-time data analysis.

[0072] Two-layer neural network: A type of neural network model with an input layer, a hidden layer, and an output layer, which can approximate complex functions.

[0073] Wasserstein Gradient Flow: An optimization technique for learning a data distribution and minimizing the distance between the generated distribution and the true data distribution.

[0074] Figure 1 A schematic flow chart of a cross-network information identification and classification method provided in an embodiment of the present disclosure, the cross-network information identification and classification method comprises steps S1 to S4.

[0075] S1, cloud server cluster obtains real-time cross-network information;

[0076] In step S1, the cloud server cluster selects an effective data stream processing framework such as Apache Kafka or Apache Flink, creates a data access channel using the API of the selected framework, and ensures that it can handle high-density data streams from multiple data sources.

[0077] Specifically, in a cloud server cluster, the key to ensuring efficient and stable operation of the system is to use a high-performance data stream processing framework to access and process cross-network information from multiple sources. Through clustered deployment, the cloud server cluster uses its distributed computing capabilities to process cross-network information flows from various sources.

[0078] For the embodiments of the present application, the selected data stream processing framework, such as Apache Kafka / Flink, provides high throughput and persistent storage functions for data.

[0079] Among them, Apache Kafka realizes data publishing and subscription through its distributed message queue characteristics, ensuring high performance and high reliability, while Apache Flink provides equally efficient computing capabilities for streaming data and batch data through its integrated stream and batch processing capabilities.

[0080] For server clusters, data access logic includes data distribution and data cache layers to ensure that data can be smoothly imported into the processing flow. In high-density data streams, effective flow control and system resource scheduling are used to ensure that all types of data can be processed in a timely manner according to priority. The specific process is as follows:

[0081] Set up roles and task allocation for each server in the cluster, such as Kafka Brokers, ZooKeeper cluster determination, and Flink Task Managers allocation. Configure Kafka Topics or Flink Data Streams to customize data channels based on data categories and frequencies. Set up data inflow monitoring systems to detect data delays, traffic levels, and abnormal warnings.

[0082] In addition, based on frameworks such as Apache Kafka or Flink, data processing functions can be further extended through plug-ins or middleware, such as using Flink CEP (complex event processing) to identify complex patterns and event associations in data streams.

[0083] S2. Preliminarily identifying and pre-classifying the cross-network information;

[0084] In one embodiment, preliminary identification and pre-classification can use NLP and text mining technology to parse the content, extract key information, and build preliminary classification rules and models according to business needs, such as grouping according to keywords, themes or data sources. Finally, the content is identified and analyzed, and the classification rules and models are updated according to the new data that is constantly entering to cope with the ever-changing characteristics of the data stream. For example: in financial news monitoring, preliminary identification and pre-classification can process text through NLP to identify the company name, stock code or market behavior mentioned, and classify the news into corresponding categories according to these keywords, such as "stock market", "IPO", "mergers and acquisitions", etc. In social media monitoring, text mining technology is used to extract user emotional tendencies, such as "positive", "neutral", and "negative", and data streams are instantly classified according to user activities and topic popularity.

[0085] In another embodiment, S2 may use a big data analysis framework (such as Spark Streaming, etc.) technology to implement dynamic analysis of data streams, specifically including:

[0086] S21. Using Spark Streaming to process the cross-network information in order to capture real-time data streams;

[0087] Integrate the Spark Streaming service on the basis of the existing data stream processing architecture to capture and process real-time data streams.

[0088] Spark Streaming is an extension of Apache Spark for processing real-time data streams. It can split real-time data streams into a series of small batches of data and then perform distributed processing on these small batches, allowing data to flow into the system continuously and be processed in near real-time.

[0089] In this step, the data stream conversion logic is designed in combination with the characteristics of the cross-network information, and the DStream API of Spark Streaming is used to process the real-time data stream, so as to capture, convert and aggregate the data stream. This can realize the real-time capture of high-speed, dynamically changing cross-network data streams, and lay the foundation for subsequent analysis and processing.

[0090] S22. Design discrete stream conversion logic to preprocess the real-time data stream;

[0091] Design DStream (discrete stream) conversion logic, process and analyze real-time data through operations such as map, reduce, and join, and use window functions and watermark technology to process stateful streaming data to solve data delay problems caused by network delays or system failures.

[0092] Specifically, the cloud server cluster is configured with the Spark Streaming environment and integrated with data sources (such as Apache Kafka) to ensure that data streams can be seamlessly imported from Kafka topics into Spark Streaming processing. Set the micro-batch size for data stream processing with appropriate time intervals as windows, for example, choose a batch every 2 seconds to ensure quasi-real-time performance. Use the DStream API to write transformation logic scripts to perform map, reduce, filter and other operations on the input data stream to perform real-time transformation and aggregation of data. By defining structured streaming SQL queries, more complex computing tasks can be performed on data streams, such as real-time joins, window functions and other operations.

[0093] In actual applications, when processing real-time data streams such as Twitter and WeChat, Spark Streaming can batch process tweets received every 2 seconds, and update the data warehouse in real time after extracting key information from tweets. In traffic monitoring systems, Spark Streaming is used to capture network traffic data in real time and perform micro-batch statistical analysis to detect traffic anomalies or attacks in a timely manner.

[0094] S23. Use a pre-trained machine learning model to perform preliminary identification and pre-classification on the pre-processed real-time data stream.

[0095] Leverage machine learning and statistical models provided in the Spark MLlib library for training to dynamically classify and predict streaming data.

[0096] By applying machine learning algorithms to pre-processed real-time data streams, machine learning models can learn data patterns and classification decision boundaries based on previous data training, and recognize and classify new input data.

[0097] Use pre-trained models in Spark MLlib to process data streams. Pre-trained models are based on historical data and have learned how to interpret and classify cross-network information. They can apply this knowledge to the identification and pre-classification of real-time data streams. By using the existing knowledge of pre-trained models, new data streams can be quickly identified and classified, reducing the time and resource consumption of training models from scratch.

[0098] Specifically, S23 selects or creates a pre-trained model that meets the data characteristics and task requirements, such as a classification model or a clustering model. Deploy the model in the Spark environment and ensure that the model can access the pre-processed data stream. Set the batch input of the data stream to the model to ensure that the model can process new data immediately when it receives it. Configure the model output and define the output format and destination of the data classification results, such as a storage system or a real-time monitoring dashboard.

[0099] For example, in the classification of user comments on an e-commerce platform, a pre-trained sentiment analysis model can be used to classify user comments in real time and identify positive or negative opinions. In the news content classification scenario, a classification model can be used to classify the text of news articles collected in real time into different categories such as politics, economy or entertainment.

[0100] For S2, preliminary identification and classification can be performed with the help of a pre-trained machine learning model. However, for data such as cross-network information that requires generalization and accuracy, traditional machine learning models are obviously not sufficient to support it. Therefore, a more accurate and detailed classification method is needed, namely the classification method of S3 in embodiment S3 of the present application.

[0101] S3, constructing and training a two-layer neural network model, and using the trained two-layer neural network model to fit the one-dimensional Wasserstein gradient flow of the cross-network information;

[0102] In the embodiment of the present application, a neural network model with a two-layer structure is developed, which is used to map the complex relationship between input data and Wasserstein gradient flow. The parameters of the neural network, such as the number of neurons in each layer, the learning rate and the regularization coefficient, are debugged to optimize the performance of the network.

[0103] In addition, a training set containing a large amount of sample data needs to be constructed, which shows the Wasserstein distance between different data features. The neural network model is trained using regression analysis and optimization of the loss function, with the goal of minimizing the difference between the predicted Wasserstein gradient flow and the true gradient flow. Cross-validation techniques are used to evaluate the generalization ability of the model and make necessary parameter adjustments to ensure the accuracy and robustness of the model.

[0104] Wasserstein gradient flow is an optimization-based deep generative model that learns to generate a target distribution by minimizing the Wasserstein distance between the generated distribution and the true data distribution. The "gradient flow" here refers to the process of optimizing the parameters of the generative model through the gradient descent method.

[0105] More specifically, the Wasserstein distance is defined as the cost of the optimal transfer plan between two probability distributions. Given a source distribution and a target distribution, the optimal transfer plan refers to the best solution required to transfer the "quality" of the source distribution to the target distribution at the minimum cost. Applying this idea to generative models, we hope to find a parameterized generative model that minimizes the Wasserstein distance between its generated distribution and the true data distribution.

[0106] The basic idea behind the Wasserstein gradient manifold is to optimize the parameters of the generative model by using the gradient descent method so that the generated distribution gradually approaches the real data distribution. Compared with other generative models, one of its major advantages is that it can better capture the geometric characteristics of the data distribution and has better theoretical guarantees. But at the same time, calculating the Wasserstein distance is also more complicated and time-consuming.

[0107] S3 further includes steps S31-S35:

[0108] S31. Construct a two-layer neural network model and initialize the parameters of the two-layer neural network model;

[0109] S31 specifically includes:

[0110] S311. Design a two-layer neural network including an input layer, one or more hidden layers, and an output layer using a ReLU activation function;

[0111] Specifically, a two-layer neural network is constructed, which includes an input layer, several hidden layers, and an output layer. The ReLU (Rectified Linear Unit) activation function is used in the hidden layer to increase the nonlinearity of the network and help the network capture complex data patterns. The connection weights (Weights) and biases (Biases) of the network are designed, which are learnable parameters in network training.

[0112] S312. Determine the number of neurons in each layer, wherein the number of neurons in the input layer is equal to the number of features, and the number of neurons in the output layer corresponds to the number of categories of the classification task or the output of the regression task;

[0113] The number of neurons in the input layer matches the feature dimension to ensure that the network can receive complete data features. The number of neurons in the hidden layer is determined by factors such as model complexity and overfitting risk, and this parameter can generally be optimized through cross-validation.

[0114] S313. Select a cross entropy loss or a mean square error loss function according to the training task;

[0115] For classification problems, the cross entropy loss function is selected to calculate the error between the model output and the true label. For regression problems, the mean square error loss function is used to calculate the gap between the predicted value and the actual value.

[0116] S314. Select an SGD optimizer or an Adam optimizer for adjusting network weights;

[0117] Use the SGD (Stochastic Gradient Descent) optimizer for network training, which is suitable for large-scale data sets, or choose the Adam optimizer, which combines the advantages of momentum and adaptive learning rate and usually achieves faster convergence.

[0118] S315. Set the batch size, learning rate, and regularization term.

[0119] Define the batch size, which affects the speed and stability of model training.

[0120] Determine the initial learning rate and consider whether to adopt a learning rate scheduling strategy.

[0121] Add regularization terms, such as L1 or L2 regularization, to reduce the risk of overfitting and improve the generalization ability of the model.

[0122] In the embodiment of the present application, it is assumed that the task is to classify images, each image has 784 pixel values ​​as features (for example, 28x28 pixel handwritten digit recognition), and the goal is to identify which of the 10 categories (digits 0-9) these images belong to.

[0123] Construct the network structure of a two-layer neural network:

[0124] Input layer: There are 784 neurons, corresponding to the 784 pixel values ​​of the image.

[0125] Hidden Layer:

[0126] The first hidden layer has 128 neurons and uses the ReLU activation function.

[0127] The other hidden layer can also have the same or a different number of neurons, also using the ReLU activation function.

[0128] Output layer: There are 10 neurons, each neuron corresponds to a category, and the softmax function is used to convert the output into a probability distribution.

[0129] Loss function: Since it is a multi-category classification task, the cross entropy loss function is selected.

[0130] Optimizer: Use the Adam optimizer for parameter updates as it usually converges quickly in such tasks.

[0131] Hyperparameter settings

[0132] Batch size: Choose a moderate value, such as 64 or 128, which is usually tuned empirically.

[0133] Learning rate: Start with 0.001 and adjust as needed during training.

[0134] Regularization: L2 regularization can be added, assuming the regularization coefficient is set to 0.001 to help prevent the model from overfitting.

[0135] Sample code:

[0136]

[0137]

[0138] Among them, the above model can adapt to different data sets and task requirements by adjusting the number of hidden layers and the number of neurons, as well as the setting of hyperparameters.

[0139] S32. Obtain a data training set, wherein the data training set shows the Wasserstein distance between different data features;

[0140] In S32, it is necessary to determine the source of the data training set and carry out data collection. The data can come from a variety of cross-network information sources such as log files, sensor data, transaction records, etc.

[0141] In addition, the data training set needs to be preprocessed, including data cleaning, format unification, missing value processing, and feature engineering, to ensure data quality and consistency.

[0142] S33. Training the two-layer neural network model based on the data training set;

[0143] S33 specifically includes:

[0144] S331. Initialize network weights;

[0145] Specifically, the network weights can be randomly initialized using methods such as Xavier or He initialization.

[0146] S332. Calculate the predicted output under the initialized network weights;

[0147] Feed the training data into the network and compute the activations of each layer and the final predicted output through forward propagation. Make sure the computational graph of the network is set up correctly for backpropagation in the next step.

[0148] S333. Evaluate the error between the prediction and the true label using the cross entropy loss or mean square error loss function;

[0149] Apply a loss function, such as the aforementioned cross entropy or mean squared error, to the output layer of the network to quantify the error between the predicted output and the true label. Geiger courses can be used in the training cycle to gradually introduce more complex or challenging samples to improve the effectiveness of training.

[0150] S334. Calculate the gradient of loss relative to the initialization network weight;

[0151] Using computational graphs and automatic differentiation techniques, calculate the gradient of the loss function with respect to the network weights. Check the range and direction of the gradient to ensure that there is no gradient explosion or gradient vanishing problem.

[0152] S335. Update the network weights using the SGD optimizer or the Adam optimizer.

[0153] Apply optimization algorithms such as SGD or Adam to update the network weights according to the calculated gradient direction.

[0154] In the above two-layer neural network model example, S331 to S335 can be specifically implemented as follows:

[0155]

[0156] Where x_train and y_train are the training datasets for features and labels respectively; x_val and y_val are the datasets for model validation.

[0157] S34. Based on the cross-network information, a probability distribution model in a one-dimensional Wasserstein space is established;

[0158] S34 specifically includes:

[0159] S341. Define one-dimensional Wasserstein space;

[0160] The one-dimensional Wasserstein space is precisely defined using mathematical language to ensure that it satisfies the properties of the probability distribution of one-dimensional space.

[0161] A distance metric in one-dimensional Wasserstein space, namely the Wasserstein distance, is determined as a tool for comparing the differences between two distributions.

[0162] A one-dimensional Wasserstein space is a collection of probability distributions that have finite first-order moments, i.e., their expectations are finite. In this space, the Wasserstein distance between two probability distributions is used to describe their similarity or difference.

[0163] One-dimensional Wasserstein space definition:

[0164] Collection of probability distributions: A one-dimensional Wasserstein space usually consists of all probability distributions with finite expectation in one dimension.

[0165] Finite first moment: All first moments (i.e., mean or expected value) of a distribution must be finite. This means that the distribution must integrate a finite value over the entire real number line, i.e., the distribution must be sufficiently "centered".

[0166] Wasserstein distance definition:

[0167] Distance metric: Wasserstein distance, also known as Earth Mover's Distance (EMD), is defined in one-dimensional space as the maximum absolute difference between the cumulative distribution functions (CDFs) of two probability distributions.

[0168] In mathematical terms, assuming that PP and QQ are two probability distributions in one-dimensional space, their cumulative distribution functions are F P (x) and F Q (x), then the one-dimensional Wasserstein distance between and can be defined as:

[0169]

[0170] In the discrete case, if there are two finite sets of points corresponding to two discrete probability distributions, then the Wasserstein distance can be calculated by solving an optimal transportation problem, where each point corresponds to a "mass" and the "transfer" marks the "cost" of these masses from one distribution to another. The one-dimensional Wasserstein distance has a physical interpretation in a mathematical sense, which is similar to the cost of transferring the "mass" of one distribution to another distribution with the least "work".

[0171] S342. Use maximum likelihood estimation or Bayesian to estimate the probability of distribution parameters in one-dimensional Wasserstein space;

[0172] Specifically, key features are extracted from cross-network information and represented as data points that can be used to establish probability distributions. Statistical methods such as maximum likelihood estimation (MLE) are applied to determine the probability distribution of these data points (parameters) based on the obtained data training set.

[0173] By comparing the advantages and disadvantages of models under different assumptions, such as information criteria (such as AIC or BIC), the most appropriate probability distribution model is selected. Numerical optimization techniques, such as linear programming methods, are used to solve the Wasserstein distance between two probability distributions.

[0174] S343. Calculate the Wasserstein distance between the probability distributions of adjacent distribution parameters in sequence.

[0175] For adjacent probability distributions in the sequence, the difference between them is quantified using the defined Wasserstein distance calculation method.

[0176] Exemplarily, in order to establish a probability distribution model in a one-dimensional Wasserstein space, based on the cross-network information, the following steps may be followed:

[0177] 1. Data Collection and Preprocessing

[0178] Collect cross-network information, such as collecting data from different network nodes, sensors, or other data sources. Preprocess data to ensure data accuracy, such as data cleaning, noise removal, and filling in missing values.

[0179] 2. Feature extraction and representation

[0180] Key features are extracted from the preprocessed cross-network information and represented as data points that can be used to build probability distributions.

[0181] 3. Probability distribution assumptions

[0182] Select the assumed probability distribution family (such as Gaussian distribution, uniform distribution, Poisson distribution, etc.). This step can also be determined based on the distribution characteristics of the actual data.

[0183] 4. Parameter Estimation

[0184] Parameters of probability distributions are estimated using statistical methods such as maximum likelihood estimation (MLE), moment method, etc. In the one-dimensional case, it is usually necessary to estimate the location parameter (such as the mean) and scale parameter (such as the variance) of the distribution.

[0185] 5. Verification of probability distribution model

[0186] Use statistical tests, such as Kolmogorov-Smirnov test, QQ plot, etc., to test whether the data conforms to the selected probability distribution.

[0187] 6. Calculation of Wasserstein distance

[0188] For each pair of distributions in the dataset, the Wasserstein distance between them is calculated, which involves sorting the data in the dataset by their actual values ​​and comparing the cumulative distribution functions.

[0189] 7. Model Optimization

[0190] Based on the calculated Wasserstein distance, different probability distribution models are compared and the model that best describes the observed data is selected.

[0191] Suppose you want to analyze traffic flow data across a network.

[0192] Data collection: Collect the number of vehicle flows at various traffic nodes at different times of the day.

[0193] Feature representation: Extract the number of vehicle flows at the corresponding time point as features.

[0194] Assumed probability distribution: Assume that the traffic data conforms to the Poisson distribution, reflecting the typical characteristics of count data.

[0195] Parameter estimation: For the flow data in each time period, the maximum likelihood estimation is used to determine the parameter λ (mean flow number) of the Poisson distribution.

[0196] Verify the model: Visual verification is performed by plotting the frequency distribution of the data in each time period and comparing it with the theoretical distribution assuming a Poisson distribution.

[0197] Calculate Wasserstein distance: Compare the Wasserstein distance between traffic data distributions in different time periods based on the cumulative distribution function.

[0198] Optimize model: Adjust model parameters based on Wasserstein distance results to more accurately reflect traffic distribution.

[0199] S35. Based on the probability distribution model in the one-dimensional Wasserstein space, the approximate solution of the one-dimensional Wasserstein gradient flow is calculated using the trained two-layer neural network model.

[0200] In S35, the approximate solution of the one-dimensional Wasserstein gradient flow is calculated using the trained two-layer neural network model, including the following steps:

[0201] S351. Obtaining the Lagrangian mapping function in the one-dimensional Wasserstein space;

[0202] Determine the type of Lagrangian mapping function that needs to be obtained, which will be a way to characterize the evolution of probability distributions, especially in one-dimensional Wasserstein space. Design or select a suitable Lagrangian mapping function based on the characteristics of the data being processed and the target task. For example, for cross-network data classification tasks, the function is used to characterize the ideal path for data points to transform from one classification to another.

[0203] S352. Utilize the trained two-layer neural network model to perform approximate calculation of the Lagrangian mapping function, and check the fitting of the data distribution in the calculation result;

[0204] The "Lagrangian mapping function" is a mapping used to characterize the distribution evolution of data in a one-dimensional Wasserstein space. Then a function can be defined that is a descriptive function that maps input features to this space. This involves an optimization problem that involves modeling the transformation of the data distribution as a function of its latent variables (such as time, conditions, etc.).

[0205] Assume scenario:

[0206] Analyze cross-network information, such as network traffic data, and predict changes in traffic to prevent potential network attacks or congestion.

[0207] Mapping function definition:

[0208] Define a mapping function L(x, t) about time t, where x represents the original network traffic data, and L(x, t) expresses the target evolution path of traffic distribution in Wasserstein space as time t passes.

[0209] In this hypothetical scenario, the typical Lagrangian mapping function is:

[0210] L(x,t)=x·e -λt

[0211] Among them, λ is a parameter that determines the rate of change. In this way, over time, the distribution of network traffic will decay exponentially according to this mapping function, simulating the natural decay trend of traffic in a network without user activity. It should be noted that the choice of this function is customized according to the specific characteristics of the data and the analysis task. In machine learning applications, this function usually needs to be determined in the most appropriate form through a data-driven approach, and neural network models (such as two-layer networks) can be used to approximate this mapping function to predict the target state given the input features.

[0212] S352 specifically includes:

[0213] A1. Use the trained two-layer neural network model to approximate the Lagrangian mapping function and output the approximate calculation result;

[0214] Using the aforementioned two-layer neural network model, the input data features are forward propagated to obtain the predicted output of the mapping.

[0215] A2. Calculate the Wasserstein distance between the approximate calculation result and the actual distribution in order to judge the fitting quality of the data distribution in the check calculation result.

[0216] Compare the neural network output with the target Lagrangian mapping function output to check the fit of the data distribution. This requires using the location of the sample points in Wasserstein space to estimate.

[0217] A custom loss function needs to be written to quantify the difference between the predicted output and the Lagrangian mapping function and to evaluate the model performance.

[0218] S353. Optimize the parameters of the two-layer neural network model parameters by gradient descent method.

[0219] Set up a backpropagation algorithm, typically the gradient descent method, to update the network parameters according to the defined loss function. During the training process, the parameters are continuously updated iteratively to gradually reduce the loss between the predicted output and the mapping function. This optimization can be done using classic optimization algorithms such as SGD and Adam. Evaluate the performance of the optimized model by calculating the loss on the validation set and other indicators such as accuracy to determine whether the expected training results have been achieved.

[0220] S4. Based on the fitting result, correct the preliminary recognition and pre-classification results of the cross-network information.

[0221] That is, based on the fitting result, the identification and classification result of the cross-network information is updated.

[0222] Based on the fitting results, the embodiment of the present application will correct the preliminary identification and pre-classification results of cross-network information. This process is interactive, which means that it will fine-tune and optimize the model established by S2 based on the model output and its comparative analysis with real data. The following are the technical implementation steps for correction:

[0223] Evaluate initial results of identification and classification:

[0224] The collected cross-network information is initially identified and pre-classified using the current model.

[0225] Model predictions are summarized and compared to actual labels or results to assess accuracy.

[0226] Analyze the degree of fit:

[0227] Analyze the predictive performance of the model using statistical methods such as confusion matrix, accuracy, recall and other metrics.

[0228] If a probability distribution model is used, examine the differences between the actual distribution and the distribution fitted by the model.

[0229] Adjust model parameters:

[0230] Adjust the neural network model parameters, including weights, biases, hyperparameters, etc., based on the feedback from the evaluation indicators.

[0231] If necessary, the parameters of the probability distribution model are adjusted to better fit the actual data distribution.

[0232] Repeated training and validation:

[0233] The model is trained again using the modified model parameters and the model performance is evaluated on the validation set.

[0234] This process is iterated until the model's predictive performance reaches a satisfactory level of accuracy or other performance metric.

[0235] Model calibration and validation:

[0236] Apply the adjusted model to re-identify and pre-classify cross-network information.

[0237] Perform final confirmation of model calibration using live data or a fresh dataset.

[0238] Results Feedback and Deployment:

[0239] Combine the optimized recognition and pre-classification model results with feedback provided by users or related systems to make final corrections to the model predictions.

[0240] After verification, the adjusted model is deployed to the production environment for actual information recognition and pre-classification.

[0241] Assume that we identify and pre-classify network traffic in a telecom operator environment to detect potential network attacks or anomalous behavior:

[0242] Using the collected network traffic data as input, preliminary classification is performed through a two-layer neural network model.

[0243] The classification results (e.g., normal communication, DDoS attack, data crawling, etc.) preliminarily indicate possible behavior patterns.

[0244] It was found that the false positive rate of some classifications was high, and the weights and hyperparameters were adjusted by analyzing the misclassified samples.

[0245] After multiple iterations, the model became more accurate and could more reliably identify and classify network behaviors.

[0246] Once the final model is confirmed, it will be deployed in the monitoring system of the entire network to help continuously identify and pre-classify cross-network information.

[0247] The present application provides a cross-network information identification and classification method. Through a neural network model, a variety of data in a cross-network environment is introduced during the model training process, so that the model has better adaptability and generalization ability. In addition, the use of a two-layer neural network based on the ReLU activation function to approximate the Lagrangian mapping function of the Wasserstein gradient flow can expand the capabilities of the existing model to better understand and process novel data distributions. Therefore, by encoding such distribution information in the model, it is possible to respond quickly to new data patterns, thereby improving the accuracy and quality of information identification and classification. The embodiments of the present application can not only be widely used in the fields of enterprise data management, electronic archive management, customer relationship management, etc., but also help enterprises better integrate and utilize information resources scattered in different systems and networks to maximize data value. Moreover, the embodiments of the present application can also be used in dynamic and complex cross-network environments such as social networks and the Internet of Things to improve the processing and analysis capabilities of real-time data streams.

[0248] Embodiment 2

[0249] Figure 2 A schematic diagram of the structure of a cross-network information identification and classification system provided in an embodiment of the present disclosure, the cross-network information identification and classification system 200 includes:

[0250] The present application also provides a cross-network information identification and classification system, including:

[0251] Acquisition module 201, used to acquire real-time cross-network information;

[0252] Identification module 202, used for preliminary identification and pre-classification of the cross-network information;

[0253] A fitting module 203 is used to construct and train a two-layer neural network model, and use the trained two-layer neural network model to fit the one-dimensional Wasserstein gradient flow of the cross-network information;

[0254] The correction module 204 is used to correct the preliminary recognition and pre-classification results of the cross-network information based on the fitting results.

[0255] The system of the embodiments of the present disclosure can execute the system provided by the embodiments of the present disclosure, and the implementation principles are similar. The actions performed by each module in the system of each embodiment of the present disclosure correspond to the steps in the method of each embodiment of the present disclosure. For the detailed functional description of each module of the system, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0256] The above is only an optional implementation method for some implementation scenarios of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the scheme of the present disclosure, other similar implementation methods based on the technical ideas of the present disclosure are also within the protection scope of the embodiments of the present disclosure.

Claims

1. A method for identifying and classifying cross-network information, characterized in that: The method comprises: The cloud server cluster obtains real-time cross-network information; the cross-network information is text information; Preliminarily identifying and pre-classifying the cross-network information; Constructing and training a two-layer neural network model, and using the trained two-layer neural network model to fit the one-dimensional Wasserstein gradient flow of the cross-network information; Based on the fitting result, the preliminary recognition and pre-classification results of the cross-network information are corrected; the two-layer neural network model is constructed and trained, and the one-dimensional Wasserstein gradient flow of the cross-network information is fitted by the two-layer neural network model, including: Constructing a two-layer neural network model and initializing parameters of the two-layer neural network model; Obtaining a data training set, wherein the data training set shows Wasserstein distances between different data features; Training the two-layer neural network model based on the data training set; Based on the cross-network information, a probability distribution model in a one-dimensional Wasserstein space is established; Based on the probability distribution model in the one-dimensional Wasserstein space, using the trained two-layer neural network model to calculate an approximate solution of the one-dimensional Wasserstein gradient flow; The method of calculating an approximate solution of a one-dimensional Wasserstein gradient flow using the trained two-layer neural network model comprises: Obtaining a Lagrangian mapping function in the one-dimensional Wasserstein space; Utilizing the trained two-layer neural network model to perform approximate calculation of the Lagrangian mapping function, and checking the fitting of the data distribution in the calculation result; Optimizing the parameters of the two-layer neural network model parameters by gradient descent method; The method of using the trained two-layer neural network model to perform approximate calculation of the Lagrangian mapping function and checking the fitting of data distribution in the calculation result includes: Using the trained two-layer neural network model to approximate the Lagrangian mapping function, and outputting the approximate calculation result; The Wasserstein distance between the approximate calculation result and the actual distribution is calculated to determine the quality of the fit of the data distribution in the check calculation result.

2. The method according to claim 1, characterized in that Constructing a two-layer neural network model and initializing the parameters of the two-layer neural network model include: Design a two-layer neural network with an input layer, one or more hidden layers, and an output layer using the ReLU activation function; Determine the number of neurons in each layer, where the number of neurons in the input layer is equal to the number of features, and the number of neurons in the output layer corresponds to the number of categories for classification tasks or the output of regression tasks; Choose cross entropy loss or mean square error loss function according to the training task; Choose an SGD optimizer or an Adam optimizer for adjusting network weights; Set the batch size, learning rate, and regularization term.

3. The method according to claim 2, characterized in that Training the two-layer neural network model based on the data training set includes: Initialize network weights; Calculate the predicted output under the initialized network weights; Evaluate the error between the prediction and the true label using the cross entropy loss or mean squared error loss function; Calculate the gradient of the loss with respect to the weights of the initialized network; The network weights are updated using the SGD optimizer or the Adam optimizer.

4. The method according to claim 1, characterized in that Based on the cross-network information, a probability distribution model in a one-dimensional Wasserstein space is established, including: Define a one-dimensional Wasserstein space; Estimate the probability of distribution parameters in one-dimensional Wasserstein space using maximum likelihood estimation or Bayesian; The Wasserstein distance between the probability distributions of adjacent distribution parameters is calculated sequentially.

5. The method according to claim 1, characterized in that Preliminary identification and pre-classification of the cross-network information include: Using Spark Streaming to process the cross-network information so as to capture real-time data streams; Designing discrete stream conversion logic to pre-process the real-time data stream; The pre-processed real-time data stream is initially identified and pre-classified using a pre-trained machine learning model.

6. The method according to claim 1, characterized in that Based on the fitting result, the preliminary identification and pre-classification results of the cross-network information are corrected, including: Based on the fitting result, the identification and classification result of the cross-network information is updated.

7. A cross-network information identification and classification system, characterized in that: include: An acquisition module is used to obtain real-time cross-network information; The cross-network information is text information; An identification module, used for preliminary identification and pre-classification of the cross-network information; A fitting module, used to construct and train a two-layer neural network model, and use the trained two-layer neural network model to fit the one-dimensional Wasserstein gradient flow of the cross-network information; A correction module, used for correcting the preliminary recognition and pre-classification results of the cross-network information based on the fitting results; The method of constructing and training a two-layer neural network model and using the two-layer neural network model to fit the one-dimensional Wasserstein gradient flow of the cross-network information includes: constructing a two-layer neural network model and initializing the parameters of the two-layer neural network model; obtaining a data training set, wherein the data training set shows the Wasserstein distance between different data features; training the two-layer neural network model based on the data training set; establishing a probability distribution model in a one-dimensional Wasserstein space based on the cross-network information; and calculating an approximate solution of the one-dimensional Wasserstein gradient flow using the trained two-layer neural network model based on the probability distribution model in the one-dimensional Wasserstein space. The method of calculating the approximate solution of the one-dimensional Wasserstein gradient flow using the trained double-layer neural network model comprises: obtaining the Lagrangian mapping function in the one-dimensional Wasserstein space; performing the approximate calculation of the Lagrangian mapping function using the trained double-layer neural network model, and checking the fitting of the data distribution in the calculation result; optimizing the parameters of the double-layer neural network model parameters by the gradient descent method; The method of using the trained two-layer neural network model to perform approximate calculation of the Lagrangian mapping function and checking the fitting of the data distribution in the calculation result includes: using the trained two-layer neural network model to perform approximate calculation of the Lagrangian mapping function and outputting the approximate calculation result; calculating the Wasserstein distance between the approximate calculation result and the actual distribution, so as to judge and check the fitting quality of the data distribution in the calculation result.

Citation Information

Patent Citations

  • Multi-source unbalanced domain adaptive method

    CN112836795A

  • Model robustness improvement method based on anti-adversarial reasoning

    CN115630302A