Method for improving data correlation and accuracy and related device

Calculate the importance weight of data characteristics and graph neural networks through attention mechanism to analyze data relationships, reconstruct data to improve its correlation and accuracy, solving the problem of insufficient data correlation and accuracy in the existing technology, and achieving a large-scale The accuracy and speed of model output results.

CN119475146APending Publication Date: 2025-02-18XIAMEN YUANTING INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411429530.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the relevance and accuracy of data, especially when processing multi-dimensional data, there is a problem of invalid feature dimensions or noise, which affects the output results of the large model.

Method used

The importance weight of data features is calculated through attention mechanisms, and the graph neural network is used to analyze the relationship between data features, reconstructing the pending data to improve its relevance and accuracy.

Benefits of technology

It improves the relevance and accuracy of the data, making the trained large model output more accurate and fast, effectively capturing the complexity of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475146A_ABST
    Figure CN119475146A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and device for improving data correlation and accuracy, and the method comprises the steps: calculating the importance weight of a data feature of to-be-processed data according to an attention mechanism, and the to-be-processed data comprises a plurality of data features; analyzing a data relationship among the plurality of data features according to a graph neural network and the importance weight of the data features; and reconstructing the to-be-processed data according to the data relationship to obtain reconstructed data. By adopting the embodiment of the invention, the accuracy and comprehensiveness of data correlation evaluation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and related apparatus for improving the relevance and accuracy of data. Background Technology

[0002] With societal progress and the advent of the era of large-scale models, people have access to increasingly more data, which is a crucial element in building large-scale domain models. Only when the collected data is sufficiently accurate and highly relevant will the trained large-scale models be more accurate and faster in handling specific problems.

[0003] The currently collected data possesses numerous feature dimensions. Often, some of these multidimensional features are invalid, or even noise. Direct use of these features will negatively impact the accuracy of the final output of large models. Traditional data processing methods, such as Term Frequency-Inverse Document Frequency (TF-IDF) and cosine similarity, have limitations. TF-IDF assesses the importance of words within a document set by measuring term and document frequencies, while cosine similarity measures the similarity between documents. These methods are only effective in text similarity analysis and keyword extraction; they struggle to capture the complexity of data with rich features. Therefore, improving the relevance and accuracy of data is a pressing technical challenge. Summary of the Invention

[0004] This application provides a method and related apparatus for improving the relevance and accuracy of data, which helps to improve the relevance and accuracy of data, thereby making the output results of the trained large model more accurate.

[0005] The first aspect of this application provides a method for improving data relevance and accuracy, the method comprising: The importance weights of the data features to be processed are calculated based on the attention mechanism, and the data to be processed includes multiple data features. The data relationships between multiple data features are analyzed based on the graph neural network and the importance weights of the data features. The data to be processed is reconstructed based on the data relationships to obtain the reconstructed data.

[0006] Optionally, after reconstructing the data to be processed based on the data relationship, the method further includes: The autoencoder is used to detect whether the reconstructed data contains anomalies; If the reconstructed data is abnormal, the reconstructed data will be deleted.

[0007] Optionally, the step of detecting whether the reconstructed data is abnormal based on the autoencoder includes: The reconstructed data is first encoded and compressed using an autoencoder, and then decoded and restored to obtain autoencoded data. The reconstruction error is determined based on the reconstructed data and the autoencoded data; If the reconstruction error is greater than or equal to a preset threshold, then the reconstructed data is determined to be abnormal. If the reconstruction error is less than the preset threshold, then it is determined that the reconstructed data is not abnormal.

[0008] Optionally, the step of calculating the importance weights of the data features of the data to be processed based on the attention mechanism includes: The query vector and key vector for each data feature are determined based on the attention mechanism; The importance weight of each data feature is determined based on the query vector and key vector of each data feature and the dimension of the data feature.

[0009] Optionally, the formula for calculating the importance weight of the data features is as follows: , in, Let Q be the importance weight of the data feature, Q be the query vector of the data feature, and K be the key vector of the data feature. Dimensions of data features.

[0010] Optionally, the step of analyzing the data relationships among multiple data features based on the graph neural network and the importance weights of the data features includes: Map multiple data features to nodes, and map the relationships between multiple data features to edges; The adjacency matrix and degree matrix are determined based on the nodes and edges; The node feature matrix in the graph neural network is updated based on the adjacency matrix, the degree matrix, and the importance weights of the data features; The data relationships between multiple data features are determined based on the node feature matrix in the graph neural network.

[0011] Optionally, the update formula for the node feature matrix in the graph neural network is as follows: , in, , These are the data feature matrices of the (l+1)th and lth layers of the graph neural network, respectively. A is the adjacency matrix, and D is the degree matrix. It is the weight matrix of the l-th layer, which is determined according to the importance weights of the data features.

[0012] A second aspect of this application provides an apparatus for improving data relevance and accuracy, the apparatus comprising: Importance weight calculation unit, used to calculate the importance weight of data features of the data to be processed according to the attention mechanism, wherein the data to be processed includes multiple data features; A data relationship analysis unit is used to analyze the data relationship between multiple data features based on a graph neural network and the importance weights of the data features; The data reconstruction unit is used to reconstruct the data to be processed based on the data relationship to obtain reconstructed data.

[0013] A third aspect of this application provides an electronic device, including: a processor and a memory; The processor is connected to a memory, wherein the memory is used to store computer programs and the processor is used to invoke the computer programs to execute the methods as described in the first aspect of the embodiments of this application.

[0014] A fourth aspect of this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, perform the method as described in the first aspect of this application.

[0015] As can be seen, this application first calculates the importance weights of the data features in the data to be processed based on an attention mechanism. The data to be processed includes multiple data features. Then, it analyzes the data relationships between the multiple data features based on the graph neural network and the importance weights of the data features. Finally, it reconstructs the data to be processed based on the data relationships to obtain the reconstructed data. Introducing an attention mechanism and calculating the importance weights of different data features helps to improve the accuracy of correlation assessment. At the same time, using a graph neural network to perform deep relationship modeling of data features and capture complex feature relationships helps to improve the comprehensiveness and accuracy of data assessment. Attached Figure Description

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

[0017] Figure 1 A schematic diagram of an application runtime environment for improving data relevance and accuracy, according to an embodiment of this application, is shown. Figure 2A flowchart illustrating a method for improving data relevance and accuracy according to an embodiment of this application is shown; Figure 3 A flowchart illustrating a method for improving data relevance and accuracy according to yet another embodiment of this application is shown; Figure 4 A schematic diagram of the structure of an apparatus for improving data relevance and accuracy according to an embodiment of this application is shown; Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of this application is shown. Detailed Implementation

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

[0019] Please refer to Figure 1 This illustration shows a schematic diagram of an application runtime environment for improving data relevance and accuracy, provided by an embodiment of this application. The application runtime environment may include: a terminal 10 and a server 20.

[0020] Terminal 10 includes, but is not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, in-vehicle terminals, game consoles, e-book readers, multimedia playback devices, wearable devices, and other electronic devices. Application clients can be installed on terminal 10.

[0021] In this embodiment, the application described above can be any application capable of providing services that improve data relevance and accuracy. Typically, the application is an industrial application. Of course, in addition to industrial applications, other types of applications can also provide services that rely on improving data relevance and accuracy. For example, scientific research applications, browser applications, virtual reality (VR) applications, augmented reality (AR) applications, etc., are not limited in this embodiment. Optionally, a client of the above-mentioned application runs on terminal 10.

[0022] Server 20 provides background services to clients of applications in terminal 10. For example, server 20 can be a background server for the aforementioned applications. Server 20 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, server 20 can simultaneously provide background services to applications in multiple terminals 10.

[0023] Optionally, terminal 10 and server 20 can communicate with each other via network 30. Terminal 10 and server 20 can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0024] Please refer to Figure 2 This document illustrates a flowchart of a method for improving data relevance and accuracy according to an embodiment of this application. This method can be applied to computer devices, which refer to electronic devices capable of data computation and processing. For example, the executing entity for each step may be... Figure 1 The application runtime environment shown is either terminal 10 or server 20. The method may include the following steps: Step 201: Calculate the importance weights of the data features of the data to be processed according to the attention mechanism. The data to be processed includes multiple data features.

[0025] Multidimensional feature data is very common in practical applications, especially in the fields of machine learning and deep learning. Multidimensional feature data typically refers to a situation where each sample has multiple features. These features can be numerical, categorical, or a combination of both.

[0026] The data to be processed can be, for example, medical diagnostic data, which may include multiple data features such as age, gender, blood pressure, blood sugar level, cholesterol level, smoking status, and body mass index. When predicting whether a patient has a certain disease based on the data to be processed, the method described in the embodiments of this application can be used for preprocessing.

[0027] The data to be processed may be, for example, financial risk control data, which may include multiple data features such as income level, credit history, occupation, education background, marital status, loan amount, loan term, etc. When assessing the default risk of a loan applicant based on the data to be processed, the method described in the embodiments of this application can be used for preprocessing.

[0028] The data to be processed can be, for example, e-commerce data, which includes multiple data features such as user age, user gender, user location, user shopping preferences, product price, product category, and product reviews. When making personalized product recommendations to users based on the data to be processed, the method described in the embodiments of this application can be used for preprocessing.

[0029] The data to be processed can be, for example, IoT data, which includes multiple data features such as temperature, humidity, light intensity, sensor signals, and location information. When controlling smart home devices based on the data to be processed, the method described in the embodiments of this application can be used for preprocessing.

[0030] Attention mechanisms are widely used techniques in deep learning and machine learning, initially inspired by human visual attention mechanisms. Attention mechanisms allow models to focus on certain parts of the input when processing it, rather than processing all input information equally.

[0031] Step 202: Analyze the data relationships between multiple data features based on the graph neural network and the importance weights of the data features.

[0032] Graph Neural Networks (GNNs) are a class of neural network models specifically designed to process graph-structured data. Graph data typically consists of nodes (vertices) and edges, where nodes represent entities and edges represent relationships between entities. GNNs utilize neural networks to learn representations of graph-structured data, thereby capturing the local and global structural characteristics of the graph. This is usually achieved through iterative updates of node features, where each node updates its feature representation based on information from its neighbors.

[0033] For example, when the data to be processed is financial risk control data, customers can be used as nodes, and the social relationships between customers can be used as edges; when the data to be processed is document data, documents can be used as nodes, and the citation relationships between documents can be used as edges.

[0034] The relationships between data features are a crucial concept in data analysis and machine learning. Understanding these relationships is essential for designing effective data preprocessing strategies, selecting appropriate models, and interpreting model results. Relationships between data features can be categorized into various types, including but not limited to correlation, causation, and dependency.

[0035] Correlation refers to whether there is a linear or non-linear statistical relationship between two or more features. Correlation can be positive (an increase in one feature also increases in another feature) or negative (an increase in one feature decreases in another feature).

[0036] In this context, causation refers to a change in one feature leading to a change in another feature. Causation is stronger than correlation because it implies that one feature directly influences another.

[0037] In this context, dependency refers to the fact that the value of one feature depends on the value of another feature. This can take the form of conditional probability, meaning that given a value of one feature, the probability distribution of another feature changes.

[0038] Feature construction or feature selection can create new features or remove irrelevant features to better capture the relationships between features.

[0039] Therefore, the data relationships between the above data features can be one or multiple. Different data relationships can be assigned values ​​according to the data type, and then data relationships or data below the threshold can be deleted.

[0040] Step 203: Reconstruct the data to be processed based on the data relationship to obtain the reconstructed data.

[0041] Data reconstruction typically refers to reorganizing or transforming data to better meet specific needs or improve data processing efficiency. Through the aforementioned data relationship reconstruction, the data to be processed can be updated, resulting in reconstructed data.

[0042] As can be seen, this application first calculates the importance weights of the data features in the data to be processed based on an attention mechanism. The data to be processed includes multiple data features. Then, it analyzes the data relationships between the multiple data features based on the graph neural network and the importance weights of the data features. Finally, it reconstructs the data to be processed based on the data relationships to obtain the reconstructed data. Introducing an attention mechanism and calculating the importance weights of different data features helps to improve the accuracy of correlation assessment. At the same time, using a graph neural network to perform deep relationship modeling of data features and capture complex feature relationships helps to improve the comprehensiveness and accuracy of data assessment.

[0043] In one embodiment provided in this application, the step of calculating the importance weights of the data features of the data to be processed based on the attention mechanism includes: The query vector and key vector for each data feature are determined based on the attention mechanism; The importance weight of each data feature is determined based on the query vector and key vector of each data feature and the dimension of the data feature.

[0044] The query vector (Q) is used to find relevant information. In the attention mechanism, the query vector represents "the information I need," helping the model determine which information is important in the current context. When processing each lexical, the query vector determines the relevance of that lexical to other lexicals through interaction with the key vector.

[0045] Key vectors (Key, K) are used for indexing information. Each word's key vector represents "the information I provide," acting as an index in the attention mechanism to help the model determine which query vectors are associated with the current word. By performing a dot product operation between the query vector and the key vector, the contribution of each word to the current word can be calculated, thus determining the attention weights.

[0046] The value vector (V) represents the actual information content. In the attention mechanism, the value vector provides specific information content, i.e., "the specific information I provide." By multiplying the attention weights by the value vectors, a weighted sum output is obtained. This output contains information adjusted according to the attention weights, helping the model better understand the content of the input sequence.

[0047] The formula for calculating the importance weight of the data features is as follows: , in, Let Q be the importance weight of the data feature, Q be the query vector of the data feature, and K be the key vector of the data feature. Dimensions of data features.

[0048] Furthermore, the importance weights calculated by the attention mechanism can also be used to assign values ​​to edges in the graph neural network, thereby making the graph neural network more accurate.

[0049] Furthermore, the method further includes: determining new data features based on each data feature and the importance weight of each data feature; deleting data features with importance weights below a set threshold; and / or deleting data features whose product of importance weight and its corresponding data feature is below a set threshold, thereby achieving data filtering. In this way, when performing graph neural network analysis on the data relationships between multiple data features, a one-pass filtering is performed, avoiding the analysis of invalid or noisy data features, thus preventing any impact on the accuracy of the graph neural network.

[0050] In one embodiment provided in this application, the step of analyzing the data relationship between multiple data features based on the graph neural network and the importance weights of the data features includes: Map multiple data features to nodes, and map the relationships between multiple data features to edges; The adjacency matrix and degree matrix are determined based on the nodes and edges; The node feature matrix in the graph neural network is updated based on the adjacency matrix, the degree matrix, and the importance weights of the data features; The data relationships between multiple data features are determined based on the node feature matrix in the graph neural network.

[0051] The degree matrix is ​​a concept in graph theory and related fields. In a graph, the degree matrix is ​​a diagonal matrix where the elements on the diagonal represent the degree of the corresponding node (i.e., the number of edges connected to that node). For an undirected graph, the degree of each node is the number of edges connected to it; while for a directed graph, it may be necessary to calculate the in-degree and out-degree separately.

[0052] The adjacency matrix is ​​a common data structure used in graph theory to represent graphs. It describes the connections between vertices in a graph. Specifically, a graph with n vertices can be represented by an n×n matrix. If an element is 0, it means there is no edge between two vertices; if it is 1, it means there is an edge between them.

[0053] The update formula for the node feature matrix in the graph neural network is as follows: , in, , These are the data feature matrices of the (l+1)th and lth layers of the graph neural network, respectively. A is the adjacency matrix, and D is the degree matrix. It is the weight matrix of the l-th layer, which is determined according to the importance weights of the data features.

[0054] Please refer to Figure 3 This illustration shows a flowchart of a method for improving data relevance and accuracy according to another embodiment of this application. This method can be applied to computer devices, which refer to electronic devices with data computing and processing capabilities. For example, the executing entity for each step can be... Figure 1 The application runtime environment shown is either terminal 10 or server 20. The method may include the following steps: Step 301: Calculate the importance weights of the data features of the data to be processed according to the attention mechanism. The data to be processed includes multiple data features.

[0055] Step 302: Analyze the data relationships among multiple data features based on the graph neural network and the importance weights of the data features.

[0056] Step 303: Reconstruct the data to be processed based on the data relationship to obtain the reconstructed data.

[0057] Step 304: Detect whether the reconstructed data is abnormal according to the autoencoder. If the reconstructed data is abnormal, delete the reconstructed data.

[0058] Steps 301 to 303 are described in detail in the previous embodiment, referring to steps 201 to 203, and will not be repeated here. After the attention mechanism calculation and graph neural network analysis, the new data needs to be detected and abnormal data removed before application, thereby further improving the reliability of the data.

[0059] Specifically, the step of detecting whether the reconstructed data is abnormal based on the autoencoder includes: The reconstructed data is first encoded and compressed using an autoencoder, and then decoded and restored to obtain autoencoded data. The reconstruction error is determined based on the reconstructed data and the autoencoded data; If the reconstruction error is greater than or equal to a preset threshold, then the reconstructed data is determined to be abnormal. If the reconstruction error is less than the preset threshold, then it is determined that the reconstructed data is not abnormal.

[0060] The reconstruction error can be calculated using the following formula:

[0061] in, It's about reconstructing the data. It is self-encoded data.

[0062] As can be seen, the embodiments of this application further test the reconstructed data to ensure the accuracy and reliability of the data.

[0063] Figure 4 A schematic diagram of an apparatus for improving data relevance and accuracy according to an embodiment of this application is shown. The apparatus includes: Importance weight calculation unit 401 is used to calculate the importance weight of the data features of the data to be processed according to the attention mechanism, wherein the data to be processed includes multiple data features; The data relationship analysis unit 402 is used to analyze the data relationship between multiple data features based on the graph neural network and the importance weights of the data features; The data reconstruction unit 403 is used to reconstruct the data to be processed according to the data relationship to obtain reconstructed data.

[0064] Figure 5A schematic diagram of the structure of a computer device provided in one embodiment of this application is shown, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the functions of the computer system of the method for improving data relevance and accuracy in any of the above embodiments.

[0065] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, causes the computer to perform the functions of the computer system of the method for improving data relevance and accuracy in any of the above embodiments.

[0066] This application also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the functions of the computer system of the method for improving data relevance and accuracy in any of the above embodiments.

[0067] It is understood that the specific examples in this application are only intended to help those skilled in the art better understand the implementation methods of this application, and are not intended to limit the scope of the invention.

[0068] It is understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiments of this application in any way.

[0069] It is understood that the various implementation methods described in this application can be implemented individually or in combination, and the implementation methods in this application are not limited in this respect.

[0070] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this application includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0071] It is understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0072] It is understood that the memory in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Specifically, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0073] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

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

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

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

[0077] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

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

[0079] The above are merely specific embodiments of this application, but the scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this invention should be determined by the scope of the claims.

Claims

1. A method for improving data relevance and accuracy, characterized in that: The method comprises: Calculating the importance weights of data features of the data to be processed according to the attention mechanism, wherein the data to be processed includes multiple data features; The data relationship between the plurality of data features is analyzed according to the importance weights of the graph neural network and the data features; the updating formula of the node feature matrix in the graph neural network is as follows: , in, , are the data feature matrices of the l+1th layer and the lth layer of the graph neural network, A is the adjacency matrix, D is the degree matrix, is the weight matrix of the lth layer, and the weight matrix is ​​determined according to the importance weights of the data features; The data to be processed is reconstructed according to the data relationship to obtain reconstructed data.

2. The method according to claim 1, characterized in that After reconstructing the data to be processed according to the data relationship, the method further includes: Detecting whether the reconstructed data is abnormal according to the autoencoder; If the reconstructed data is abnormal, the reconstructed data is deleted.

3. The method according to claim 1 or 2, characterized in that: The detecting whether the reconstructed data is abnormal according to the autoencoder includes: According to the autoencoder, the reconstructed data is first encoded and compressed and then decoded and restored to obtain autoencoded data; determining a reconstruction error based on the reconstructed data and the autoencoded data; If the reconstruction error is greater than or equal to a preset threshold, it is determined that the reconstructed data is abnormal; If the reconstruction error is smaller than the preset threshold, it is determined that the reconstructed data is not abnormal.

4. The method according to claim 1, characterized in that The step of calculating the importance weight of the data features of the data to be processed according to the attention mechanism includes: Determine the query vector and key vector for each data feature based on the attention mechanism; The importance weight of each of the data features is determined according to the query vector and the key vector of each of the data features and the dimension of the data features.

5. The method according to claim 4, characterized in that The calculation formula of the importance weight of the data feature is as follows: , in, is the importance weight of the data feature, Q is the query vector of the data feature, K is the key vector of the data feature, is the dimension of the data features.

6. The method according to claim 1, characterized in that The step of analyzing the data relationship between the plurality of data features according to the graph neural network and the importance weights of the data features includes: Mapping the plurality of data features into nodes, and mapping the connections between the plurality of data features into edges; Determine an adjacency matrix and a degree matrix based on the nodes and edges; Update a node feature matrix in a graph neural network according to the adjacency matrix, the degree matrix, and the importance weights of the data features; The data relationship between the plurality of data features is determined according to the node feature matrix in the graph neural network.

7. The method according to claim 6, characterized in that The importance weights calculated by the attention mechanism can also be used to assign values ​​to the edges in the graph neural network.

8. A device for improving data relevance and accuracy, characterized in that: The device comprises: An importance weight calculation unit, used to calculate the importance weight of a data feature of the data to be processed according to an attention mechanism, wherein the data to be processed includes a plurality of data features; A data relationship analysis unit is used to analyze the data relationship between the plurality of data features according to the graph neural network and the importance weights of the data features; the update formula of the node feature matrix in the graph neural network is as follows: , in, , are the data feature matrices of the l+1th layer and the lth layer of the graph neural network, A is the adjacency matrix, D is the degree matrix, is the weight matrix of the lth layer, and the weight matrix is ​​determined according to the importance weights of the data features; A data reconstruction unit is used to reconstruct the data to be processed according to the data relationship to obtain reconstructed data.

9. An electronic device, characterized in that: include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 7 is executed.