Large model interaction method
By training a large language model with marine query corpus and introducing a geographic attention mechanism, the accuracy of marine geographic semantic parsing was improved, solving the problem of large parsing errors in traditional models in marine scenarios, and realizing efficient and accurate marine information interaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-10
AI Technical Summary
Traditional large language models cannot effectively capture the unique professional information of marine scenes when processing marine geographic semantic parsing tasks. In particular, they suffer from large errors and low accuracy in fuzzy location parsing scenarios, and cannot meet the requirements of geographic positioning accuracy in scenarios such as marine fisheries, port scheduling, and disaster early warning.
By constructing a marine query corpus training set, a large language model is trained. A geographic attention mechanism and a hybrid loss function are introduced, and a grid coordinate embedding layer is combined to improve the model's semantic parsing ability. Data augmentation and guided probing techniques are used to ensure the accuracy of query corpus features.
It achieves accurate semantic parsing of marine queries, can efficiently match grid hydrological databases, output answers that conform to the geographical characteristics of marine scenarios, adapt to the usage habits of different groups such as fishermen, emergency personnel, and tourists, support natural language queries, and meet the needs of high-timeliness and high-precision marine forecasting and emergency response.
Smart Images

Figure CN121833922A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of marine information interaction technology, specifically to large model interaction methods. Background Technology
[0002] Marine-oriented information interaction technology is a specialized information service technology that focuses on the characteristics of marine scenarios. Its core logic relies on key technologies such as natural language processing and data matching to perform semantic analysis on marine-related queries initiated by users, extract key features of core needs, and efficiently match them with marine professional data. Ultimately, users can ask questions in a natural and convenient way, and the system will output corresponding answers that conform to the geographic context of the marine scenario, thus opening up the transmission link between marine professional data and users' diverse query needs.
[0003] Traditional natural language processing (NLP) uses large language models (such as the general-purpose BERT, the basic GPT, and ChatGLM-6B) pre-trained to form semantic parsing models to parse user marine queries. Because these models are not specifically optimized for marine geographic scenarios, they have significant limitations in handling marine geographic semantic parsing tasks. Firstly, the underlying parameter design of these models focuses on general domain semantic understanding, primarily addressing the general grammar and logical connections of text. They lack the ability to specifically capture the specialized information unique to marine geographic scenarios, especially paying insufficient attention to spatial and specialized features such as "grid coordinates," "latitude and longitude accuracy," and "marine hydrological parameter correlations," thus failing to establish a deep connection between semantic representation and geospatial information. This limitation is particularly pronounced in fuzzy location parsing scenarios. For example, vague location expressions such as "near Pingtan," "southern Fujian coast," and "Minjiang River estuary" appearing in marine query corpora lack clear latitude and longitude boundaries and a unified geographical scope definition. It is impossible to effectively identify the geographical direction logic behind the vague expressions. It is difficult to determine the reasonable spatial range corresponding to vague words such as "near" and "coastal," and it is also impossible to associate them with standardized grid coordinates. Ultimately, this leads to large errors and low accuracy in fuzzy location resolution, which cannot meet the core requirements for geographic positioning accuracy in scenarios such as marine fisheries, port scheduling, and disaster early warning. Summary of the Invention
[0004] In view of the above problems, this application provides a large model interaction method to solve the above problems.
[0005] To achieve the above objectives, the inventors provide a large-scale model interaction method, which includes the following steps:
[0006] Retrieve user ocean query;
[0007] The user's marine geographic query is input into the marine semantic parsing model to obtain query corpus features; the marine semantic parsing model is pre-trained using a marine query corpus training set; the query corpus features include time, grid number, grid coordinates, industry association attributes, and behavior;
[0008] The query corpus features are matched with a gridded hydrological database to generate answers based on the user's marine query.
[0009] Furthermore, the training of the ocean semantic parsing model includes the following steps:
[0010] Obtain a training set of ocean query corpus;
[0011] The ocean query corpus in the training set is labeled with "time-location-behavior" triplet, and the location is labeled with grid number, grid coordinates and industry association attributes. The results are used as the labels of the ocean query corpus.
[0012] A large language model is constructed, the parameters of the underlying set proportion are frozen, a "geographic attention mechanism" is introduced, and a grid coordinate embedding layer is added to the Transformer encoder; a hybrid loss function is set, which includes cross-entropy loss and geographic distance loss;
[0013] The large language model is trained using ocean query corpus from the ocean query corpus training set as training data. The output of the large language model is calculated through forward propagation, and the difference between the output of the large language model and the labels of the ocean query corpus is calculated using a mixture loss function. The parameters of the large language model are updated through backpropagation algorithm. The training is repeated iteratively until the distance error between the grid coordinates of the output of the large language model and the grid coordinates of the labels of the ocean query corpus is less than a set threshold, thus obtaining the ocean semantic parsing model.
[0014] Furthermore, the ocean query corpus training set is obtained by collecting real ocean query corpus data, and also includes data augmentation of the collected real ocean query corpus data. The data augmentation includes expanding the collected real ocean query corpus by using synonym replacement, spatiotemporal expansion, and scene transfer.
[0015] Furthermore, in the step of data augmentation of the collected real ocean query corpus data, the method also includes using a bidirectional LSTM model to calculate the semantic similarity between the augmented ocean query corpus and the corresponding real ocean query corpus, and retaining the augmented ocean query corpus with a similarity greater than a preset threshold.
[0016] Furthermore, the ocean query corpus training set includes fuzzy representation corpus.
[0017] Furthermore, the query corpus features also include the confidence level of the corresponding grid coordinates;
[0018] In the step of inputting the user's marine geographic query into the marine semantic parsing model to obtain the query corpus features, when the confidence level is less than a set threshold, a guided follow-up question is generated, and the query corpus features are obtained by re-inputting the user's feedback into the marine semantic parsing model.
[0019] Furthermore, the step of matching the query corpus features with the grid hydrological database includes filtering the data records in the grid hydrological database according to preset conditions, and then calculating the cosine similarity between the filtered results and the query corpus features.
[0020] The preset conditions include one or more of the following:
[0021] The distance between the grid coordinates of the query corpus features and the grid coordinates of the data records is less than or equal to 0.5 grid cells;
[0022] The time window between the time of querying corpus features and the time of data recording is less than or equal to 2 hours.
[0023] Furthermore, an improved KNN algorithm is used to match the grid hydrological database according to preset conditions.
[0024] Furthermore, in the step of matching the query corpus features with the grid hydrological database, a caching mechanism is enabled to cache the matching results, with a cache validity period of 15 minutes and a response time of ≤2 seconds.
[0025] Furthermore, it also includes using gradient boosting trees to filter the matching results, retaining data with a confidence level of ≥90% for generating answers based on user ocean queries.
[0026] Unlike existing technologies, the above-mentioned technical solution trains a marine semantic parsing model using a marine query corpus training set. This enables the model to extract multi-dimensional query corpus features from user marine queries, including time, grid number, grid coordinates, industry-related attributes, and behavior. This significantly improves the accuracy and professionalism of the model's semantic parsing, effectively capturing core information such as geographical descriptions, industry-specific needs, and spatiotemporal constraints in user queries. This fundamentally avoids the problem of irrelevant answers caused by semantic understanding biases in traditional models. After completing accurate semantic parsing, the model performs targeted matching of the extracted query corpus features with a grid hydrological database. Through multi-dimensional feature filtering, irrelevant data can be efficiently filtered out, ensuring that the matched data highly matches the user's needs in terms of geographical scope, time window, and industry attributes. This results in accurately outputting answers that conform to the geographical characteristics of the marine scenario. This method allows users to initiate queries in natural language without needing to master professional query syntax, and it can adapt to the usage habits of different groups such as fishermen, emergency personnel, and tourists.
[0027] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description
[0028] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of the present invention and other related contents, and should not be considered as limitations on this application.
[0029] In the accompanying drawings of the instruction manual:
[0030] Figure 1 This is a flowchart illustrating the large model interaction method described in a specific implementation. Detailed Implementation
[0031] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.
[0032] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.
[0033] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit this application.
[0034] In the description of this application, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" logical relationship.
[0035] In this application, terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy or order relationship between these entities or operations.
[0036] Without further limitations, the use of terms such as “comprising,” “including,” “having,” or other similar open-ended expressions in this application is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.
[0037] As understood in the Examination Guidelines, in this application, expressions such as "greater than," "less than," and "exceeding" are understood to exclude the stated number; expressions such as "above," "below," and "within" are understood to include the stated number. Furthermore, in the description of the embodiments in this application, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times," unless otherwise explicitly specified.
[0038] In the description of the embodiments of this application, the space-related expressions used, such as "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "vertical," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," indicate the orientation or positional relationship based on the orientation or positional relationship shown in the specific embodiments or drawings. They are only for the purpose of describing the specific embodiments of this application or for the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0039] The processor described in the embodiments of this application can be implemented by hardware, firmware, software, or a combination thereof. It can be a circuit, one or more of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, or a microprocessor. It also includes other physical, biological, or chemical structures that can implement the same or equivalent functions as the processors listed above, such as biological neurons, quantum computing units, DNA computing units, etc., so that the processor can execute some or all of the steps in the computer program or method involved in the various embodiments of this application, or any combination of the steps mentioned therein.
[0040] The computer program involved in the embodiments can be stored in a computer device readable storage medium, which includes, but is not limited to, disks, magnetic tapes, magnetic cards, floppy disks, flash memory, optical disks, optical cards, read-only memory (ROM), random access memory (RAM), erasable programmable ROM (EPROM), and electrically erasable programmable ROM (EEPROM), etc., and also includes other biological, physical, or chemical structures that can achieve the same or equivalent functions as the storage media listed above, such as DNA, RNA, proteins, and other units with information storage capabilities. In specific embodiments, the storage medium involved can be one of the above-mentioned media types, or a combination of the above-mentioned media types. In different embodiments, the computer program involved in the embodiments can be centrally stored in a single medium, or distributed and stored in multiple media. The memory containing the computer device readable storage medium can be non-volatile memory or random access memory. These computer device readable storage media can be built into the device, or can be connected to the device involved in the embodiments as an external device or part of an external device. In some embodiments, the memory having a computer device readable storage medium is deployed locally; in other embodiments, the memory may be deployed remotely from the processor, for example, as a network-attached memory accessed via RF circuitry or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, a local area network (LAN), a wide area network (WLAN), a storage area network (SAN), or a suitable combination thereof, as long as computer device access to the memory is enabled. Furthermore, the computer program involved in the embodiments may be stored in plaintext / ciphertext form, or it may be designed as training data, integrated and recombined through model training and implicitly stored in the parameter states of a deep neural network or other machine learning model.
[0041] The large-scale model interaction method trains a marine semantic parsing model using a marine query corpus, enabling it to extract multi-dimensional query corpus features from user marine queries, including time, grid number, grid coordinates, industry-related attributes, and behavior. This significantly improves the accuracy and professionalism of the model's semantic parsing, effectively capturing core information such as geographical descriptions, industry-specific needs, and spatiotemporal constraints in user queries. This fundamentally avoids the problem of irrelevant answers caused by semantic understanding biases in traditional models. After completing accurate semantic parsing, the model performs targeted matching of the extracted query corpus features with a grid hydrological database. Through multi-dimensional feature filtering, irrelevant data is efficiently filtered out, ensuring that the matched data highly matches the user's needs in terms of geographical scope, time window, and industry attributes, thereby accurately outputting answers that conform to the geographical characteristics of the marine scenario. This method supports users initiating queries in natural language, without requiring expertise in query syntax, and is adaptable to the usage habits of different groups such as fishermen, emergency responders, and tourists.
[0042] The aforementioned large-scale model interaction method can be deeply integrated into diverse application scenarios in the marine field. Leveraging its precise semantic parsing capabilities and efficient data matching advantages, it is particularly well-suited to the high-timeliness and high-precision requirements of core scenarios such as marine forecasting, fisheries production, and port scheduling. For example, in a marine forecasting scenario, when emergency responders or coastal residents query "wave height warning for the next 2 hours along the southern Fujian coast," the model can quickly analyze the core features of "time (next 2 hours) - geography (southern Fujian coast) - behavior (querying wave height warning)," match the wave data for that period in real time in the gridded hydrological database, and output accurate warning results, providing second-level response support for emergency response to disasters such as typhoons and storm surges.
[0043] The following combination Figure 1 It provides a method for large model interaction, which includes the following steps:
[0044] S10, Obtain user ocean query;
[0045] S20. Input the user's marine geographic query into the marine semantic parsing model to obtain query corpus features; the marine semantic parsing model is pre-trained using a marine query corpus training set; the query corpus features include time, grid number, grid coordinates, industry association attributes, and behavior;
[0046] S30. Match the query corpus features with the grid hydrological database to generate an answer based on the user's ocean query.
[0047] The training of the ocean semantic parsing model includes the following steps:
[0048] Obtain a training set of ocean query corpus;
[0049] The ocean query corpus in the training set is labeled with "time-location-behavior" triplet, and the location is labeled with grid number, grid coordinates and industry association attributes. The results are used as the labels of the ocean query corpus.
[0050] A large language model is constructed, the parameters of the underlying set proportion are frozen, a "geographic attention mechanism" is introduced, and a grid coordinate embedding layer is added to the Transformer encoder; a hybrid loss function is set, which includes cross-entropy loss and geographic distance loss;
[0051] The large language model is trained using ocean query corpus from the ocean query corpus training set as training data. The output of the large language model is calculated through forward propagation, and the difference between the output of the large language model and the labels of the ocean query corpus is calculated using a mixture loss function. The parameters of the large language model are updated through backpropagation algorithm. The training is repeated iteratively until the distance error between the grid coordinates of the output of the large language model and the grid coordinates of the labels of the ocean query corpus is less than a set threshold, thus obtaining the ocean semantic parsing model.
[0052] The marine query corpus in the aforementioned training set was obtained by collecting user interaction data from real-world marine application scenarios, ensuring that the training corpus possesses semantic features, scenario coverage, and expressive diversity that closely reflect actual usage needs. Specifically, the collection channels can cover various frequently used service platforms in the marine field, including, for example, fisheries production service apps, offline consultation records from fishing port information service stations, port operation management systems, shipping information query platforms, tourism consultation platforms, scenic area service hotlines, marine disaster early warning apps, and government service platforms. The marine query corpus can include, but is not limited to, colloquial and scenario-based expressions (e.g., "What is the sea temperature in the aquaculture area near Pingtan tomorrow?"), and expressions reflecting professional needs (e.g., "Xiamen Port channel current velocity query at 2 PM").
[0053] To improve the quality of the marine query corpus training set and provide high-quality data support for subsequent marine semantic parsing model training, the collected marine query corpus can be preprocessed. This preprocessing can include deduplication, filtering, and correction. Deduplication refers to removing duplicate or highly similar corpora to avoid data redundancy during model training. Filtering involves filtering invalid information from the marine query corpus, accurately removing garbled characters, special symbols, meaningless interjections (such as "um" and "ah"), and interference content unrelated to marine queries, ensuring the clarity of the core information in the corpus. Correction involves regularizing and correcting frequently occurring colloquial misspellings in application scenarios (such as writing "fish catch" as "fish catch" and "wave high" as "wave draft"), thus solidifying the standardization foundation of the corpus.
[0054] In some embodiments, to further improve the generalization of the marine semantic parsing model, data augmentation is also performed on the collected real marine query corpus data. This data augmentation includes expanding the collected real marine query corpus using synonym replacement, spatiotemporal expansion, and scene migration. Synonym replacement refers to replacing the core semantics with equivalent expressions in the marine domain (e.g., replacing "fishing at sea" with "ocean operations," "water temperature" with "seawater temperature," "going to sea" with "going by boat," "sea fishing," etc.); replacing "large waves" with "high swells," etc.). Spatiotemporal expansion refers to refining or expanding ambiguous spatiotemporal expressions into expressions with different spatiotemporal dimensions (e.g., expanding "next week" to "202X-MM-DD to 202X-MM-DD," expanding "Southern Fujian coast" to specific sub-regions such as "Xiamen coast" and "Quanzhou coast"). Scene migration refers to cross-geographical adaptation based on industry attributes (e.g., migrating "Xiamen port shipping query" to "Quanzhou port shipping query," and "Pingtan aquaculture area sea temperature query" to "Ningde aquaculture area sea temperature query").
[0055] During the data augmentation process of collected real ocean query corpora, augmentation strategies such as synonym replacement, spatiotemporal expansion, and scene migration may produce invalid augmented corpora that do not conform to the core semantics of the original real corpora due to problems such as expression transformation deviation (e.g., semantic shift caused by excessive replacement) and inappropriate scene adaptation (e.g., ignoring port-specific features when migrating across ports). Directly including these invalid augmented corpora in the training set can easily lead to the model learning incorrect semantic associations, affecting parsing accuracy. In some embodiments, the data augmentation step of collecting real ocean query corpora also includes using a bidirectional LSTM model to calculate the semantic similarity between the augmented ocean query corpora and the corresponding real ocean query corpora, and retaining the augmented ocean query corpora with a similarity greater than a preset threshold (the threshold range can be between 90% and 95%, such as 92%). Specifically, a semantic consistency verification mechanism is constructed by introducing a bidirectional LSTM model. By leveraging the deep semantic capture capability of the bidirectional LSTM model, the similarity between the two texts is calculated. Only the expanded corpus with a similarity greater than the threshold is retained, thereby eliminating invalid data with semantic shifts and scene misalignments. This ensures both the scale advantage of the enhanced corpus and the accuracy and standardization of the corpus's semantics, providing high-quality and highly consistent corpus support for subsequent model training. It also avoids the introduction of noise into the model due to invalid corpus, thereby improving the accuracy and stability of the model's semantic parsing of ocean queries.
[0056] In real-world marine query scenarios, users (such as fishermen, tourists, and emergency responders) often use vague location descriptions like "near Pingtan," "southern Fujian coast," or "islands around Xiamen" to initiate queries, either due to a lack of professional geographical expression skills or to improve interaction efficiency. They also use vague time descriptions like "recently" or "tomorrow afternoon." Traditional training sets containing only structured, precise descriptions can lead to problems where the model, lacking knowledge of the semantic parsing logic for vague descriptions, exhibits large parsing errors for these high-frequency real-world queries and fails to accurately map them to corresponding grids or data. Therefore, vague descriptions can be included in the construction of the marine query corpus training set. This means the marine query corpus training set should include vague descriptions (such as "Are the waves high on the islands around Xiamen suitable for beachcombing this weekend?" or "Typhoon warning times for the southern Fujian coast") to enhance the model's adaptability to real-world marine interaction scenarios.
[0057] The aforementioned grid number is a unique identifier assigned to each independent grid unit after the standardized gridding of marine geospatial space, used to achieve rapid matching with the grid hydrological database. The aforementioned grid coordinates refer to the precise location representation of each marine grid unit in geographic space, typically based on latitude and longitude, clearly defining the grid's boundary range or center coordinates. This is the core basis for achieving accurate geographic positioning and matching, providing a spatial reference for subsequent matching with the grid hydrological database. The aforementioned industry-related attributes refer to the specific marine-related business attributes bound to the marine grid unit, including but not limited to fisheries, shipping, tourism, and emergency response, matching the industry-specific data corresponding to that grid to avoid data mismatch with needs.
[0058] The aforementioned large language models possess core capabilities of natural language processing, such as BERT, the basic GPT, and ChatGLM-6B. The preferred large language model is ChatGLM-6B, which exhibits strong adaptability to Chinese semantic understanding, particularly excelling at capturing colloquial Chinese expressions and ambiguous geographical descriptions, thus fitting the characteristics of marine-themed query corpora. The following explanation will further elaborate on this using the ChatGLM-6B model as an example.
[0059] A ChatGLM-6B model was constructed, freezing 30% of the bottom-level parameters and retaining the upper semantic understanding layer for fine-tuning. A "geographic attention mechanism" was introduced, adding a grid coordinate embedding layer (64-dimensional) to the Transformer encoder. A hybrid loss function was set, comprising cross-entropy loss and geographic distance loss; the geographic distance loss weight was set to 0.3, and the optimization objective was to reduce the distance error between the predicted grid and the real grid to ≤0.1 grid cells. The ChatGLM-6B model was trained using ocean query corpora from the ocean query training set. The output of the ChatGLM-6B model was calculated through forward propagation, and the difference between the output of the large language model and the labels in the ocean query corpus was calculated using the hybrid loss function. The parameters of the ChatGLM-6B model were updated using the backpropagation algorithm. Iterative training was repeated until the distance error between the grid coordinates output by the ChatGLM-6B model and the grid coordinates of the labels in the ocean query corpus was less than a set threshold, thus obtaining the ocean semantic parsing model.
[0060] In the process of marine semantic parsing, for vague geographical expressions such as "near Pingtan" and "southern Fujian coast" in user queries, although the model can parse the corresponding grid coordinates based on the training set, the confidence level of the output grid coordinates may be low due to problems such as vague expression boundaries and insufficient scene relevance. If the data is directly matched based on the low-confidence grid coordinates, geographical positioning errors are likely to occur, resulting in incorrect answers. To solve this problem, the technical approach is to first introduce a confidence index of the corresponding grid coordinates into the query corpus features. The query corpus features also include the confidence level of the corresponding grid coordinates. In the step of inputting the user's marine geographical query into the marine semantic parsing model to obtain query corpus features, when the confidence level is less than a set threshold (e.g., 85%), a guided follow-up question is generated, and the query corpus features are obtained by re-entering the marine semantic parsing model based on user feedback. This involves simultaneously calculating and outputting the confidence level of a location when the marine semantic parsing model outputs features such as grid coordinates. When the model determines that the confidence level of the parsed grid coordinates is less than a preset confidence threshold, it automatically generates guided follow-up questions that fit the ambiguous description scenario (e.g., for "near Pingtan," "Do you mean within 10 nautical miles of Pingtan Island or the entire Pingtan sea area?", and for "Southern Fujian coast," "Do you mean the Southern Fujian coast including the sea areas of Xiamen and Quanzhou?"). After obtaining accurate information from user feedback, the supplementary information is integrated into the original query and re-entered into the model for parsing, iteratively updating the query corpus features. By quantifying the parsing reliability through confidence and triggering dynamic follow-up questions, ambiguous descriptions can be gradually focused into precise geographical locations, effectively avoiding data matching errors caused by low-confidence parsing results and significantly improving the accuracy of grid coordinate parsing. At the same time, guided follow-up questions conform to user interaction habits, requiring no professional geographical terminology from the user, thus improving user-friendliness.
[0061] The aforementioned grid-based hydrological database includes several types of parameters such as sea surface temperature, current velocity, and waves. In the process of matching query corpus features with the grid-based hydrological database, if a traditional matching method is used to directly traverse the entire dataset, the database contains massive amounts of hydrological data with different time, spatial, and industry attributes. This presents problems such as low matching efficiency, difficulty in meeting the real-time requirements of scenarios like marine emergency early warning, and a lack of precise filtering logic leading to spatiotemporal misalignment or semantic disconnect between the matching results and user needs. In some embodiments, preset conditions related to the query corpus features can be set to initially filter the data records in the grid-based hydrological database, thereby reducing the size of candidate data. Specifically, the step of matching query corpus features with the grid-based hydrological database includes filtering the data records in the grid-based hydrological database according to preset conditions, and then calculating the cosine similarity between the filtered results and the query corpus features.
[0062] The preset conditions include one or more of the following:
[0063] The distance between the grid coordinates of the query corpus features and the grid coordinates of the data records is less than or equal to 0.5 grid cells;
[0064] The time window between the time of querying corpus features and the time of data recording is less than or equal to 2 hours.
[0065] When calculating the cosine similarity between the filtered results and the query corpus features, data records with a cosine similarity greater than or equal to 0.8 can be retained as matching results. Specifically, an improved KNN algorithm can be used to match the gridded hydrological database according to preset conditions. Before calculating neighboring data, preset conditions are introduced, that is, data records that meet the preset conditions are locked first, which significantly reduces the data scale of subsequent similarity calculations and avoids interference from irrelevant data. Secondly, in the cosine similarity calculation stage, data records in the candidate data with a feature similarity ≥ 0.8 with the query corpus are determined as valid matching data, ensuring the semantic fit between the matching results and the query requirements.
[0066] In some embodiments, to achieve high real-time queries such as storm surge warnings and waterway emergencies, a caching mechanism can be enabled to eliminate the need for repeated matching calculations and meet the second-level response requirements of marine emergency scenarios. Specifically, in the step of matching query corpus features with a gridded hydrological database, a caching mechanism is enabled to cache the matching results, with a cache validity period of 15 minutes and a response time of ≤2 seconds.
[0067] After matching the query corpus features with the gridded hydrological data, some matching results may still have low confidence levels due to data noise (such as temporary errors from hydrological sensors), semantic ambiguity (such as confusion caused by the requirements of multi-industry attribute grids), or blurred spatiotemporal boundaries (such as ±0.5 grid edge data). If such data is directly used to generate answers, it is easy to reduce the accuracy of the final answer and fail to meet the high data reliability requirements of scenarios such as marine forecasting and emergency early warning. To address this, a gradient boosting tree (GBDT) model is introduced to construct a secondary screening model for the matching results. This model also includes using a gradient boosting tree to screen the matching results. The matching results are input into the gradient boosting tree, and the confidence level of each matching data is quantitatively evaluated. Only data with a confidence level ≥90% is retained to generate answers based on user marine queries. Through the gradient iterative learning capability of the gradient boosting tree, low-confidence noise data in the matching results can be accurately identified and removed, ensuring the reliability of the data used to generate answers.
[0068] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.
Claims
1. A large-scale model interaction method, characterized in that, Includes the following steps: Retrieve user ocean query; The user's marine geographic query is input into the marine semantic parsing model to obtain the query corpus features; the marine semantic parsing model is pre-trained using the marine query corpus training set. The query corpus features include time, grid number, grid coordinates, industry association attributes, and behavior; The query corpus features are matched with a gridded hydrological database to generate answers based on the user's marine query.
2. The large model interaction method according to claim 1, characterized in that, The training of the ocean semantic parsing model includes the following steps: Obtain a training set of ocean query corpus; The ocean query corpus in the training set is labeled with "time-location-behavior" triplet, and the location is labeled with grid number, grid coordinates and industry association attributes. The results are used as the labels of the ocean query corpus. A large language model is constructed, the parameters of the underlying set proportion are frozen, a "geographic attention mechanism" is introduced, and a grid coordinate embedding layer is added to the Transformer encoder; a hybrid loss function is set, which includes cross-entropy loss and geographic distance loss; The large language model is trained using ocean query corpus from the ocean query corpus training set as training data. The output of the large language model is calculated through forward propagation, and the difference between the output of the large language model and the labels of the ocean query corpus is calculated using a mixture loss function. The parameters of the large language model are updated through backpropagation algorithm. The training is repeated iteratively until the distance error between the grid coordinates of the output of the large language model and the grid coordinates of the labels of the ocean query corpus is less than a set threshold, thus obtaining the ocean semantic parsing model.
3. The large model interaction method according to claim 2, characterized in that, The ocean query corpus training set is obtained by collecting real ocean query corpus data, and also includes data augmentation of the collected real ocean query corpus data. The data augmentation includes expanding the collected real ocean query corpus by using synonym replacement, spatiotemporal expansion, and scene transfer.
4. The large model interaction method according to claim 3, characterized in that, The step of data augmentation of the collected real ocean query corpus data also includes using a bidirectional LSTM model to calculate the semantic similarity between the augmented ocean query corpus and the corresponding real ocean query corpus, and retaining the augmented ocean query corpus with a similarity greater than a preset threshold.
5. The large model interaction method according to claim 2, characterized in that, The ocean query corpus training set includes fuzzy representation corpus.
6. The large model interaction method according to claim 1, characterized in that, The query corpus features also include the confidence level of the corresponding grid coordinates; In the step of inputting the user's marine geographic query into the marine semantic parsing model to obtain the query corpus features, when the confidence level is less than a set threshold, a guided follow-up question is generated, and the query corpus features are obtained by re-inputting the user's feedback into the marine semantic parsing model.
7. The large model interaction method according to claim 1, characterized in that, The step of matching the query corpus features with the grid hydrological database includes filtering the data records in the grid hydrological database according to preset conditions, and then calculating the cosine similarity between the filtering results and the query corpus features. The preset conditions include one or more of the following: The distance between the grid coordinates of the query corpus features and the grid coordinates of the data records is less than or equal to 0.5 grid cells; The time window between the time of querying corpus features and the time of data recording is less than or equal to 2 hours.
8. The large model interaction method according to claim 7, characterized in that, An improved KNN algorithm is used to match the grid hydrological database according to preset conditions.
9. The large model interaction method according to claim 1, characterized in that, In the step of matching the query corpus features with the grid hydrological database, a caching mechanism is enabled to cache the matching results. The cache validity period is set to 15 minutes and the response time is ≤2 seconds.
10. The large model interaction method according to claim 7, characterized in that, It also includes using gradient boosting trees to filter matching results, retaining data with a confidence level of ≥90% for generating answers based on user ocean queries.