A Method and System for Constructing Underwater Acoustic Question-Answering Intelligent Agents that Integrate Large Models and Knowledge Graphs
Patent Information
- Application Number
- CN202610697171.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-20
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]现有的通用大语言模型(LLM)在处理水声等垂直学科问题时,极易产生脱离物理规律的“幻觉”
[0039](1):突破静态知识局限,实现高动态海况下的精准自适应决策,本发明通过引入“环境漂移方差”的计算与阈值判断机制,能够在真实物理环境发生突变时,触发图谱节点权重的实时惩罚与边关系的重构。这使得智能体具备了“动态物理直觉”,能够随着海况变化实时修正先验知识,保障了极端动态环境下的问答时效性与准确性。
Smart Images

Figure CN122570644A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the interdisciplinary field of artificial intelligence and underwater acoustics, and in particular to a method and system for constructing an underwater acoustic question-answering agent that integrates a large model and a knowledge graph. Background Technology
[0002] With the development of marine digitalization and intelligence, underwater acoustics, as a core technology for marine exploration and communication, has seen relatively lagging research in intelligentization. Currently, underwater acoustic algorithms still mainly rely on experience-driven traditional programming paradigms, lacking dedicated intelligent agents that cater to both scientific research and engineering needs.
[0003] Existing generalized large language models (LLMs) are prone to generating "illusions" that deviate from physical laws when dealing with problems in vertical disciplines such as underwater acoustics. To address this issue, current technologies typically introduce knowledge graphs (KGs) as supplementary prompts. However, real-world ocean environments (such as temperature, salinity, depth, internal waves, and hydrothermal strata) are highly dynamic and change frequently, while pre-built underwater acoustic knowledge graphs are static. When a user inquires about current anomalous signals at a research site, the physical constraints of the static graph conflict with the dynamic environment, leading the agent to provide incorrect answers that conform to theory but are detached from actual sea conditions. Summary of the Invention
[0004] This application aims to at least partially solve one of the technical problems in the aforementioned technologies.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] A method and system for constructing an underwater acoustic question-answering agent that integrates a large model and a knowledge graph. The method is executed by a processor and includes step S10: acquiring multi-dimensional underwater acoustic environment parameters collected in real time by on-site underwater acoustic sensors, and receiving natural language question text input by the user.
[0007] Step S20: Input the multidimensional underwater acoustic environment parameters into a preset underwater acoustic channel simulation module to extract sound field features and obtain the current sound field feature vector. Simultaneously, extract entities from the natural language question text and map it to a preset static underwater acoustic knowledge graph, extracting the theoretical knowledge subgraph corresponding to the natural language question text.
[0008] Step S30: Calculate the distribution difference between the current sound field feature vector and the node attribute vector of each node in the theoretical knowledge subgraph, and obtain the environmental drift variance based on the distribution difference.
[0009] Step S40: Determine whether the environmental drift variance is greater than a preset timeliness safety threshold. If so, use the current sound field feature vector to perform real-time penalty of node weights and reconstruction of edge relationships on the theoretical knowledge subgraph to generate a transient physical constraint subgraph.
[0010] Step S50: The transient physical constraint subgraph is used as the external prompt word content, concatenated with the natural language question text, and input into the finely tuned pre-trained large language model for inference, and the underwater acoustics professional question and answer result corresponding to the natural language question text is output.
[0011] Optionally, the step S10 of acquiring multi-dimensional underwater acoustic environment parameters collected in real time by the on-site underwater acoustic sensor includes receiving the initial sound velocity profile time-series data and the raw data of water temperature and salinity gradient sent by the on-site underwater acoustic sensor. The initial sound velocity profile time-series data is then subjected to denoising and interpolation smoothing processing to obtain a standard sound velocity profile matrix.
[0012] The original water temperature and salinity gradient data were subjected to outlier removal and normalization to obtain standard temperature and salinity gradient features.
[0013] The standard sound velocity profile matrix and the standard temperature and salinity gradient features are combined in multiple dimensions to generate multi-dimensional underwater acoustic environment parameters that conform to the input interface format of the underwater acoustic channel simulation module. The multi-dimensional underwater acoustic environment parameters are stored in a preset environmental state cache queue for the processor to extract and read data when executing step S20.
[0014] Optionally, step S20, which involves inputting the multidimensional underwater acoustic environment parameters into a preset underwater acoustic channel simulation module to extract sound field features and obtain the current sound field feature vector, includes inputting the multidimensional underwater acoustic environment parameters into the underwater acoustic channel simulation module based on ray acoustics theory.
[0015] A virtual sound field propagation space is constructed within the underwater acoustic channel simulation module, and the intrinsic sound ray propagation path of sound waves in the virtual sound field propagation space is simulated.
[0016] The propagation loss values, multipath delay distribution matrix, and phase offset parameters of the intrinsic sound ray propagation path at nodes at different distances and depths are extracted.
[0017] The propagation loss value, the multipath delay distribution matrix, and the phase offset parameter are subjected to feature dimensionality reduction and vectorization encoding conversion operations to generate the current sound field feature vector with fixed dimensions.
[0018] Optionally, the step S30 of calculating the distribution difference between the current sound field feature vector and the node attribute vectors of each node in the theoretical knowledge subgraph, and obtaining the environmental drift variance based on the distribution difference, includes traversing and extracting all nodes contained in the theoretical knowledge subgraph, and obtaining the node attribute vectors pre-bound inside each node, wherein the node attribute vectors represent static physical parameters under standard marine environment.
[0019] Calculate the cosine similarity value between the current sound field feature vector and each of the node attribute vectors.
[0020] The calculated cosine similarity values are aggregated using a preset logarithmic loss function to obtain an overall deviation quantification value. This overall deviation quantification value is then substituted into a preset variance statistical model for weighted calculation to obtain the environmental drift variance.
[0021] Optionally, step S40 involves using the current sound field feature vector to perform real-time penalty on node weights and reconstruct edge relationships on the theoretical knowledge subgraph to generate a transient physical constraint subgraph, including identifying a set of abnormal nodes in the theoretical knowledge subgraph that have physical feature conflicts with the current sound field feature vector.
[0022] The access weight values of all nodes in the abnormal node set during the graph inference process are reduced to complete the real-time penalty operation of the node weights.
[0023] Calculate the association probability between the remaining nodes that have not been penalized and the current sound field feature vector, and establish new directed connections between the remaining nodes based on the association probability.
[0024] Save the graph structure data containing the adjusted access weight values and the new directed connection edges, and encapsulate the graph structure data into the transient physical constraint subgraph output.
[0025] Optionally, in step S50, the transient physical constraint subgraph is used as external prompt word content, which is then concatenated with the natural language question text and input into a finely tuned pre-trained large language model for inference. This includes using a preset graph-to-text conversion algorithm to serialize the topological structure information and node text information of the transient physical constraint subgraph into a physical constraint prompt string.
[0026] According to the preset system-level prompt instruction template, the physical constraint prompt string is prepended to the natural language question text to form a composite reasoning input sequence containing dynamic background knowledge.
[0027] The composite inference input sequence is fed into the input layer of the pre-trained large language model pre-loaded in the processor memory, and the underwater acoustic professional question-answering result is output through decoding operation by a multi-layer self-attention mechanism.
[0028] Optionally, after determining whether the environmental drift variance is greater than the preset timeliness safety threshold in step S40, the method further includes directly retaining the original graph topology and all original node weight parameters of the theoretical knowledge subgraph if it is determined that the environmental drift variance is less than or equal to the preset timeliness safety threshold.
[0029] Extract the graph text representation data corresponding to the theoretical knowledge subgraph, and configure the graph text representation data as static external prompt words.
[0030] According to the preset splicing rules, the static external prompts are combined with the natural language question text to perform text splicing operation, generate a standard inference sequence, and input it into the fine-tuned pre-trained large language model. The pre-trained large language model is then decoded through the fully connected layer to obtain the underwater acoustics professional question answering result corresponding to the static constraint rules.
[0031] Optionally, before performing entity extraction and mapping to a preset static underwater acoustic knowledge graph on the natural language question text in step S20, the method further includes the following step of constructing the static underwater acoustic knowledge graph: obtaining professional unstructured text data containing acoustic field physics laws and underwater acoustic equipment parameters from a preset underwater acoustics literature database.
[0032] The pre-installed named entity recognition model is used to extract entity words and related predicate information between the entity words from the professional unstructured text data.
[0033] The entity vocabulary is constructed as nodes in the graph database, the associated predicate information is constructed as static directed edges connecting the nodes, and attribute vectors representing the standard ambient temperature and pressure acoustic field environment are injected into the graph database as a reference. Finally, the initialization construction and deployment of the static underwater acoustic knowledge graph are completed.
[0034] Optionally, before inputting the data into the fine-tuned pre-trained large language model for inference in step S50, the method further includes the step of fine-tuning the pre-trained large language model by obtaining a publicly available underwater acoustic question-and-answer dataset and historical real sea trial communication log data, and cleaning and constructing a standard fine-tuning instruction dataset containing instruction input columns and professional answer output columns.
[0035] Multiple low-rank adaptive adapter modules are inserted into the underlying architecture of the general large language model in the base state, and the original fully connected layer network weight parameters of the general large language model are frozen.
[0036] The standard fine-tuning instruction dataset is input into the network to perform a forward propagation process and calculate the cross-entropy loss. The parameters of the low-rank adaptive adapter module are updated only through backpropagation, and the fine-tuned pre-trained large language model is derived after training convergence.
[0037] The present invention also proposes an underwater acoustic question-answering agent construction system that integrates large models and knowledge graphs, including a memory and a processor communicatively connected to the memory. The memory stores a computer program, and the processor, when executing the computer program, implements the method as described in any one of claims 1 to 9.
[0038] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0039] (1): Breaking through the limitations of static knowledge, this invention achieves accurate adaptive decision-making under highly dynamic sea conditions. By introducing the calculation and threshold judgment mechanism of "environmental drift variance", it can trigger real-time penalty of graph node weights and reconstruction of edge relationships when the real physical environment undergoes sudden changes. This enables the agent to have "dynamic physical intuition", which can correct prior knowledge in real time as the sea conditions change, ensuring the timeliness and accuracy of question answering in extreme dynamic environments.
[0040] (2): Integrating multimodal features to effectively overcome the "illusion" of large-scale models in specialized fields. Large language models are prone to producing seemingly reasonable but actually physically incompatible "illusions" when dealing with problems in vertical disciplines such as underwater acoustics. This invention utilizes the Bellhop underwater acoustic channel simulation module to extract real "sound field feature vectors" and deeply integrates them with the natural language processing capabilities of large-scale models. By transforming "transient physical constraint subgraphs" into hard cue words to constrain the decoding boundaries of large-scale models, each solution output by the system not only possesses high linguistic coherence but also has strict ray acoustic physics laws as logical support. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments 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.
[0042] Figure 1 This is the main flowchart of the underwater acoustic question-answering intelligent agent construction method proposed in this invention;
[0043] Figure 2 This is a flowchart illustrating the specific steps involved in obtaining multidimensional underwater acoustic environment parameters as proposed in this invention.
[0044] Figure 3 This is a flowchart illustrating the specific steps of sound field feature extraction proposed in this invention;
[0045] Figure 4 This is a flowchart illustrating the specific steps involved in generating the transient physical constraint subgraph proposed in this invention.
[0046] Figure 5 This is a diagram of the underwater acoustic question-answering intelligent agent construction system proposed in this invention. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] The following describes, with reference to the accompanying drawings, a method and system for constructing an underwater acoustic question-answering agent that integrates a large model and a knowledge graph, according to an embodiment of this application.
[0049] like Figure 1-4 As shown, this invention provides a method for constructing an underwater acoustic question-answering agent that integrates a large model and a knowledge graph, comprising the following steps:
[0050] Step S10: Obtain multi-dimensional underwater acoustic environment parameters collected in real time by on-site underwater acoustic sensors, and receive natural language question text input by the user.
[0051] In practical applications, before the system is deployed in real-world scenarios, it needs to be mined offline from professional books and papers (underwater acoustics literature database). Using the Named Entity Recognition (NER) model, key equipment names, physical terms, and their hierarchical relationships in lengthy documents can be automatically extracted and assembled into the basic framework of the graph database.
[0052] This step marks the starting point for data interaction between the offline world and the real physical world, as well as human intent, within the entire system. Here, "on-site underwater acoustic sensors" refers to hardware detection equipment deployed in the ocean (such as CTD meters); "multi-dimensional underwater acoustic environment parameters" refers to a set of data reflecting the current objective physical state of the seawater, rather than a single numerical value; and "natural language query text" refers to the query requests issued by human users in everyday language or professional terminology. The purpose of this step is to simultaneously capture the physical environment state and the user's subjective intent, providing foundational data for subsequent calculations.
[0053] "Noise reduction and interpolation smoothing" are used to eliminate signal jitter and spikes generated by the sensor in the harsh environment of the deep sea, and to fill in data gaps caused by packet loss during transmission; "Outlier removal and normalization" are used to compress data of different dimensions into a uniform range. An "environmental state buffer queue" is used to achieve asynchronous decoupling between the data acquisition module and the large model inference module.
[0054] Through the above steps, it is ensured that the information acquired by the system not only includes static text instructions but also incorporates dynamic real physical parameters, overcoming the shortcomings of traditional systems that are developed in isolation from the actual environment. At the same time, it guarantees the purity and consistency of the underlying data input to the system, preventing system inference from crashing due to hardware-level "dirty data".
[0055] For example, two months before the start of the scientific expedition, researchers imported tens of thousands of underwater acoustic engineering papers (the aforementioned unstructured text data). The named entity recognition model automatically extracted words such as "thermocline," "generation," and "multipath refraction" from the text and converted them into circles (nodes) and arrows (static directed edges) in the graph database, constructing the system's basic framework. During a deep-sea scientific expedition, underwater acoustic sensors deployed on-site collected real-time multi-dimensional underwater acoustic environment parameters such as temperature, salinity, and depth. Simultaneously, researchers input the following natural language question into the control console on the deck: "Why is there severe attenuation and interference in the communication signal reception at the current depth?" In deep-sea scientific expeditions, the temperature data transmitted by the sensors is mixed with current noise (such as consecutive data points of 2℃, 200℃, and 3℃). The system performs noise reduction and removes the outlier 200℃, smoothing and interpolating it to 2.5℃. After normalization, it is stored in the environmental state cache queue for stable use by subsequent modules.
[0056] Step S20: Input the multidimensional underwater acoustic environment parameters into a preset underwater acoustic channel simulation module to extract sound field features and obtain the current sound field feature vector; at the same time, extract entities from the natural language question text and map it to a preset static underwater acoustic knowledge graph, and extract the theoretical knowledge subgraph corresponding to the natural language question text.
[0057] In practical applications, this system employs a dual-thread parallel processing approach. The first thread imports the multidimensional underwater acoustic environment parameters into a professional underwater acoustic channel simulation module (such as the Bellhop simulation model). Through physical acoustic modeling and calculation, these parameters are transformed into high-dimensional mathematical vectors easily processed by computers, namely, the "current sound field feature vector." The second thread utilizes entity extraction algorithms from Natural Language Processing (NLP) technology to extract core professional terms from user input. These terms are then located within a "static underwater acoustic knowledge graph" that has already solidified underwater acoustic expertise, forming a local network structure, namely, the "theoretical knowledge subgraph." This process unifies the unstructured physical environment data and text data into computer-readable feature vectors and graph topology structures, laying the foundation for subsequent cross-modal data fusion and comparison.
[0058] "Ray ray acoustics theory" is a classic analytical method in underwater acoustics. By calculating the eigenray ray formed by the refraction of virtual sound waves, it is possible to determine with extremely high precision how sound propagates underwater. Subsequently, due to the massive amount of ray data, the system compresses it into a dense feature vector of fixed length through "feature reduction and vectorization encoding conversion operations" for input into the neural network for computation. This successfully transforms the complex physical sound field spatial propagation model into a standardized vector format that can be directly read and computed by the deep learning model.
[0059] For example, the system inputs the collected temperature and salinity data into the Bellhop simulation model and extracts the current sound field feature vector reflecting the severity of current seawater refraction. Simultaneously, it extracts the entities "attenuation" and "interference" from the researchers' questions, maps them onto the static underwater acoustic knowledge graph, and extracts the theoretical knowledge subgraph containing nodes such as "multipath effect" and "sound shadow zone." In the underwater acoustic channel simulation module, the system calculates that the sound waves emitted by the research vessel undergo five seabed reflections. After extracting the attenuation values and time delay matrices for these five paths, it uses dimensionality reduction operations such as principal component analysis (PCA) to compress the massive matrix into a single 512-dimensional current sound field feature vector.
[0060] Step S30: Calculate the distribution difference between the current sound field feature vector and the node attribute vector of each node in the theoretical knowledge subgraph, and obtain the environmental drift variance based on the distribution difference.
[0061] In practical applications, the real marine environment is dynamically changing, while the node attributes in the theoretical knowledge subgraph are constructed based on standard laboratory or historical average data (static patterns). This step mathematically compares the measured current sound field feature vector with the inherent node attribute vectors in the graph. The deviation between the two is measured by calculating Euclidean distance or cosine similarity, and then aggregated into "environmental drift variance" using statistical formulas.
[0062] Calculation formula: In the formula, The environmental drift variance; The total number of nodes in the theoretical knowledge subgraph; The current sound field feature vector; The node attribute vector; It is a distance metric function; The mean of the distance differences among all nodes. This step is the first to achieve a precise quantitative assessment of whether "theoretical knowledge is divorced from the current actual sea conditions," enabling the agent to judge based on common sense physics.
[0063] The "cosine similarity score" measures the degree of overlap between feature vectors in spatial directions; the more consistent the directions, the better they conform to the theory. The "logarithmic loss function" is commonly used in machine learning to impose a higher penalty coefficient on values that deviate extremely from the theory. Finally, a variance statistical model is used to obtain the global dispersion. This provides a highly sensitive quantization and comparison mechanism, enabling the system to accurately capture and amplify the impact of even minor changes in the marine environment on the overall acoustic field physical state.
[0064] For example, the system calculates that the distribution difference between the real ocean refraction (the current sound field feature vector) and the textbook standard (the node attribute vector in the theoretical knowledge subgraph) is extremely large. After substituting into the above formula, the environmental drift variance is found to be 0.85.
[0065] Step S40: Determine whether the environmental drift variance is greater than the preset timeliness safety threshold; if so, use the current sound field feature vector to perform real-time penalty of node weights and reconstruction of edge relationships on the theoretical knowledge subgraph to generate a transient physical constraint subgraph.
[0066] In practical applications, following step S30, this step performs conditional logic judgment. The "preset timeliness safety threshold" is an empirically set boundary. When the environmental drift variance exceeds this threshold, it indicates that a drastic change has occurred in the real environment, and the original theoretical graph has become invalid. At this time, an innovation mechanism is triggered: the system reduces the influence of knowledge nodes that do not conform to reality (i.e., real-time penalty for node weights) and establishes new causal relationships based on the current real sound field characteristics (i.e., edge relationship reconstruction processing), thereby temporarily assembling a "transient physical constraint subgraph" in memory that perfectly matches the current sea conditions. This step breaks through the static constraints of traditional knowledge graphs, realizes the adaptive reconstruction of knowledge patterns with the dynamic physical environment, and effectively constrains the reasoning boundaries of subsequent models.
[0067] Lowering the "access weight value" means that this knowledge point will be ignored by the large model when generating prompts later. The key to endowing the agent with the ability to "reconstruct logic" is to "calculate the association probability between the remaining nodes that have not been penalized and the current sound field feature vector, and establish new directed connections between the remaining nodes based on the association probability," allowing the system to re-establish causal relationships between things. This gives the system real-time "self-correction" and "topological evolution" capabilities, realizing the dynamic flexibility and adaptability of the knowledge base.
[0068] When the environmental drift variance does not exceed the standard, it proves that the current marine environment is in a standard normal state, and textbook theories are fully applicable. At this time, the system directly skips the reconstruction step that consumes a lot of computing power and directly uses the static original map to generate the "standard inference sequence".
[0069] For example, the preset timeliness safety threshold is set to 0.5. Since the calculated environmental drift variance is 0.85, which is greater than 0.5, the system determines that the current sea state is abnormal (such as a sudden internal wave), quickly reduces the weight of the "standard sound speed propagation" node in the theoretical spectrum, and creates a new connection edge pointing to the "severe multipath attenuation" node, generating the transient physical constraint subgraph that conforms to the current severe sea state.
[0070] Upon detecting the conflict, the system drastically reduced the weight of the "optimal deep-sea acoustic propagation" node, which originally had a weight of 1.0 in the textbook, to 0.05 (real-time penalty); at the same time, a new directed connection edge representing a high correlation probability was established between the remaining "sudden temperature drop" node and the "blind zone appearance" node.
[0071] Alternatively, if the environmental drift variance calculated by the system is only 0.1, which is less than the preset timeliness safety threshold, the system determines that there is no need to reconstruct the map. Instead, it directly calls upon the knowledge of sound wave attenuation in stable sea areas from static teaching materials (static external prompts) to quickly answer the researchers' questions, saving 80% of the computing power of the shipborne server.
[0072] Step S50: The transient physical constraint subgraph is used as the external prompt word content, concatenated with the natural language question text, and input into the finely tuned pre-trained large language model for inference, and the underwater acoustics professional question and answer result corresponding to the natural language question text is output.
[0073] In practical applications, this step is the final output stage. The system converts the dynamically reconstructed transient physical constraint subgraph into computer text prompts (i.e., external prompt content) and combines it with the original natural language question text. Subsequently, both are input into a large language model (LLM) with powerful natural language understanding capabilities. This pre-trained LLM has been fine-tuned in the field of underwater acoustics and generates the final answer under the strict constraints of the external prompt content (i.e., the actual physical laws). These steps fundamentally eliminate the "illusion" (i.e., generating seemingly reasonable but erroneous answers that violate physical laws) that large language models are prone to when answering specialized questions, significantly improving the quality of underwater acoustics professional knowledge question answering in complex interdisciplinary scenarios.
[0074] For example, the system translates the reconstructed spectrum into the prompt: "Physical constraints: A sudden internal wave has occurred in the current sea area, causing severe multipath attenuation," and inputs this, along with the researchers' questions, into the finely tuned pre-trained large language model. After inference, the model outputs the underwater acoustics question-and-answer result: "Analysis shows that the sudden internal wave in the current sea area has caused a drastic change in the acoustic field structure, triggering multipath interference attenuation. It is recommended to lower the receiving array by 50 meters to avoid this layer-hopping interference."
[0075] The image-to-text conversion algorithm acts like a translator, serializing the three-dimensional network structure into a linear natural language string. Then, utilizing the large model's "self-attention mechanism," the model can automatically allocate attention weight between the user's question and background cues, identifying key clues for solving the problem.
[0076] For example, the "translator" transforms the reconstructed graph network into a string sequence: "Background setting: There is a sudden temperature drop, and a blind spot appears." This sequence is then merged with the sequence of questions from the researchers. During computation, the multi-layered self-attention mechanism of the large model assigns a very high attention weight to the term "blind spot," thereby outputting professional suggestions for avoiding blind spots.
[0077] For underwater acoustic agents, directly retraining a general-purpose large model is extremely costly. Therefore, this solution uses a "low-rank adaptive adapter module" (such as LoRA technology) for fine-tuning: that is, "freezing" the original tens of billions of parameters of the large model and training only a few small-scale parameter layers.
[0078] For example, the R&D team acquired Q&A pairs (standard fine-tuning instruction datasets) accumulated from dozens of previous scientific expeditions, and used ordinary server graphics cards to update the parameters of the low-rank adaptive adapter module in the model for only a few days. After training converged, the model (the fine-tuned pre-trained large language model) was able to understand highly specialized academic terms such as "passive sonar array gain calculation".
[0079] like Figure 5 As shown, the present invention also provides an underwater acoustic question-answering agent construction system that integrates large models and knowledge graphs, including a memory and a processor communicatively connected to the memory, wherein the memory stores a computer program.
[0080] The memory is pre-programmed with computer-executable instructions. The processor is configured to perform the following control logic steps when reading and executing the computer-executable instructions: acquire multi-dimensional underwater acoustic environment parameters collected in real time by on-site underwater acoustic sensors, and receive natural language question text input by the user; input the multi-dimensional underwater acoustic environment parameters into a preset underwater acoustic channel simulation module to extract sound field features and obtain the current sound field feature vector; simultaneously, extract entities from the natural language question text and map it to a preset static underwater acoustic knowledge graph, extracting the theoretical knowledge subgraph corresponding to the natural language question text; calculate the distribution difference between the current sound field feature vector and the node attribute vectors of each node in the theoretical knowledge subgraph, and obtain the environmental drift variance based on the distribution difference; determine whether the environmental drift variance is greater than a preset timeliness safety threshold.
[0081] If so, the current sound field feature vector is used to perform real-time penalty of node weights and reconstruction of edge relationships on the theoretical knowledge subgraph to generate a transient physical constraint subgraph; the transient physical constraint subgraph is used as external prompt word content, concatenated with the natural language question text, and input into the finely tuned pre-trained large language model for inference, and outputs the underwater acoustic professional question and answer result corresponding to the natural language question text.
[0082] The present invention has the following advantages:
[0083] 1. Breaking through the limitations of static knowledge, this invention enables precise adaptive decision-making under highly dynamic sea conditions. By introducing a calculation and threshold judgment mechanism for "environmental drift variance," it can trigger real-time penalties on graph node weights and reconstruction of edge relationships when sudden changes occur in the real physical environment. This gives the agent "dynamic physical intuition," allowing it to correct prior knowledge in real time as sea conditions change, ensuring the timeliness and accuracy of question answering in extreme dynamic environments.
[0084] 2. Integrating multimodal features to effectively overcome the "illusion" of large-scale models in specialized fields: Large language models are prone to producing seemingly reasonable but actually physically incompatible "illusions" when dealing with problems in vertical disciplines such as underwater acoustics. This invention utilizes the Bellhop underwater acoustic channel simulation module to extract realistic "sound field feature vectors" and deeply integrates them with the natural language processing capabilities of large-scale models. By transforming "transient physical constraint subgraphs" into hard cue words that constrain the decoding boundaries of large-scale models, each solution output by the system not only possesses high linguistic coherence but also has strict ray acoustic physics laws as logical support.
[0085] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0086] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0087] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for constructing an underwater acoustic question-answering agent that integrates large models and knowledge graphs, characterized in that, The method is executed by a processor, and the method includes: Step S10: Obtain multi-dimensional underwater acoustic environment parameters collected in real time by on-site underwater acoustic sensors, and receive natural language question text input by the user; Step S20: Input the multidimensional underwater acoustic environment parameters into a preset underwater acoustic channel simulation module to extract sound field features and obtain the current sound field feature vector; at the same time, extract entities from the natural language question text and map it to a preset static underwater acoustic knowledge graph to extract the theoretical knowledge subgraph corresponding to the natural language question text. Step S30: Calculate the distribution difference between the current sound field feature vector and the node attribute vector of each node in the theoretical knowledge subgraph, and obtain the environmental drift variance based on the distribution difference; Step S40: Determine whether the environmental drift variance is greater than the preset timeliness safety threshold; if so, use the current sound field feature vector to perform real-time penalty of node weights and reconstruction of edge relationships on the theoretical knowledge subgraph to generate a transient physical constraint subgraph. Step S50: The transient physical constraint subgraph is used as the external prompt word content, concatenated with the natural language question text, and input into the finely tuned pre-trained large language model for inference, and the underwater acoustics professional question and answer result corresponding to the natural language question text is output.
2. The method according to claim 1, characterized in that, The step S10 of acquiring multi-dimensional underwater acoustic environment parameters collected in real time by on-site underwater acoustic sensors includes: Receive the initial sound velocity profile time-series data and the raw data of water temperature and salinity gradient sent by the on-site underwater acoustic sensor; The initial sound velocity profile time series data is subjected to denoising and interpolation smoothing to obtain a standard sound velocity profile matrix; The original water temperature and salinity gradient data are subjected to outlier removal and normalization to obtain standard temperature and salinity gradient features. The standard sound velocity profile matrix and the standard temperature and salinity gradient features are combined in multiple dimensions to generate multi-dimensional underwater acoustic environment parameters that conform to the input interface format of the underwater acoustic channel simulation module. The multi-dimensional underwater acoustic environment parameters are stored in a preset environmental state cache queue for the processor to extract and read data during step S20.
3. The method according to claim 1, characterized in that, Step S20 involves inputting the multidimensional underwater acoustic environment parameters into a preset underwater acoustic channel simulation module to extract sound field features and obtain the current sound field feature vector, including: The multidimensional underwater acoustic environment parameters are input into the underwater acoustic channel simulation module based on ray acoustics theory; A virtual sound field propagation space is constructed within the underwater acoustic channel simulation module, and the propagation path of the intrinsic sound rays of the sound wave in the virtual sound field propagation space is simulated. Extract the propagation loss values, multipath delay distribution matrix, and phase offset parameters of the intrinsic sound ray propagation path at nodes at different distances and depths; The propagation loss value, the multipath delay distribution matrix, and the phase offset parameter are subjected to feature dimensionality reduction and vectorization encoding conversion operations to generate the current sound field feature vector with fixed dimensions.
4. The method according to claim 1, characterized in that, The step S30, which calculates the distribution difference between the current sound field feature vector and the node attribute vectors of each node in the theoretical knowledge subgraph, and obtains the environmental drift variance based on the distribution difference, includes: Traverse and extract all nodes contained in the theoretical knowledge subgraph, and obtain the node attribute vector pre-bound inside each node, wherein the node attribute vector represents the static physical parameters under standard marine environment; Calculate the cosine similarity value between the current sound field feature vector and each of the node attribute vectors; The cosine similarity values obtained by calculation are aggregated and calculated according to the preset log loss function to obtain the overall deviation quantification value; the overall deviation quantification value is substituted into the preset variance statistical model for weighted calculation to obtain the environmental drift variance.
5. The method according to claim 1, characterized in that, Step S40, which involves using the current sound field feature vector to perform real-time penalty of node weights and reconstruction of edge relationships on the theoretical knowledge subgraph to generate a transient physical constraint subgraph, includes: Identify the set of abnormal nodes in the theoretical knowledge subgraph that conflict with the physical features of the current sound field feature vector; The access weight value of all nodes in the abnormal node set during the graph inference process is reduced to complete the real-time penalty operation of the node weight. Calculate the association probability between the remaining nodes that have not been penalized and the current sound field feature vector, and establish new directed connection edges between the remaining nodes according to the association probability; Save the graph structure data containing the adjusted access weight values and the new directed connection edges, and encapsulate the graph structure data into the transient physical constraint subgraph output.
6. The method according to claim 1, characterized in that, Step S50, which involves concatenating the transient physical constraint subgraph as external cue words with the natural language question text and inputting it into a finely tuned pre-trained large language model for inference, includes: A preset graph-to-text conversion algorithm is used to serialize the topological structure information and node text information of the transient physical constraint subgraph into a physical constraint prompt string; According to the preset system-level prompt instruction template, the physical constraint prompt string is prepended to the natural language question text to form a composite reasoning input sequence containing dynamic background knowledge; The composite inference input sequence is fed into the input layer of the pre-trained large language model pre-loaded in the processor memory, and the underwater acoustic professional question-answering result is output through decoding operation by a multi-layer self-attention mechanism.
7. The method according to claim 1, characterized in that, After determining in step S40 whether the environmental drift variance is greater than a preset timeliness safety threshold, the method further includes: If it is determined that the environmental drift variance is less than or equal to the preset timeliness safety threshold, then the original graph topology and all original node weight parameters of the theoretical knowledge subgraph are directly retained. Extract the graph text representation data corresponding to the theoretical knowledge subgraph, and configure the graph text representation data as static external prompt words; According to the preset splicing rules, the static external prompts are combined with the natural language question text to perform text splicing operation, generate a standard inference sequence, and input it into the fine-tuned pre-trained large language model. The pre-trained large language model is then decoded through the fully connected layer to obtain the underwater acoustics professional question answering result corresponding to the static constraint rules.
8. The method according to claim 1, characterized in that, Before performing entity extraction and mapping to a preset static underwater acoustic knowledge graph on the natural language question text in step S20, the method further includes the following steps for constructing the static underwater acoustic knowledge graph: Obtain professional unstructured text data containing the physical laws of sound fields and parameters of underwater acoustic equipment from a pre-set underwater acoustics literature database; The pre-installed named entity recognition model is used to extract entity words and related predicate information between the entity words from the professional unstructured text data. The entity vocabulary is constructed as nodes in the graph database, the associated predicate information is constructed as static directed edges connecting the nodes, and attribute vectors representing the standard ambient temperature and pressure acoustic field environment are injected into the graph database as a reference. Finally, the initialization construction and deployment of the static underwater acoustic knowledge graph are completed.
9. The method according to claim 1, characterized in that, Before inputting the data into the fine-tuned pre-trained large language model for inference in step S50, the method further includes the step of fine-tuning the pre-trained large language model: We obtained publicly available underwater acoustic question-and-answer datasets and historical real sea trial communication log data, and cleaned and constructed a standard fine-tuning instruction dataset containing instruction input columns and professional answer output columns. Multiple low-rank adaptive adapter modules are inserted into the underlying architecture of the general large language model in the base state, and the original fully connected layer network weight parameters of the general large language model are frozen. The standard fine-tuning instruction dataset is input into the network to perform a forward propagation process and calculate the cross-entropy loss. The parameters of the low-rank adaptive adapter module are updated only through backpropagation, and the fine-tuned pre-trained large language model is derived after training convergence.
10. A system for constructing an underwater acoustic question-answering agent that integrates large models and knowledge graphs, characterized in that, The device includes a memory and a processor communicatively connected to the memory, the memory storing a computer program, and the processor, when executing the computer program, implementing the method as described in any one of claims 1 to 9.