Agricultural and pastoral supply chain voice interaction system based on enterprise WeChat and model driving method

By using a voice interaction system and model-driven approach based on WeChat for the agricultural and livestock supply chain, the problems of real-time interaction and system adaptability among participants in the agricultural and livestock product-food supply chain have been solved, enabling more efficient business operations and management.

CN120931234APending Publication Date: 2025-11-11RUITONG TRACEABILITY (LANGFANG) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511026391.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

In existing technologies, it is difficult for participants in the agricultural and livestock product-food supply chain to conduct real-time and timely business interactions and data collection on-site, and the system construction cannot adapt to the diversity and variability of various entities, organizations, business objects and interaction logics.

Method used

We adopt a voice interaction system and model-driven approach for the agricultural and livestock supply chain based on WeChat Work. We obtain user input through the WeChat Work interaction module, parse the information using the large model service module and output structured JSON data, and combine scene event intelligence agents and data intelligence agents to realize the operation of the back-end business system.

Benefits of technology

It improved the timeliness of business operations, reduced operation time, lowered system expansion and management costs, and enhanced the sophistication of supply chain management and the ability to monitor business processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
Patent Text Reader

Abstract

The invention relates to the technical field of real-time cooperation of agricultural and pastoral products-food supply chains, in particular to an agricultural and pastoral supply chain voice interaction system and model driving method based on enterprise WeChat, and the system comprises an enterprise WeChat interaction module which is used for obtaining voice, pictures, position information, WeChat numbers and mobile phone numbers inputted by a user; the large model (LLM) service module is used for analyzing the input information according to a preset scenarized cue word template and outputting structured JSON (JavaScript Object Notation) data; the scene event agent is used for storing a service event configuration library in a JSON format, outputting a matching event definition according to LLM, and triggering a background service system to operate through an RPA engine; the data agent is used for dynamically generating SQL statements on the basis of an AtributeSet configuration table and realizing addition, deletion, modification, query and associated query of business objects; the method has the beneficial effects that compared with a traditional mode that an operator enters a software system manually after going to an office, the timeliness of each business operation is improved by at least half an hour, and the time is often prolonged by one day or even several days by adopting the scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of real-time collaborative technology for agricultural and livestock products-food supply chains, specifically to a voice interaction system and model-driven method for agricultural and livestock supply chains based on WeChat for Business. Background Technology

[0002] The agricultural and livestock product-food supply chain industry involves numerous farmers of varying sizes, warehousing and logistics providers, supermarkets, central kitchens, restaurants, and end consumers. Many participants in these intermediaries typically have limited access to computers. Finding effective methods and tools to enable these diverse stakeholders to participate in platform operations promptly and seamlessly is both a key challenge and a crucial aspect of achieving efficient end-to-end collaboration and operation.

[0003] Currently, there is no effective means to conduct real-time, timely business interactions and data collection on-site. Instead, operations must be performed after returning to the office environment and logging into different specific systems.

[0004] For agricultural and livestock products and food supply chains and industry platforms, the participating entities, such as farmers, warehousing and logistics providers, supermarkets, central kitchens, and restaurants, are constantly expanding, and the rules and processes for business collaboration are also continuously evolving and upgrading. Their back-end system platforms typically cannot have the large development and service teams of companies like Alibaba, JD.com, and Meituan to provide customized development and operational services for business systems. Therefore, the key capability becomes how well the business system can adapt to the diversity and variability of various entities, organizations, business objects, and interaction logics.

[0005] Currently, the technical approach for system construction is still the Demand-Design-Development-Operation (DevOPS) model, and there are no effective means to support adapting to the diversity and variability of entities, organizations, business objects, and interaction logic.

[0006] Therefore, we propose a voice interaction system and model-driven method for the agricultural and livestock supply chain based on WeChat Work to solve the above problems. Summary of the Invention

[0007] In view of the problems existing in the prior art, the present invention discloses a voice interaction system and model-driven method for agricultural and livestock supply chains based on WeChat for Business, and the technical solution adopted includes: Enterprise WeChat interaction module: used to obtain user input of voice, images, location information, WeChat ID, and mobile phone number; Large Model (LLM) service module: Parses input information based on pre-set contextualized prompt word templates and outputs structured JSON data; Scene event intelligence agent: Stores business event configuration library in JSON format, matches event definitions based on LLM output, and triggers backend business system operations through RPA engine; Data intelligence agent: Based on the AttributeSet configuration table, it dynamically generates SQL statements to realize the logic of adding, deleting, modifying and querying business objects, as well as related queries and dataset calculation and processing.

[0008] As a preferred embodiment of the present invention, the business event configuration library includes the following fields: businessMessageID: A unique identifier for the event; action.TriggerAPP: Target business system; action.TriggerPageEvent: Target system function event; response.templateParams: Parameters for WeChat feedback templates.

[0009] As a preferred embodiment of the present invention, the AttributeSet configuration table includes the following fields: Business Object (BO) Name; Attribute name and data type; Relationship mapping fields are used to associate different business objects.

[0010] As a preferred embodiment of the present invention, the method for the data intelligence agent to achieve dynamic SQL generation includes: Read the attribute column based on the BO name; Replace the parameters in the SQL template INSERT INTO {BO name} ({attribute column}) VALUES (?); When a relational field exists, the WHERE {relational field} = associated BO.id condition is automatically generated.

[0011] As a preferred technical solution of the present invention, the model-driven method of the agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise includes: (a) Obtain user multimodal input through WeChat Work and extract WeChat ID, mobile phone number, and location information; (b) Load the LLM prompt template based on the current task type; (c) Match events according to the business event configuration library to drive RPA operations in the backend system; (d) Dynamically generate SQL based on the AttributeSet configuration table to perform business data operations.

[0012] As a preferred embodiment of the present invention, the prompt word template in step (b) includes business scenario keyword variables, including: $CURRENT_TASK: Current shortcut taskbar options; $LOCATION: The user's latitude and longitude; $USER_ROLE: Identifier for the farmer / driver / merchant role.

[0013] As a preferred embodiment of the present invention, the scenario prompt word template is designed for different business scenarios, including: Quotation scenario: "Retrieve product, price, and unit"; Contract scenario: "Retrieve supplier, product, quantity, and unit price"; Pest and disease scenario: "Extract plot location, crop type, and disease type".

[0014] As a preferred technical solution of the present invention, the model-driven method of the agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise includes the following steps: S1. Participants log in via WeChat for Business. S2. Voice input: “My name is XXX”; S3, Intelligent Agent WeChat Voice Login Authentication: The background scene event intelligent agent performs text recognition and name confirmation on the voice input. At the same time, it automatically extracts the WeChat ID and mobile phone number from the information from WeChat and matches them with the registered user name "XXX" and its WeChat ID and mobile phone number in the enterprise WeChat backend. S4. The backend uses the quick tasks function of WeChat Work to intelligently obtain the dynamic work tasks related to the current operator. The operator can then select a dynamic task item based on the work task currently in progress. S5. Participants collect information by scanning QR codes, taking photos, or making videos, depending on the different interactive tasks. S6. Participants input other relevant information about the task via voice (e.g., purchase action, type of goods, quantity, etc.). S7: The intelligent agent intelligently identifies information such as purchase, goods, and quantity based on the business context. S8. If necessary, the intelligent agent will automatically send task confirmation information, including key product categories and quantities, and confirm with the operator via WeChat. The operator can confirm by voice or by using the WeChat task reply button tool. S9. The intelligent agent receives the confirmed task information and interacts with the back-end agricultural and livestock products-food supply chain back-end service.

[0015] The beneficial effects of this invention are: 1. Compared to the traditional method of operators manually entering data into the software system after arriving at the office, this solution improves the timeliness of each business operation by at least half an hour, and often by a day or even several days. 2. For food supply chain business application systems, the support cycle for related food supply chain business expansion and refinement has been reduced from six months to one week or even one day, and the cost has also been greatly reduced. 3. A large number of participants who are not used to or have difficulty accessing the software system can conduct business interactions extensively, conveniently, and anytime and anywhere, fundamentally changing the problems of extensive management and inadequate monitoring of business processes in the supply chain such as agricultural product procurement and warehousing. Detailed Implementation

[0016] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Example 1

[0017] This invention discloses a voice interaction system and model-driven method for agricultural and livestock supply chains based on WeChat for Business. The technical solution adopted includes: Enterprise WeChat interaction module: used to obtain user input of voice, images, location information, WeChat ID, and mobile phone number; Large Model (LLM) service module: Parses input information based on pre-set contextualized prompt word templates and outputs structured JSON data; Scene event intelligence agent: Stores business event configuration library in JSON format, matches event definitions based on LLM output, and triggers backend business system operations and dataset calculation and processing logic through RPA engine; Data intelligence agent: Dynamically generates SQL statements based on the AttributeSet configuration table to realize the creation, deletion, modification, query and related queries of business objects.

[0018] The basic requirement for the integration and collaboration of different systems is to uniformly manage the identity account information (username, WeChat ID, mobile phone number) of each participant in order to facilitate identity verification. This is why mature registration and login, permission authentication, and log auditing technologies are used here.

[0019] This system assumes that all participants are there to complete business tasks; purely social interactions are not considered. Therefore, the quick taskbar in WeChat Work (a feature of WeChat Work) includes selections for frequently used business tasks, similar to a function menu, such as: 1) Quotation; 2) Electronic Contract.

[0020] Flexible rule configuration and parsing for task matching logic: Determine the current task based on the context of the interaction. For example, tasks at the buyer's site include returns and loading; tasks in the warehouse include product outbound and inbound; and if the purchasing personnel return from purchasing, the task in the warehouse is inbound.

[0021] As a preferred embodiment of the present invention, the business event configuration library includes the following fields: businessMessageID: A unique identifier for the event; action.TriggerAPP: Target business system; action.TriggerPageEvent: Target system function event; response.templateParams: Parameters for WeChat feedback templates.

[0022] As a preferred embodiment of the present invention, the AttributeSet configuration table includes the following fields: Business Object (BO) Name; Attribute name and data type; Relationship mapping fields are used to associate different business objects.

[0023] As a preferred embodiment of the present invention, the method for the data intelligence agent to achieve dynamic SQL generation includes: Read the attribute column based on the BO name; Replace the parameters in the SQL template INSERT INTO {BO name} ({attribute column}) VALUES (?); When a relational field exists, the WHERE clause `{relational field} = BO.id` is automatically generated. As a preferred technical solution of the present invention, the model-driven method of the agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise includes: (a) Obtain user multimodal input through WeChat Work and extract WeChat ID, mobile phone number, and location information; (b) Load the LLM prompt template based on the current task type; (c) Match events according to the business event configuration library to drive RPA operations in the backend system; (d) Dynamically generate SQL based on the AttributeSet configuration table to perform business data operations.

[0024] As a preferred embodiment of the present invention, the prompt word template in step (b) includes business scenario keyword variables, including: $CURRENT_TASK: Current shortcut taskbar options; $LOCATION: The user's latitude and longitude; $USER_ROLE: Identifier for the farmer / driver / merchant role.

[0025] As a preferred embodiment of the present invention, the scenario prompt word template is designed for different business scenarios, including: Quotation scenario: "Retrieve product, price, and unit"; Contract scenario: "Retrieve supplier, product, quantity, and unit price"; Pest and disease scenario: "Extract plot location, crop type, and disease type".

[0026] Traditional NLP (Natural Language Processing) technology has relatively low recognition accuracy for the diverse and ambiguous content of images, videos, and videos input by users. However, using large model services can achieve satisfactory information extraction results.

[0027] Because the video images input by users are related to the business scenario context, such as contract images, ID card photos, product photos, etc., the information to be extracted from the video images is different, and the prompt words are different when using the large model service.

[0028] Taking a contract image as an example, the prompt could be: "Please extract five pieces of information from the image below: product, unit, price, supplier, and contact person, and return them in JSON format: ******". Using Alibaba's Tongyi Qianwen (or Baidu's Wenxin Yiyan, ByteDance's Doubao, Tencent's Hunyuan, etc.) large model, the required information can be effectively returned.

[0029] As a preferred technical solution of the present invention, the model-driven method of the agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise includes the following steps: S1. Participants log in via WeChat for Business. S2. Voice input: “My name is XXX”; S3, Intelligent Agent WeChat Voice Login Authentication: The background scene event intelligent agent performs text recognition and name confirmation on the voice input. At the same time, it automatically extracts the WeChat ID and mobile phone number from the information from WeChat and matches them with the registered user name "XXX" and its WeChat ID and mobile phone number in the enterprise WeChat backend. S4. The backend uses the quick tasks function of WeChat Work to intelligently obtain the dynamic work tasks related to the current operator. The operator can then select a dynamic task item based on the work task currently in progress. S5. Participants collect information by scanning QR codes, taking photos, or making videos, depending on the different interactive tasks. S6. Participants input other relevant information about the task via voice (e.g., purchase action, type of goods, quantity, etc.). S7: The intelligent agent intelligently identifies information such as purchase, goods, and quantity based on the business context. S8. If necessary, the intelligent agent will automatically send task confirmation information, including key product categories and quantities, and confirm with the operator via WeChat. The operator can confirm by voice or by using the WeChat task reply button tool. S9. The intelligent agent receives the confirmed task information and interacts with the back-end agricultural and livestock products-food supply chain back-end service.

[0030] In the quick task bar of the operator's WeChat, different tasks can be selected. Here, we will use quotation as an example to describe the technical solution: If a participant chooses option 1) to quote a price, it means that he or she will provide price information, such as "our potatoes are 2.5 yuan per jin".

[0031] If a scenario event agent sends a message to a participant's WeChat account saying, "We are inquiring about prices, how much are your potatoes per pound?", and the participant replies, "Our potatoes are 2.5 yuan per pound" (example).

[0032] For the response information, the scene event intelligence system intelligently sorts out the key inquiry information, including product, price, and unit. Similarly, due to the diversity and ambiguity of language, traditional NLP (Natural Language Processing) has relatively low recognition accuracy, while using large model services can achieve satisfactory information extraction results.

[0033] Design prompt: "Please extract the product, price, and unit information from the sentence below and return it in JSON format: ******" When the query is invoked, ****** is replaced with a phrase like "Our potatoes are 2.5 yuan per jin" entered by the participant via WeChat. Using Alibaba's Tongyi Qianwen (or Baidu's Wenxin Yiyan, ByteDance's Doubao, Tencent's Hunyuan, etc.) large model, the required information can be effectively returned. After obtaining the information, the participant's quote is saved as the quote for this inquiry.

[0034] The above examples illustrate voice and text input. Below, we will explain the implementation mechanism for tasks requiring image input: For example, in a task where farmers collect samples from wheat fields to check for leaf diseases and pests, participants need to take several photos of the wheat leaves and upload them to WeChat: "These are photos of the wheat growth and leaves in plot XX..." (Photo 1, Photo 2, Photo 3, Video 1) Based on the business context, the backend identified that the task was to collect photos of the wheat field's growth and whether the wheat leaves were affected by pests or diseases.

[0035] The backend identifies the location information carried in the information packet, locates and matches the wheat field, and recognizes the photo as wheat.

[0036] For pest and disease identification, according to the processing logic defined in this application scenario, the results are further forwarded to the pest and disease diagnosis experts for process identification feedback.

[0037] Through WeChat Mini Program services, the scene event intelligent agent can obtain several basic pieces of information transmitted from the front-end WeChat mobile phone: a) WeChat ID b) Mobile phone number c) Latitude and longitude location d) Required identity token e) Other information provided by participants. Example 2

[0038] Data model-driven agent technology is the core of the data agent module in this solution. The following is an algorithm description of this technology: 1) The attribute structure of each data object and business object is stored in a database table, called AttributeSet. As shown below, the attribute set content of the two business objects, organization structure (organ) and personnel (person), is stored.

[0039]

[0040] 2) Based on template-driven SQL access technology, automatically generate SQL templates for operations on organizational structure, personnel, etc. AddBOTemplate: INSERT INTO person (&1) VALUES(&2).

[0041] 3) When adding a person, the above template of the person object is automatically read, and the &1 and &2 parameters are replaced according to the attributes of the added object, thereby dynamically generating an executable SQL and handing it over to the SQL engine, such as MySQL, for execution.

[0042] 4) Similarly, the above templates can be generated for various operations such as deletion, modification, and query. During execution, the executable SQL statements can be dynamically generated based on the AttributeSet configuration information mentioned above, according to the different types of business objects, and then handed over to the database engine for execution.

[0043] 5) For the relationships between various business objects, configure the following relation schema in the modeling process. For example, the attributes of a person include the OUID attribute, which indicates that the person belongs to the corresponding department or that the corresponding department protects the person.

[0044] When performing logical join queries, you can perform queries like "the personnel included in a certain organizational structure," which corresponds to SQL similar to the following: BOAIncludeBOBQueryTemplate: SELECT &1 FROM _person_ WHERE person.OUID = organ.id When executing a query, you can update &1 based on the returned value; if you want to return all values, replace &1 with "*".

[0045] 6) Similarly, for the relationship definition of all other types of business objects, the above-mentioned query and object operation templates can be generated accordingly. When performing operations on a certain object and related objects, the corresponding template is replaced with the actual executable SQL according to the object's AttributeSet information and the above-mentioned association configuration, and handed over to the database engine for execution.

[0046] 7) This technology enables data intelligence agents to adapt to changes in business objects and their relationships. Only the definitions of the business read / write attribute sets in the configuration library and the relationship configurations for different business objects need to be adjusted. Operations such as object querying / adding / deleting / updating, as well as complex relationship logic operations, remain unchanged. This ensures the stability of core services. Example 3 This system supports business functions and process examples. The processes and interactions vary greatly depending on the specific business management process. Here, we will use... Taking the interaction of three stages—1) inquiry and quotation; 2) electronic contract; and 3) procurement and warehousing—as an example, we can illustrate the flexible interactive configuration of the scenario event intelligent agent.

[0047] Inquiry and quotation: { "businessMessagaID": "Inquiry about suppliers of agricultural and livestock products" "name": "Inquiry about suppliers of agricultural and livestock products" "message":"Purchase $ product, $ quantity, how much per kilogram".

[0048] "action":{"TriggerAPP":"Procurement Management", "TriggerPage":"submitQuotationPage", "TriggerPageEvent":"submitQuotationInfor"}.

[0049] "response":{"templateID":"Supplier Inquiry Response"} "BOID":"Quotation" "tempalteParams": "Supplier Name, Product, Quantity, Price" } Electronic contracts: { "businessMessagaID":"Send contracts to buyers", "name":"Send contract to supplier", "message":"Customer, Product, Quantity, Price, Contact Person, Contract Attachments".

[0050] "action":{ "TriggerAPP":"Contract customer confirmation", "TriggerPage":"submitContractPage ", "TriggerPageEvent":"submitContractInfor"}.

[0051] "response":{ "templateID":"ContractTemplateID", "BOID":"Contract", "tempalteParams":"Customer, Product, Quantity, Price" } Purchase and warehousing: {"businessMessagaID":"Post-Purchase Warehousing Notification"} "name":"Notification of Warehousing After Purchase" "message": "Supplier, Product, Quantity, Purchase Confirmation Image" "action":{ "TriggerAPP":"Inventory Procurement Management"} "TriggerPage":"submitStockInputPage " "TriggerPageEvent":"submitStockInputNotification"} "response":{} } Components not described in detail in this article are existing technologies.

[0052] While the specific embodiments of the present invention have been described in detail above, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention, and modifications or variations without creative effort are still within the protection scope of the present invention.

Claims

1. A voice interaction system for the agricultural and livestock supply chain based on WeChat for Business, characterized in that: include: Enterprise WeChat interaction module: used to obtain user input of voice, images, location information, WeChat ID, and mobile phone number; Large Model (LLM) service module: Parses input information based on pre-set contextualized prompt word templates and outputs structured JSON data; Scene event intelligence agent: Stores business event configuration library in JSON format, matches event definitions based on LLM output, and triggers backend business system operations through RPA engine; Data intelligence agent: Based on the AttributeSet configuration table, it dynamically generates SQL statements to realize the logic of adding, deleting, modifying and querying business objects, as well as related queries and dataset calculation and processing.

2. The agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise as described in claim 1, characterized in that, The business event configuration library contains the following fields: businessMessageID: A unique identifier for the event; action.TriggerAPP: Target business system; action.TriggerPageEvent: Target system function event; response.templateParams: Parameters for WeChat feedback templates.

3. The agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise as described in claim 1, characterized in that, The AttributeSet configuration table includes the following fields: Business Object (BO) Name; Attribute name and data type; Relationship mapping fields are used to associate different business objects.

4. The agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise as described in claim 1, characterized in that, The method for the data intelligence agent to achieve dynamic SQL generation includes: Read the attribute column based on the BO name; Replace the parameters in the SQL template INSERT INTO {BO name} ({attribute column}) VALUES (?); When a relational field exists, the WHERE {relational field} = associated BO.id condition is automatically generated.

5. The model-driven method for a voice interaction system for agricultural and livestock supply chains based on WeChat Work, as described in any one of claims 1-4, is characterized in that... include: (a) Obtain user multimodal input through WeChat Work and extract WeChat ID, mobile phone number, and location information; (b) Load the LLM prompt template based on the current task type; (c) Match events according to the business event configuration library to drive RPA operations in the backend system; (d) Dynamically generate SQL based on the AttributeSet configuration table to perform business data operations.

6. The model-driven method for the agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise as described in claim 5, characterized in that, The prompt template in step (b) includes business scenario keyword variables, including: $CURRENT_TASK: Current shortcut taskbar options; $LOCATION: The user's latitude and longitude; $USER_ROLE: Identifier for the farmer / driver / merchant role.

7. The model-driven method for the agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise as described in claim 6, characterized in that, The scenario prompt templates are designed for different business scenarios, including: Quotation scenario: "Retrieve product, price, and unit"; Contract scenario: "Retrieve supplier, product, quantity, and unit price"; Pest and disease scenario: "Extract plot location, crop type, and disease type".

8. The model-driven method for the agricultural and livestock supply chain voice interaction system based on WeChat for Enterprise as described in claim 7, characterized in that, Includes the following steps: S1. Participants log in via WeChat for Business. S2. Voice input "My name is XXX"; S3, Intelligent Agent WeChat Voice Login Authentication: The background scene event intelligent agent performs text recognition and name confirmation on the voice input. At the same time, it automatically extracts the WeChat ID and mobile phone number from the information from WeChat and matches them with the registered user name "Li Fang" and her WeChat ID and mobile phone number in the enterprise WeChat backend. S4. The backend uses the quick tasks function of WeChat Work to intelligently obtain the dynamic work tasks related to the current operator. The operator can then select a dynamic task item based on the work task currently in progress. S5. Participants collect information by scanning QR codes, taking photos, or making videos, depending on the different interactive tasks. S6. Participants input other relevant information about the task via voice (e.g., purchase action, type of goods, quantity, etc.). S7: The intelligent agent intelligently identifies information such as purchase, goods, and quantity based on the business context. S8. If necessary, the intelligent agent will automatically send task confirmation information, including key product categories and quantities, and confirm with the operator via WeChat. The operator can confirm by voice or by using the WeChat task reply button tool. S9. The intelligent agent receives the confirmed task information and interacts with the back-end agricultural and livestock products-food supply chain back-end service.