Reasoning methods, devices, equipment, and media for the correlation between the test object and the group
By acquiring static and dynamic data of samples, constructing a knowledge graph, and using graph neural networks for feature calculation, the problems of low efficiency and poor accuracy in existing technologies are solved, and efficient and accurate analysis of the correlation between the test object and the preset sample group is achieved.
Patent Information
- Application Number
- CN202311258615.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2043-09-26
AI Technical Summary
Existing technologies are inefficient and inaccurate when analyzing the correlation between the test object and the pre-set sample group, resulting in wasted human resources and incorrect judgments.
By acquiring static and dynamic data of samples, a knowledge graph is constructed and feature calculation is performed using a graph neural network. The model is trained by combining static and dynamic fusion data to determine the correlation between the test object and the preset sample group.
It improves the accuracy and efficiency of the disease correlation between the test subjects and the preset sample population, reduces the duplication of manual data collection, and provides a more reliable reference.
Smart Images

Figure CN117312853B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of graph neural networks and deep learning, and in particular to a reasoning method, apparatus, device, and medium for the correlation between a test object and a group. Background Technology
[0002] With the advancement of medical technology, people are paying more and more attention to infectious diseases. The transmission routes of various infectious diseases are different. Infectious diseases can be transmitted through the respiratory tract, digestive tract, contact, blood and body fluids, and vertical transmission. When analyzing the target object, in general, the correlation data between the target object and the preset sample group can only be obtained through self-description or a large amount of manual data collection and processing. However, this wastes a lot of human resources. Manual processing is not only inefficient but also inaccurate, which may provide incorrect guidance for subsequent judgments.
[0003] Traditional neural networks are primarily used to process structured data such as vectors and matrices, while graph neural networks can effectively handle unstructured graph-structured data. They can capture the complex relationships between nodes and edges, extract information from the graph, and preserve its structural features, thus enabling more accurate data analysis and prediction. Therefore, how to use neural networks to infer the correlation between a test object and a pre-defined sample group is a pressing technical problem that needs to be solved. Summary of the Invention
[0004] In view of the shortcomings of the prior art described above, the present invention provides a reasoning method, apparatus, device and medium for the correlation between the object to be tested and the group, so as to solve the above technical problems.
[0005] To achieve the above-mentioned objectives and other related objectives, the technical solutions provided in this application are as follows.
[0006] This invention provides a method for reasoning about the correlation between a test object and a group, comprising:
[0007] Obtain sample static data, sample dynamic data, and a global weight matrix. The sample static data is used to characterize sample identity information, and the sample dynamic data is used to characterize the sample's movement trajectory.
[0008] Static fusion data is determined based on the sample static data and the global weight matrix;
[0009] A knowledge graph is constructed based on the dynamic sample data, and the knowledge graph is used to perform feature calculations on the knowledge graph to obtain dynamic fused data.
[0010] The model is trained based on the static fusion data and the dynamic fusion data to obtain the correlation model, so as to determine the correlation between the target object to be tested and the preset sample group according to the correlation model.
[0011] In the technical solution provided in the embodiments of this application, the step of determining static fusion data based on the sample static data and the global weight matrix includes: determining static feature vectors based on the sample static data; aggregating multiple static feature vectors and multiplying them with the global weight matrix to obtain static fusion data.
[0012] In the technical solution provided in the embodiments of this application, after obtaining the sample dynamic data, the method further includes preprocessing the sample dynamic data. The preprocessing steps include: dividing the action trajectory based on a preset time period to obtain segmented trajectory data; and normalizing the segmented trajectory data to obtain normalized trajectory data.
[0013] In the technical solution provided in the embodiments of this application, the step of constructing a knowledge graph based on the sample dynamic data includes: using the sample as a node; determining the trajectory intersection points between the nodes according to the normalized trajectory data; determining the coordinate positions of the sample in each preset time period according to the trajectory intersection points; determining the node relationship between corresponding nodes according to the distance between the coordinate positions, thereby obtaining the knowledge graph.
[0014] In the technical solution provided in the embodiments of this application, feature calculation is performed on the knowledge graph through a graph neural network to obtain dynamic fusion data; including: performing attention calculation on the weight matrix parameters and nodes in the knowledge graph through the graph neural network to obtain attention weights between the nodes; determining node features based on the attention weights and the node relationships; and aggregating multiple node features to obtain the dynamic fusion data.
[0015] In the technical solution provided by the embodiments of this application, the expression for determining the attention weight is as follows:
[0016]
[0017] Among them, e ij Represents a node Features of nodes The attention weights, where 'a' represents attention and 'W' represents the weight matrix parameters. This represents the coordinate position of the i-th sample within a preset time period t. This represents the coordinate position of the j-th sample within a preset time period t.
[0018] In the technical solution provided by the embodiments of this application, a correlation model is obtained by training a model based on the static fusion data and the dynamic fusion data, including: determining the predicted correlation between the samples based on the static fusion data and the dynamic fusion data; constructing a loss function based on the predicted correlation and the actual correlation; updating a preset neural network based on the loss value of the loss function until the loss value is within a preset loss threshold range, thereby obtaining the correlation model.
[0019] According to another aspect of the embodiments of this application, an inference apparatus for the correlation between a test object and a group is provided, comprising: a collection module for acquiring sample static data, sample dynamic data, and a global weight matrix, wherein the sample static data is used to characterize sample identity information, and the sample dynamic data is used to characterize the sample's movement trajectory; a static data processing module for determining static fusion data based on the sample static data and the global weight matrix; a dynamic data processing module for constructing a knowledge graph based on the sample dynamic data, and performing feature calculation on the knowledge graph through a graph neural network to obtain dynamic fusion data; and an association module for training a model based on the static fusion data and the dynamic fusion data to obtain an association degree model, so as to determine the correlation degree between the test target object and a preset sample group according to the association degree model.
[0020] According to another aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the inference method for the correlation between the test object and the group as described above.
[0021] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the inference method for the correlation between the object under test and the group as described above.
[0022] This application provides a method, apparatus, device, and medium for inferring the correlation between a target object and a pre-defined sample group. The method includes: acquiring static sample data, dynamic sample data, and a global weight matrix; determining static fusion data using the static sample data and the global weight matrix; constructing a knowledge graph using the dynamic sample data; performing feature processing on the knowledge graph based on a graph neural network to obtain dynamic sample data; training a model using the static and dynamic fusion data to obtain a correlation model; and determining the correlation between the target object and a pre-defined sample group based on the correlation model. This application processes the static sample data to obtain static fusion data and performs feature processing on the knowledge graph constructed from the dynamic sample data using a graph neural network model to obtain dynamic fusion data. By combining the static and dynamic fusion data to train the model, the correlation between the target object and the pre-defined sample group can be directly output based on the correlation model, eliminating the need for repeated manual data collection. This improves the accuracy and efficiency of determining the disease correlation between the target object and the pre-defined sample group and provides a valuable reference for subsequent researchers. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating an exemplary embodiment of the present invention, showing a method for reasoning about the correlation between a test object and a group;
[0024] Figure 2 This is a flowchart illustrating the determination of dynamically fused data, as shown in an exemplary embodiment of the present invention;
[0025] Figure 3 This is a block diagram illustrating an exemplary embodiment of the present invention of a reasoning device for the correlation between a test object and a group;
[0026] Figure 4 This is a schematic diagram illustrating the structure of a computer system suitable for implementing the electronic device of the present invention, as shown in an exemplary embodiment of the present invention. Detailed Implementation
[0027] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0028] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0029] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0030] Graph Neural Networks (GNNs) are machine learning models in computer science specifically designed for processing and analyzing graph-structured data. In computer science, GNNs encode and reason about information in a graph by defining and updating node representations on nodes and edges. Based on the idea of neighborhood aggregation, GNNs iteratively collect information from a node's neighbors and combine this information with the node's own features to update its representation. This iterative process can be implemented using graph convolution operations. Graph convolution aggregates the feature information of a node's neighbors, performs a linear transformation on the aggregation result using a weight matrix, and then applies a non-linear activation function to obtain a new node representation. Each node can utilize information from its surrounding nodes for feature updates, thus fully considering the contextual information of the graph structure.
[0031] Traditional neural networks are primarily used to process structured data such as vectors and matrices, while graph neural networks can effectively handle unstructured graph-structured data. They can capture the complex relationships between nodes and edges, extract information from the graph, and preserve its structural features, thus enabling more accurate data analysis and prediction.
[0032] The inventors discovered that with the advancement of medical technology, people are paying more and more attention to infectious diseases. The transmission routes of various infectious diseases are different. Infectious diseases can be transmitted through the respiratory tract, digestive tract, contact, blood and body fluids, and vertical transmission. When analyzing the target object, in general, the correlation data between the target object and the preset sample group can only be obtained through self-description or a large amount of manual data collection and processing. However, this wastes a lot of human resources. Manual processing is not only inefficient but also inaccurate, which may provide incorrect guidance for subsequent judgments.
[0033] To address the aforementioned issues, static sample data, dynamic sample data, and a global weight matrix are acquired. Static fusion data is determined using the static sample data and the global weight matrix. A knowledge graph is constructed using the dynamic sample data. Feature processing of the knowledge graph is performed based on a graph neural network to obtain dynamic sample data. A model is trained using the static and dynamic fusion data to obtain a correlation model. The correlation model is then used to determine the correlation between the target object to be tested and the preset sample group.
[0034] like Figure 1 As shown, in one embodiment of the present invention, the steps of providing a method for inferring the correlation between a test object and a group include at least:
[0035] S110. Obtain sample static data, sample dynamic data and global weight matrix. Sample static data is used to represent sample identity information, and sample dynamic data is used to represent sample movement trajectory.
[0036] S120. Determine the static fusion data based on the sample static data and the global weight matrix;
[0037] S130. Construct a knowledge graph based on dynamic sample data, and perform feature calculation on the knowledge graph through a graph neural network to obtain dynamic fused data;
[0038] S140. Based on static fusion data and dynamic fusion data, a model is trained to obtain a correlation model, so as to determine the correlation between the target object to be tested and the preset sample group according to the correlation model.
[0039] It should be noted that the preset sample group is a group composed of multiple samples, and the group also has the corresponding characteristics contained in the samples themselves.
[0040] In detail, in an exemplary embodiment of this application, the step of determining static fusion data based on sample static data and a global weight matrix includes: determining static feature vectors based on the sample static data; aggregating multiple static feature vectors and multiplying them with the global weight matrix to obtain static fusion data. It should be noted that the sample static data represents the sample's identity information data, which varies from person to person and includes data such as gender, age, and blood type. The sample's identity information includes disease-related identity information, such as blood type and other underlying disease information, such as diabetes, hypertension, lung disease, and heart disease. The global weight matrix is a (f*s) matrix, and the global weight matrix W... r ∈R f×sWhere f is the size of the embedding vector dimension, s is the number of static data samples, and the global weight matrix is used to extract important parameters of the correlation between the static data samples and the preset sample group. The static data samples are encoded and feature extracted. Each static data sample is converted into a binary vector. Taking gender as an example, assuming there are two values: "Male" and "Female", their binary vectors are converted to obtain encoded data [1,0] and [0,1]. Feature extraction is performed on the encoded data to obtain static feature vectors. Multiple static feature vectors are aggregated to obtain a static feature matrix S∈R. n×s Where n is the size of the embedding vector dimension and s is the number of static feature vectors. Multiple static feature vectors are aggregated and multiplied with the global weight matrix to obtain static fused data.
[0041] The static fusion data is determined as shown in expression (1):
[0042] f s =W r ×S (1)
[0043] In expression (1), f s W represents statically fused data. r Let S be the global weight matrix and S be the static feature matrix.
[0044] In detail, in an exemplary embodiment of this application, after acquiring the sample dynamic data, the method further includes preprocessing the sample dynamic data. The preprocessing steps include: dividing the movement trajectory based on a preset time period to obtain segmented trajectory data; and normalizing the segmented trajectory data to obtain normalized trajectory data. The sample's movement trajectory can be the actions and travel routes of the sample in different locations within a certain time period. Because some basic infectious diseases can only infect other healthy individuals after performing specific actions, it is necessary to preprocess the sample dynamic data by dividing the movement trajectory into time segments based on a preset time period, treating the data of each time period as an independent dataset. If the parameters of the entire movement trajectory are H = {h1, h2, h3, ..., h...} n The movement trajectory is divided into segments based on a preset time period t, resulting in segmented movement trajectories H. t ={h t1 ,h t2 ,h t3 ,...,h tn ,} represents the trajectory data for the t-th preset time period; the trajectory data for each preset time period is mapped to the range (0-1) to obtain normalized trajectory data.
[0045] In detail, in an exemplary embodiment of this application, the step of constructing a knowledge graph based on sample dynamic data includes: treating samples as nodes; determining trajectory intersections between nodes based on normalized trajectory data; determining the coordinate positions of samples in various preset time periods based on the trajectory intersections; and determining the node relationships between corresponding nodes based on the distance between the coordinate positions, thereby obtaining the knowledge graph. Specifically, a single sample is treated as a node, and trajectory intersections between samples are determined using normalized trajectory data, where the trajectory intersection data is represented as... Where d represents the dimension of the intersection; the trajectory intersection point of each node is set as the coordinate position within the corresponding preset time period t, i.e. in and This represents the position of the i-th person on the x and y axes; it calculates the distance between the coordinates of nodes. If the distance between two nodes is less than a preset distance value, it indicates that the two nodes are related; otherwise, they are not related. This yields the node relationships and the knowledge graph, denoted as G. t =(V t E t ), where V t E represents the set of nodes during that time period. t This represents the set of node relationships for that time period.
[0046] In detail, in one exemplary embodiment of this application, as Figure 2 As shown, the process of calculating features from a knowledge graph using a graph neural network to obtain dynamically fused data includes at least steps S210 to S230:
[0047] S210. Attention weights between nodes are obtained by performing attention calculations on the weight matrix parameters and nodes in the knowledge graph using a graph neural network.
[0048] S220. Determine node characteristics based on attention weights and node relationships;
[0049] S230. Aggregate the features of multiple nodes to obtain dynamic fused data.
[0050] The shared linear transformation of the weight matrix parameters is: W∈R F×F′ Where F is the dimension of the node, and F′ is the dimension of the transformed node feature vector. The node performs self-attention calculation, a∶R F′ ×R F′ →R, thus obtaining the attention. Graph neural networks calculate attention based on the nodes of the knowledge graph, and then use this attention to calculate the attention weight between two nodes.
[0051] More specifically, in an exemplary embodiment of this application, note that the expression for determining the weights is as shown in (2):
[0052]
[0053] Among them, e ij Represents a node Features of nodes The attention weights, where 'a' represents attention and 'W' represents the weight matrix parameters. This represents the coordinate position of the i-th sample within a preset time period t. This represents the coordinate position of the j-th sample within a preset time period t.
[0054] The graph structure is injected into the attention by performing hidden attention, but only the j∈N nodes are computed. i e ij , where N i It is a neighborhood of node i in the graph neural network; neighbor j will be exactly a first-order neighbor of i (including i). In order to enable comparison between different nodes, the attention coefficient is obtained by normalizing at node j through the softmax function. The normalized attention coefficient is determined as shown in expression (3):
[0055]
[0056] In expression (3), a ij e is the coefficient of attention. ij Represents a node Features of nodes Attention weight, This indicates that for the kth to Nth... i Perform a summation calculation, e ik Represents a node Features of nodes Attention weight.
[0057] The attention weights and node relationships are linearly combined to obtain node features, and the expression for determining the node features is shown in (4):
[0058]
[0059] In expression (4), For node characteristics, σ is a nonlinear function, and a ij Attention coefficient This indicates that for the j-th to Nth... i Perform a summation calculation, where W represents the parameters of the weight matrix. This represents the coordinate position of the j-th sample within a preset time period t.
[0060] By aggregating the features of multiple nodes, dynamic fused data is obtained, and the expression of the dynamic fused data is shown in (5):
[0061]
[0062] In expression (5), h i For dynamically fused data, σ is a nonlinear function, ∑ t∈T This indicates that the summation is performed over a preset time period t to the time axis T. This represents the coordinate position of the i-th sample within a preset time period t.
[0063] In detail, in an exemplary embodiment of this application, a correlation model is obtained by training a model based on static fused data and dynamic fused data, including: determining the predicted correlation between samples based on the static fused data and dynamic fused data; constructing a loss function based on the predicted correlation and the actual correlation; updating a preset neural network based on the loss value of the loss function until the loss value is within a preset loss threshold range, thereby obtaining the correlation model. Specifically, the static fused data and dynamic fused data are input into a multilayer perceptron for calculation to obtain the predicted correlation, and the expression for determining the predicted correlation is shown in (6).
[0064] y′ i =MLP(f s h i (6)
[0065] Where, y′ i Indicates the predicted correlation degree, MLP stands for Multilayer Perceptron, f s h represents static fused data i This indicates dynamically fused data.
[0066] The loss function is constructed based on the predicted correlation and the actual correlation. The expression for the loss function is shown in (7).
[0067] Loss MLP =CrossEntropyLoss(y′) i ,y i (7)
[0068] Among them, Loss MLP CrossEntropyLoss represents the loss value, and y′ represents the loss function. i y represents the predicted correlation. i Indicates the true degree of correlation.
[0069] The loss value is compared with a preset loss threshold range. When the loss value is outside the preset loss threshold range, the preset neural network is adjusted according to the loss value until the loss value is within the preset loss threshold range, thus obtaining the correlation model.
[0070] Specifically, if the preset sample group suffers from gastrointestinal infectious diseases (bacterial dysentery), the relevant data of the target object to be tested are input into the correlation model. The correlation model includes the relevant infectious data and characteristics of gastrointestinal infectious diseases, and the correlation model outputs the correlation between the target object to be tested and the preset sample group suffering from gastrointestinal infectious diseases.
[0071] This application provides a method for inferring the correlation between a target object and a pre-defined sample group. The method includes: acquiring static sample data, dynamic sample data, and a global weight matrix; determining static fusion data using the static sample data and the global weight matrix; constructing a knowledge graph using the dynamic sample data; performing feature processing on the knowledge graph based on a graph neural network to obtain dynamic sample data; training a model using the static and dynamic fusion data to obtain a correlation model; and determining the correlation between the target object and a pre-defined sample group based on the correlation model. This application processes the static sample data to obtain static fusion data, and performs feature processing on the knowledge graph constructed from the dynamic sample data using a graph neural network model to obtain dynamic fusion data. By combining the static and dynamic fusion data to train the model, the correlation between the target object and the pre-defined sample group can be directly output based on the correlation model, eliminating the need for repeated manual data collection. This improves the accuracy and efficiency of determining the disease correlation between the target object and the pre-defined sample group, and also provides a valuable reference for subsequent researchers.
[0072] like Figure 3 As shown, the exemplary inference device for the correlation between the test object and the group includes: a data acquisition module 310, a static data processing module 320, a dynamic data processing module 330, and a correlation module 340.
[0073] The acquisition module 310 is used to acquire sample static data, sample dynamic data and global weight matrix. The sample static data is used to represent sample identity information and the sample dynamic data is used to represent the sample's movement trajectory.
[0074] The static data processing module 320 is used to determine the static fusion data based on the sample static data and the global weight matrix.
[0075] The dynamic data processing module 330 is used to construct a knowledge graph based on sample dynamic data, and to perform feature calculation on the knowledge graph through a graph neural network to obtain dynamic fused data.
[0076] The association module 340 is used to train a model based on static fusion data and dynamic fusion data to obtain an association degree model, so as to determine the association degree between the target object to be tested and the preset sample group according to the association degree model.
[0077] It should be noted that the inference device for the correlation between the test object and the group provided in the above embodiments and the inference method for the correlation between the test object and the group provided in the above embodiments belong to the same concept. The specific way of performing each step has been described in detail in the method embodiments, and will not be repeated here.
[0078] Embodiments of the present invention also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device enables the inference method for the correlation between the test object and the group provided in the above embodiments.
[0079] Please see Figure 4 A schematic diagram of a computer system suitable for implementing embodiments of the present invention is shown. It should be noted that... Figure 4 The computer system 400 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0080] like Figure 4 As shown, the computer system 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 402 or programs loaded from storage portion 408 into Random Access Memory (RAM) 403. The RAM 403 also stores various programs and data required for system operation. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An Input / Output (I / O) interface 405 is also connected to the bus 404.
[0081] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to I / O interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed.
[0082] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs various functions defined in the system of the present invention.
[0083] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a computer's processor, causes the computer to perform the aforementioned inference method for the correlation between the test object and the group. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0084] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0085] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0086] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A reasoning method for the correlation between a test object and a group, characterized in that, include: Obtain sample static data, sample dynamic data, and a global weight matrix. The sample static data is used to characterize sample identity information, and the sample dynamic data is used to characterize the sample's movement trajectory. Static fusion data is determined based on the sample static data and the global weight matrix; A knowledge graph is constructed based on the dynamic sample data, and the knowledge graph is used to perform feature calculations on the knowledge graph to obtain dynamic fused data. The model is trained based on the static fusion data and the dynamic fusion data to obtain the correlation model, so as to determine the correlation between the target object to be tested and the preset sample group according to the correlation model.
2. The reasoning method for the correlation between the test object and the group according to claim 1, characterized in that, The steps for determining static fused data based on the sample static data and the global weight matrix include: Determine the static feature vector based on the static data of the sample; The static feature vectors are aggregated and multiplied with the global weight matrix to obtain static fused data.
3. The reasoning method for the correlation between the test object and the group according to claim 2, characterized in that, After acquiring the sample dynamic data, the method further includes preprocessing the sample dynamic data, the preprocessing steps of which include: The movement trajectory is divided into segments based on a preset time period to obtain segmented trajectory data; The segmented trajectory data is normalized to obtain normalized trajectory data.
4. The reasoning method for the correlation between the test object and the group according to claim 3, characterized in that, The steps for constructing a knowledge graph based on the dynamic sample data include: The sample is used as a node; Determine the trajectory intersection points between the nodes based on the normalized trajectory data; The coordinate positions of the sample in each preset time period are determined based on the intersection points of the trajectories. The knowledge graph is obtained by determining the node relationships between corresponding nodes based on the distance between the coordinate positions.
5. The reasoning method for the correlation between the test object and the group according to claim 4, characterized in that, The knowledge graph is used to perform feature calculations to obtain dynamically fused data, including: The attention weights between nodes are obtained by performing attention calculations on the weight matrix parameters and the nodes in the knowledge graph using the graph neural network. Node features are determined based on the attention weights and node relationships; The dynamic fused data is obtained by aggregating the features of multiple nodes.
6. The reasoning method for the correlation between the test object and the group according to claim 5, characterized in that, The expression for determining the attention weight is as follows: Among them, e ij Represents a node Features of nodes The attention weights, where 'a' represents attention and 'W' represents the weight matrix parameters. This represents the coordinate position of the i-th sample within a preset time period t. This represents the coordinate position of the j-th sample within a preset time period t.
7. The reasoning method for the correlation between the test object and the group according to claim 5, characterized in that, Based on the static fused data and the dynamic fused data, a model is trained to obtain a correlation model, including: The predicted correlation between the samples is determined based on the static fusion data and the dynamic fusion data; A loss function is constructed based on the predicted correlation and the actual correlation. The preset neural network is updated based on the loss value of the loss function until the loss value is within the preset loss threshold range, thus obtaining the correlation model.
8. A reasoning device for the correlation between a test object and a group, characterized in that, include: The acquisition module is used to acquire static sample data, dynamic sample data, and a global weight matrix. The static sample data is related to the sample identity information, and the dynamic sample data is related to the sample's movement trajectory. The static data processing module is used to determine static fusion data based on the sample static data and the global weight matrix; The dynamic data processing module is used to construct a knowledge graph based on the sample dynamic data, and to perform feature calculation on the knowledge graph through a graph neural network to obtain dynamic fused data. The association module is used to train a model based on the static fusion data and the dynamic fusion data to obtain an association degree model, so as to determine the association degree between the target object to be tested and the preset sample group according to the association degree model.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the reasoning method for the correlation between the test object and the group as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by the computer's processor, causes the computer to perform the reasoning method for the correlation between the test object and the group as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Ship trend probability continuous prediction method and device based on behavior characteristic spectrum
CN116226403A
Dynamic knowledge graph reasoning method and device fusing static facts
CN116227600A