Nutrition information processing method of intelligent voice food scale, food scale, program product and storage medium
The smart voice-activated food scale acquires data through weighing and voice modules. When the network is normal, it generates a nutrition analysis report using a cloud server. When the network is interrupted, it generates basic nutrition values using a local database. This solves the problems of cumbersome input and inaccurate recognition in existing technologies, and achieves efficient and stable acquisition of nutrition information.
Patent Information
- Application Number
- CN202511131421.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-11-28
AI Technical Summary
Existing smart nutrition scales have cumbersome and inefficient methods for inputting food types when obtaining nutritional information. Handwriting recognition has low accuracy, and while mobile selection is convenient, it still requires effort, resulting in low operational efficiency.
The smart voice-controlled food scale uses a weighing module to obtain weight information and a voice module to obtain voice signals. When the network is normal, the data is sent to the cloud server for parsing and database retrieval to generate a nutrition analysis report. When the network is interrupted, the scale uses the local database to generate basic nutrition values and updates the display after the network is restored, allowing for flexible switching between network conditions.
Users can obtain food nutrition information without manual input, improving operational efficiency and user experience, ensuring stable and convenient information access in different network scenarios, and enhancing the authority and reliability of the data.
Smart Images

Figure CN121034548A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent health device technology, and in particular to a method for processing nutritional information of an intelligent voice food scale, the food scale, the program product, and the storage medium. Background Technology
[0002] As people become increasingly health-conscious and pay more attention to food nutrition information, smart nutrition scales are being used more and more widely in daily life. They can help people quickly know the various nutrients in the food they are measuring, thus better controlling their dietary health. Whether in the home kitchen or in some health management settings, smart nutrition scales play an important role.
[0003] Currently available smart nutrition scales employ different methods for inputting crucial food category information when obtaining nutritional data. Some scales are equipped with a physical keyboard, requiring users to manually search and input the food name letter by letter, relying on their memory, to inform the scale what food is being measured. Others support handwriting input, allowing users to write the food name in a designated area, which is then converted into machine-readable information by the scale's built-in recognition system. Still others connect to mobile applications on smartphones and tablets, allowing users to manually select from a list of food categories and names within the app to determine the food category.
[0004] However, these food input methods have revealed numerous problems in practical use. When using keyboard input, the sheer number of food names requires users to spend a significant amount of time searching and accurately entering them, making the entire process extremely cumbersome, especially in scenarios requiring quick access to nutritional information, severely impacting efficiency. Handwriting input suffers from inconsistent recognition accuracy; the system often struggles to accurately identify illegible handwriting or obscure food names, resulting in inaccurate generation of corresponding nutritional information. While mobile application-based input offers some convenience compared to the previous two methods, users still need to expend considerable effort manually filtering through a vast array of food options, making the process inefficient. Summary of the Invention
[0005] This application provides a method for processing nutritional information of a smart voice food scale, a food scale, a program product, and a storage medium. This allows users to obtain nutritional information simply by speaking the type of food, eliminating the need for complex manual input. This simplifies the process, improves efficiency, and enables users to conveniently and stably obtain nutritional information about food in different network scenarios, thereby enhancing the user experience and product practicality.
[0006] In a first aspect, this application provides a method for processing nutritional information in a smart voice-activated food scale, comprising: when a weighing module detects an object placed on it, the processing module activates the weighing module to acquire weight information and the voice module to acquire a voice signal; when the network connection is normal, the processing module sends the weight information and the voice signal to a cloud server; the processing module receives a nutritional analysis report from the cloud server, the cloud server parses the voice signal to obtain a first recognition result; using the first recognition result and the corresponding weight information as input, the processing module retrieves and calculates from an associated cloud-based food nutrition database; the processing module sends the nutritional analysis report to a display module for display; when the network connection is interrupted, the processing module recognizes the voice signal to obtain a second recognition result, and based on the second recognition result and the corresponding weight information, retrieves and calculates from a preset local food nutrition database to generate basic nutritional values; the local food nutrition database has less data than the cloud-based food nutrition database; the processing module sends the basic nutritional values to the display module for display; when the network connection is restored, the processing module receives an updated nutritional analysis report from the cloud server and sends the updated nutritional analysis report to the display module for updating the display.
[0007] By adopting the above technical solution, the processing module is responsible for coordinating the operation of various functional modules. After the weighing module acquires weight information and the voice module acquires voice signals, when the network is normal, the processing module sends both to the cloud server. Utilizing its parsing and database resources, the processing module generates a nutritional analysis report based on the voice signal parsing results and weight information, and then sends it back for display, fully leveraging the advantages of the cloud to ensure comprehensive and accurate information. When the network is interrupted, the processing module generates basic nutritional values based on the local database by recognizing the voice signal and processing the weight information, providing users with a reference even without a network connection. Once the network is restored, the display is updated to provide users with the latest information at all times. This series of operations can flexibly switch according to network conditions. Users do not need to manually input complex information; they only need to state the type of food by voice. This simplifies the acquisition process, improves efficiency, and enables users to conveniently and stably obtain food nutritional information in different network scenarios, enhancing the user experience and product usability.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, after the processing module sends the nutrition analysis report to the display module for display, the method further includes: the processing module recording a local display timestamp; and the step of sending an updated nutrition analysis report to the display module for updating the display, specifically including: the processing module identifying conflicting data items in the basic nutrition values that have semantic or numerical conflicts with the updated nutrition analysis report; in the case of semantic conflicts, the processing module performs arbitration explicitness, which triggers a user interaction arbitration interface, and the user interaction arbitration interface updates the display by receiving the user's selection; in the case of numerical conflicts, the processing module determines the amount of preceding data in the basic nutrition values that precedes the conflicting data item; the processing module multiplies the amount of preceding data by a preset time coefficient to obtain an adaptive time threshold; in the case of actual time difference being less than the adaptive time threshold, the processing module performs silent display, which updates the nutrition analysis report; the actual time difference is the difference between the current time and the local display timestamp; in the case of actual time difference not being less than the adaptive time threshold, the processing module performs upgrade explicitness, which updates the nutrition analysis report and triggers a correction flag and a voice alarm.
[0009] By adopting the above technical solution, the processing module records the local display timestamp for time reference. When the network recovers and the display needs to be updated, and a conflict arises between the basic nutritional values and the updated nutritional analysis report, for semantic conflicts, a user-interactive arbitration interface is triggered, allowing the user to choose to update; for numerical conflicts, an adaptive time threshold is calculated based on the amount of preceding data, and the display method is determined by comparing the actual time difference with the threshold. If the difference is small, the display remains silent; if the difference is large, the display is upgraded and a warning is issued. This solution addresses the issues of data consistency and authority. By reasonably handling conflicts, it maintains data consistency and traceability, enhances the authority of the output data, avoids misleading users due to data discrepancies, and ensures the reliability of nutritional information.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, after the processing module sends the weight information and voice signal to the cloud server when the network connection is normal, the method further includes: the cloud server generating a food fingerprint sequence based on the weight information and voice signal; the cloud server determining a target recipe using the food fingerprint sequence; the cloud server extracting the standard weight of the ingredients from the target recipe and determining a scaling factor based on the ratio of the weight information to the standard weight; the cloud server applying the scaling factor to the seasoning components of the target recipe to obtain implicit component data; and the cloud server using the implicit component data as a calculation factor in the nutritional analysis report.
[0011] By employing the above technical solution, the cloud server first generates a fingerprint sequence of ingredients based on weight information and voice signals, and records the ingredient details according to the operation sequence. Next, this sequence is used to determine the target recipe, and the most suitable recipe is determined by combining ingredient types and combinations, weight ratios, and matching with candidate recipes. Then, a scaling factor is calculated using standard weights to obtain implicit component data for seasonings, which is finally incorporated into the nutritional analysis report. This solves the problem of inaccurate and incomplete nutritional reports caused by users not weighing seasonings. By linking ingredient and seasoning information, even without specifically weighing seasonings, the report can cover all elements of the dish, outputting a complete and accurate nutritional analysis report, providing users with a comprehensive nutritional reference that matches the actual dish.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, the step of the cloud server generating a food fingerprint sequence based on weight information and voice signal specifically includes: the cloud server combining the first identification result identified each time with the obtained weight information as a food fingerprint; and the cloud server storing multiple food fingerprints generated in continuous operation into a cooking session to obtain a food fingerprint sequence.
[0013] By adopting the above technical solution, the first identification result and weight information are combined to form a food fingerprint and a sequence. This can not only accurately capture the key features of each food operation, but also make the food information in the cooking process clear, orderly and traceable, which is convenient for tracing and analyzing the order of food addition and the matching relationship.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, the step of the cloud server storing multiple ingredient fingerprints generated during continuous operation into a cooking session to obtain an ingredient fingerprint sequence specifically includes: when the session is active, the cloud server appends subsequent ingredient fingerprints to all cooking sessions; the cloud server continuously monitors at least one preset cancellation appending condition, and cancels the appending operation when any condition is met; the cancellation appending condition includes: when the newly added ingredient fingerprint causes the number of candidate recipes to decrease by a preset number threshold; when the newly added ingredient fingerprint results in no corresponding candidate recipe.
[0015] By adopting the above technical solution, when a session is activated, the cloud server adds ingredient fingerprints to ensure the continuous and complete recording of cooking information. Simultaneously, monitoring is conducted to cancel the addition of fingerprints if abnormal changes occur in the number of candidate recipes, and newly added fingerprints are filtered to remove unreasonable information. This ensures accurate association between dishes and ingredients. This addition and filtering mechanism allows the ingredient fingerprint sequence to accurately reflect the actual composition of the cooked ingredients, laying a reliable foundation for subsequent recipe determination and other operations, avoiding interference from erroneous information, and improving the rationality and accuracy of nutritional information processing based on ingredient information.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, while the session is active, the cloud server appends subsequent ingredient fingerprints to all cooking sessions; the cloud server continuously monitors at least one preset cancellation condition, and when any condition is met, cancels the current appending operation step; if the cloud server determines that the ingredient fingerprint sequence corresponds to all ingredients in the candidate recipe, it cancels the activation state of the ingredient fingerprint sequence.
[0017] By employing the above technical solution, ingredient fingerprints are appended while the session is active, continuously refining the information on cooking ingredients. Simultaneously, monitoring and cancellation of appending conditions eliminate interference from abnormal information. The activation state is deactivated when the ingredient fingerprint sequence matches all ingredients in the candidate recipe, signifying precise association between ingredients and dishes. This solves the problem of scattered data making it difficult to associate with dishes, ensuring each ingredient is accurately categorized into its corresponding dish's nutritional calculations. This makes the generated nutritional analysis report more relevant to the actual dish, improving the accuracy of matching nutritional information with specific dishes and guaranteeing users receive accurate nutritional references.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the step of the cloud server using the ingredient fingerprint sequence to determine the target recipe specifically includes: the cloud server performing probability matching between the combination of ingredient types in the ingredient fingerprint sequence and the weight ratio between each ingredient and the candidate recipes in the cloud recipe database, and calculating a comprehensive confidence score for each candidate recipe; the cloud server determining the candidate recipe with the highest comprehensive confidence score as the target recipe.
[0019] By employing the above technical solution, the cloud server identifies the actual ingredient types by utilizing the combination of ingredient types in the ingredient fingerprint sequence, determines the dosage relationship based on the weight ratio of each ingredient, performs probability matching with candidate recipes, calculates the comprehensive confidence score, and selects the highest-scoring recipe as the target recipe. Through this precise determination of the target recipe, the subsequently generated nutritional analysis report can closely relate to the actual dish, enhancing the accuracy of the match between nutritional information and actual cooking results. This provides users with valuable nutritional references tailored to the dish, helping them control their dietary nutrition.
[0020] In a second aspect, this application provides a food scale, which includes: one or more processors and a memory; the memory is coupled to one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the food scale to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, this application provides a computer program product containing instructions that, when the computer program product is run on a food scale, cause the food scale to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, this application provides a computer-readable storage medium including instructions that, when executed on a food scale, cause the food scale to perform the method described in the first aspect and any possible implementation thereof.
[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. The processing module coordinates the operation of all functional modules. After the weighing module acquires weight information and the voice module acquires voice signals, the processing module sends both to the cloud server when the network is normal. Utilizing the server's parsing and database resources, the processing module generates a nutritional analysis report based on the voice signal analysis results and weight information, and then sends it back for display, fully leveraging the advantages of the cloud to ensure comprehensive and accurate information. When the network is interrupted, the processing module generates basic nutritional values based on the local database by recognizing the voice signal and processing the weight information, providing users with a reference even without a network connection. Once the network is restored, the display is updated to provide users with the latest information at all times. This series of operations flexibly switches according to network conditions. Users do not need to manually input complex information; they only need to state the type of food by voice. This simplifies the acquisition process, improves efficiency, and allows users to conveniently and stably obtain food nutritional information in different network scenarios, enhancing the user experience and product usability.
[0024] 2. The processing module records the local display timestamp for time reference. When the network recovers and the display needs updating, and conflicts arise between basic nutrient values and the updated nutrient analysis report, for semantic conflicts, a user-interactive arbitration interface is triggered, allowing the user to choose to update; for numerical conflicts, an adaptive time threshold is calculated based on the amount of preceding data. The display method is determined by comparing the actual time difference with the threshold. If the difference is small, the display remains silent; if the difference is large, the display is upgraded and a warning is issued. This solution addresses data consistency and authority issues. By properly handling conflicts, it maintains data consistency and traceability, enhances the authority of the output data, prevents users from being misled by data discrepancies, and ensures the reliability of nutritional information.
[0025] 3. The cloud server first generates an ingredient fingerprint sequence based on weight information and voice signals, recording the ingredient details according to the operation sequence. Next, this sequence is used to determine the target recipe. The most suitable recipe is determined by combining ingredient types and combinations, weight ratios, and matching with candidate recipes. Then, a scaling factor is calculated using standard weights to obtain implicit component data for seasonings, which is finally incorporated into the nutritional analysis report. This solves the problem of inaccurate and incomplete nutritional reports caused by users not weighing seasonings. By linking ingredient and seasoning information, even without specifically weighing seasonings, the report covers all elements of the dish, outputting a complete and accurate nutritional analysis report, providing users with comprehensive nutritional references that match the actual dishes. Attached Figure Description
[0026] Figure 1This is a flowchart illustrating the nutritional information processing method of the intelligent voice food scale in this application embodiment; Figure 2 This is another flowchart illustrating the nutritional information processing method of the intelligent voice food scale in this application embodiment; Figure 3 This is another flowchart illustrating the nutritional information processing method of the intelligent voice food scale in this application embodiment; Figure 4 This is a schematic diagram of an exemplary hardware structure of a food scale in an embodiment of this application. Detailed Implementation
[0027] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0028] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0029] Please see Figure 1 , Figure 1 This is a flowchart illustrating the nutritional information processing method of the intelligent voice food scale in this application embodiment; A method for processing nutritional information in a smart voice-activated food scale includes: S101. When the processing module detects that an object is placed on the weighing module, it starts the weighing module to obtain weight information and the voice module to obtain voice signals. The "processing module" refers to the core component inside the smart voice food scale, responsible for coordinating the work of various functional modules, processing data, and controlling the flow of information. It is used to integrate and schedule various types of data and operations. The "weighing module" refers to the hardware part of the food scale specifically used to detect the weight of objects placed on it. It can convert the weight of the object into corresponding electrical signals and other data forms to provide weight information. The "voice module" refers to the component with voice acquisition function, which can receive the voice content spoken by the user and convert it into a digital signal form that can be recognized by the processing module to acquire voice signals.
[0030] In some embodiments, the processing module monitors the status of the weighing module in real time. Once an object is detected being placed on the weighing module, it simultaneously sends a start command to both the weighing module and the voice module. Upon receiving the command, the weighing module uses its built-in weighing sensors and other related components to measure physical quantities such as the pressure applied by the object, and converts these quantities into corresponding weight information through an internal conversion mechanism, such as converting the pressure value into weight data in grams or kilograms according to a certain conversion relationship. Upon receiving the start command, the voice module activates its voice acquisition function, capturing the user's voice describing the type of food and other related information through a microphone or other devices. It then digitizes the analog voice signal to generate a voice signal that the processing module can further analyze.
[0031] S102. Under normal network connection conditions, the processing module sends the weight information and voice signal to the cloud server; "Network connection is normal" means that the smart voice food scale has established a stable and effective communication link with the external network through wired (such as Ethernet connection) or wireless (such as Wi-Fi connection) means that it can perform data transmission operations; "cloud server" refers to a server cluster deployed in the Internet cloud with data storage, computing and analysis capabilities, which is used to receive the data transmitted by the food scale and process it according to the corresponding algorithm to generate subsequent operations such as nutritional analysis reports.
[0032] S103. The processing module receives a nutrition analysis report from the cloud server. The nutrition analysis report is generated by the cloud server parsing the voice signal to obtain the first recognition result. The first recognition result and the corresponding weight information are used as input to retrieve and calculate the data from the associated cloud food nutrition database. The "Nutritional Analysis Report" is a detailed report containing the content of various nutrients in the tested food (such as protein, fat, carbohydrates, vitamins, etc.) and related nutritional evaluations, used to present the nutritional status of the food to the user intuitively. The "First Recognition Result" refers to the result of the cloud server processing the voice signal transmitted from the food scale through voice recognition, semantic understanding, and other methods to determine key information such as the type of food, which is an important basis for subsequent retrieval and calculation of nutritional information. The "Cloud Food Nutrition Database" is a database stored on the cloud server that covers a large amount of detailed nutritional component data and related nutritional characteristic data of different types of food, which can serve as the basic data source for calculating and generating the nutritional analysis report.
[0033] Specifically, after receiving the weight information and voice signal from the processing module, the cloud server first uses its built-in speech recognition engine (such as a deep learning-based speech recognition algorithm) to analyze the voice signal, identifying key content such as the type of food described in the speech, and obtaining the first recognition result. Next, using this first recognition result and the corresponding weight information as query conditions, it searches the associated cloud-based food nutrition database, for example, to find the basic content data of various nutrients for that food at a given weight. Then, based on a certain nutritional calculation model (such as a calculation model established according to the density and proportional relationship of different nutrients), it performs corresponding calculations in conjunction with the retrieved data, such as proportional conversion of basic nutrient content based on food weight, and finally generates a complete nutritional analysis report. The processing module then waits for and receives this nutritional analysis report from the cloud server through the previously established network communication link.
[0034] S104. The processing module sends the nutritional analysis report to the display module for display. The "display module" refers to the screen component on the smart voice food scale used to intuitively display information. It can present the nutritional analysis report from the processing module to the user in a visual format such as text and charts, making it convenient for the user to view the nutritional information of the food.
[0035] This step is executed after the processing module successfully receives the nutrition analysis report from the cloud server. The purpose is to display the analyzed food nutrition information to the user so that the user can directly obtain the desired results.
[0036] S105. In the event of a network connection interruption, the processing module recognizes the voice signal to obtain a second recognition result, and based on the second recognition result and the corresponding weight information, retrieves and calculates from the preset local food nutrition database to generate basic nutritional values; the amount of data in the local food nutrition database is less than that in the cloud food nutrition database. Among them, "network connection interruption" indicates that the communication link between the smart voice food scale and the external network has failed, and data transmission cannot be carried out normally; "second recognition result" refers to the result of the processing module's recognition of the voice signal after processing it based on its own voice recognition capability when the network connection is interrupted, and the result is used to retrieve nutritional information in the local database later; "local food nutrition database" refers to a relatively small set of food nutrition data that is pre-stored in the internal storage medium (such as flash memory) of the smart voice food scale. Although its data volume is smaller than that of the cloud-based food nutrition database, it can provide some nutritional information reference when the network is unavailable.
[0037] When the smart voice food scale detects an interruption in the connection with the external network, such as a loss of Wi-Fi signal or a disconnected network cable, and has already acquired weight information and voice signals (if step S101 was completed before the network interruption), it will execute this step, which aims to provide users with a general nutritional information reference using limited local resources.
[0038] In some embodiments, after determining that the network connection is interrupted, the processing module activates its built-in speech recognition module (which may be based on some lightweight speech recognition algorithms suitable for running on local devices) to recognize and process the previously acquired speech signal. For example, by extracting speech features and matching them with locally stored speech templates, it identifies key information such as the type of food described in the speech, obtaining a second recognition result. Next, using this second recognition result and the corresponding weight information as query conditions, it searches a pre-built local food nutrition database. Since the local database has limited data, it may only cover basic nutritional data for some common foods, so it will find basic data such as the content of some nutrients at a given weight. Then, based on some simple nutritional calculation rules (which may be simpler than those used on cloud servers), and combined with the retrieved data, it performs calculations, such as estimating based on common nutrient ratios, ultimately generating basic nutritional values to provide users with a general nutritional reference.
[0039] S106. The processing module sends the basic nutrient values to the display module for display. S107. When the network connection is restored, the processing module receives the updated nutrition analysis report from the cloud server and sends the updated nutrition analysis report to the display module to update the display.
[0040] "Network connection restored" means that the communication link between the smart voice food scale and the external network, which was originally interrupted, has been re-established and restored to normal, and the scale can once again interact with the cloud server for data.
[0041] When the smart voice food scale detects that the network connection has been restored from a previous interruption, such as a successful Wi-Fi reconnection or a restored wired network connection, and the cloud server has completed the generation of the updated nutrition analysis report, it will perform this step to provide users with the latest and most accurate food nutrition information.
[0042] As can be seen, the processing module is responsible for coordinating the operation of various functional modules. After the weighing module acquires weight information and the voice module acquires voice signals, when the network is normal, the processing module sends both to the cloud server. Utilizing its parsing and database resources, it generates a nutritional analysis report based on the voice signal parsing results and weight information, and then sends it back for display, fully leveraging the advantages of the cloud to ensure comprehensive and accurate information. When the network is interrupted, the processing module generates basic nutritional values based on the local database by recognizing the voice signal and processing the weight information, providing users with a reference even without a network connection. Once the network is restored, the display is updated, providing users with the latest information at all times. This series of operations flexibly switches according to network conditions. Users do not need to manually input complex information; they only need to state the type of food by voice. This simplifies the acquisition process, improves efficiency, and allows users to conveniently and stably obtain food nutritional information in different network scenarios, enhancing the user experience and product usability.
[0043] In practical use, step S107, due to the significantly larger data volume and computing power of the cloud server compared to the food scale, results in different recognition outcomes for the same voice signal. These differing outcomes lead to discrepancies between the basic nutritional values and the updated nutritional analysis report, thereby compromising data consistency and traceability, and ultimately undermining the authority of the food scale's output data. Simultaneously, the basic nutritional values can influence the user's own judgment. Therefore, it is necessary to address both the decline in authority and the impact on user judgment. Thus, in some embodiments, after step S106, the following step is also included: Please see Figure 2 , Figure 2 This is another flowchart illustrating the nutritional information processing method of the intelligent voice food scale in this application embodiment; S201, The processing module records the local display timestamp; Among them, "local display timestamp" refers to the specific time information recorded by the internal system of the food scale, which corresponds to the moment when the basic nutritional value or nutritional analysis report is first displayed on the display module. It is usually presented in the form of year, month, day, hour, minute, second, etc., and is used to mark the time point of information display to provide a benchmark for subsequent time difference calculation.
[0044] Step S107 specifically includes: S202. The processing module identifies conflicting data items in the basic nutrient values that have semantic or numerical conflicts with the updated nutrient analysis report. Among them, "conflicting data items" refer to specific nutritional information entries that have the aforementioned semantic or numerical conflicts. "Semantic conflict" refers to inconsistencies between the basic nutritional values and the updated nutritional analysis report in descriptive information such as food type and nutrient names; "numerical conflict" refers to differences between the two reports in the specific content value of the same nutrient. This process is executed after the network connection is restored and the processing module receives the updated nutrition analysis report from the cloud server, but before it is sent to the display module for updating and display. It is used to identify the differences between the two types of data, providing a basis for subsequent targeted conflict handling.
[0045] Specifically, the processing module compares the basic nutritional values with the updated nutritional analysis report one by one. First, it compares the semantic information such as the types of food and names of nutrients involved in the two reports. If any entries are found to be inconsistent in description, they are marked as data items with semantic conflicts. Second, for nutrients with consistent semantics, it further compares their specific values. When the difference in values exceeds a preset allowable error range (such as 5%), it is marked as a data item with numerical conflicts. Through this comparison process, the processing module can accurately identify all conflicting data items, providing clear targets for subsequent arbitration or hierarchical display.
[0046] S203. In the case of semantic conflict of conflicting data items, the processing module performs arbitration explicit. Arbitration explicit is triggered by the user interaction arbitration interface, which is updated and displayed according to the user's selection. Among them, "explicit arbitration" refers to a display method that introduces user judgment to determine the final displayed content when semantic conflicts occur; "user interaction arbitration interface" refers to the interactive interface that pops up on the food scale display module, which allows users to choose between basic nutritional values with semantic conflicts and updated nutritional analysis reports. It usually includes elements such as displaying conflicting content and selection buttons.
[0047] Specifically, after determining that a semantic conflict exists, the processing module sends a command to the display module, triggering the display of the user-interactive arbitration interface. This interface clearly lists the semantic information in the basic nutritional values and the semantic information in the updated nutritional analysis report. The user confirms the information via voice according to the actual situation, and the processing module then sends the corresponding information to the display module for updating and display, ensuring that the final displayed information is the semantic information approved by the user.
[0048] S204. In the case of a conflicting data item being a numerical conflict, the processing module determines the amount of preceding data in the basic nutrient values that precedes the conflicting data item. "Preceding data quantity" refers to the number of valid data items that precede the conflicting data item (in display order or data storage order) among all data items included in the basic nutrient value.
[0049] Specifically, the processing module first determines the order of all data items in the basic nutrient values (usually arranged according to the importance of the nutrients or the conventional display order). Then, it locates the position of the conflicting data item within this order and counts the number of all valid data items preceding that position, thus obtaining the amount of preceding data. The amount of preceding data reflects the position of the conflicting data item in the overall data and the data accumulation situation, providing a basis for the adaptive calculation of the subsequent time threshold.
[0050] S205. The processing module multiplies the amount of preceding data by a preset time coefficient to obtain an adaptive time threshold. Here, "preset time coefficient" refers to a fixed time parameter (units can be seconds, minutes, etc.) set in advance in the processing module; "adaptive time threshold" is a time standard calculated using the amount of preceding data and the preset time coefficient, representing the approximate time limit at which users may begin to notice data errors and need to pay attention to updates. Specifically, the processing module reads a preset time coefficient (e.g., 10 minutes per item) from the internal storage unit, then multiplies the amount of preceding data obtained in step S204 with this preset time coefficient to calculate the adaptive time threshold. This is used to determine how long it will take for the user to become aware of a data conflict under the current data state.
[0051] S206. When the actual time difference is less than the adaptive time threshold, the processing module performs a silent display, which is to update the nutrition analysis report; the actual time difference is the difference between the current time and the local display timestamp. Among them, "actual time difference" refers to the length of the time period from the moment when the basic nutritional values are first displayed on the display module (that is, the moment corresponding to the local display timestamp) to the moment when the displayed content needs to be updated. The unit is usually seconds, minutes, etc., and it reflects the duration of the interval between two data displays. "Adaptive time threshold" is a time standard calculated in the previous step (S205) based on the amount of preceding data and the preset time coefficient. It represents the approximate time limit at which users may begin to notice that there are errors in the data and need to pay attention to the update. "Silent display" is a way of updating the displayed content without obviously prompting the user (such as not making any additional sounds or displaying any eye-catching prompts). Instead, the original display of basic nutritional values is directly replaced with the updated nutritional analysis report. The purpose is to complete the data update without disturbing the user.
[0052] Execution Timing and Scenarios: This step is executed when the processing module calculates that the actual time difference is less than the adaptive time threshold. It is typically applicable in scenarios where the time interval between the display of basic nutritional values and the current moment is relatively short. This means that the user hasn't had time to form a fixed understanding based on previous data or to detect potential errors. In this case, updating the data would have minimal impact on the user's existing judgment. Therefore, a silent display method can be used to update the displayed content, allowing users to obtain the latest and more accurate nutritional analysis report without their awareness, ensuring both accuracy and authority.
[0053] S207. If the actual time difference is not less than the adaptive time threshold, the processing module will perform an upgrade explicit display, which will be an update to the nutrition analysis report, and trigger a correction flag and voice alarm.
[0054] This step is executed when the processing module determines, through calculation, that the actual time difference is not less than the adaptive time threshold. This typically occurs in scenarios where a relatively long period has elapsed since the basic nutritional values were first displayed. Users have likely already formed an impression of the previously displayed values and may have made some judgments or developed certain understandings based on this data. If the display is updated directly without any notification, users may continue to use the old data, leading to misjudgments. Therefore, a more obvious method, such as explicit updates, is needed to clearly inform users that the data has changed and that they have received the latest and most accurate nutritional analysis report.
[0055] As can be seen, the processing module records the local display timestamp for time reference. When the network recovers and the display needs to be updated, and conflicts arise between basic nutrient values and the updated nutrient analysis report, for semantic conflicts, a user-interactive arbitration interface is triggered, allowing the user to choose to update; for numerical conflicts, an adaptive time threshold is calculated based on the amount of preceding data, and the display method is determined by comparing the actual time difference with the threshold. If the difference is small, the display remains silent; if the difference is large, the display is upgraded and a warning is issued. This solution addresses data consistency and authority issues by reasonably handling conflicts, maintaining data consistency and traceability, enhancing the authority of the output data, preventing users from being misled by data discrepancies, and ensuring the reliability of nutritional information.
[0056] In actual use, adding seasonings is a natural cooking behavior, while using a food scale is a deliberate measurement task. These two behavior patterns are fundamentally contradictory in a cooking scenario. Therefore, users will not use a food scale to measure the weight of seasonings. Since user behavior does not involve weighing, the weight of seasonings cannot be obtained. Consequently, the output nutritional analysis report is not a true nutritional analysis report. Therefore, how can a truly complete and accurate final nutritional analysis report reflecting the entire dish (including main ingredients and all seasonings) be generated? Therefore, the nutritional analysis report obtained in step S103 is not accurate enough.
[0057] Therefore, after step S102, the method further includes: Please see Figure 3 , Figure 3 This is another flowchart illustrating the nutritional information processing method of the intelligent voice food scale in this application embodiment; S301, The cloud server generates a food fingerprint sequence based on weight information and voice signal; Among them, the "food fingerprint sequence" refers to a sequence composed of individual food fingerprints arranged in chronological order, with each food fingerprint containing the type of food and its corresponding weight information.
[0058] Specifically, the cloud server first analyzes the received voice signal, using built-in speech recognition technology (such as a deep learning-based speech recognition model) to identify the types of ingredients described in the speech, obtaining a first recognition result. Then, for each ingredient operation, this first recognition result is combined with the corresponding weight information to form an ingredient fingerprint. This ingredient fingerprint acts like a "data packet" recording key information about this ingredient operation. Next, as the cooking process continues, multiple such ingredient fingerprints are generated. The cloud server stores them sequentially into the cooking session according to the order of ingredient operations, thus constructing an ingredient fingerprint sequence. This ensures that the ingredient information added at different times during the entire cooking process is recorded in an orderly manner, facilitating subsequent steps to trace and analyze the specific situation of the ingredients based on this sequence.
[0059] In some embodiments, after receiving weight information and voice signals, the cloud server sends the voice signals to a professional voice recognition engine. The engine extracts voice features and matches them with pre-trained voice templates to obtain the first recognition result of the ingredient type. Next, a data structure is constructed to represent the ingredient fingerprint in the form of key-value pairs, using the first recognition result as the key and the weight information as the value. Finally, each ingredient fingerprint is added to a linked list structure in the order of timestamps to form an ingredient fingerprint sequence. Each node in the linked list corresponds to an ingredient fingerprint. By traversing the linked list, the ingredient information of the entire cooking process can be obtained, which is not limited here.
[0060] In practical use, a dish usually includes multiple ingredients. These ingredients need to be correctly associated with the dish. The technical challenge lies in the fact that the data acquired by the food scale is discrete. Therefore, how to perform accurate timestamp alignment and data logical binding to ensure that they are included in the nutritional calculation of the same dish is a crucial question. In some embodiments, step S301 specifically includes: S3011, the cloud server combines the first identification result and the obtained weight information each time as a food fingerprint; Among them, "food fingerprint" is a data unit that integrates the type information (first identification result) and weight information of food to form a key food feature. It can uniquely identify the relevant circumstances of a food operation.
[0061] Specifically, after parsing the voice signal and obtaining the first recognition result, along with the corresponding weight information, the cloud server uses internal data processing logic to link these two pieces of information. For example, the cloud server can create a data structure with two fields: one field stores the first recognition result (such as the ingredient name string "tomato"), and the other field stores the weight information (such as "200 grams"). By filling these two pieces of information into their respective fields, a combination of ingredient fingerprints is completed. This ingredient fingerprint not only indicates what the ingredient is but also its quantity, comprehensively recording the key characteristics of this ingredient operation.
[0062] S3012, The cloud server stores multiple ingredient fingerprints generated during continuous operation into the cooking session to obtain the ingredient fingerprint sequence.
[0063] It is evident that combining the first identification result with the weight information to form a food fingerprint and sequence can not only accurately capture the key features of each food operation, but also make the food information in the cooking process clear, orderly and traceable, making it convenient to trace and analyze the order of food addition and the matching relationship.
[0064] In some embodiments, step S3012 specifically includes: S30121. When a session is active, the cloud server will add subsequent food fingerprints to all cooking sessions; the cloud server will continuously monitor at least one preset cancellation condition, and cancel the current addition operation when any condition is met. "Session Activation" refers to the current cooking session being in a normal, active state and capable of receiving new data (i.e., subsequent ingredient fingerprints). This indicates that the current cooking operation is not yet finished, and there are still situations such as adding new ingredients that need to be recorded in the session. "Cancel Append Conditions" refers to some rules and conditions set in advance on the cloud server to determine whether to allow the addition of new ingredient fingerprints to the cooking session. When these conditions are met, it means that the new ingredient fingerprint may not conform to the normal cooking logic or may interfere with subsequent operations such as recipe determination, so the addition operation needs to be canceled. "All Cooking Sessions" refers to all sessions related to different cooking operations that are running simultaneously on the cloud server. This means that ingredient fingerprints should be added to all active cooking sessions to ensure that the information of each cooking process can be updated in a timely manner.
[0065] When multiple cooking sessions are being processed on the cloud server (for example, multiple cooking sessions may exist simultaneously in the scenario of cooking different dishes), and these sessions are active, this step is executed whenever a new ingredient fingerprint is generated. The purpose is to ensure that the ingredient information during the cooking process can be continuously and completely recorded in the corresponding session. At the same time, unreasonable information is prevented from being mixed in by monitoring and canceling the appending conditions. This is suitable for situations where new ingredients are continuously added during the entire cooking operation.
[0066] The conditions for canceling the additional addition include: S30122. When the newly added ingredient fingerprint causes the number of candidate recipes to decrease by a preset number threshold; Among them, "candidate recipes" refer to a series of recipes that may be suitable for the current cooking ingredients, selected by the cloud server based on the existing ingredient fingerprint sequences and through matching and analysis with the cloud recipe database. These recipes are the basis for further determining the target recipes. "Preset quantity threshold" refers to a value set in advance in the cloud server to measure whether the change in the number of candidate recipes after adding new ingredient fingerprints exceeds a reasonable range. When the decrease in the number of candidate recipes reaches this threshold, it is considered that the newly added ingredient fingerprints may be unreasonable and need to be processed accordingly.
[0067] Specifically, when a new ingredient fingerprint is ready to be added, the same matching operation is performed, but this time the newly added ingredient fingerprint is also taken into consideration. Candidate recipes are re-selected, and the number of new candidate recipes is counted. Next, the difference between the number of candidate recipes before and after the previous two rounds is calculated and compared with a preset threshold. If the difference is greater than the preset threshold, it indicates that the newly added ingredient fingerprint has significantly reduced the number of candidate recipes, which may not conform to normal cooking logic. For example, it may be due to the addition of an ingredient that is extremely incompatible with other ingredients, causing many originally reasonable recipes to be excluded. In this case, it needs to be processed according to the corresponding rules (such as canceling the addition of this ingredient fingerprint).
[0068] It should be noted that steps S30122 and S30123 refer to common recipes, not all recipes.
[0069] S30123, When a newly added ingredient fingerprint results in no corresponding candidate recipe.
[0070] Specifically, the cloud server first uses a preset matching algorithm (such as comparing and matching ingredients with recipes in the cloud recipe database based on the existing ingredient fingerprint sequences in the current cooking session) to find and determine the corresponding candidate recipe list. Next, when a new ingredient fingerprint is generated, this new fingerprint information is integrated into the existing matching conditions, and the cloud recipe database is searched again to see if at least one recipe matching the new conditions can be found as a candidate recipe. For example, if the previous ingredient fingerprint sequence corresponds to various types of candidate recipes such as stir-fries and stews, but the newly added ingredient fingerprint corresponds to a very special ingredient rarely used in conventional cooking, and when it is added to the matching conditions, there is no recipe in the entire cloud recipe database that contains this ingredient and meets the other existing ingredient pairing and weight ratio requirements—meaning there is no corresponding candidate recipe—then this newly added ingredient fingerprint may be unreasonable and needs to be processed accordingly, such as removing it from the cooking session to avoid interfering with subsequent recipe-based nutritional analysis and other operations.
[0071] As can be seen, upon session activation, the cloud server adds ingredient fingerprints to ensure the continuous and complete recording of cooking information. Simultaneously, monitoring mechanisms cancel the addition of fingerprints if abnormal changes occur in the number of candidate recipes, and filter newly added fingerprints to remove unreasonable information. This ensures accurate association between ingredients and dishes. This addition and filtering mechanism allows the ingredient fingerprint sequence to precisely reflect the actual composition of the ingredients used in cooking, laying a reliable foundation for subsequent recipe determination and other operations, avoiding interference from erroneous information, and improving the rationality and accuracy of nutritional information processing based on ingredient information.
[0072] S30124. If the cloud server determines that the ingredient fingerprint sequence corresponds to all ingredients in the candidate recipe, the activation status of the ingredient fingerprint sequence will be cancelled.
[0073] Specifically, the cloud server continuously compares the current ingredient fingerprint sequence with each candidate recipe. For each candidate recipe, it meticulously examines all the ingredient types and corresponding standard quantities, then checks them against the actual ingredient information recorded in the ingredient fingerprint sequence. When a candidate recipe is found whose ingredients perfectly match the information in the ingredient fingerprint sequence, it means that the target recipe that best suits the actual cooking situation has been found. At this point, the cloud server deactivates the ingredient fingerprint sequence by modifying the corresponding status flag (e.g., changing the boolean value indicating activation from "True" to "False") or adjusting the status fields in the relevant data structures, indicating that the ingredient fingerprint sequence has completed its mission in the ingredient addition and recipe matching stage.
[0074] As can be seen, adding ingredient fingerprints while the session is active continuously improves the cooking ingredient information, while monitoring and canceling the addition conditions eliminates interference from abnormal information. The activation state is deactivated when the ingredient fingerprint sequence matches all ingredients in the candidate recipe, meaning that the association between ingredients and dishes is accurately achieved. This solves the problem of scattered data making it difficult to associate with dishes, ensuring that each ingredient is accurately assigned to the corresponding dish's nutritional calculation. This makes the generated nutritional analysis report more relevant to the actual dish, improving the accuracy of matching nutritional information with specific dishes and ensuring that users obtain accurate nutritional references for dishes.
[0075] S302, The cloud server uses the fingerprint sequence of ingredients to determine the target recipe; Among them, the "target recipe" refers to the recipe that best matches the ingredients used in the actual cooking process among many candidate recipes. By determining the target recipe, we can lay the foundation for subsequent operations such as accurately analyzing the nutritional components of the dish and generating a realistic nutritional analysis report.
[0076] In some embodiments, step S302 specifically includes: S3021, the cloud server performs probability matching with candidate recipes in the cloud recipe database based on the combination of food types in the food fingerprint sequence and the weight ratio between each food, and calculates a comprehensive confidence score for each candidate recipe. Among them, "ingredient combination" refers to the combination of different ingredient types presented in the ingredient fingerprint sequence, such as "tomato, egg, and scallion". Different ingredient combinations often correspond to different dish possibilities. "Weight ratio between ingredients" refers to the weight ratio of each ingredient in the ingredient fingerprint sequence. For example, if the tomato is 200 grams and the egg is 100 grams, the weight ratio between them is 2:1. This ratio is crucial for distinguishing different cooking methods or determining specific dishes. "Overall confidence score" is a value calculated for each candidate recipe after comprehensively considering multiple factors such as ingredient combination and weight ratio through a specific algorithm. This value represents the probability that the candidate recipe matches the actual cooking ingredients. The higher the score, the higher the matching degree.
[0077] In some embodiments, the cloud server converts the combinations of food types in the food fingerprint sequence into a vector form, with each food item corresponding to a dimension in the vector, where 1 is the value if the food item is present and 0 is the value if it is absent. Similarly, the food types in the candidate recipes are also converted into vectors. Then, the cosine similarity of the vectors is used to measure the matching degree of the food type combinations, resulting in a similarity score between 0 and 1 (which can be converted into a specific score through linear transformation). Next, for the weight ratio between each food item, the Euclidean distance between the actual weight ratio and the weight ratio of the candidate recipe is calculated, with a smaller distance resulting in a higher score (which can be converted into a specific score through a certain mapping function). Finally, the scores of these two dimensions are weighted and summed according to a preset weight coefficient to obtain a comprehensive confidence score. This achieves the probability matching and score calculation between the candidate recipes and the actual food items, which is not limited here.
[0078] In some embodiments, the cloud server uses a set approach to compare combinations of ingredient types. It calculates the intersection and union of the candidate recipe ingredient type set and the actual ingredient type set. A ratio is obtained by dividing the number of elements in the intersection by the number of elements in the union, which serves as a matching index for the ingredient type combination (which can be further converted into a specific score). Then, for the weight ratio, the weight ratios of the actual ingredients and the candidate recipes are normalized respectively, and the sum of the absolute values of their differences is calculated. The matching score of the weight ratio is determined within a preset score range based on the magnitude of the difference. Finally, the analytic hierarchy process (AHP) is used to determine the weights of the ingredient type combination and weight ratio in the comprehensive evaluation. The scores of the two dimensions are multiplied according to their weights and then added together to obtain the comprehensive confidence score, thus completing the probability matching and score calculation. No limitations are imposed here.
[0079] S3022, The cloud server will identify the candidate recipe with the highest overall confidence score as the target recipe.
[0080] As can be seen, the cloud server uses the combination of ingredient types in the ingredient fingerprint sequence to know the actual ingredient types, determines the usage relationship based on the weight ratio of each ingredient, performs probability matching with candidate recipes, calculates the comprehensive confidence score, and selects the highest-scoring recipe as the target recipe. By accurately determining the target recipe in this way, the subsequent nutritional analysis report can closely revolve around the actual dish, enhancing the accuracy of the match between nutritional information and actual cooking results. This provides users with valuable nutritional references that are relevant to the dish, helping them control their dietary nutrition.
[0081] S303, The cloud server extracts the standard weight of the ingredients from the target recipe and determines the scaling factor based on the ratio of the weight information to the standard weight. Among them, "standard weight" refers to the weight value that each ingredient should use as specified in the target recipe, which is an important reference for measuring whether the dish preparation meets the conventional standard; "weight information" is the actual weight data of each ingredient in actual cooking, which was obtained and recorded in the ingredient fingerprint sequence through a food scale; "scaling factor" is a coefficient calculated by comparing the actual weight information of the ingredients with the standard weight of the corresponding ingredients in the target recipe. It can reflect the difference in the amount of ingredients used between the actual cooking and the standard recipe, and will be used to make corresponding adjustments to the seasoning components in the target recipe.
[0082] This step is executed after the target recipe is successfully determined on the cloud server (step S302). The purpose is to find the ratio between the actual amount of cooking ingredients and the amount specified in the target recipe, so as to reasonably estimate the unweighed ingredients such as seasonings in the target recipe based on this relationship.
[0083] S304. The cloud server applies a scaling factor to the seasoning ingredients of the target recipe to obtain implicit ingredient data. Among them, "seasoning ingredients" refers to the various seasonings (such as salt, sugar, soy sauce, etc.) and their dosage information specified in the target recipe. In actual cooking, these seasonings are often not weighed using a food scale, but they still affect the nutritional components of the dish. "Hidden ingredient data" refers to the data that reflects the actual dosage and corresponding nutritional status of seasoning ingredients in actual cooking, obtained by calculating the scaling factor with the dosage of seasoning ingredients in the target recipe. It is a key part of improving the nutritional analysis report of the dish and makes the report more in line with the actual cooking situation.
[0084] Execution timing and scenario: This step is executed after the scaling factor is determined on the cloud server (step S303) and the target recipe is obtained (step S302). It aims to reasonably estimate the amount of unweighed seasoning ingredients in the target recipe based on the actual amount of ingredients used in cooking (reflected by the scaling factor), thereby obtaining more realistic nutritional data. It is suitable for the stage where a comprehensive and accurate nutritional analysis report of the dish needs to be generated.
[0085] Specifically, the cloud server first extracts the dosage information of various seasoning ingredients from the target recipe, such as "5 grams of salt, 10 grams of sugar, and 15 ml of soy sauce." Then, it retrieves the previously calculated scaling factor. Next, it multiplies the dosage of each seasoning ingredient by this scaling factor to calculate the corresponding amount of seasoning used in actual cooking. After obtaining this actual dosage data, and combining it with the known nutritional content of each seasoning, the actual nutritional benefits of the seasoning ingredients can be calculated. This combination of data, including actual dosage and corresponding nutritional information, constitutes the implicit ingredient data. S305. The cloud server uses implicit component data as a calculation factor in the nutrition analysis report.
[0086] As can be seen, the cloud server first generates a fingerprint sequence of ingredients based on weight information and voice signals, and records the ingredient information according to the operation sequence. Then, it uses this sequence to determine the target recipe, comprehensively considers the combination of ingredient types, weight ratios, and matches candidate recipes to determine the most suitable recipe. Next, it calculates a scaling factor using standard weights to obtain implicit component data for seasonings, and finally incorporates it into the nutritional analysis report calculation. This solves the problem of inaccurate and incomplete nutritional reports caused by users not weighing seasonings. By linking ingredient and seasoning information, even without specifically weighing seasonings, the report can cover all elements of the dish, outputting a complete and accurate nutritional analysis report, providing users with a comprehensive nutritional reference that matches the actual dish.
[0087] The following describes an exemplary food scale 400 provided in an embodiment of this application. Figure 4 This is an exemplary hardware structure diagram of the food scale 400 provided in this application embodiment.
[0088] In some embodiments, the food scale 400 is a computer device or includes a computer device within the food scale 400. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores data. The network interface of the computer device is used to communicate with other external terminals or servers via a network connection. In some embodiments, the network interface can be a wired network interface; in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, it implements the methods described in the embodiments of this application.
[0089] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0090] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application 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. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0091] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0092] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0093] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for processing nutritional information in a smart voice-activated food scale, characterized in that, include: When the processing module detects an object placed on the weighing module, it activates the weighing module to obtain weight information and the voice module to obtain voice signals. Under normal network connectivity, the processing module sends the weight information and the voice signal to the cloud server; The processing module receives a nutrition analysis report from the cloud server, and the cloud server parses the voice signal to obtain a first recognition result from the nutrition analysis report. Using the first identification result and the corresponding weight information as input, the system retrieves and calculates the data from the associated cloud-based food nutrition database; The processing module sends the nutritional analysis report to the display module for display. In the event of a network connection interruption, the processing module recognizes the voice signal to obtain a second recognition result, and based on the second recognition result and the corresponding weight information, retrieves and calculates basic nutritional values from a preset local food nutrition database; the amount of data in the local food nutrition database is less than that in the cloud-based food nutrition database. The processing module sends the basic nutrient values to the display module for display. Once the network connection is restored, the processing module receives the updated nutrition analysis report from the cloud server and sends the updated nutrition analysis report to the display module to update the display.
2. The method according to claim 1, characterized in that, After the processing module sends the nutrition analysis report to the display module for display, the method further includes: the processing module recording a local display timestamp; The step of sending the updated nutritional analysis report to the display module responsible for updating the display specifically includes: The processing module identifies conflicting data items in the basic nutrient values that have semantic or numerical conflicts with the updated nutrient analysis report; In the case of semantic conflict in the conflicting data items, the processing module performs arbitration explicitly, which triggers the user interaction arbitration interface, and the user interaction arbitration interface is updated and displayed according to the user's selection. In the case that the conflicting data item is a numerical conflict, the processing module determines the amount of preceding data in the basic nutrient value that precedes the conflicting data item. The processing module multiplies the amount of preceding data by a preset time coefficient to obtain an adaptive time threshold. If the actual time difference is less than the adaptive time threshold, the processing module performs a silent display, which means updating the updated nutrition analysis report; the actual time difference is the difference between the current time and the local display timestamp. If the actual time difference is not less than the adaptive time threshold, the processing module performs an upgrade explicit display, which involves updating and displaying the updated nutrition analysis report and triggering a correction flag and voice alarm.
3. The method according to claim 1, characterized in that, After the step of the processing module sending the weight information and the voice signal to the cloud server when the network connection is normal, the method further includes: The cloud server generates a food fingerprint sequence based on the weight information and the voice signal; The cloud server uses the ingredient fingerprint sequence to determine the target recipe; The cloud server extracts the standard weight of the ingredients from the target recipe and determines the scaling factor based on the ratio of the weight information to the standard weight. The cloud server applies the scaling factor to the seasoning ingredients of the target recipe to obtain implicit ingredient data; The cloud server uses latent component data as a calculation factor in the nutritional analysis report.
4. The method according to claim 3, characterized in that, The step of the cloud server generating a food fingerprint sequence based on the weight information and the voice signal specifically includes: The cloud server combines the first identification result and the obtained weight information each time as a food fingerprint; The cloud server stores multiple ingredient fingerprints generated during continuous operation into the cooking session to obtain the ingredient fingerprint sequence.
5. The method according to claim 4, characterized in that, The step of the cloud server storing multiple food fingerprints generated during continuous operation into the cooking session to obtain the food fingerprint sequence specifically includes: When a session is active, the cloud server will subsequently add the food fingerprints to all cooking sessions; the cloud server continuously monitors at least one preset cancellation condition, and cancels the current addition operation when any condition is met. The conditions for canceling the addition include: When the newly added ingredient fingerprint causes the number of candidate recipes to decrease by a preset threshold; When the newly added ingredient fingerprint results in no corresponding candidate recipe.
6. The method according to claim 5, characterized in that, While the session is active, the cloud server will subsequently add the ingredient fingerprints to all cooking sessions; the cloud server continuously monitors at least one preset cancellation condition, and when any condition is met, cancels the current addition operation step. If the cloud server determines that the ingredient fingerprint sequence corresponds to all ingredients in the candidate recipe, it will deactivate the ingredient fingerprint sequence.
7. The method according to claim 3, characterized in that, The steps by which the cloud server uses the ingredient fingerprint sequence to determine the target recipe specifically include: The cloud server performs probability matching between the combination of food types in the food fingerprint sequence and the weight ratio between each food and the candidate recipes in the cloud recipe database, and calculates a comprehensive confidence score for each candidate recipe. The cloud server will identify the candidate recipe with the highest overall confidence score as the target recipe.
8. A food scale, characterized in that, The food scale includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, and the one or more processors calling the computer instructions to cause the food scale to perform the method as described in any one of claims 1-7.
9. A computer program product containing instructions, characterized in that, When the computer program product is run on a food scale, it causes the food scale to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the food scale, the food scale performs the method as described in any one of claims 1-7.