An artificial intelligence agent-based multi-modal grain data fusion and decision-making method
By constructing a grain database and utilizing semantic understanding models and SQL generation models, multimodal grain data is processed automatically, solving the problem of low efficiency in grain subsidy verification in existing technologies and achieving efficient and accurate data-driven decision-making.
Patent Information
- Application Number
- CN202511222931.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-08-29
AI Technical Summary
Existing technologies for verifying grain subsidies in the agricultural sector are inefficient in processing multimodal grain data, consume a lot of human resources, and are prone to errors, failing to meet actual needs.
We construct an original grain database, use the semantic understanding models of BiLSTM-CRF and Transformer models to determine query intent, and convert it into structured query language (SQL) data through an SQL generation model to achieve automated decision-making.
It improves the efficiency and accuracy of grain data processing, saves human resources, meets the requirements for rapidly and automatically generating integrated decision-making results, and enhances user satisfaction.
Smart Images

Figure CN120743941B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of data processing technology, and in particular to a multimodal grain data processing method. Background Technology
[0002] When agricultural departments conduct intelligent management of multimodal grain data, such as verifying declared areas for crops like rice and wheat for grain subsidies, it may be necessary to fuse multimodal data, including remote sensing imagery, vector data, structured tables, and unstructured reports. Therefore, a multimodal grain data fusion and decision-making method is needed to generate different verification decision results based on actual query requirements. Currently, manual data processing methods are commonly used. For example, manually correcting UAV imagery using Geographic Information Systems (GIS), manually drawing vector data formats (Shapefiles, SHP files), relying on on-site identification and photographic evidence for field verification, and manually entering attribute fields, not only consumes a large amount of human resources but also results in inefficient, time-consuming, and error-prone production of fusion and decision-making results, failing to meet actual usage needs. Summary of the Invention
[0003] This specification provides a method, apparatus, and electronic device for multimodal grain data fusion and decision-making based on artificial intelligence agents, the technical solution of which is as follows:
[0004] In a first aspect, embodiments of this specification provide a multimodal grain data fusion and decision-making method based on artificial intelligence agents, the method comprising:
[0005] Construct a raw grain database and obtain query statements for grain data. The raw grain database includes a grain spatial database, a grain document vector library, and a grain image storage database.
[0006] The target grain query intent corresponding to the query statement is determined based on a semantic understanding model. The semantic understanding model is constructed using a BiLSTM-CRF model and a Transformer model. The target grain query intent includes a first intent to query grain planting images, a second intent to query grain planting area, and a third intent to query grain data verification reports.
[0007] The target grain query intent is transformed according to the SQL generation model to obtain the target grain SQL data;
[0008] The decision result is determined based on the target grain query intent to determine the corresponding SQL data of the target grain in the original grain database.
[0009] Secondly, a multimodal grain data fusion and decision-making device based on artificial intelligence agents is provided, the device comprising:
[0010] The construction module is used to construct the original grain database and obtain query statements for grain data. The original grain database includes a grain spatial database, a grain document vector library, and a grain image storage database.
[0011] The query module is used to determine the target grain query intent corresponding to the query statement based on a semantic understanding model. The semantic understanding model is constructed by BiLSTM-CRF model and Transformer model. The target grain query intent includes a first intent to query grain planting images, a second intent to query grain planting area, and a third intent to query grain data verification report.
[0012] The conversion module is used to convert the target grain query intent according to the SQL generation model to obtain target grain SQL data;
[0013] The determination module is used to determine the decision result corresponding to the target grain SQL data in the original grain database based on the target grain query intent.
[0014] Thirdly, an electronic device is provided, including a device processor and a memory;
[0015] The device processor is connected to the memory;
[0016] The memory is used to store executable program code;
[0017] The device processor runs a program corresponding to the executable program code stored in the memory to perform the steps of the method provided as in the first aspect or any possible implementation thereof.
[0018] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, the computer-readable storage medium storing instructions that, when executed on a computer or device processor, cause the computer or device processor to perform the method provided as in the first aspect or any possible implementation thereof.
[0019] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:
[0020] In one or more embodiments of this specification, an original grain database is constructed, and query statements for grain data are obtained. Then, based on a semantic understanding model, the target grain query intent corresponding to the query statement is determined. The target grain query intent is then transformed according to a Structured Query Language (SQL) generation model to obtain target grain SQL data. Finally, based on the target grain query intent, the decision result of the target grain SQL data in the original grain database is determined. By automatically identifying and transforming the target grain SQL data corresponding to the query statement through a semantic understanding model, and determining its corresponding decision result in the constructed original grain database, the requirement for rapid and automatic generation of fused decision results is met. This saves significant human resources while enhancing the accuracy of the decision results and improving user satisfaction. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart illustrating a multimodal grain data fusion and decision-making method based on artificial intelligence agents, provided as an embodiment of this specification;
[0023] Figure 2 This specification provides a schematic diagram of the structure of a multimodal grain data fusion and decision-making device based on artificial intelligence agents, as shown in the embodiments of this specification.
[0024] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Detailed Implementation
[0025] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0026] The terms "first," "second," "third," etc., in the description, claims, and accompanying drawings are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.
[0027] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this specification. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
[0028] Please see Figure 1 , Figure 1 This document presents an overall flowchart of a multimodal grain data fusion and decision-making method based on artificial intelligence agents, as provided in an embodiment of this specification.
[0029] like Figure 1 As shown, the multimodal grain data fusion and decision-making method based on artificial intelligence agents may include at least the following steps:
[0030] Step 101: Construct the original grain database and obtain the query statement for the grain data.
[0031] The original grain database includes a grain spatial database, a grain document vector library, and a grain image storage database.
[0032] In the embodiments of this specification, the multimodal grain data fusion and decision-making system to which the multimodal grain data fusion and decision-making method is applied may include a data layer, an agent layer, and an application layer. The application layer can receive queries from users via interactive interfaces or target terminals, including but not limited to queries related to grain subsidies (i.e., queries corresponding to grain data), and transmit them to the agent layer for fusion analysis in conjunction with the data layer to obtain decision analysis results for the grain data query. Therefore, to facilitate subsequent fusion analysis of grain data queries without requiring manual input or querying, an original grain database needs to be constructed first. This original grain database may include, but is not limited to, a grain spatial database, a grain document vector library, and a grain image storage database.
[0033] Grain types generally include crops such as barley, wheat, rice, rapeseed, dryland grains, and rice.
[0034] In one possible implementation, constructing the original grain database includes:
[0035] Acquire historical grain data, which includes grain geospatial data, unstructured grain documents, and grain remote sensing images;
[0036] Based on grain geospatial data, grain unstructured documents, and grain remote sensing images, a grain spatial database, a grain document vector library, and a grain image storage database are constructed respectively.
[0037] By integrating the aforementioned grain spatial database, grain document vector library, and grain image storage database, the original grain database is obtained.
[0038] In the embodiments of this specification, to facilitate the subsequent fusion analysis of query statements for grain data by the intelligent agent layer and save manual retrieval resources and time, it is necessary to construct an original grain database. This can be achieved by first compiling historical grain data from a large number of relevant historical grain records. Specifically, this may include grain geospatial data, such as plot SHP data and survey area administrative division data, as well as unstructured grain documents, such as grain declaration forms and verification reports, and grain remote sensing imagery, such as UAV remote sensing imagery and remote sensing imagery of various grain planting standards.
[0039] Next, a grain spatial database is constructed based on grain geospatial data to support spatial query and analysis, a grain document vector library is constructed based on grain document vector library to support semantic search, and a grain image storage database is constructed based on grain remote sensing imagery to support image tiling services.
[0040] Finally, the constructed grain spatial database, grain document vector library, and grain image storage database are integrated to obtain the original grain database.
[0041] Specifically, the grain spatial database can be used to store geospatial data and supports spatial querying and analysis. It performs geometric verification, coordinate system transformation, spatial indexing, and topological calculations on the input SHP files.
[0042] The grain document vector library can be used to store and retrieve unstructured documents. After parsing the input PDF or Word document with Apache Tika, the BERT model is used to generate document semantic vectors. After calculating the document relevance through cosine similarity, a hybrid retrieval is performed by combining keywords and semantic search.
[0043] The grain image storage database efficiently stores and manages remote sensing imagery and supports image tiling services. After the original imagery is corrected, it is pyramid-cut to generate tiles of various resolutions, which are then stored. During searches, Geohash encoding is used to quickly locate image regions.
[0044] Step 102: Determine the target grain query intent corresponding to the query statement based on the semantic understanding model.
[0045] The semantic understanding model is constructed using a BiLSTM-CRF model and a Transformer model. The target grain query intent includes a first intent to query grain planting images, a second intent to query grain planting area, and a third intent to query grain data verification reports.
[0046] In the embodiments of this specification, after obtaining the query statement for grain data, since different target users have different query needs, the corresponding query statements will also have different query instructions. Different types of query instructions will also change the decisions generated in subsequent data fusion analysis. Therefore, in order to improve the efficiency of subsequent multimodal grain data fusion and decision-making, and improve the real-time performance of the system, the query statement can be input into a pre-constructed semantic understanding model to determine its corresponding target grain query intent. The semantic understanding model can be obtained by concatenating a BiLSTM-CRF model and a Transformer model, and trained using a labeled model training set. The labeled model training set includes pairing data of each historical query statement and its historical target grain query intent.
[0047] Furthermore, the obtained target grain query intents include, but are not limited to, a first intent to query images of a certain type of grain planting, a second intent to query the planting area of a certain type of grain, and a third intent to query a data verification report for a certain type of grain. The grain data verification report is used to represent the verification report between the subsidy data and the actual planting subsidy data for that type of grain.
[0048] In addition, each time the corresponding target grain query intent data record is determined, the semantic understanding model can be back-optimized and trained to enable it to learn continuously and improve the model's parsing accuracy.
[0049] In one possible implementation, determining the target grain query intent corresponding to the query statement based on the semantic understanding model includes:
[0050] The query statement is used to identify grain targets, and the target grain identification entity is obtained by using the BiLSTM-CRF model.
[0051] The target grain identification entity is classified according to the Transformer model to obtain the target grain query intent.
[0052] In the embodiments of this specification, when determining the target grain query intent corresponding to a query statement using a semantic understanding model, since the query statements used in this multimodal grain data fusion and decision-making system generally contain proper nouns corresponding to grain subsidy data, in order to improve query efficiency and reduce the scale of semantic recognition data, the query statement can first be identified as a grain target based on a trained BiLSTM-CRF model to obtain target grain identification entities, such as farmers as types, towns, communities, and areas. Then, the target grain identification entities are classified according to intent using a Transformer model to determine the target grain query intent corresponding to the target grain identification entity, so that subsequent data fusion and decision-making can be performed directly based on the target grain query intent.
[0053] Step 103: Transform the target grain query intent according to the SQL generation model to obtain the target grain SQL data.
[0054] In the embodiments of this specification, after determining the target grain query intent corresponding to the query statement through the semantic understanding model, since the target grain query intent may include multiple forms of data, in order to unify and integrate them for subsequent decision-making and achieve efficient querying and analysis of the original grain database, it is necessary to uniformly transform the target grain query intent according to the SQL generation model to obtain the target grain SQL data, so as to ensure the consistency of subsequent query statements in the original grain database.
[0055] In one possible implementation, the step of converting the target grain query intent according to the SQL generation model to obtain target grain SQL data includes:
[0056] The initial grain SQL data corresponding to the target grain query intent is determined based on the SQL generation model;
[0057] The initial grain SQL data is syntax-corrected based on the AST tree to obtain corrected grain SQL data.
[0058] The target grain SQL data is obtained by indexing and optimizing the corrected grain SQL data based on the grain spatial database.
[0059] In the embodiments of this specification, a pre-trained SQL generation model specifically for the grain domain is used, integrating natural language processing and a knowledge graph of grain subsidy data, to semantically parse the input target grain query intent and construct initial grain SQL data according to SQL syntax specifications. The generated initial grain SQL may contain a complete logical structure, but may contain syntactic ambiguities or non-standard expressions, such as nested logical errors. Next, a depth-first traversal is performed on the initial grain SQL data based on an AST tree to perform syntax compliance checks node by node. Specifically, structural reconstruction is first performed to automatically correct nested errors, and then non-standard expressions in the initial grain SQL data are replaced with standard ones according to semantic standardization. Unreferenced fields are deleted, and overlapping conditions are merged to obtain corrected grain SQL data. Further, based on the spatial index in the grain spatial database, an R-tree index is used to optimize the corrected grain SQL data. As an example, geographical constraints in the WHERE clause can be identified, rewritten as bounding box queries using R-tree indexes, then the partition key index is aligned first, and a covering index is added to the aggregate query to obtain the final target grain SQL data.
[0060] Step 104: Based on the target grain query intent, determine the decision result corresponding to the target grain SQL data in the original grain database.
[0061] In the embodiments of this specification, since different target grain query intentions result in different decisions generated by data fusion analysis, after determining the target grain query intention and target grain SQL data corresponding to the query statement, it is necessary to determine the analysis decision based on the target grain query intention, and then perform data fusion on the target grain SQL data in the constructed original grain database to obtain the corresponding decision result.
[0062] In one possible implementation, the step of determining the decision result corresponding to the target grain SQL data in the original grain database based on the target grain query intent includes:
[0063] When the target grain query intent is determined to be the first intent, the target encoded data corresponding to the target grain SQL data is determined based on the grain image storage database. The first intent is used to query grain planting images.
[0064] The target encoded data is converted into an image format to obtain a target grain planting image, and the decision result is determined as the target grain planting image.
[0065] In the embodiments of this specification, when the target grain query intent is determined to be the first intent, that is, the query statement is used to represent the query for grain planting images, the target Geohash encoded data corresponding to the target grain SQL data can be determined first based on the grain image storage database in the original grain database. Then, the image area can be quickly located through the target Geohash encoded data, and the image format can be converted to obtain the target grain planting image. The decision result is then determined as the target grain planting image for display.
[0066] In one possible implementation, the step of determining the decision result corresponding to the target grain SQL data in the original grain database based on the target grain query intent includes:
[0067] When the target grain query intent is determined to be the second intent, coordinate transformation and topological operation are performed on the target grain SQL data based on the spatial database to obtain target grain operation data. The second intent is used to query the grain planting area.
[0068] The target grain planting area is obtained by calculating the closed polygon area of the target grain calculation data, and the decision result is determined as the target grain planting area.
[0069] In the embodiments of this specification, when the target grain query intent is determined to be the second intent, i.e., the query statement is used to represent the query of grain planting area, the target grain SQL data can be coordinate transformed according to the spatial database of the original grain database, converting the WGS84 coordinate system to the Web Mercator coordinate system. Next, topological operations are performed on the coordinate-transformed data to obtain the target grain calculated data. Further, the planting area corresponding to this type of grain is determined using the target grain calculated data, and the polygonal closed area of this planting area is calculated to obtain the target grain planting area. The decision result is then displayed as the target grain planting area.
[0070] In one possible implementation, the step of determining the decision result corresponding to the target grain SQL data in the original grain database based on the target grain query intent includes:
[0071] When the target grain query intent is determined to be the third intent, the target grain declaration area corresponding to the target grain SQL data is determined according to the grain document vector library. The third intent is used to query the grain data verification report.
[0072] The grain data verification report is determined based on the comparison between the target grain planting area and the target grain declared area, and the decision result is determined as the grain data verification report.
[0073] In the embodiments of this specification, when the target grain query intent is determined to be a third intent, i.e., the query statement is used to represent a query for a grain data verification report, the target grain planting area corresponding to the target grain SQL data is first determined based on the spatial database in the original grain database. Next, the target grain declared area corresponding to the target grain SQL data is determined through the grain document vector library in the original grain database. Further, the target grain planting area is compared with the target grain declared area. When the comparison result indicates that the target grain planting area and the target grain declared area are the same, the generated grain data verification report is determined to be correct, and the decision result is displayed as the grain data verification report. When the comparison result indicates that the target grain planting area is different from the target grain declared area, the area difference between the target grain planting area and the target grain declared area can be further determined, and the area difference is compared with the difference threshold. When the area difference exceeds the difference threshold, the generated grain data verification report can be determined to be an error in grain data verification. When the area difference does not exceed the difference threshold, the generated grain data verification report can be determined to be an anomaly in grain data verification, and the decision result is determined as the grain data verification report for display.
[0074] Optionally, in addition to the first intent for querying grain planting images, the second intent for querying grain planting area, and the third intent for querying grain data verification reports, the target grain query intent in this invention may also include the location of planting difference areas and the identification of planted crop types.
[0075] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0076] Please refer to the following. Figure 2 , Figure 2 This diagram illustrates the structure of a multimodal grain data fusion and decision-making device based on artificial intelligence, as provided in an embodiment of this specification. It should be noted that... Figure 2 The multimodal grain data fusion and decision-making device based on artificial intelligence agents shown is used to execute the present application. Figure 1 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figure 1 The example shown.
[0077] like Figure 2As shown, the multimodal grain data fusion and decision-making device based on artificial intelligence agents may include at least:
[0078] The construction module 201 is used to construct the original grain database and obtain the query statement of grain data. The original grain database includes a grain spatial database, a grain document vector library and a grain image storage database.
[0079] The query module 202 is used to determine the target grain query intent corresponding to the query statement based on a semantic understanding model. The semantic understanding model is constructed by a BiLSTM-CRF model and a Transformer model. The target grain query intent includes a first intent to query grain planting images, a second intent to query grain planting area, and a third intent to query grain data verification reports.
[0080] The conversion module 203 is used to convert the target grain query intent according to the SQL generation model to obtain target grain SQL data;
[0081] The determination module 204 is used to determine the decision result corresponding to the target grain SQL data in the original grain database based on the target grain query intent.
[0082] In one possible implementation, the construction module 201 is specifically used for:
[0083] Acquire historical grain data, which includes grain geospatial data, unstructured grain documents, and grain remote sensing images;
[0084] Based on grain geospatial data, grain unstructured documents, and grain remote sensing images, a grain spatial database, a grain document vector library, and a grain image storage database are constructed respectively.
[0085] By integrating the aforementioned grain spatial database, grain document vector library, and grain image storage database, the original grain database is obtained.
[0086] In one possible implementation, the query module 202 is specifically used for:
[0087] The query statement is used to identify grain targets, and the target grain identification entity is obtained by using the BiLSTM-CRF model.
[0088] The target grain identification entity is classified according to the Transformer model to obtain the target grain query intent.
[0089] In one possible implementation, the conversion module 203 is specifically used for:
[0090] The initial grain SQL data corresponding to the target grain query intent is determined based on the SQL generation model;
[0091] The initial grain SQL data is syntax-corrected based on the AST tree to obtain corrected grain SQL data.
[0092] The target grain SQL data is obtained by indexing and optimizing the corrected grain SQL data based on the grain spatial database.
[0093] In one possible implementation, the determining module 204 is specifically used for:
[0094] When the target grain query intent is determined to be the first intent, the target encoded data corresponding to the target grain SQL data is determined based on the grain image storage database. The first intent is used to query grain planting images.
[0095] The target encoded data is converted into an image format to obtain a target grain planting image, and the decision result is determined as the target grain planting image.
[0096] In one possible implementation, the determining module 204 is further configured to:
[0097] When the target grain query intent is determined to be the second intent, coordinate transformation and topological operation are performed on the target grain SQL data based on the spatial database to obtain target grain operation data. The second intent is used to query the grain planting area.
[0098] The target grain planting area is obtained by calculating the closed polygon area of the target grain calculation data, and the decision result is determined as the target grain planting area.
[0099] In one possible implementation, the determining module 204 is further configured to:
[0100] When the target grain query intent is determined to be the third intent, the target grain declaration area corresponding to the target grain SQL data is determined according to the grain document vector library. The third intent is used to query the grain data verification report.
[0101] The grain data verification report is determined based on the comparison between the target grain planting area and the target grain declared area, and the decision result is determined as the grain data verification report.
[0102] Those skilled in the art will clearly understand that the technical solutions of the embodiments of this application can be implemented by means of software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware that can independently complete or cooperate with other components to complete a specific function, wherein the hardware may be, for example, a field-programmable gate array (FPGA), an integrated circuit (IC), etc.
[0103] Each processing unit and / or module in the embodiments of this application can be implemented by an analog circuit that implements the functions described in the embodiments of this application, or by software that executes the functions described in the embodiments of this application.
[0104] Please refer to the following. Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification is shown.
[0105] like Figure 3 As shown, the electronic device 300 may include at least one device processor 301, at least one network interface 304, a user interface 303, a memory 305, and at least one communication bus 302.
[0106] The communication bus 302 can be used to realize the connection and communication of the above components.
[0107] The user interface 303 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.
[0108] The network interface 304 may include, but is not limited to, Bluetooth modules, NFC modules, Wi-Fi modules, etc.
[0109] The device processor 301 may include one or more processing cores. The device processor 301 connects to various parts within the electronic device 300 using various interfaces and lines. It executes various functions and processes data of the electronic device 300 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the device processor 301 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The device processor 301 may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the device processor 301 and may be implemented as a separate chip.
[0110] The memory 305 may include RAM or ROM. Optionally, the memory 305 may include a non-transitory computer-readable medium. The memory 305 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned device processor 301. Figure 3 As shown, the memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
[0111] Specifically, the device processor 301 can be used to call the multimodal grain data fusion and decision-making application based on artificial intelligence agents stored in the memory 305, and specifically perform the following operations:
[0112] Construct a raw grain database and obtain query statements for grain data. The raw grain database includes a grain spatial database, a grain document vector library, and a grain image storage database.
[0113] The target grain query intent corresponding to the query statement is determined based on a semantic understanding model. The semantic understanding model is constructed using a BiLSTM-CRF model and a Transformer model. The target grain query intent includes a first intent to query grain planting images, a second intent to query grain planting area, and a third intent to query grain data verification reports.
[0114] The target grain query intent is transformed according to the SQL generation model to obtain the target grain SQL data;
[0115] The decision result is determined based on the target grain query intent to determine the corresponding SQL data of the target grain in the original grain database.
[0116] As an optional embodiment of this specification, the construction of the original grain database includes:
[0117] Acquire historical grain data, which includes grain geospatial data, unstructured grain documents, and grain remote sensing images;
[0118] Based on grain geospatial data, grain unstructured documents, and grain remote sensing images, a grain spatial database, a grain document vector library, and a grain image storage database are constructed respectively.
[0119] By integrating the aforementioned grain spatial database, grain document vector library, and grain image storage database, the original grain database is obtained.
[0120] As an optional embodiment of this specification, the step of determining the target grain query intent corresponding to the query statement based on the semantic understanding model includes:
[0121] The query statement is used to identify grain targets, and the target grain identification entity is obtained by using the BiLSTM-CRF model.
[0122] The target grain identification entity is classified according to the Transformer model to obtain the target grain query intent.
[0123] As an optional embodiment of this specification, the step of converting the target grain query intent according to the SQL generation model to obtain target grain SQL data includes:
[0124] The initial grain SQL data corresponding to the target grain query intent is determined based on the SQL generation model;
[0125] The initial grain SQL data is syntax-corrected based on the AST tree to obtain corrected grain SQL data.
[0126] The target grain SQL data is obtained by indexing and optimizing the corrected grain SQL data based on the grain spatial database.
[0127] As an optional embodiment of this specification, the step of determining the decision result corresponding to the target grain SQL data in the original grain database based on the target grain query intent includes:
[0128] When the target grain query intent is determined to be the first intent, the target encoded data corresponding to the target grain SQL data is determined based on the grain image storage database. The first intent is used to query grain planting images.
[0129] The target encoded data is converted into an image format to obtain a target grain planting image, and the decision result is determined as the target grain planting image.
[0130] As an optional embodiment of this specification, the step of determining the decision result corresponding to the target grain SQL data in the original grain database based on the target grain query intent includes:
[0131] When the target grain query intent is determined to be the second intent, coordinate transformation and topological operation are performed on the target grain SQL data based on the spatial database to obtain target grain operation data. The second intent is used to query the grain planting area.
[0132] The target grain planting area is obtained by calculating the closed polygon area of the target grain calculation data, and the decision result is determined as the target grain planting area.
[0133] As an optional embodiment of this specification, the step of determining the decision result corresponding to the target grain SQL data in the original grain database based on the target grain query intent includes:
[0134] When the target grain query intent is determined to be the third intent, the target grain declaration area corresponding to the target grain SQL data is determined according to the grain document vector library. The third intent is used to query the grain data verification report.
[0135] The grain data verification report is determined based on the comparison between the target grain planting area and the target grain declared area, and the decision result is determined as the grain data verification report.
[0136] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0137] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0138] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0139] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0140] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0141] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0142] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0143] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0144] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
Claims
1. A multimodal grain data fusion and decision-making method based on artificial intelligence agents, characterized in that, The method includes: Construct a raw grain database and obtain query statements for grain data. The raw grain database includes a grain spatial database, a grain document vector library, and a grain image storage database. The target grain query intent corresponding to the query statement is determined based on a semantic understanding model. The semantic understanding model is constructed using a BiLSTM-CRF model and a Transformer model. The target grain query intent includes a first intent to query grain planting images, a second intent to query grain planting area, and a third intent to query grain data verification reports. The target grain query intent is transformed according to the SQL generation model to obtain the target grain SQL data; Based on the target grain query intent, determine the decision result corresponding to the target grain SQL data in the original grain database; The process of transforming the target grain query intent according to the SQL generation model to obtain target grain SQL data includes: The initial grain SQL data corresponding to the target grain query intent is determined based on the SQL generation model; The initial grain SQL data is syntax-corrected based on the AST tree to obtain corrected grain SQL data. The target grain SQL data is obtained by indexing and optimizing the corrected grain SQL data based on the grain spatial database.
2. The method according to claim 1, characterized in that, The construction of the original grain database includes: Acquire historical grain data, which includes grain geospatial data, unstructured grain documents, and grain remote sensing images; Based on grain geospatial data, grain unstructured documents, and grain remote sensing images, a grain spatial database, a grain document vector library, and a grain image storage database are constructed respectively. By integrating the aforementioned grain spatial database, grain document vector library, and grain image storage database, the original grain database is obtained.
3. The method according to claim 1, characterized in that, The step of determining the target grain query intent corresponding to the query statement based on the semantic understanding model includes: The query statement is used to identify grain targets, and the target grain identification entity is obtained by using the BiLSTM-CRF model. The target grain identification entity is classified according to the Transformer model to obtain the target grain query intent.
4. The method according to claim 1, characterized in that, The decision result for determining the corresponding SQL data of the target grain in the original grain database based on the target grain query intent includes: When the target grain query intent is determined to be the first intent, the target encoded data corresponding to the target grain SQL data is determined based on the grain image storage database; The target encoded data is converted into an image format to obtain a target grain planting image, and the decision result is determined as the target grain planting image.
5. The method according to claim 1, characterized in that, The decision result for determining the corresponding SQL data of the target grain in the original grain database based on the target grain query intent includes: When the target grain query intent is determined to be the second intent, coordinate transformation and topological operation are performed on the target grain SQL data based on the spatial database to obtain target grain operation data; The target grain planting area is obtained by calculating the closed polygon area of the target grain calculation data, and the decision result is determined as the target grain planting area.
6. The method according to claim 5, characterized in that, The decision result for determining the corresponding SQL data of the target grain in the original grain database based on the target grain query intent includes: When the target grain query intent is determined to be the third intent, the target grain declaration area corresponding to the target grain SQL data is determined according to the grain document vector library; The grain data verification report is determined based on the comparison between the target grain planting area and the target grain declared area, and the decision result is determined as the grain data verification report.
7. A multimodal grain data fusion and decision-making device based on artificial intelligence agents, characterized in that, The device includes: The construction module is used to construct the original grain database and obtain query statements for grain data. The original grain database includes a grain spatial database, a grain document vector library, and a grain image storage database. The query module is used to determine the target grain query intent corresponding to the query statement based on a semantic understanding model. The semantic understanding model is constructed by BiLSTM-CRF model and Transformer model. The target grain query intent includes a first intent to query grain planting images, a second intent to query grain planting area, and a third intent to query grain data verification report. The conversion module is used to convert the target grain query intent according to the SQL generation model to obtain target grain SQL data; The determination module is used to determine the decision result corresponding to the target grain SQL data in the original grain database based on the target grain query intent; The conversion module is specifically used for: The initial grain SQL data corresponding to the target grain query intent is determined based on the SQL generation model; The initial grain SQL data is syntax-corrected based on the AST tree to obtain corrected grain SQL data. The target grain SQL data is obtained by indexing and optimizing the corrected grain SQL data based on the grain spatial database.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer or processor, cause the computer or processor to perform the steps of the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Database query method and device based on natural language, equipment and medium
CN120011385A