Agricultural disease question consulting and answering method and device and electronic equipment

By obtaining the pictures and text of agricultural disease problems submitted by users, as well as location information, determining the prompt words and inputting a large language model, the problem of accurate response to agricultural disease problems in the existing technology is solved, and more targeted and effective is achieved Diagnostic answers.

CN119494400AInactive Publication Date: 2025-02-21BEIJING ACADEMY OF AGRICULTURE & FORESTRY SCIENCES
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202411440080.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-02-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately respond to agricultural diseases in the form of pictures and text, especially when users cannot clearly describe plant diseases.

Method used

By obtaining the target agricultural disease problems submitted by the user, including the target consultation pictures and target consultation texts, as well as the user's location information, we determine the prompt words corresponding to the target agricultural disease problems and enter them into the large language model to obtain targeted consultation diagnosis answer.

Benefits of technology

It realizes accurate responses to agricultural disease problems in the form of pictures and text, and can provide more targeted and effective consultation and diagnostic answers based on user intentions and location information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494400A_ABST
    Figure CN119494400A_ABST
Patent Text Reader

Abstract

The invention provides an agricultural disease question consulting and answering method and device and electronic equipment, and relates to the technical field of agriculture, and the method comprises the steps: obtaining a target agricultural disease question submitted by a user and the position information of the user, the target agricultural disease question comprising a target consulting picture and a target consulting text; determining a prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the position information; and inputting the cue word into the large language model to obtain a consultation diagnosis answer corresponding to the target agricultural disease problem output by the large language model. According to the technical scheme, the cue word is determined according to the target consultation picture and the target consultation text submitted by the user and the position information of the user, the consultation diagnosis answer is obtained through the large language model, and the consultation diagnosis answer can be obtained by combining the intention expressed by the user through the target consultation picture and the target consultation text and the position information of the user. The agricultural disease problem is accurately replied, and the obtained consultation and diagnosis answer has higher pertinence and higher effectiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural technology, and in particular to a method, device and electronic equipment for consulting and answering agricultural disease issues. Background Art

[0002] Agricultural disease problems account for the largest category of problems in agricultural production technology consultation, and are also a category of problems that are difficult to solve using general automatic response methods.

[0003] The symptoms of diseases are diverse and manifest in different ways. It is difficult for ordinary farmers to describe the symptoms of plants clearly and accurately in words. Most users take pictures of diseased plants and ask questions with simple text descriptions. For example, users provide plant disease pictures and text descriptions: "It has been like this for the past few days. What is the reason? How should I use medicine?" This consultation method of pictures combined with short text is very common.

[0004] Existing reply methods mostly analyze and answer questions based on the user's text description. However, in the case of the above-mentioned picture plus text format, it is impossible to give an accurate reply because the text does not carry any substantial information. Summary of the invention

[0005] The present invention provides a method, device and electronic device for consulting and answering agricultural disease issues, which are used to solve the defect in the prior art that accurate responses to agricultural disease issues in the form of pictures and texts cannot be given, and can achieve accurate responses to agricultural disease issues in the form of pictures and texts, and can provide targeted responses to the intentions expressed in the user's consultation statements.

[0006] The invention provides a method for consulting and answering agricultural disease problems, comprising the following steps.

[0007] Obtaining a target agricultural disease problem submitted by a user and the user's location information, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text; Determine the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information; The prompt word is input into a large language model to obtain a consulting diagnosis answer corresponding to the target agricultural disease problem output by the large language model.

[0008] According to a method for consulting and answering agricultural disease problems provided by the present invention, the step of obtaining a target agricultural disease problem submitted by a user comprises: Obtaining a target global image corresponding to the agricultural disease problem submitted by the user, and identifying the target global image; When it is determined based on the recognition result that the agricultural disease problem corresponding to the target global image is an infectious disease problem, the agricultural disease problem corresponding to the target global image is determined as the target agricultural disease problem.

[0009] According to a method for answering agricultural disease problem consultation provided by the present invention, the prompt word corresponding to the target agricultural disease problem is determined based on the target consultation picture, the target consultation text and the location information, including: Determine disease characteristic information corresponding to the target agricultural disease problem based on the target consultation picture; Determining consulting feature information corresponding to the target agricultural disease problem based on the target consulting text; Determine the environmental characteristic information corresponding to the target agricultural disease problem based on the location information; The prompt word corresponding to the target agricultural disease problem is determined based on the disease characteristic information, the consultation characteristic information, the environmental characteristic information, the location information, the preset role information and the answer requirement.

[0010] According to a method for answering agricultural disease problem consultation provided by the present invention, determining the disease characteristic information corresponding to the target agricultural disease problem based on the target consultation picture includes: The target consultation picture is input into a pre-trained image detection model to obtain disease feature information corresponding to the target agricultural disease problem output by the image detection model; the disease feature information includes disease objects, disease sites and disease symptoms; the image detection model is determined based on target agricultural disease training samples and identification label training corresponding to the target agricultural disease training samples.

[0011] According to a method for answering agricultural disease questions provided by the present invention, the consultation feature information includes consultation key sentences; The determining of the consulting feature information corresponding to the target agricultural disease problem based on the target consulting text includes: Inputting the target consultation text into a text analysis model; Determining at least one target sentence from the target consultation text based on the sentence extraction function in the text analysis model; Performing word segmentation processing on each of the target sentences respectively to determine the characteristic words in each of the target sentences; Based on the characteristic words in each of the target sentences, a consultation key sentence is determined from each of the target sentences.

[0012] According to a method for consulting and answering agricultural disease problems provided by the present invention, the method of determining a consulting key sentence from each target sentence based on a characteristic word in each target sentence comprises: For each of the target sentences, based on the word weights and word types corresponding to the feature words in the target sentence, and the number of agricultural feature words in the feature words, determine the sentence weight of the target sentence; The target sentence whose sentence weight is greater than a preset weight threshold is determined as the consultation key sentence.

[0013] According to a method for answering agricultural disease questions provided by the present invention, the sentence weight of the target sentence is determined based on the word weights and word types corresponding to the feature words in the target sentence, and the number of agricultural feature words in the feature words, including:

[0014] in, represents the sentence weight of the target sentence, Indicates the first Characteristic words, represents the number of feature words in the target sentence, Indicates the first The word weight corresponding to each feature word; represents the correction value, when the number of agricultural characteristic words in the characteristic words is equal to 1, is a preset correction value. When the number of agricultural characteristic words in the characteristic words is not equal to 1, is 0; when the number of agricultural characteristic words in the characteristic words is greater than or equal to 2, is the preset correction value, when the number of agricultural characteristic words in the characteristic words is less than 2, is 0; when the word type corresponding to the feature word includes a preset prompt phrase, is the preset correction value, when the word type corresponding to the feature word does not include the preset prompt phrase, is 0.

[0015] According to a method for consulting and answering agricultural disease problems provided by the present invention, the prompt word corresponding to the target agricultural disease problem is determined based on the disease feature information, the consultation feature information, the environmental feature information, the location information, the preset role information and the answer requirement, including:

[0016] in, Indicates the prompt word, represents the disease characteristic information, represents the environmental characteristic information, represents the location information, represents the preset role information, represents the consulting characteristic information, Indicates the answer requirement, represents the disease object, Indicates the diseased part, Indicates the disease symptoms, and the environmental characteristic information includes the weather in a preset period of time , average temperature and average humidity , Indicates the key words of the consultation, and the answer requirement includes the disease judgment result , characteristic symptoms Cause , drug prevention and treatment methods and management measures to prevent and control .

[0017] The present invention also provides an agricultural disease problem consultation and answering device, comprising the following modules: An acquisition module, used to acquire a target agricultural disease problem submitted by a user and the user's location information, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text; A prompt module, used to determine a prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information; The reply module is used to input the prompt word into the large language model to obtain the consulting and diagnostic answer corresponding to the target agricultural disease problem output by the large language model.

[0018] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for consulting and answering agricultural disease problems as described above is implemented.

[0019] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for consulting and answering agricultural disease problems as described in any one of the above methods is implemented.

[0020] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned agricultural disease problem consultation and answering methods.

[0021] The method, device and electronic device for consulting and answering agricultural disease problems provided by the present invention obtain the target agricultural disease problem submitted by the user and the user's location information, and the target agricultural disease problem includes a target consultation picture and a target consultation text, and then determine the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information. The prompt word is further input into the large language model to obtain the consultation and diagnosis answer corresponding to the target agricultural disease problem output by the large language model. The technical solution of the present invention determines the prompt word according to the target consultation picture, the target consultation text and the user's location information submitted by the user, and obtains the consultation and diagnosis answer corresponding to the target agricultural disease problem through the large language model. It can combine the intention expressed by the user through the target consultation picture and the target consultation text, as well as the user's location information, to accurately respond to the agricultural disease problem, and the consultation and diagnosis answer obtained is more targeted and more effective. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 This is one of the flow charts of the agricultural disease problem consultation and answering method provided by the present invention.

[0024] Figure 2 This is the second flow chart of the method for consulting and answering agricultural disease problems provided by the present invention.

[0025] Figure 3 It is a schematic diagram of the target consultation picture provided by the present invention.

[0026] Figure 4 It is a structural schematic diagram of the agricultural disease problem consultation and answering device provided by the present invention.

[0027] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] In view of the problems in the prior art, the embodiment of the present invention provides a method for consulting and answering agricultural disease problems. Figure 1 This is one of the flow charts of the method for consulting and answering agricultural disease problems provided by the present invention, such as Figure 1 As shown, the method includes the following steps 110, 120 and 130.

[0030] Step 110: Obtain the target agricultural disease problem submitted by the user and the location information of the user, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text.

[0031] Specifically, the target agricultural disease problem submitted by the user and the user's location information can be obtained. The target agricultural disease problem can include a target consultation picture and a target consultation text. The target consultation picture can be, for example, a photo of a plant with disease symptoms taken by the user, and the target consultation text can be, for example, "The corn planted three months ago has become like this. What is the reason? How to solve it?" The user's location information can be, for example, the geographical location of the user's IP address (Internet Protocol Address).

[0032] In one embodiment, obtaining the target agricultural disease problem submitted by the user includes: Obtaining a target global image corresponding to the agricultural disease problem submitted by the user, and identifying the target global image; When it is determined based on the recognition result that the agricultural disease problem corresponding to the target global image is an infectious disease problem, the agricultural disease problem corresponding to the target global image is determined as the target agricultural disease problem.

[0033] Specifically, the target global image corresponding to the agricultural disease problem submitted by the user can be obtained, and the target global image is a global image of the field where the agricultural disease problem is located. Further, the target global image corresponding to the agricultural disease problem can be identified, that is, the target global image can first be subjected to image edge detection to eliminate background interference in the target global image, and then the target global image after interference elimination is binarized, and the area and number of pixels corresponding to the disease in the target global image after binarization are identified by a preset single peak threshold, and the standard deviation of the disease occurring in the field is further calculated according to the area and number of pixels corresponding to the disease. Finally, when the standard deviation is less than the preset standard deviation threshold, it indicates that the local area where the disease occurs is relatively concentrated, and there is an obvious disease center. It can be determined that the agricultural disease problem corresponding to the target global image is an infectious disease problem. In the case of identifying the agricultural disease problem as an infectious disease problem, the agricultural disease problem is determined as a target agricultural disease problem. If crops are diseased in a large area at the same time in the field and there is no obvious disease center, it can be determined that the agricultural disease problem is not an infectious disease problem.

[0034] In the above embodiment, by identifying the target global image corresponding to the agricultural disease problem submitted by the user, it is determined whether the agricultural disease problem is an infectious disease problem, and then a more targeted consultation and diagnosis answer can be given to the infectious disease problem.

[0035] Step 120: Determine the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information.

[0036] In one embodiment, determining the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information includes: Determine disease characteristic information corresponding to the target agricultural disease problem based on the target consultation picture; Determining consulting feature information corresponding to the target agricultural disease problem based on the target consulting text; Determine the environmental characteristic information corresponding to the target agricultural disease problem based on the location information; The prompt word corresponding to the target agricultural disease problem is determined based on the disease characteristic information, the consultation characteristic information, the environmental characteristic information, the location information, the preset role information and the answer requirement.

[0037] Specifically, Figure 2 FIG. 2 is a flow chart of the method for consulting and answering agricultural disease problems provided by an embodiment of the present invention. Figure 2 As shown, the disease characteristic information corresponding to the target agricultural disease problem can be determined based on the target consultation picture, the consultation characteristic information corresponding to the target agricultural disease problem can also be determined based on the target consultation text, and the environmental characteristic information corresponding to the target agricultural disease problem can also be determined based on the location information. The location information can also be obtained through satellite positioning technology. The environmental characteristic information may include environmental characteristics such as weather, average temperature and average humidity within a preset period of time. For example, the average temperature data within three days can be taken as the average temperature, and the average humidity data within three days can be taken as the average humidity.

[0038] The prompt words corresponding to the target agricultural disease problem can be further determined based on the disease characteristic information, consultation characteristic information, environmental characteristic information, location information, preset role information and answer requirements. The preset role information is used to prompt the user role of the large language model to input the consultation question. For example, the preset role information can be set to agricultural practitioners by default. The answer requirement may include, for example, disease judgment results, characteristic symptoms, causes of occurrence, drug prevention and control methods, and management measures and prevention methods. The answer requirement can ensure that the consultation and diagnosis answer corresponding to the target agricultural disease problem includes the above content, among which the characteristic symptoms can be used to guide the user to perform a preliminary check of the symptoms, the cause of occurrence can be used to inform the user of the cause of the disease problem, the drug prevention and control method can be used to guide the user to use the medicine, and the management measures and prevention methods can be used to guide the user to prevent the disease through management measures such as water, fertilizer, air, heat and site.

[0039] In the above embodiment, the corresponding feature information is determined based on the target consultation picture, the target consultation text and the location information, and then the prompt words corresponding to the target agricultural disease problems are determined in combination with the preset role information and the answer requirements, so that the determined prompt words contain picture-related content, text content and environmental conditions, and a variety of problem information is extracted for the target agricultural disease problems. The setting of the preset role information improves the accuracy of the reply, and the setting of the answer requirements improves the richness of the reply, laying the foundation for obtaining accurate agricultural problem consultation and diagnosis answers in the future.

[0040] In one embodiment, determining the disease characteristic information corresponding to the target agricultural disease problem based on the target consultation picture includes: The target consultation picture is input into a pre-trained image detection model to obtain disease feature information corresponding to the target agricultural disease problem output by the image detection model; the disease feature information includes disease objects, disease sites and disease symptoms; the image detection model is determined based on target agricultural disease training samples and identification label training corresponding to the target agricultural disease training samples.

[0041] Specifically, Figure 2 As shown, the target consultation image can be input into the pre-trained image detection model to obtain the disease feature information corresponding to the target agricultural disease problem output by the image detection model, and the disease feature information may include the disease object, disease part and disease symptoms, etc. The disease object may include crops such as tomatoes, peppers, strawberries or cucumbers, the disease part may include one or more crop parts such as roots, stems, leaves, flowers and fruits, and the disease symptoms may include one or more crop disease symptoms such as discoloration, necrosis, rot, wilting, deformity and mold.

[0042] Exemplarily, the disease symptoms may include disease symptoms and disorders, and the specific types of disease symptoms and disorders may be shown in Table 1 below: Table 1 Examples of disease symptoms

[0043] It is to be understood that symptoms and diseases may also include other types, which are not specifically limited in the embodiments of the present invention.

[0044] Among them, the image detection model is determined based on the target agricultural disease training samples and the identification labels corresponding to the target agricultural disease training samples. Multiple groups of agricultural disease pictures can be acquired in advance, and further, the multiple groups of agricultural disease pictures can be pre-processed by flipping, rotating, scaling, cropping, shifting, and changing the brightness to expand the number of agricultural disease pictures and obtain target agricultural disease training samples. The target agricultural disease training samples have a high representativeness of the actual state of the field. The identification labels corresponding to the target agricultural disease training samples include disease objects, disease sites, and disease symptoms. Furthermore, the initial image detection model can be trained based on the target agricultural disease training samples and the identification labels corresponding to the target agricultural disease training samples to obtain a pre-trained image detection model. Among them, the initial image detection model can be, for example, a YOLO (You Only Look Once) model, or other image detection models, and the embodiments of the present invention are not specifically limited here.

[0045] In the above embodiment, the target consultation picture is input into a pre-trained image detection model to obtain the disease feature information corresponding to the target agricultural disease problem, so that the prompt words subsequently determined based on the disease feature information can include the disease object, disease site and disease symptoms, thereby enabling the large language model to respond to the object, site and symptoms of the disease, and the final consultation diagnosis answer is more targeted.

[0046] In one embodiment, the consultation feature information includes consultation key sentences; The determining of the consulting feature information corresponding to the target agricultural disease problem based on the target consulting text includes: Inputting the target consultation text into a text analysis model; Determining at least one target sentence from the target consultation text based on the sentence extraction function in the text analysis model; Performing word segmentation processing on each of the target sentences respectively to determine the characteristic words in each of the target sentences; Based on the characteristic words in each of the target sentences, a consultation key sentence is determined from each of the target sentences.

[0047] Specifically, the consultation feature information includes consultation key sentences. Figure 2As shown, the target consultation text can be input into the text analysis model, and at least one target sentence can be determined from the target consultation text based on the sentence extraction function in the text analysis model. Further, each target sentence can be segmented to determine the characteristic words in each target sentence, that is, the target sentence is split into multiple words. Further, based on the characteristic words in each target sentence, the consultation key sentence can be determined from each target sentence.

[0048] Optionally, stop words among the multiple feature words may be removed. Stop words generally refer to words that appear frequently but do not have obvious actual meanings, such as prepositions, conjunctions, and pronouns.

[0049] In the above embodiment, the target consultation text is input into the text analysis model, and then based on the sentence extraction function in the text analysis model, at least one target sentence is determined from the target consultation text, and each target sentence is further segmented to determine the characteristic words in each target sentence, and based on the characteristic words in each target sentence, the key consultation sentences are determined from each target sentence, thereby simplifying the target consultation text and extracting the key information therein.

[0050] In one embodiment, determining the consulting key sentence from each of the target sentences based on the characteristic words in each of the target sentences includes: For each of the target sentences, based on the word weights and word types corresponding to the feature words in the target sentence, and the number of agricultural feature words in the feature words, determine the sentence weight of the target sentence; The target sentence whose sentence weight is greater than a preset weight threshold is determined as the consultation key sentence.

[0051] Specifically, the target sentence includes a plurality of feature words, each of which corresponds to a word weight and a word type, and the feature words can also be classified into agricultural feature words and non-agricultural feature words. Therefore, for each target sentence, the sentence weight of the target sentence can be determined based on the word weight and word type corresponding to the feature words in the target sentence, and the number of agricultural feature words in the feature words. The sentence weight can characterize the importance of the target sentence. And the target sentence whose sentence weight is greater than the preset weight threshold can be determined as a consulting key sentence. Among them, the preset weight threshold can be set as needed, and the embodiment of the present invention is not specifically limited here.

[0052] In the above embodiment, for each target sentence, the sentence weight of the target sentence is determined based on the word weight and word type corresponding to the feature words in the target sentence, as well as the number of agricultural feature words in the feature words. The target sentence with a sentence weight greater than a preset weight threshold is determined as a key consulting sentence. The key sentence information is extracted, and the number of sentences is reduced and the efficiency is improved on the basis of ensuring the accuracy of the subsequent generation of prompt words.

[0053] In one embodiment, the determining the sentence weight of the target sentence based on the word weights and word types corresponding to the feature words in the target sentence and the number of agricultural feature words in the feature words includes:

[0054] in, represents the sentence weight of the target sentence, Indicates the first Characteristic words, represents the number of feature words in the target sentence, Indicates the first The word weight corresponding to each feature word; represents the correction value, when the number of agricultural characteristic words in the characteristic words is equal to 1, is a preset correction value. When the number of agricultural characteristic words in the characteristic words is not equal to 1, is 0; when the number of agricultural characteristic words in the characteristic words is greater than or equal to 2, is the preset correction value, when the number of agricultural characteristic words in the characteristic words is less than 2, is 0; when the word type corresponding to the feature word includes a preset prompt phrase, is the preset correction value, when the word type corresponding to the feature word does not include the preset prompt phrase, is 0.

[0055] It should be noted that the word weights corresponding to the characteristic words may be the same or different. The correction value is used to correct the word weights to improve the accuracy of the sentence weights of the target sentence. The scope of agricultural characteristic words can be set in advance. For example, agricultural characteristic words can include crop names. The preset correction value can be determined in advance as needed, and the embodiment of the present invention does not make specific limitations here. The scope of the preset prompt phrases can also be set in advance. For example, the preset prompt phrases can include phrases such as "I want to ask", "Mainly want to ask" and "What to do".

[0056] In the above embodiment, the sentence weight of the target sentence is determined based on the word weights and word types corresponding to the feature words in the target sentence, as well as the number of agricultural feature words in the feature words, which lays the foundation for determining the consulting key sentences in the target sentence.

[0057] In one embodiment, the determining of the prompt word corresponding to the target agricultural disease problem based on the disease characteristic information, the consultation characteristic information, the environmental characteristic information, the location information, the preset role information and the answer requirement includes:

[0058] in, Indicates the prompt word, represents the disease characteristic information, represents the environmental characteristic information, represents the location information, represents the preset role information, represents the consulting characteristic information, Indicates the answer requirement, represents the disease object, Indicates the diseased part, Indicates the disease symptoms, and the environmental characteristic information includes the weather in a preset period of time , average temperature and average humidity , Indicates the key words of the consultation, and the answer requirement includes the disease judgment result , characteristic symptoms Cause , drug prevention and treatment methods and management measures to prevent and control .

[0059] In addition, in the process of determining the above prompt words, different parts of the prompt words are separated by line breaks and symbols to eliminate ambiguity, which enables the large language model to more accurately understand the user's intention to raise the target agricultural disease issue.

[0060] Optionally, other requirements may be added to the prompt words as needed, such as the number of output words and a brief description, etc. The brief description may be: disease diagnosis requires comprehensive judgment of various background information, this result is for reference only, if the problem cannot be alleviated, it is recommended to contact XXX experts for further answers.

[0061] Optionally, a prompt word template may be pre-constructed, and disease characteristic information, consultation characteristic information, environmental characteristic information, location information, preset role information and answer requirements may be input into the prompt word template to thereby determine the prompt word corresponding to the target agricultural disease problem.

[0062] In the above embodiment, by splicing disease characteristic information, consultation characteristic information, environmental characteristic information, location information, preset role information and answer requirements, the prompt words corresponding to the target agricultural disease problem are determined, and then based on the prompt words and the large language model, a more accurate consultation and diagnosis answer corresponding to the target agricultural disease problem can be obtained.

[0063] Step 130: Input the prompt word into a large language model to obtain a consulting diagnosis answer corresponding to the target agricultural disease problem output by the large language model.

[0064] Specifically, the prompt words can be input into the large language model to obtain the consulting and diagnostic answers corresponding to the target agricultural disease problem output by the large language model. The large language model can be determined after pre-training the initial large language model. For example, the large language model can be obtained by training the initial large language model based on agricultural disease technical data. The agricultural disease technical data may include the name of the disease (including aliases), the cause of the disease, the law of disease, the symptoms of the disease, and the prevention and control methods. Among them, the initial large language model can be, for example, the Wenxin large model, or other large language models, and the embodiments of the present invention do not make specific limitations here.

[0065] For example, Figure 3 is a schematic diagram of the target consultation picture provided by the present invention. The user submits Figure 3 The target consultation picture shown in the figure is shown, and the following target consultation text is submitted: "My relatives came to my house earlier, and I went to greet the guests. I was busy and delayed. I haven't been to the greenhouse for a few days. As a result, the bottoms of more than a dozen stems have such problems and are all broken. I want to ask if there is any hope? What should I do?" The following prompt words are determined by the method of the present invention: “Disease crops: The target of the disease is tomato, the diseased part is the root, and the disease symptoms are necrotic spots, dry rot and sclerotia; Environment: The average temperature in the past three days is 38 degrees Celsius, the average humidity in the past three days is 87%, and the weather in the past three days is cloudy; Location: XX Town, XX County, XX City; Preset role information: agricultural practitioners; Key words of inquiry: I haven't been to the greenhouse for a few days. As a result, more than a dozen stems have had this problem at the bottom and are all broken. I want to ask if there is any hope? What should I do?

[0066] Answer requirements: The response required includes disease diagnosis results, characteristic symptoms, causes of disease, drug control methods and management measures and control methods.

[0067] After the above prompt words are input into the large language model, the consultation and diagnosis answers output by the large language model are as follows: “This is tomato white Juan disease.

[0068] Characteristic symptoms: It harms the base of tomato stems, with necrotic patches on the surface, appearing dry and rotten, with white silky mycelium, and later forming grain-like sclerotia.

[0069] Causes of disease: spread of pathogens and suitable environmental conditions. Pathogens mainly overwinter in the soil and diseased tissues in the form of sclerotia. These sclerotia have strong stress resistance and will not die even if they are stored for 10 years under dry conditions. However, under irrigation, it takes 3 to 4 months for all of them to die. Pathogens mainly invade from the base or roots of the host stem. In addition, in a hot and humid environment, tomato white rot is prone to occur.

[0070] Drug control method: After the central diseased plant is found, the diseased plant and the surrounding soil surface should be handled in time. 40% pentachloronitrobenzene powder can be used at 1-1.5 kg / mu, and 40-60 kg of fine dry soil can be added and mixed evenly, and then applied in appropriate amounts. You can also use 400 times of 40% pentachloronitrobenzene powder, or 500-1000 times of 3% metalaxyl·oxamectin aqueous solution, or 3000 times of 20% propiconazole microemulsion, or 1000 times of 50% isoprodinil wettable powder, or 2000 times of 20% triadimefon emulsifiable concentrate, or 500-1000 times of 70% methyl thiophanate suspension, or 800 times of 20% methyl tolclofos, or 500 times of 50% polysulfur suspension, etc., spray the base of the diseased stem and the surrounding soil surface, and spray 1-2 times every 7-10 days until the disease is controlled. You can also use the above-mentioned liquid to irrigate the roots of diseased plants, 400~500 ml per plant.

[0071] Management measures Prevention and control methods: Rotate crops with non-Solanaceae crops for more than 2 to 3 years. Vegetable fields with severe disease should be rotated with Gramineae crops. If conditions permit, water-land rotation is feasible for better results. Deeply plow the soil after harvest. Remove diseased plants in time when they are found early, and sprinkle lime powder in the holes of diseased plants. Cover the ground with film, use drip irrigation or dark irrigation under the film, strengthen ventilation in the greenhouse, and control the humidity in the greenhouse.

[0072] Disease diagnosis requires comprehensive judgment based on a variety of background information. This result is for reference only. If the problem cannot be alleviated, it is recommended to contact 010-XXXXX plant protection experts for further answers.

[0073] The method for consulting and answering agricultural disease problems provided by the present invention obtains the target agricultural disease problem submitted by the user and the user's location information, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text, and then determines the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information. The prompt word is further input into the large language model to obtain the consultation and diagnosis answer corresponding to the target agricultural disease problem output by the large language model. The technical solution of the present invention determines the prompt word according to the target consultation picture, the target consultation text and the user's location information submitted by the user, and obtains the consultation and diagnosis answer corresponding to the target agricultural disease problem through the large language model. It can accurately respond to the agricultural disease problem in combination with the intention expressed by the user through the target consultation picture and the target consultation text, as well as the user's location information, and the obtained consultation and diagnosis answer is more targeted and more effective.

[0074] The agricultural disease problem consultation and answering device provided by the present invention is described below. The agricultural disease problem consultation and answering device described below and the agricultural disease problem consultation and answering method described above can be referenced to each other.

[0075] Figure 4 FIG. 1 is a schematic diagram of the structure of the agricultural disease problem consultation and answering device provided by the present invention. Figure 4 As shown, the agricultural disease problem consultation and answering device 400 includes the following modules: An acquisition module 410 is used to acquire a target agricultural disease problem submitted by a user and the location information of the user, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text; Prompt module 420, used to determine the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information; The reply module 430 is used to input the prompt word into the large language model to obtain the consulting and diagnostic answer corresponding to the target agricultural disease problem output by the large language model.

[0076] In one embodiment, the acquisition module 410 is specifically used for: Obtaining a target global image corresponding to the agricultural disease problem submitted by the user, and identifying the target global image; When it is determined based on the recognition result that the agricultural disease problem corresponding to the target global image is an infectious disease problem, the agricultural disease problem corresponding to the target global image is determined as the target agricultural disease problem.

[0077] In one embodiment, the prompt module 420 is specifically used to: Determine disease characteristic information corresponding to the target agricultural disease problem based on the target consultation picture; Determining consulting feature information corresponding to the target agricultural disease problem based on the target consulting text; Determine the environmental characteristic information corresponding to the target agricultural disease problem based on the location information; The prompt word corresponding to the target agricultural disease problem is determined based on the disease characteristic information, the consultation characteristic information, the environmental characteristic information, the location information, the preset role information and the answer requirement.

[0078] In one embodiment, the prompt module 420 is further configured to: The target consultation picture is input into a pre-trained image detection model to obtain disease feature information corresponding to the target agricultural disease problem output by the image detection model; the disease feature information includes disease objects, disease sites and disease symptoms; the image detection model is determined based on target agricultural disease training samples and identification label training corresponding to the target agricultural disease training samples.

[0079] In one embodiment, the consultation feature information includes consultation key sentences, and the prompt module 420 is further used to: Inputting the target consultation text into a text analysis model; Determining at least one target sentence from the target consultation text based on the sentence extraction function in the text analysis model; Performing word segmentation processing on each of the target sentences respectively to determine the characteristic words in each of the target sentences; Based on the characteristic words in each of the target sentences, a consultation key sentence is determined from each of the target sentences.

[0080] In one embodiment, the prompt module 420 is further configured to: For each of the target sentences, based on the word weights and word types corresponding to the feature words in the target sentence, and the number of agricultural feature words in the feature words, determine the sentence weight of the target sentence; The target sentence whose sentence weight is greater than a preset weight threshold is determined as the consultation key sentence.

[0081] In one embodiment, the prompt module 420 is further configured to:

[0082] in, represents the sentence weight of the target sentence, Indicates the first Characteristic words, represents the number of feature words in the target sentence, Indicates the first The word weight corresponding to each feature word; represents the correction value, when the number of agricultural characteristic words in the characteristic words is equal to 1, is a preset correction value. When the number of agricultural characteristic words in the characteristic words is not equal to 1, is 0; when the number of agricultural characteristic words in the characteristic words is greater than or equal to 2, is the preset correction value, when the number of agricultural characteristic words in the characteristic words is less than 2, is 0; when the word type corresponding to the feature word includes a preset prompt phrase, is the preset correction value, when the word type corresponding to the feature word does not include the preset prompt phrase, is 0.

[0083] In one embodiment, the reply module 430 is specifically configured to:

[0084] in, Indicates the prompt word, represents the disease characteristic information, represents the environmental characteristic information, represents the location information, represents the preset role information, represents the consulting characteristic information, Indicates the answer requirement, represents the disease object, Indicates the diseased part, Indicates the disease symptoms, and the environmental characteristic information includes the weather in a preset period of time , average temperature and average humidity , Indicates the key words of the consultation, and the answer requirement includes the disease judgment result , characteristic symptoms Cause , drug prevention and treatment methods and management measures to prevent and control .

[0085] The agricultural disease problem consultation and answering device provided by the present invention obtains the target agricultural disease problem submitted by the user and the user's location information, and the target agricultural disease problem includes a target consultation picture and a target consultation text, and then determines the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information. The prompt word is further input into the large language model to obtain the consultation and diagnosis answer corresponding to the target agricultural disease problem output by the large language model. The technical solution of the present invention determines the prompt word according to the target consultation picture, the target consultation text and the user's location information submitted by the user, and obtains the consultation and diagnosis answer corresponding to the target agricultural disease problem through the large language model. It can combine the intention expressed by the user through the target consultation picture and the target consultation text, as well as the user's location information, to accurately respond to the agricultural disease problem, and the consultation and diagnosis answer obtained is more targeted and more effective.

[0086] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communications interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the agricultural disease problem consultation and answering method, which includes: Obtaining a target agricultural disease problem submitted by a user and the user's location information, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text; Determine the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information; The prompt word is input into a large language model to obtain a consulting diagnosis answer corresponding to the target agricultural disease problem output by the large language model.

[0087] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0088] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the agricultural disease problem consultation and answering method provided by the above methods, the method includes: Obtaining a target agricultural disease problem submitted by a user and the user's location information, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text; Determine the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information; The prompt word is input into a large language model to obtain a consulting diagnosis answer corresponding to the target agricultural disease problem output by the large language model.

[0089] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the agricultural disease problem consultation and answering method provided by the above methods, the method comprising: Obtaining a target agricultural disease problem submitted by a user and the user's location information, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text; Determine the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information; The prompt word is input into a large language model to obtain a consulting diagnosis answer corresponding to the target agricultural disease problem output by the large language model.

[0090] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0091] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for consulting and answering agricultural disease problems, characterized in that: include: Obtaining a target agricultural disease problem submitted by a user and the user's location information, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text; Determine the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information; The prompt word is input into a large language model to obtain a consulting diagnosis answer corresponding to the target agricultural disease problem output by the large language model.

2. The method for consulting and answering agricultural disease problems according to claim 1, characterized in that: The obtaining of the target agricultural disease problem submitted by the user includes: Obtaining a target global image corresponding to the agricultural disease problem submitted by the user, and identifying the target global image; When it is determined based on the recognition result that the agricultural disease problem corresponding to the target global image is an infectious disease problem, the agricultural disease problem corresponding to the target global image is determined as the target agricultural disease problem.

3. The method for consulting and answering agricultural disease problems according to claim 1 or 2, characterized in that: The step of determining the prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information includes: Determine disease characteristic information corresponding to the target agricultural disease problem based on the target consultation picture; Determining consulting feature information corresponding to the target agricultural disease problem based on the target consulting text; Determine the environmental characteristic information corresponding to the target agricultural disease problem based on the location information; The prompt word corresponding to the target agricultural disease problem is determined based on the disease characteristic information, the consultation characteristic information, the environmental characteristic information, the location information, the preset role information and the answer requirement.

4. The method for consulting and answering agricultural disease problems according to claim 3, characterized in that: The determining of disease characteristic information corresponding to the target agricultural disease problem based on the target consultation picture includes: The target consultation picture is input into a pre-trained image detection model to obtain disease feature information corresponding to the target agricultural disease problem output by the image detection model; the disease feature information includes disease objects, disease sites and disease symptoms; the image detection model is determined based on target agricultural disease training samples and identification label training corresponding to the target agricultural disease training samples.

5. The method for consulting and answering agricultural disease problems according to claim 4, characterized in that: The consultation feature information includes consultation key sentences; The determining of the consulting feature information corresponding to the target agricultural disease problem based on the target consulting text includes: Inputting the target consultation text into a text analysis model; Determining at least one target sentence from the target consultation text based on the sentence extraction function in the text analysis model; Performing word segmentation processing on each of the target sentences respectively to determine the characteristic words in each of the target sentences; Based on the characteristic words in each of the target sentences, a consultation key sentence is determined from each of the target sentences.

6. The method for consulting and answering agricultural disease problems according to claim 5, characterized in that: The step of determining the consulting key sentence from each of the target sentences based on the characteristic words in each of the target sentences comprises: For each of the target sentences, based on the word weights and word types corresponding to the feature words in the target sentence, and the number of agricultural feature words in the feature words, determine the sentence weight of the target sentence; The target sentence whose sentence weight is greater than a preset weight threshold is determined as the consultation key sentence.

7. The method for consulting and answering agricultural disease problems according to claim 5, characterized in that: The determining the sentence weight of the target sentence based on the word weights and word types corresponding to the feature words in the target sentence and the number of agricultural feature words in the feature words includes: in, represents the sentence weight of the target sentence, Indicates the first Characteristic words, represents the number of feature words in the target sentence, Indicates the first The word weight corresponding to each feature word; represents the correction value, when the number of agricultural characteristic words in the characteristic words is equal to 1, is a preset correction value. When the number of agricultural characteristic words in the characteristic words is not equal to 1, is 0; when the number of agricultural characteristic words in the characteristic words is greater than or equal to 2, is the preset correction value, when the number of agricultural characteristic words in the characteristic words is less than 2, is 0; when the word type corresponding to the feature word includes a preset prompt phrase, is the preset correction value, when the word type corresponding to the feature word does not include the preset prompt phrase, is 0.

8. The method for consulting and answering agricultural disease problems according to claim 5, characterized in that: The determining of the prompt word corresponding to the target agricultural disease problem based on the disease characteristic information, the consultation characteristic information, the environmental characteristic information, the location information, the preset role information and the answer requirement includes: in, Indicates the prompt word, represents the disease characteristic information, represents the environmental characteristic information, represents the location information, represents the preset role information, represents the consulting characteristic information, Indicates the answer requirement, represents the disease object, Indicates the diseased part, Indicates the disease symptoms, and the environmental characteristic information includes the weather in a preset period of time , average temperature and average humidity , Indicates the key words of the consultation, and the answer requirement includes the disease judgment result , characteristic symptoms Cause , drug prevention and treatment methods and management measures to prevent and control .

9. An agricultural disease problem consultation and answering device, characterized in that: include: An acquisition module, used to acquire a target agricultural disease problem submitted by a user and the user's location information, wherein the target agricultural disease problem includes a target consultation picture and a target consultation text; A prompt module, used to determine a prompt word corresponding to the target agricultural disease problem based on the target consultation picture, the target consultation text and the location information; The reply module is used to input the prompt word into the large language model to obtain the consulting and diagnostic answer corresponding to the target agricultural disease problem output by the large language model.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements the agricultural disease problem consultation and answering method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Man-machine fusion consulting question-answering method and system for agricultural technology service robot

    CN111581338A

  • Target information display method and device, electronic equipment and medium

    CN112732896A

  • Plant disease and insect pest diagnosis method, diagnosis system and readable storage medium

    CN113947697A

  • Agricultural community knowledge question and answer method and device and storage medium

    CN116303981A

  • Question and answer method and device, equipment and storage medium

    CN116628150A