Supermarket customer service model and system based on generative artificial intelligence
By training generative artificial intelligence models and processing structured data, the problems of untimely customer service response and lack of professionalism in unmanned supermarkets have been solved, achieving efficient and intelligent customer service and reducing labor costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-04-17
AI Technical Summary
Unmanned supermarkets suffer from problems such as untimely response to user requests, insufficient professionalism of customer service, and difficulty in reducing labor costs. Existing intelligent customer service models cannot meet the customer service needs of unmanned supermarkets, especially in terms of semantic understanding and real-time data linkage.
By employing a generative artificial intelligence model, historical data is preprocessed and scarce samples are supplemented to generate instruction-response pairs and calculate the total loss. The initial model is then trained, a structured knowledge graph is constructed, and intent classification and response adjustment are performed to achieve intelligent customer service.
It improves the intelligence and efficiency of customer service in unmanned supermarkets, reduces human intervention, and enhances user satisfaction and operational efficiency.
Smart Images

Figure CN121880501A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a supermarket customer service model and system based on generative artificial intelligence. Background Technology
[0002] As a core form of new retail, unmanned supermarkets boast 24-hour operation and low labor costs as their core advantages. However, their unmanned nature also brings the following customer service pain points: Untimely response to user requests: During the shopping process, users often encounter problems such as product location search, self-checkout failure, and price disputes, and still need to rely on remote human customer service. During peak hours (such as weekends and holidays), long queues are likely to occur, affecting the shopping experience. Insufficient customer service professionalism: Unmanned supermarkets have a wide variety of products and complex equipment types. Human customer service representatives need to master knowledge of all product categories and equipment troubleshooting skills, which results in high training costs and is prone to errors in response due to untimely information updates. Labor costs are difficult to reduce: In order to cover 24-hour service, multiple shifts of remote customer service need to be configured, resulting in high long-term operating costs, which contradicts the original intention of unmanned supermarkets to reduce costs and increase efficiency.
[0003] Existing general-purpose intelligent customer service models are not optimized for unmanned supermarket scenarios, and have problems such as semantic understanding bias (e.g., unable to distinguish between "checking milk prices" and "complaining about inconsistent milk prices"), responses that are detached from actual business needs, and inability to link with real-time data (e.g., displaying outdated information when checking inventory), making it difficult to meet the customer service needs of unmanned supermarkets. Summary of the Invention
[0004] This invention aims to at least solve one of the technical problems existing in related technologies. To this end, this invention provides a supermarket customer service model and system based on generative artificial intelligence, enabling the provision of AI customer service that is more suitable for unattended supermarket scenarios.
[0005] This invention provides a supermarket customer service model based on generative artificial intelligence, comprising: S1: Obtain historical data, preprocess the historical data and supplement it with scarce sample data to obtain the target historical data; S2: Generate multiple command-response pairs based on the target's historical data, calculate the information noise contrast estimation and cross-entropy loss of the command-response pairs, and calculate the total loss of the command-response pairs through the information noise contrast estimation and cross-entropy loss. S3: Obtain the initial model, train the initial model using the total loss to obtain the target model, construct a structured knowledge graph, process the target historical data using the structured knowledge graph to obtain structured data; S4: Obtain user input, classify the user input intent to obtain classified user input, and the target model generates an initial response and outputs it based on the classified user input and structured data; S5: Obtain the response feedback obtained from the initial response, adjust the initial response based on the response feedback to obtain the target response, and complete the supermarket customer service work through the target response.
[0006] According to the supermarket customer service model based on generative artificial intelligence provided by the present invention, step S1 further includes: S11: Obtain the historical data, remove invalid content and annotate entity information in the historical data to obtain intermediate historical data; S12: Determine the scarce sample type, obtain scarce data samples based on the scarce sample type, add the scarce data samples to the intermediate historical data, and obtain the target historical data.
[0007] According to the supermarket customer service model based on generative artificial intelligence provided by the present invention, step S2 further includes: S21: Generate multiple instruction response pairs including correct instruction response pairs and incorrect instruction response pairs based on the target historical data, obtain the response pair embedding vector of the instruction response pairs, and calculate the information noise contrast estimation through the response pair embedding vector; S22: Calculate the character cross-entropy loss for each character in the instruction response pair, calculate the cross-entropy loss based on the character cross-entropy loss, determine the loss weight coefficient, and calculate the total loss of the instruction response pair based on the loss weight coefficient, information noise contrast estimation, and cross-entropy loss.
[0008] According to a supermarket customer service model based on generative artificial intelligence provided by the present invention, in step S3, an artificial intelligence model is obtained as the initial model, and the initial model learns the instruction response pair according to the total loss and adjusts the internal parameters to obtain the target model.
[0009] According to a supermarket customer service model based on generative artificial intelligence provided by the present invention, in step S4, an initial classification is determined, and the user input is categorized according to the initial classification to obtain the categorized user input. The target model calls the structured data and generates the initial response according to the categorized user input.
[0010] According to a supermarket customer service model based on generative artificial intelligence provided by the present invention, in step S5, when the initial response is adjusted by human intervention, the obtained target response is marked as a human intervention response, and a human intervention response pair is generated based on the human intervention response. The human intervention response pair is added to the historical data and the historical data is updated.
[0011] This invention also provides a supermarket customer service system based on generative artificial intelligence, comprising: Data processing module: used to acquire historical data, preprocess the historical data and supplement it with scarce sample data to obtain the target historical data; Total loss calculation module: used to generate multiple command-response pairs based on target historical data, calculate the information noise contrast estimation and cross-entropy loss of the command-response pairs, and calculate the total loss of the command-response pairs through information noise contrast estimation and cross-entropy loss; Structured data module: Used to obtain the initial model, train the initial model with the total loss to obtain the target model, construct a structured knowledge graph, and process the target historical data through the structured knowledge graph to obtain structured data; Initial response module: used to acquire user input, classify the intent of the user input, obtain classified user input, and the target model generates and outputs the initial response based on the classified user input and structured data; Target Response Module: This module is used to obtain response feedback based on the initial response, adjust the initial response based on the feedback to obtain the target response, and complete the supermarket customer service work through the target response.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a supermarket customer service model based on generative artificial intelligence as described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a supermarket customer service model based on generative artificial intelligence as described above.
[0014] The present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer is able to perform the steps of a supermarket customer service model based on generative artificial intelligence as described above.
[0015] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: This invention provides a supermarket customer service model and system based on generative artificial intelligence. By setting specific instruction-response pairs, the total loss of the instruction-response pairs can be obtained. The initial model is then trained based on the total loss, enabling the trained target model to generate more targeted responses that are closer to the correct answer. This addresses some of the unique problems faced in the field of supermarket customer service, providing customers with a more intelligent supermarket customer service model that requires less human intervention, thereby further improving the operational efficiency of unmanned supermarkets.
[0016] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating a supermarket customer service model based on generative artificial intelligence provided by the present invention.
[0019] Figure 2 This is a schematic diagram of the structure of a supermarket customer service system based on generative artificial intelligence provided by the present invention.
[0020] Figure 3 This is a schematic diagram of the structure of a supermarket customer service device based on generative artificial intelligence provided by the present invention.
[0021] Figure label: 100. Data processing module; 200. Total loss calculation module; 300. Structured data module; 400. Initial response module; 500. Target response module; 810. Processor; 820. Communication interface; 830. Memory; 840. Communication bus. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but cannot be used to limit the scope of this invention.
[0023] In the description of the embodiments of the present invention, it should be noted that the terms "first", "second" and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0024] In the description of the embodiments of the present invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of the present invention based on the specific circumstances.
[0025] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0026] The following is combined Figures 1 to 3 Specific embodiments of the present invention are described below. Figure 1 This is a flowchart illustrating a supermarket customer service model based on generative artificial intelligence provided by the present invention, including: S1: Obtain historical data, preprocess the historical data and supplement it with scarce sample data to obtain the target historical data; Furthermore, the objective of this stage is to preprocess historical data and supplement scarce sample data to obtain the target historical data. Specifically, step S1 further includes: S11: Obtain the historical data, remove invalid content and annotate entity information in the historical data to obtain intermediate historical data; S12: Determine the scarce sample type, obtain scarce data samples based on the scarce sample type, add the scarce data samples to the intermediate historical data, and obtain the target historical data.
[0027] The specific implementation method for the above steps in this embodiment is as follows: First, historical data needs to be acquired. In this embodiment, historical data refers to dialogue records, work orders, and manual data containing product information (such as category, price, shelf life, and storage location), equipment malfunctions (such as self-checkout machine errors, weighing station errors, and access control failures), membership benefits (such as points inquiry and discount redemption), and after-sales disputes (such as price discrepancies and returns / exchanges). Next, the historical data needs to be cleaned of invalid content, including duplicate inquiries, meaningless input, and filler words. Then, entity information annotation is performed on the historical data, which involves labeling the problem solved by each piece of historical data, as well as the serial numbers, IDs, and identification codes of the various products and equipment involved. Furthermore, outdated product inventory and price information needs to be corrected. This completes the entity information annotation, resulting in intermediate historical data.
[0028] During the daily operation of a supermarket, new products and equipment may be introduced. Historical data may lack information related to these new products and equipment; such data constitutes a scarce sample type. For scarce samples, it is necessary to generate data covering various issues and solutions encountered in the historical data, i.e., scarce data samples, by referencing the format of historical data. These scarce data samples also need to be labeled with entity information. Adding the scarce data samples to the intermediate historical data yields the target historical data.
[0029] S2: Generate multiple command-response pairs based on the target's historical data, calculate the information noise contrast estimation and cross-entropy loss of the command-response pairs, and calculate the total loss of the command-response pairs through the information noise contrast estimation and cross-entropy loss. Furthermore, the objective of this stage is to calculate the information noise contrast estimation and cross-entropy loss of the instruction-response pair, thereby calculating the total loss of the instruction-response pair. Specifically, step S2 further includes: S21: Generate multiple instruction response pairs including correct instruction response pairs and incorrect instruction response pairs based on the target historical data, obtain the response pair embedding vector of the instruction response pairs, and calculate the information noise contrast estimation through the response pair embedding vector; S22: Calculate the character cross-entropy loss for each character in the instruction response pair, calculate the cross-entropy loss based on the character cross-entropy loss, determine the loss weight coefficient, and calculate the total loss of the instruction response pair based on the loss weight coefficient, information noise contrast estimation, and cross-entropy loss.
[0030] The specific implementation method for the above steps in this embodiment is as follows: First, instruction-response pairs need to be generated based on historical data. These pairs consist of potential customer inquiries and their corresponding responses. In actual supermarket operations, confusion can easily arise between different products, especially similar products from different brands, and between similar questions, such as refunds and returns / exchanges. Therefore, multiple instruction-response pairs need to be generated. These include one correct instruction-response pair containing the correct answer, and multiple incorrect instruction-response pairs containing incorrect answers that address the confused questions. For example, an answer regarding product location might suggest a similar product from the same brand, or an answer regarding refunds might suggest returns / exchanges. The embedding vector of the correct instruction-response pair is then calculated. and the embedding vector of the i-th error instruction response pair This yields the response pair embedding vectors for each instruction-response pair, allowing for the computation of information-noise contrast estimation for each instruction-response pair. : Where sim() calculates the cosine similarity of the content within the parentheses, k is the total number of erroneous instruction response pairs, τ is a pre-defined temperature coefficient, and q is the embedding vector of the current instruction response pair.
[0031] Next, the cross-entropy loss of each character in the instruction response pair needs to be calculated, which is the character cross-entropy loss. After obtaining the cross-entropy loss of all characters in the instruction response pair, the sum of the cross-entropy losses of all characters is calculated, and the sum is divided by the total number of characters in the instruction response pair to obtain the cross-entropy loss. Then, the weights of the cross-entropy loss and the information-noise contrast estimation are determined, i.e., the loss weight coefficients. Here, the weight of the cross-entropy loss is 0.3, and the weight of the information-noise contrast estimation is 0.7. This allows the calculation of the total loss for the instruction-response pair. : S3: Obtain the initial model, train the initial model using the total loss to obtain the target model, construct a structured knowledge graph, process the target historical data using the structured knowledge graph to obtain structured data; Furthermore, the objective of this stage is to train the target model and process the target historical data using a structured knowledge graph to obtain structured data. Specifically, in step S3, an artificial intelligence model is obtained as the initial model. The initial model learns from the instruction response pairs based on the total loss and adjusts its internal parameters to obtain the target model.
[0032] The specific implementation method for the above steps in this embodiment is as follows: First, an existing AI model needs to be acquired as the initial model. This AI model can be a commercially available open-source large language model. All instruction-response pairs and their corresponding total losses are input into the initial model, and the instruction-response pairs with the smaller total loss are prioritized for learning. The goal is to minimize the total loss of the generated answers. The initial model is trained using historical target data. During training, a mode of instruction fine-tuning + feedback alignment is used to optimize the initial model's accuracy in recognizing intentions in the unmanned supermarket domain. Adjusting the internal parameters yields the target model. During training, technicians can also score the answers given by the initial model, and the initial model is trained to achieve higher scores.
[0033] Subsequently, a structured knowledge graph is constructed, comprising a product layer, a device layer, and a membership layer. In this embodiment, the presentation format is as follows: Product layer: Product ID - Name - Price - Shelf location - Shelf life; Device layer: Device ID - Type - Fault code - Troubleshooting steps; Membership layer: Membership level - Points rules - Exclusive discounts. The content of the target historical data is then transformed according to the structured knowledge graph format to obtain structured data.
[0034] S4: Obtain user input, classify the user input intent to obtain classified user input, and the target model generates an initial response and outputs it based on the classified user input and structured data; Furthermore, the objective of this stage is to obtain categorized user input, thereby generating and outputting an initial response. Specifically, in step S4, an initial category is determined, and the user input is categorized according to the initial category to obtain the categorized user input. The target model then calls the structured data based on the categorized user input and generates the initial response.
[0035] The specific implementation method for the above steps in this embodiment is as follows: First, user input, i.e., the questions input by the user, needs to be obtained. Then, an initial category needs to be determined for the user input. In this embodiment, the initial categories include product-related, equipment malfunction, membership service, and after-sales disputes. The target model determines which category the user input belongs to based on its semantics, thus completing the classification and obtaining categorized user input, which is essentially labeling the user input with a category tag.
[0036] Next, based on the category tags, relevant information needs to be confirmed. For example, when the category tag is "after-sales dispute," data needs to be retrieved to confirm whether the user has purchased the mentioned product. When it involves membership services, user membership data and points data need to be retrieved. After confirming the relevant information, the target model can generate an initial response based on the information in the structured data. Here, since the supermarket's inventory, prices, and discounts are constantly changing during operation, the relevant information in the structured data needs to be updated before generating the initial response.
[0037] S5: Obtain the response feedback obtained from the initial response, adjust the initial response based on the response feedback to obtain the target response, and complete the supermarket customer service work through the target response.
[0038] Furthermore, the goal of this stage is to adjust the initial response to obtain the target response, thereby completing the supermarket customer service work. Specifically, in step S5, when the initial response is adjusted using manual intervention, the obtained target response is marked as a manual intervention response, and a manual intervention response pair is generated based on the manual intervention response. The manual intervention response pair is then added to the historical data, and the historical data is updated.
[0039] The specific implementation method for the above steps in this embodiment is as follows: After receiving the initial response, the user can provide feedback based on it and input it into the target model. This feedback could be either a solution to the problem, an inability to solve it, or a follow-up question. If the feedback is satisfactory, the initial response is adopted as the target response; otherwise, it needs to be adjusted based on the feedback. The specific adjustment method depends on the content of the feedback. If the user is emotionally charged or provides repeated feedback, manual intervention is required to adjust the initial response. If it's just further questioning, the target model adjusts the initial response automatically. When adjusting the initial response manually, the adjusted target response is marked as a manual intervention response, and the user's input is paired with the manual intervention response to obtain manual intervention response pairs. Once a certain number of manual intervention response pairs are accumulated, they are added to historical data for further adjustment and training of the target model.
[0040] This invention can effectively understand the user's intent and provide accurate responses and troubleshooting methods, greatly improving user satisfaction.
[0041] The present invention provides a supermarket customer service device based on generative artificial intelligence. The supermarket customer service device based on generative artificial intelligence described below can be referred to in correspondence with the supermarket customer service model based on generative artificial intelligence described above.
[0042] Figure 2 An example is a schematic diagram of the structure of a supermarket customer service system based on generative artificial intelligence, such as... Figure 2 As shown, a supermarket customer service model based on generative artificial intelligence, as described above, includes: Data processing module 100: used to acquire historical data, preprocess the historical data and supplement it with scarce sample data to obtain the target historical data; Total loss calculation module 200: used to generate multiple command-response pairs based on target historical data, calculate the information noise contrast estimation and cross-entropy loss of the command-response pairs, and calculate the total loss of the command-response pairs through information noise contrast estimation and cross-entropy loss; Structured Data Module 300: Used to acquire the initial model, train the initial model using the total loss to obtain the target model, construct a structured knowledge graph, and process the target historical data using the structured knowledge graph to obtain structured data; Initial response module 400: Used to acquire user input, classify the intent of the user input, obtain classified user input, and the target model generates and outputs an initial response based on the classified user input and structured data; Target Response Module 500: Used to obtain response feedback based on the initial response, adjust the initial response based on the response feedback to obtain the target response, and complete the supermarket customer service work through the target response.
[0043] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call a computer program in the memory 830 to execute a supermarket customer service model based on generative artificial intelligence, which includes: S1: Obtain historical data, preprocess the historical data and supplement it with scarce sample data to obtain the target historical data; S2: Generate multiple command-response pairs based on the target's historical data, calculate the information noise contrast estimation and cross-entropy loss of the command-response pairs, and calculate the total loss of the command-response pairs through the information noise contrast estimation and cross-entropy loss. S3: Obtain the initial model, train the initial model using the total loss to obtain the target model, construct a structured knowledge graph, process the target historical data using the structured knowledge graph to obtain structured data; S4: Obtain user input, classify the user input intent to obtain classified user input, and the target model generates an initial response and outputs it based on the classified user input and structured data; S5: Obtain the response feedback obtained from the initial response, adjust the initial response based on the response feedback to obtain the target response, and complete the supermarket customer service work through the target response.
[0044] Furthermore, when the computer program in the aforementioned memory 830 can be implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0045] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to execute a supermarket customer service model based on generative artificial intelligence provided by the methods described above, the model comprising: S1: Obtain historical data, preprocess the historical data and supplement it with scarce sample data to obtain the target historical data; S2: Generate multiple command-response pairs based on the target's historical data, calculate the information noise contrast estimation and cross-entropy loss of the command-response pairs, and calculate the total loss of the command-response pairs through the information noise contrast estimation and cross-entropy loss. S3: Obtain the initial model, train the initial model using the total loss to obtain the target model, construct a structured knowledge graph, process the target historical data using the structured knowledge graph to obtain structured data; S4: Obtain user input, classify the user input intent to obtain classified user input, and the target model generates an initial response and outputs it based on the classified user input and structured data; S5: Obtain the response feedback obtained from the initial response, adjust the initial response based on the response feedback to obtain the target response, and complete the supermarket customer service work through the target response.
[0046] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the aforementioned supermarket customer service model based on generative artificial intelligence, the model comprising: S1: Obtain historical data, preprocess the historical data and supplement it with scarce sample data to obtain the target historical data; S2: Generate multiple command-response pairs based on the target's historical data, calculate the information noise contrast estimation and cross-entropy loss of the command-response pairs, and calculate the total loss of the command-response pairs through the information noise contrast estimation and cross-entropy loss. S3: Obtain the initial model, train the initial model using the total loss to obtain the target model, construct a structured knowledge graph, process the target historical data using the structured knowledge graph to obtain structured data; S4: Obtain user input, classify the user input intent to obtain classified user input, and the target model generates an initial response and outputs it based on the classified user input and structured data; S5: Obtain the response feedback obtained from the initial response, adjust the initial response based on the response feedback to obtain the target response, and complete the supermarket customer service work through the target response.
[0047] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0048] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A supermarket customer service model based on generative artificial intelligence, characterized in that, include: S1: Obtain historical data, preprocess the historical data and supplement it with scarce sample data to obtain the target historical data; S2: Generate multiple command-response pairs based on the target's historical data, calculate the information noise contrast estimation and cross-entropy loss of the command-response pairs, and calculate the total loss of the command-response pairs through the information noise contrast estimation and cross-entropy loss. S3: Obtain the initial model, train the initial model using the total loss to obtain the target model, construct a structured knowledge graph, process the target historical data using the structured knowledge graph to obtain structured data; S4: Obtain user input, classify the user input intent to obtain classified user input, and the target model generates an initial response and outputs it based on the classified user input and structured data; S5: Obtain the response feedback obtained from the initial response, adjust the initial response based on the response feedback to obtain the target response, and complete the supermarket customer service work through the target response.
2. The supermarket customer service model based on generative artificial intelligence according to claim 1, characterized in that, Step S1 further includes: S11: Obtain the historical data, remove invalid content and annotate entity information in the historical data to obtain intermediate historical data; S12: Determine the scarce sample type, obtain scarce data samples based on the scarce sample type, add the scarce data samples to the intermediate historical data, and obtain the target historical data.
3. A supermarket customer service model based on generative artificial intelligence according to claim 1, characterized in that, Step S2 further includes: S21: Generate multiple instruction response pairs including correct instruction response pairs and incorrect instruction response pairs based on the target historical data, obtain the response pair embedding vector of the instruction response pairs, and calculate the information noise contrast estimation through the response pair embedding vector; S22: Calculate the character cross-entropy loss for each character in the instruction response pair, calculate the cross-entropy loss based on the character cross-entropy loss, determine the loss weight coefficient, and calculate the total loss of the instruction response pair based on the loss weight coefficient, information noise contrast estimation, and cross-entropy loss.
4. A supermarket customer service model based on generative artificial intelligence according to claim 1, characterized in that, In step S3, an artificial intelligence model is obtained as the initial model. The initial model learns the instruction response pair based on the total loss and adjusts its internal parameters to obtain the target model.
5. A supermarket customer service model based on generative artificial intelligence according to claim 1, characterized in that, In step S4, an initial classification is determined, and the user input is categorized according to the initial classification to obtain the categorized user input. The target model then calls the structured data based on the categorized user input and generates the initial response.
6. A supermarket customer service model based on generative artificial intelligence according to claim 1, characterized in that, In step S5, when the initial response is adjusted using human intervention, the obtained target response is marked as a human intervention response, and a human intervention response pair is generated based on the human intervention response. The human intervention response pair is then added to the historical data and the historical data is updated.
7. A supermarket customer service system based on generative artificial intelligence, used to execute a supermarket customer service model based on generative artificial intelligence as described in any one of claims 1 to 6, characterized in that, include: Data processing module: used to acquire historical data, preprocess the historical data and supplement it with scarce sample data to obtain the target historical data; Total loss calculation module: used to generate multiple command-response pairs based on target historical data, calculate the information noise contrast estimation and cross-entropy loss of the command-response pairs, and calculate the total loss of the command-response pairs through information noise contrast estimation and cross-entropy loss; Structured data module: Used to obtain the initial model, train the initial model with the total loss to obtain the target model, construct a structured knowledge graph, and process the target historical data through the structured knowledge graph to obtain structured data; Initial response module: used to acquire user input, classify the user input intent, obtain classified user input, and the target model generates and outputs the initial response based on the classified user input and structured data; Target Response Module: This module is used to obtain response feedback based on the initial response, adjust the initial response based on the feedback to obtain the target response, and complete the supermarket customer service work through the target response.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of a supermarket customer service model based on generative artificial intelligence as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of a supermarket customer service model based on generative artificial intelligence as described in any one of claims 1 to 6.
10. A computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, characterized in that, When the program instructions are executed by the computer, the computer is able to perform the steps of a supermarket customer service model based on generative artificial intelligence as described in any one of claims 1 to 6.