Medical article writing method and device and storage medium
By building a time-series medical knowledge base and graph community, using the Hidden Markov model and large language model, the problems of insufficient global information capture and limited reasoning ability in medical article writing are solved, and high-quality and accurate medical article generation are achieved .
Patent Information
- Application Number
- CN202411321905.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art has problems such as insufficient global information capture, limited reasoning ability and content selection risks in the writing of medical articles, resulting in low writing quality and accuracy.
By collecting and preprocessing medical article data, building a time-series medical knowledge base and generating a graph community, using the Hidden Markov model for timing inference, creating a emission probability matrix to select article fragments, and combining it with a large language model for writing and modifying, and finally doing Manual review and revision.
It realizes global information capture of complex queries and multi-themed problems, enhances the comprehensiveness and accuracy of the article content, avoids conflicts of opinion, and ensures that the generated medical articles are logically coherent and professional.
Smart Images

Figure CN119443053A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing and medical information processing, and in particular to a method, device and storage medium for writing medical articles. Background Art
[0002] In the field of medical article writing, the existing technology mainly adopts the Retrieval-Augmented Generation (RAG) model to write articles. The traditional RAG model realizes the generation of medical articles through the following steps: the first step is to build a medical knowledge base, which contains a large number of medical documents and articles, so as to provide reference materials when writing articles; the second step is to create a retrieval system, and develop an efficient retrieval system that can quickly recall document fragments related to the current writing topic from the knowledge base; the third step is to use the Large Language Model (LLM) to modify and write articles. After receiving the relevant document fragments provided by the retrieval system, the LLM generates coherent text content according to the context.
[0003] Although the traditional RAG model has improved the automated writing capabilities of medical articles to a certain extent, it still has many shortcomings in practical applications, as follows: (i) Local information matching and fusion: The traditional RAG model mainly focuses on the matching and fusion of local information by retrieving relevant document fragments and inputting them into the generation model as context. However, when dealing with complex queries or multi-topic questions, the traditional RAG model may find it difficult to fully capture all relevant information, resulting in a lack of globality in the generated responses. (ii) Limited reasoning ability: As the knowledge base expands, the traditional RAG model finds it difficult to effectively connect various information points, resulting in limited reasoning ability and affecting the quality and accuracy of article generation.
[0004] In summary, the existing technologies for medical article writing have the defects of low writing quality and accuracy due to the problems of insufficient global information capture, limited reasoning ability and content selection risks. Summary of the invention
[0005] In view of this, the present invention provides a medical article writing method, device and storage medium to solve the problem of low writing quality and accuracy of medical articles.
[0006] In a first aspect, the present invention provides a method for writing a medical article, the method comprising:
[0007] Collecting the data set to be processed, preprocessing the data set to be processed, and storing the preprocessing results in a preset time series medical knowledge base;
[0008] Constructing a graph community of a preset medical knowledge base according to a preset time-series medical knowledge base;
[0009] Based on the hidden Markov model, the time series inference of the graph community of the preset medical knowledge base at different time points is performed;
[0010] By creating a preset retrieval system and setting the emission probability model, the emission probability matrix is constructed;
[0011] According to the emission probability matrix, article fragments are selected, and the articles are written and modified according to the preset model, and manual review and revision are performed to complete the writing of medical articles.
[0012] In an optional embodiment, the step of collecting the data set to be processed, preprocessing the data set to be processed, and storing the preprocessing result in a preset time series medical knowledge base includes:
[0013] Medical articles from various time periods were collected. The data sets were sourced from publicly released guidelines, expert consensus, medical literature, conference abstracts, and medical databases.
[0014] Use natural language processing technology to pre-process the collected articles, including data cleaning, named entity recognition and document slicing, including classification and annotation of articles, and extraction of key information and medical concepts;
[0015] The preprocessed documents are classified by year and stored in a preset chronological medical knowledge base.
[0016] In an optional implementation, the step of constructing a graph community of a preset medical knowledge base according to a preset time-series medical knowledge base includes:
[0017] Based on the preprocessed medical articles, a graph structure is constructed in each time period, where nodes represent medical concepts and edges represent the relationships between concepts.
[0018] Use the GraphSAGE graph embedding algorithm to embed the graph structure and generate an embedding vector;
[0019] According to the graph structure and embedding vector of each time period, a graph community of the preset medical knowledge base is constructed.
[0020] In an optional implementation, the content of the GraphSAGE graph embedding algorithm includes:
[0021] Define a neighbor sampling strategy. For each node v, randomly sample a fixed number of neighbor nodes from its neighbor node set N(v), and set the sampling size to k.
[0022] Neighbor information aggregation: for each node v, its own feature vector h vand the feature vectors of neighbor nodes {h u :u∈N(v)} are aggregated together to generate a new feature representation; the aggregation function is the average aggregation method as the information aggregation method; the content of the average aggregation includes: Represents the feature vector of node v at the kth layer; at the 0th layer, the node feature vector is its initial input feature For the kth layer, the characteristic vector formula of node v is obtained: Where σ represents the activation function, W (k) represents the weight matrix of the kth layer, AGGREGATE is the aggregation function; through multi-layer aggregation operations, high-order feature representations of nodes are gradually generated; assuming there are k layers of aggregation operations, the final embedding representation of each node v is
[0023] Through multi-layer aggregation operations, high-order feature representations of nodes are gradually generated. Assuming there are k layers of aggregation operations, the final embedding representation of each node v is
[0024] Finally, the merged nodes are embedded as a concatenation of multiple layers of feature representations, and the expression of the method is:
[0025] In an optional implementation, the step of performing time series inference at different time points on the graph community of the preset medical knowledge base based on the hidden Markov model includes:
[0026] Define the set state and set the set, where each state represents the graph structure at a point in time;
[0027] Define the transition probability matrix from state s at time t i Transfer to state s at time t-1 j The probability is: P ij =P(s t-1 =s j |s t =s i );
[0028] The initial state distribution vector π represents the probability that the system is in each state at the initial time t: π i =P(s t =s i );
[0029] Based on the existing probabilities, time series inference is performed, given the selected time t and the initial state s t , calculate the system belongs to s at the tnth moment j The probability of time series inference at different time points is: P(s t-n =s j )=πi ·P(s t =s i )·P(s t-1 =s * )…P(s t-n =s j ).
[0030] In an optional implementation, the content of constructing the emission probability matrix by creating a preset retrieval system and setting an emission probability model includes:
[0031] Retrieving content features by creating a preset retrieval system, wherein the preset retrieval system is an Elasticsearch vector retrieval system;
[0032] Define hidden states and observed states, where the hidden states include content features corresponding to the medical questions; the observed states include the main ideas of the generated articles;
[0033] By setting an emission probability model, the emission probability from hidden state to observation state is defined, wherein the emission probability model is used to describe the probability of hidden state generating observation state, the hidden state corresponds to the relevant content features retrieved from the medical knowledge base at a preset time, and the observation state corresponds to the main viewpoint of the generated article;
[0034] The element B of the emission probability matrix B jk Indicates that in the hidden state s j The observation state o generated under k Probability:
[0035] B jk =P(o k |s j ).
[0036] In an optional embodiment, the steps of selecting article segments according to the emission probability matrix, writing and modifying the article according to a preset model, and manually reviewing and revising to complete the writing of the medical article include:
[0037] Calculation of retrieval similarity: Input the medical question, retrieve relevant content features through the vector retrieval system, and calculate the similarity between the retrieval content and the medical question; select the most relevant article fragment based on the similarity and emission probability model;
[0038] Use the LLM model to write and revise the article: Input the selected article fragments into the LLM model, use the LLM model to write and revise the article, and generate a first draft;
[0039] The generated articles were manually reviewed and revised to complete the writing of medical articles.
[0040] The medical article writing method and device provided by the present invention realizes global information capture of complex queries and multi-topic issues by utilizing graph communities and time series models, thereby enhancing the comprehensiveness of article content. Through the hidden Markov time series model, the problem of selecting the content of the same article at different times is solved, and conflicts of opinion at subsequent times are avoided. Through the emission probability model of the hidden Markov model, the weights of different documents are flexibly adjusted to achieve the decoupling of the problem of selecting the content of different articles at the same time, thereby enhancing the flexibility and adaptability of the system. Combining the LLM model and the graph retrieval enhanced generation model, it is ensured that the generated medical articles are accurate in content, logically coherent, and meet the requirements of the medical profession.
[0041] In a second aspect, the present invention provides a medical article writing device, the device comprising:
[0042] A data collection and preprocessing module is used to collect the data set to be processed, preprocess the data set to be processed, and store the preprocessing results in a preset time series medical knowledge base;
[0043] A graph community construction module, used to construct a graph community of a preset medical knowledge base according to a preset time-series medical knowledge base;
[0044] Hidden Markov model application module, used to perform time series inference at different time points on the graph community of the preset medical knowledge base based on the hidden Markov model;
[0045] An emission probability matrix construction module is used to construct an emission probability matrix by creating a preset retrieval system and setting an emission probability model;
[0046] The article writing module is used to select article fragments according to the emission probability matrix, write and modify the article according to the preset model, and perform manual review and revision to complete the writing of the medical article.
[0047] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the medical article writing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0048] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to execute the medical article writing method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 is a flow chart of a method for writing a medical article according to an embodiment of the present invention;
[0051] Figure 2 is another flow chart of a method for writing a medical article according to an embodiment of the present invention;
[0052] Figure 3 is a structural block diagram of a medical article writing device according to an embodiment of the present invention;
[0053] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0055] According to an embodiment of the present invention, an embodiment of a method for writing a medical article is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0056] In this embodiment, a medical article writing method is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 1 is a flow chart of a method for writing a medical article according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0057] Step S101, collect the data set to be processed, pre-process the data set to be processed, and store the pre-processing result in a preset time series medical knowledge base.
[0058] In an embodiment of the present invention, a data set to be processed is collected, and the data set to be processed is preprocessed, and the preprocessing results are stored in a preset time series medical knowledge base, including: collecting medical articles of various time periods, and the data set sources include academic journals, conference papers, and medical databases. This is only an example, not limited to this. In actual applications, the corresponding data set is selected according to the actual situation. The collected articles are preprocessed using natural language processing technology, and the preprocessed articles are classified and labeled to extract key information and medical concepts. The preprocessing includes word segmentation, deduplication and semantic analysis. This is only an example, not limited to this. In actual applications, the corresponding preprocessing means are selected according to the actual situation. The preprocessed articles are classified and organized by year and stored in a preset time series medical knowledge base. The content of the preset time series medical knowledge base is not limited here, and the corresponding storage is performed according to the actual situation after preprocessing.
[0059] Step S102, constructing a graph community of a preset medical knowledge base according to a preset time-series medical knowledge base.
[0060] In an embodiment of the present invention, the step of constructing a graph community (Graph Communities) of a preset medical knowledge base according to a preset time-series medical knowledge base includes: constructing a graph structure in each time period based on preprocessed medical articles, wherein nodes represent medical concepts and edges represent relationships between concepts. The graph structure is embedded using the GraphSAGE graph embedding algorithm to generate an embedding vector, wherein GraphSAGE is a graph neural network model based on the spatial domain. The graph neural network model based on the spatial domain directly aggregates node information and performs other processing. Unlike the graph neural network model based on the frequency domain, it does not need to convert node information (spatial domain) into the frequency domain, and then inversely transforms it into node information (spatial domain) for model training and prediction after processing in the frequency domain. According to the graph structure and embedding vector of each time period, a graph community of the preset medical knowledge base is constructed.
[0061] In the embodiment of the present invention, the content of the GraphSAGE graph embedding algorithm includes:
[0062] Define a neighbor sampling strategy. For each node v, randomly sample a fixed number of neighbor nodes from its neighbor node set N(v), and set the sampling size to k.
[0063] Neighbor information aggregation: for each node v, its own feature vector h v and the feature vectors of neighbor nodes {h u :u∈N(v)} are aggregated together to generate a new feature representation; the aggregation function is the average aggregation method as the information aggregation method; the content of the average aggregation includes: Represents the feature vector of node v at the kth layer; at the 0th layer, the node feature vector is its initial input feature For the kth layer, the characteristic vector formula of node v is obtained: Where σ represents the activation function, W (k) represents the weight matrix of the kth layer, AGGREGATE is the aggregation function; through multi-layer aggregation operations, high-order feature representations of nodes are gradually generated; assuming there are k layers of aggregation operations, the final embedding representation of each node v is
[0064] Through multi-layer aggregation operations, high-order feature representations of nodes are gradually generated. Assuming there are k layers of aggregation operations, the final embedding representation of each node v is
[0065] Finally, the merged nodes are embedded as a concatenation of multiple layers of feature representations, and the expression of the method is: The CONCAT function combines text or feature vectors from multiple regions and / or strings.
[0066] Step S103, based on the hidden Markov model, perform time series inference on the graph community of the preset medical knowledge base at different time points.
[0067] In an embodiment of the present invention, based on a Hidden Markov Model (HMM), the steps of performing temporal inference at different time points on a graph community of a preset medical knowledge base include: defining a set state and setting a set, wherein each state represents a graph structure at a time point. Define a transition probability matrix, where the element P of the transition probability matrix P is ji Indicates that from the state s at time t i Transfer to state s at time t-1 j The probability is: P ij =P(s t-1 =s j |s t =s i ). The initial state distribution vector π represents the probability that the system is in each state at the initial time t: π i =P(s t =s i ).
[0068] Based on the existing probabilities, time series inference is performed, given the selected time t and the initial state s t , calculate the system belongs to s at the tnth moment j The probability of time series inference at different time points is: P(s t-n =s j )=P(s t =s i)·P(s t-1 =s * )…P(s t-n =s j ).
[0069] Step S104, constructing a transmission probability matrix by creating a preset retrieval system and setting a transmission probability model.
[0070] In the embodiment of the present invention, by creating a preset retrieval system and setting an emission probability model, the content of the emission probability matrix is constructed, including:
[0071] The content features are retrieved by creating a preset retrieval system, wherein the preset retrieval system is an Elasticsearch vector retrieval system. This is only an example and is not limited to this. In actual applications, a corresponding retrieval system is selected according to actual conditions.
[0072] Define hidden states and observed states, where the hidden state includes content features corresponding to the medical question; the observed state includes the main viewpoint of the generated article.
[0073] By setting the emission probability model, the emission probability from the hidden state to the observed state is defined, wherein the emission probability model is used to describe the probability of the hidden state generating the observed state, the hidden state corresponds to the relevant content features retrieved from the medical knowledge base at a preset time, and the observed state corresponds to the main idea of the generated article.
[0074] As above, the state at time t is the element B of the emission probability matrix B of i ik Indicates that in the hidden state s i The observation state o generated under k Probability:
[0075] B ik =P(o k |s i ).
[0076] Step S105, according to the emission probability matrix, select the article fragment, write and modify the article according to the preset model, and perform manual review and revision to complete the writing of the medical article.
[0077] In the embodiment of the present invention, according to the emission probability matrix, the article fragment is selected, the article is written and modified according to the preset model, and manual review and revision are performed to complete the steps of writing the medical article, including: calculation of retrieval similarity: inputting a medical question, retrieving relevant content features through a vector retrieval system, and calculating the similarity Sim between the retrieval content and the medical question; according to the joint probability model of the transition probability model, similarity and emission probability model, i.e., B k =max(Sim*P(o k|s i ),P(s t-1 =s j |s t =s i )*Sim*P(o k |s j ),…), select the most relevant article fragment with the highest recommendation probability.
[0078] Use the LLM model to write and revise the article: Input the selected article fragment into the LLM model, use the LLM model to write and revise the article, and generate a first draft.
[0079] The generated articles were manually reviewed and revised to complete the writing of medical articles.
[0080] Figure 2 is another flow chart of an embodiment of the present invention. In an embodiment of the present invention, according to Figure 2 The flowchart of can also complete the above-mentioned embodiment of the present invention.
[0081] The medical article writing method provided in this embodiment realizes the global information capture of the medical knowledge base, the time consistency processing and the mapping of the content features to the subjective points of the article, thereby generating accurate, coherent and professional medical articles.
[0082] In this embodiment, a medical article writing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0083] This embodiment provides a medical article writing device, such as Figure 3 As shown, including:
[0084] The data collection and preprocessing module 301 is used to collect the data set to be processed, preprocess the data set to be processed, and store the preprocessing results in a preset time series medical knowledge base;
[0085] A graph community construction module 302, used to construct a graph community of a preset medical knowledge base according to a preset time-series medical knowledge base;
[0086] A hidden Markov model application module 303 is used to perform temporal inference at different time points on the graph community of the preset medical knowledge base based on the hidden Markov model;
[0087] The emission probability matrix construction module 304 is used to construct the emission probability matrix by creating a preset retrieval system and setting an emission probability model;
[0088] The article writing module 305 is used to select article segments according to the emission probability matrix, write and modify the article according to a preset model, and perform manual review and revision to complete the writing of the medical article.
[0089] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0090] The medical article writing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0091] The embodiment of the present invention also provides a computer device having the above Figure 4 Medical article writing device shown.
[0092] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to an interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0093] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0094] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0095] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0096] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0097] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0098] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0099] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for writing a medical article, characterized in that: The method comprises: Collecting the data set to be processed, preprocessing the data set to be processed, and storing the preprocessing results in a preset time series medical knowledge base; Constructing a graph community of a preset medical knowledge base according to a preset time-series medical knowledge base; Based on the hidden Markov model, the time series inference of the graph community of the preset medical knowledge base at different time points is performed; By creating a preset retrieval system and setting the emission probability model, the emission probability matrix is constructed; According to the emission probability matrix, article fragments are selected, and the articles are written and modified according to the preset model, and manual review and revision are performed to complete the writing of medical articles.
2. The method according to claim 1, characterized in that The step of collecting the data set to be processed, preprocessing the data set to be processed, and storing the preprocessing result in a preset time series medical knowledge base includes: Medical articles from various time periods were collected. The data sets were sourced from publicly released guidelines, expert consensus, medical literature, conference abstracts, and medical databases. Use natural language processing technology to preprocess the collected articles. The preprocessing includes data cleaning, named entity recognition and document slicing, including classification and annotation of articles, extraction of key information and medical concepts; The preprocessed documents are classified by year and stored in a preset chronological medical knowledge base.
3. The method according to claim 2, characterized in that The step of constructing a graph community of a preset medical knowledge base according to a preset time-series medical knowledge base includes: Based on the preprocessed medical articles, a graph structure is constructed in each time period, where nodes represent medical concepts and edges represent the relationships between concepts. Use the GraphSAGE graph embedding algorithm to embed the graph structure and generate an embedding vector; According to the graph structure and embedding vector of each time period, a graph community of the preset medical knowledge base is constructed.
4. The method according to claim 3, characterized in that The contents of the GraphSAGE graph embedding algorithm include: Define a neighbor sampling strategy. For each node v, randomly sample a fixed number of neighbor nodes from its neighbor node set N(v), and set the sampling size to k. Neighbor information aggregation: for each node v, its own feature vector h v and the feature vectors of neighbor nodes {h u :u∈N(v)} are aggregated together to generate a new feature representation; the aggregation function is the average aggregation method as the information aggregation method; the content of the average aggregation includes: Represents the feature vector of node v at the kth layer; at the 0th layer, the node feature vector is its initial input feature For the kth layer, the characteristic vector formula of node v is obtained: Where σ represents the activation function, W (k) represents the weight matrix of the kth layer, AGGREGATE is the aggregation function; through multi-layer aggregation operations, high-order feature representations of nodes are gradually generated; assuming there are k layers of aggregation operations, the final embedding representation of each node v is Through multi-layer aggregation operations, high-order feature representations of nodes are gradually generated. Assuming there are k layers of aggregation operations, the final embedding representation of each node v is Finally, the merged node embedding is represented as a concatenation combination of multi-layer feature representations, and the expression of the method is:
5. The method according to claim 4, characterized in that The step of performing time series inference at different time points on the graph community of the preset medical knowledge base based on the hidden Markov model includes: Define the set state and set the set, where each state represents the graph structure at a point in time; Define the transition probability matrix from state s at time t i Transfer to state s at time t-1 j The probability is: P ij =P(s t-1 =s j |s t =s i ); The initial state distribution vector π represents the probability that the system is in each state at the initial time t: π i =P(s t =s i ); Based on the existing probabilities, time series inference is performed, given the selected time t and the initial state s t , calculate the system belongs to s at the tnth moment j The probability of time series inference at different time points is: P(s t-n =s j )=π i ·P(s t =s i )·P(s t-1 =s * )…P(s t-n =s j ).
6. The method according to claim 5, characterized in that The content of constructing the emission probability matrix by creating a preset retrieval system and setting an emission probability model includes: Retrieving content features by creating a preset retrieval system, wherein the preset retrieval system is an Elasticsearch vector retrieval system; Define hidden states and observed states, where the hidden states include content features corresponding to the medical questions; the observed states include the main ideas of the generated articles; By setting an emission probability model, the emission probability from hidden state to observation state is defined, wherein the emission probability model is used to describe the probability of hidden state generating observation state, the hidden state corresponds to the relevant content features retrieved from the medical knowledge base at a preset time, and the observation state corresponds to the main viewpoint of the generated article; The element B of the emission probability matrix B jk Indicates that in the hidden state s j The observation state o generated under k Probability: B jk =P(o k |s j )。 7. The method according to claim 6, characterized in that The steps of selecting article fragments according to the emission probability matrix, writing and modifying the article according to a preset model, and manually reviewing and revising to complete the writing of the medical article include: Calculation of retrieval similarity: Input the medical question, retrieve relevant content features through the vector retrieval system, and calculate the similarity between the retrieval content and the medical question; select the most relevant article fragment based on the similarity and emission probability model; Use the LLM model to write and revise the article: Input the selected article fragments into the LLM model, use the LLM model to write and revise the article, and generate a first draft; The generated articles were manually reviewed and revised to complete the writing of medical articles.
8. A medical article writing device, characterized in that: The device comprises: A data collection and preprocessing module is used to collect the data set to be processed, preprocess the data set to be processed, and store the preprocessing results in a preset time series medical knowledge base; A graph community construction module, used to construct a graph community of a preset medical knowledge base according to a preset time-series medical knowledge base; Hidden Markov model application module, used to perform time series inference at different time points on the graph community of the preset medical knowledge base based on the hidden Markov model; An emission probability matrix construction module is used to construct an emission probability matrix by creating a preset retrieval system and setting an emission probability model; The article writing module is used to select article fragments according to the emission probability matrix, write and modify the article according to the preset model, and perform manual review and revision to complete the writing of the medical article.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the medical article writing method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the medical article writing method according to any one of claims 1 to 7.