Multi-context based coffee beverage recommendation method and coffee machine

CN122777591APending Publication Date: 2026-09-18QINGDAO LEJIA ELECTRIC APPLIANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610967613.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

[0004]本发明的一个目的在于,解决现有咖啡机推荐的咖啡饮品常常与用户当前的真实需求不符的问题

Benefits of technology

[0015] Based on the foregoing description, those skilled in the art will understand that in the aforementioned technical solution of the present invention, by synchronously collecting four types of real-time contextual data—time, weather, location, and social—and assigning dynamic weights to each contextual data based on preset rules, and then performing structured processing and fusion calculations on the contextual data with unified dimensions, and finally completing the recommendation of coffee drinks based on the comprehensive score, the recommendation results are more in line with the user's real needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122777591A_ABST
    Figure CN122777591A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of coffee equipment, and specifically provides a coffee beverage recommendation method based on multiple contexts and a coffee machine. The recommendation method comprises the following steps: collecting multiple context data at the current time; assigning a dynamic weight to each context data according to a preset core context determination rule; for each coffee beverage in a beverage library, performing structured processing on each context data to convert all context data into structured values of a unified dimension; for each coffee beverage, performing fusion calculation on all structured values and dynamic weights to obtain a comprehensive score of each coffee beverage; and sorting the comprehensive scores of all coffee beverages and recommending one or more coffee beverages with the highest comprehensive score. The present application makes the recommendation result more in line with the real needs of users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of coffee equipment technology, specifically providing a method for recommending coffee beverages based on multiple scenarios and a coffee machine. Background Technology

[0002] With the development of smart homes, some smart coffee machines have built-in beverage libraries, allowing users to manually select the coffee drinks they want. Furthermore, some coffee machines can proactively recommend coffee drinks based on the user's past drinking history, reducing the number of steps required from the user.

[0003] However, user demand for coffee beverages often fluctuates with changes in real-time scenarios. For example, seasonal changes, weather variations (high temperatures, rainy days, cold weather), different times of day (energizing in the morning, relaxing in the evening), different locations (home, office), and different social situations (alone, gathering) all significantly influence users' preferences for coffee flavor, temperature, and strength. Existing coffee machine recommendation methods either rely on manual selection by the user or make static recommendations based solely on historical records. They cannot perceive and utilize the aforementioned real-time and changing contextual information, resulting in recommended beverages that often do not match the user's current actual needs, requiring the user to manually adjust or reselect. This demonstrates poor intelligence and a subpar user experience. Summary of the Invention

[0004] One objective of this invention is to address the problem that existing coffee machines often recommend coffee drinks that do not match the user's actual needs.

[0005] To achieve the above objectives, the present invention provides, in a first aspect, a method for recommending coffee beverages based on multiple contexts, comprising: Collect multiple contextual data at the current moment, including time contextual data, weather contextual data, location contextual data, and social contextual data; According to the preset core scenario determination rules, a dynamic weight is assigned to each scenario data; the sum of all the dynamic weights is 1. For each coffee beverage in the beverage library, the contextual data is structured to convert all the contextual data into structured numerical values ​​with a unified dimension. For each of the coffee drinks, all the structured values ​​and dynamic weights are fused and calculated to obtain a comprehensive score for each coffee drink. The overall scores of all the coffee drinks are ranked, and one or more of the coffee drinks with the highest overall scores are recommended.

[0006] Optionally, the preset core context determination rules include: When the time-priority triggering condition is met, the time-context data is assigned the highest weight; When the time-priority triggering condition is not met but the weather-priority triggering condition is met, the weather scenario data is assigned the highest weight. When the weather priority triggering condition is not met but the location priority triggering condition is met, the location context data is assigned the highest weight. When the location-priority triggering condition is not met but the social-priority triggering condition is met, the social context data is assigned the highest weight. If none of the priority triggering conditions are met, the default weight is used.

[0007] Optionally, when one of the time context data, the weather context data, the location context data, and the social context data is assigned the highest weight, the other three context data are assigned the same weight; and / or, the highest weight is 0.4.

[0008] Optionally, the time-priority triggering conditions include: the current time is in the early morning or late at night; the weather-priority triggering conditions include: the temperature is higher than a first threshold, the temperature is lower than a second threshold, it is raining or snowing, or the relative humidity is higher than a humidity threshold; the location-priority triggering conditions include: the current location is an office, a hotel, or outdoors; and the social-priority triggering conditions include: the current social context involves multiple people.

[0009] Optionally, each of the coffee drinks is pre-configured with a context-value mapping table; the step of performing structured processing on the context data for each coffee drink in the beverage library to convert all the context data into structured values ​​with uniform dimensions includes: for each coffee drink in the beverage library, retrieving the structured values ​​corresponding to each context data in the context-value mapping table.

[0010] Optionally, for each of the coffee drinks, the process of fusing all the structured values ​​and the dynamic weighting machine to obtain a comprehensive score for each coffee drink includes: Calculate the mean of the basic linear score based on each of the structured numerical values ​​and the dynamic weights; Based on the structured numerical values ​​described above, a dynamic adaptive threshold is calculated in real time. Based on the dynamic adaptive threshold, positive and negative feature splitting is performed on each of the structured values ​​to obtain positive context adaptation gain and negative context conflict loss. Four-dimensional higher-order tensor coupling calculations are performed on each of the structured numerical values, and benchmark feature corrections are made in conjunction with the mean of the basic linear scores. Second-order cross-fusion is performed on any two of the structured numerical values ​​to obtain contextual interaction gain features; The tensor fusion baseline features are modified by beverage differentiation by configuring a fusion coefficient for each coffee beverage individually, so as to obtain tensor fusion modified features. The overall score of the coffee beverage is calculated based on the positive context adaptation gain, the negative context conflict loss, the context interaction gain feature, and the tensor fusion correction feature.

[0011] Optionally, calculating the overall score of the coffee beverage includes: Wherein, Score(i) is the overall score of the coffee beverage described in item i; S t S w S l and S s These are the structured numerical values ​​corresponding to the time context, weather context, location context, and social context, respectively; W is a weight matrix containing the dynamic weights mentioned above. S x and S y Represents any two distinct structured numerical values; w x and w y For S x and S y Dynamic weights; ⨂ represents the operation of four-dimensional higher-order tensor multiplication; K i Let K be the fusion coefficient of the coffee beverage described in the i-th paragraph, and 0.85 ≤ K. i ≤1.15; δ is the tensor reference correction coefficient, and 0.12≤δ≤0.17; λ is the second-order cross-fusion gain coefficient, and 0.1≤λ≤0.2; μ is the negative loss adjustment coefficient, and 0.9≤μ≤1.1; The mean of the basic linear fusion score; θ The threshold is dynamically adaptive, and 0.1 ≤ θ ≤0.2; L(θ) ) is the negative situational conflict loss function.

[0012] Optionally, Where θ0 is the baseline adaptation threshold, and 0.4≤θ0≤0.6; τ is the threshold dynamic adjustment coefficient, and 0.07≤τ≤0.09; σ(S x ) represents the standard deviation of all the structured values.

[0013] Optionally, the positive context adaptation gain and the negative context conflict loss are calculated using the following formula: Wherein, G(i) is the positive scenario adaptation gain, and L(i) is the negative scenario conflict loss; And / or, The step of calculating the mean of the basic linear score based on each of the structured numerical values ​​and the dynamic weights includes: .

[0014] In a second aspect, the present invention provides a coffee machine including a processor and a memory, wherein the memory stores a computer program, and the processor, when executing the computer program, is capable of implementing the recommended method described in any one of the first aspects.

[0015] Based on the foregoing description, those skilled in the art will understand that in the aforementioned technical solution of the present invention, by synchronously collecting four types of real-time contextual data—time, weather, location, and social—and assigning dynamic weights to each contextual data based on preset rules, and then performing structured processing and fusion calculations on the contextual data with unified dimensions, and finally completing the recommendation of coffee drinks based on the comprehensive score, the recommendation results are more in line with the user's real needs.

[0016] In particular, by adopting a dynamic weight allocation mechanism, the influence ratio of each scenario can be adaptively adjusted according to the core scenario, improving the flexibility of scenario adaptation. By using comprehensive score ranking as the recommendation basis to replace the traditional extensive recommendation logic, the matching degree between coffee drinks and the current scenario is effectively improved, reducing manual selection operations for users and enhancing the intelligence level and user experience of the coffee machine.

[0017] Furthermore, by sequentially introducing the mean of basic linear scores, dynamic adaptive thresholds, positive and negative feature splitting, four-dimensional high-order tensor coupling, second-order cross-fusion, and multi-layer operation logic for beverage differentiation correction, the recommendation results for coffee beverages are made more refined and accurate, enabling them to cope with diverse and complex usage scenarios.

[0018] In particular, the four-dimensional tensor product can capture the high-order interaction effects between four contextual factors (specifically, the structured numerical values ​​corresponding to the contextual data), namely time, weather, location, and social factors, which more closely approximate the complex decision-making logic of real-world scenarios. By calculating the dynamic adaptive threshold in real time and splitting each structured numerical value into positive and negative features, it can identify which contextual factors are "favorable" (above the threshold) or "unfavorable" (below the threshold) to the current coffee beverage, thereby calculating the adaptation gain and conflict loss respectively, improving the robustness of the recommendation results. By performing second-order cross-fusion on any two contextual factors (specifically, the structured numerical values ​​corresponding to the contextual data), the synergistic effect between them is captured, further enriching the expressive power of this invention. By configuring fusion coefficients separately for each coffee beverage, the tensor fusion results are differentiated, allowing the same fusion model (the formula for calculating the comprehensive score of coffee beverages) to adapt to the individual characteristics of different coffee beverages, achieving a compromise of "model sharing and coefficient independence".

[0019] Other beneficial effects of the present invention will be described in detail below with reference to the accompanying drawings, so that those skilled in the art can more clearly understand the improved objectives, features and advantages of the present invention. Attached Figure Description

[0020] To more clearly illustrate the technical solution of the present invention, some embodiments of the present invention will be described below with reference to the accompanying drawings. Those skilled in the art should understand that the same reference numerals may indicate the same or similar parts or components in different drawings; the drawings of the present invention are not necessarily drawn to scale. In the drawings: Figure 1 This is a flowchart of the steps of a coffee beverage recommendation method based on multiple scenarios in some embodiments of the present invention; Figure 2 yes Figure 1 Flowchart of the specific steps in step S400; Figure 3 This is a schematic block diagram of a coffee machine provided by the present invention. Detailed Implementation

[0021] Those skilled in the art should understand that the embodiments described below are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. These partial embodiments are intended to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present invention.

[0022] It should be noted that in the description of this invention, terms such as "center," "upper," "lower," "top," "bottom," "left," "right," "vertical," "horizontal," "inner," and "outer," which indicate direction or positional relationships, are based on the direction or positional relationships shown in the accompanying drawings. These are used merely for ease of description and do not indicate or imply that the corresponding device or element must have a specific orientation, or be constructed and operated in a specific orientation; therefore, they should not be construed as limitations on this invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0023] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" 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; and they can also refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0024] Furthermore, it should be noted that in this invention, the flowchart is not intended to indicate that the operations of the method will be performed in any particular order, or that all operations of the method are included in all every case. Moreover, the method may include additional operations. Within the scope of the technical concept provided by the method of this embodiment, additional variations can be made to the following method.

[0025] Finally, it should be noted that in the description of this invention, each functional module can be a physical module composed of multiple structures, components, or electronic devices, or a virtual module composed of multiple programs; each functional module can be an independent module or a module divided from a whole module according to its function. Those skilled in the art should understand that, provided the technical solution described in this invention can be implemented, any changes in the configuration, implementation, or positional relationship of the functional modules will not deviate from the technical principles of this invention, and therefore should all fall within the protection scope of this invention.

[0026] like Figure 1 As shown, in some embodiments of the present invention, a method for recommending coffee beverages based on multiple contexts includes: Step S100: Collect multiple contextual data at the current moment, including time contextual data, weather contextual data, location contextual data, and social contextual data.

[0027] Among them, time context data refers to the current time or time period label, which is used to distinguish different drinking times such as early morning, daytime, and late night, in order to meet users' differentiated needs such as refreshing and soothing.

[0028] Among them, weather scenario data refers to real-time temperature, weather type (sunny / rainy / snowy), relative humidity, etc.

[0029] Among them, location context data refers to the current geographical location of the coffee machine, which is divided into scenarios such as home, office, hotel, and outdoors.

[0030] Among them, social context data refers to the number of people in the current usage scenario, which is divided into two categories: single person alone and group gathering.

[0031] Specifically, time context data can be obtained through the timing module or via the internet through the communication module. Local weather context data can be obtained via the internet through the communication module. Location context data can be obtained through the positioning module (e.g., GPS, BeiDou, or WiFi). Social context data can be obtained through the human-computer interaction module (e.g., a display screen with touch buttons).

[0032] It should be noted that all of the above-mentioned functional modules can be built into the coffee machine, or into any other feasible electronic device that communicates with the coffee machine. For example, they can be built into a mobile phone, which then sends the information to the coffee machine after obtaining it.

[0033] The social context data can be input by the user. Alternatively, the human-computer interaction module can be set up as an image acquisition module, which can then capture images of the coffee machine's environment and use image recognition technology to determine the number of people in the current scene, thereby identifying the social environment data based on the number of people.

[0034] Step S200: Assign dynamic weights to each scenario data according to the preset core scenario judgment rules; the sum of all dynamic weights is 1.

[0035] In this step, the dynamic weights assigned to the time context data, weather context data, location context data, and social context data are denoted as w, respectively. t w w w l and w s And w t +w w +w l +w s =1.

[0036] Among them, dynamic weights represent the proportion of influence of single-class contextual data on coffee beverage recommendation results. The larger the weight value, the stronger the dominant role of that type of context in the recommendation results.

[0037] The preset core context determination rules are as follows: time context takes precedence over weather context, weather context takes precedence over location context, and location context takes precedence over social context, with determinations triggered sequentially. Specifically, the preset core context determination rules include: When the time-priority trigger condition is met, the time-contextual data is assigned the highest weight. For example, w t =0.4, w w =w l =w s =0.2. The time-priority triggering conditions include: the current time is in the early morning or late night.

[0038] The early morning period is set from 5:00 to 8:00, which corresponds to the user's need for morning alertness, while the late night period is set from 22:00 to 1:00 the next day, which corresponds to the user's need for nighttime relaxation.

[0039] When the time-priority trigger condition is not met but the weather-priority trigger condition is met, the weather scenario data is assigned the highest weight. For example, w w =0.4, w t =w l =w s =0.2. Weather priority triggering conditions include: temperature above the first threshold, temperature below the second threshold, rain or snow, or relative humidity above the humidity threshold (any one of these conditions will trigger the trigger).

[0040] The first threshold is the high-temperature threshold, ranging from 28℃ to 35℃, for example, 30℃. The second threshold is the low-temperature threshold, ranging from 0℃ to 10℃, for example, 5℃. The humidity threshold ranges from 70% to 90%, for example, 80%.

[0041] When the weather-priority trigger condition is not met but the location-priority trigger condition is met, the location context data is assigned the highest weight. For example, w l =0.4, w t =w w =w s =0.2. Location-priority trigger conditions include: the current location is an office, hotel, or outdoors.

[0042] When the location-priority trigger condition is not met but the social-priority trigger condition is met, the social context data is assigned the highest weight. For example, w s =0.4, w t =w w =w l=0.2. Social priority triggering conditions include: the current social context involves multiple people (gathering, multi-person office, etc.).

[0043] When none of the priority triggering conditions are met, the default weight is used. For example, w t =w w =w l =w s =0.25.

[0044] Furthermore, when one of the time-contextual data, weather-contextual data, location-contextual data, and social-contextual data is assigned the highest weight, the other three contextual data are assigned equal weights.

[0045] Optionally, the highest weight is 0.4, and the other three weights are 0.2 each.

[0046] Those skilled in the art will understand that step S200 is designed to enable dynamic weights to automatically amplify the influence of the core context based on the real-time scenario, thereby significantly improving the flexibility of scenario adaptation.

[0047] Step S300: For each coffee beverage in the beverage library, perform structured processing on the contextual data to convert all contextual data into structured numerical values ​​with uniform dimensions.

[0048] Those skilled in the art will understand that step S300 aims to convert the raw context data into structured numerical values ​​with uniform dimensions, providing a standardized data foundation for subsequent fusion calculations.

[0049] Each coffee beverage has a pre-set scenario-numerical mapping table.

[0050] Step S300 further includes: for each coffee beverage in the beverage library, retrieving the structured numerical value corresponding to each context data in the context-numerical mapping table.

[0051] The beverage library is a list of all coffee beverages stored in the coffee machine or a device that communicates with the coffee machine (such as a mobile phone), including a variety of preset beverages such as Americano, latte, cappuccino, and cold brew.

[0052] The context-value mapping table predefines the suitability score for each coffee beverage under different times, weather, locations, and social scenarios. In other words, the context-value mapping table contains structured numerical values ​​corresponding to contextual data, weather contextual data, location contextual data, and social contextual data.

[0053] In this step, the structured values ​​corresponding to the time context data, weather context data, location context data, and social context data are denoted as S. t S w Sl and S s The four structured values ​​all range from [0,1]. The closer the value is to 1, the better the coffee beverage is suited to the current context.

[0054] For example, if the current scenario is a hot summer day (weather situation), the mapping table for coffee drinks - "cold brew coffee" is retrieved, and the table is looked up to obtain S. w =0.95 (fitness close to 1, relatively high). Retrieve the mapping table for coffee drinks – “Hot Latte”, and look up the table to get S. w =0.2 (fit is close to 0, which is relatively low).

[0055] Step S400: For each coffee beverage, all structured values ​​and dynamic weights are integrated and calculated to obtain a comprehensive score for each coffee beverage.

[0056] Step S500: Sort all coffee drinks by their overall scores and recommend one or more coffee drinks with the highest overall scores.

[0057] In step S500, the highest-scoring coffee beverage or the top three can be selected and the recommended results displayed on the coffee machine's screen, allowing the user to choose and prepare it with a single click. Furthermore, the screen can be a touchscreen; when the user touches any coffee beverage, the coffee machine begins preparing that beverage.

[0058] Those skilled in the art will understand that by synchronously collecting real-time contextual data in four categories—time, weather, location, and social—and assigning dynamic weights to each contextual data based on preset rules, then performing structured processing and fusion calculations on the contextual data with unified dimensions, and finally completing coffee beverage recommendations based on comprehensive scores, the recommendation results are more in line with the user's actual needs.

[0059] In particular, by adopting a dynamic weight allocation mechanism, the influence ratio of each scenario can be adaptively adjusted according to the core scenario, improving the flexibility of scenario adaptation. By using comprehensive score ranking as the recommendation basis to replace the traditional extensive recommendation logic, the matching degree between coffee drinks and the current scenario is effectively improved, reducing manual selection operations for users and enhancing the intelligence level and user experience of the coffee machine.

[0060] like Figure 2 As shown, step S400 further includes: Step S410: Calculate the mean of the basic linear scores based on each structured value and dynamic weight. The specific formula is as follows: Among them, S t S w S land S s These are structured numerical values ​​(referred to as context factors) corresponding to time context, weather context, location context, and social context, respectively. t w w w l and w s S t S w S l and S s The dynamic weights, as described above From the formula above, we can see that the mean of the basic linear score... It is the average value after weighting and summing all context factors, used to reflect the basic fit level between coffee beverages and the four types of context factors.

[0061] Step S420: Calculate the dynamic adaptive threshold in real time based on each structured value.

[0062] In this step, the dynamic adaptive threshold is calculated using the following formula: Where θ0 is the baseline adaptation threshold, and 0.4 ≤ θ0 ≤ 0.6; τ is the threshold dynamic adjustment coefficient, and 0.07 ≤ τ ≤ 0.09. σ(S x S is the standard deviation of all structured values. t S w S l and S s The standard deviation of σ(S). x This is used to characterize the degree of dispersion of the current four types of context factors. The higher the dispersion, the greater the threshold adaptive offset.

[0063] In this step, 0.1 ≤ θ ≤0.2. Specifically, if θ If the calculated result is less than 0.1, then the value is 0.1. If θ If the calculated result is greater than 0.2, then the value is 0.2.

[0064] Step S430: Based on the dynamic adaptive threshold, perform positive and negative feature splitting calculation on each structured value to obtain positive context adaptation gain and negative context conflict loss.

[0065] Wherein, the positive context adaptation gain G(i) is the structured numerical value greater than or equal to the dynamic adaptive threshold θ. The positive score contributed by the context factor indicates a high degree of match between the scene and the coffee beverage; Wherein, the negative contextual conflict loss L(i) is the structured numerical value less than the dynamic adaptive threshold θ. The deduction in score due to contextual factors indicates a conflict between the scene and the coffee beverage.

[0066] In this step, the positive scenario adaptation gain G(i) and the negative scenario conflict loss L(i) are calculated using the following formulas: Where G(i) is the positive context adaptation gain and L(i) is the negative context conflict loss.

[0067] Among them, S x w represents the structured numerical values ​​corresponding to time context, weather context, location context, and social context. x For S x Dynamic weights.

[0068] Step S440: Perform four-dimensional high-order tensor coupling calculation on each structured numerical value, and perform benchmark feature correction in combination with the mean of the basic linear score.

[0069] Step S450: Perform second-order cross-fusion on any two structured numerical values ​​to obtain contextual interaction gain features.

[0070] Step S460: The tensor fusion baseline features are modified by beverage differentiation through the fusion coefficient configured separately for each coffee beverage to obtain the tensor fusion modified features.

[0071] Step S470: Calculate the overall score of the coffee beverage based on the positive context adaptation gain, negative context conflict loss, context interaction gain features, and tensor fusion correction features.

[0072] Those skilled in the art will understand that by sequentially introducing the mean of basic linear scores, dynamic adaptive thresholds, positive and negative feature splitting, four-dimensional high-order tensor coupling, second-order cross-fusion, and multi-layered computational logic for beverage differentiation correction, the recommendation results for coffee beverages become more refined and accurate, enabling them to cope with diverse and complex usage scenarios.

[0073] In particular, the four-dimensional tensor product can capture the high-order interaction effects between four contextual factors (specifically, the structured numerical values ​​corresponding to the contextual data), namely time, weather, location, and social factors, which more closely approximate the complex decision-making logic of real-world scenarios. By calculating the dynamic adaptive threshold in real time and splitting each structured numerical value into positive and negative features, it can identify which contextual factors are "favorable" (above the threshold) or "unfavorable" (below the threshold) to the current coffee beverage, thereby calculating the adaptation gain and conflict loss respectively, improving the robustness of the recommendation results. By performing second-order cross-fusion on any two contextual factors (specifically, the structured numerical values ​​corresponding to the contextual data), the synergistic effect between them is captured, further enriching the expressive power of this invention. By configuring fusion coefficients separately for each coffee beverage, the tensor fusion results are differentiated, allowing the same fusion model (the formula for calculating the comprehensive score of coffee beverages) to adapt to the individual characteristics of different coffee beverages, achieving a compromise of "model sharing and coefficient independence".

[0074] Further, in step S470, the overall score of the coffee beverage is calculated, including: Score(i) is the overall score of the i-th coffee beverage.

[0075] Among them, S t S w S l and S s These are structured values ​​corresponding to time context, weather context, location context, and social context, respectively; W represents the dynamic weights (w... t w w w l and w s The weight matrix is ​​used to perform matrix operations with the tensor operation results.

[0076] Among them, S x and S y Represents any two distinct structured numerical values; w x and w y For S x and S y Dynamic weights.

[0077] Where ⨂ represents the four-dimensional higher-order tensor product operation, used to calculate S. t S w S l and S s Four dimensions of high-order interaction effects capture the complex relationships resulting from the superposition of multiple contexts.

[0078] Among them, K i Let K be the fusion coefficient of the i-th coffee beverage, and 0.85 ≤ K.i ≤1.15. Due to the differences in taste and properties among various coffee drinks, using a uniform calculation model would lead to recommendation bias. This step addresses this by configuring a fusion coefficient K individually for each coffee drink. i This achieves differentiated adaptation of "general algorithm model + individual product independent coefficient".

[0079] Where μ is the negative loss adjustment coefficient, and 0.9≤μ≤1.1.

[0080] in, δ is the mean of the basic linear fusion score (as described above); δ is the tensor baseline correction coefficient, used to make a secondary correction to the tensor operation result by combining the mean of the basic linear score, and 0.12≤δ≤0.17.

[0081] Where, θ The threshold is dynamically adaptive (as described above), and 0.1 ≤ θ ≤0.2; L(θ) ) is the negative situational conflict loss L(i) calculated in step S430.

[0082] in, Here is the formula for second-order cross-fusion of any two structured numerical values ​​(i.e., the calculation formula in step S450). λ is the second-order cross-fusion gain coefficient, and 0.1≤λ≤0.2.

[0083] in, The tensor fusion correction feature obtained in step S460.

[0084] To adapt to low-end models and reduce computational complexity, in other embodiments of the present invention, those skilled in the art can replace steps S410 to S470 as needed with the following formulas: Score(i) = S t (i)×w t (i)+S w (i)×w w (i)+S l (i)×w l (i)+S s (i)×w s (i); Where Score(i) is the overall score of the i-th coffee drink, S t (i), S w (i), S l (i) and S s (i) represent the structured values ​​of the time context, weather context, location context, and social context corresponding to the i-th coffee beverage, respectively, w t (i), ww (i), w l (i) and w s (i) represents the dynamic weights of the time context, weather context, location context, and social context corresponding to the i-th coffee drink.

[0085] Furthermore, in some embodiments of the present invention, those skilled in the art can, as needed, continuously collect data on the user's selection, adjustment, and rejection behaviors regarding recommended coffee drinks under different circumstances during the operation of the coffee machine. Then, based on user feedback, the values ​​of fixed parameters such as θ0, τ, δ, λ, and μ are dynamically adjusted to adaptively shift within a specified range to suit individual drinking preferences.

[0086] Those skilled in the art can also, in cases where high-scoring coffee drinks are repeatedly rejected by users while low-scoring coffee drinks are actively selected by users, cause the coffee machine to iteratively adjust the K value of the corresponding coffee drink within the range of 0.85 to 1.15. i This is to gradually reduce recommendation bias and adapt the calculation model to users' personalized tastes.

[0087] Those skilled in the art can also continuously optimize the structured numerical S under different scenarios by combining long-term contextual data and user selection records. t S w S l and S s This allows the mapping relationship to evolve dynamically with user habits, thereby further improving the accuracy of context matching.

[0088] Those skilled in the art can also, based on the core context determination rules, enable the coffee machine to statistically analyze the recommendation hit rate under different scenarios, and make minor adaptive adjustments to the boundary rules of the four triggering conditions of time, weather, location, and social interaction, in order to optimize the dynamic weight allocation logic.

[0089] like Figure 3 As shown, the present invention also provides a coffee machine 001, including a processor 100 and a memory 200. The memory 200 stores a computer program 201. When the processor 100 executes the computer program 201, it can implement the recommended method described in any of the preceding embodiments.

[0090] The processor 100 may be adapted to execute stored instructions, and the processor 100 may be a single-core processor, a multi-core processor, a computing cluster, or any number of other configurations.

[0091] The memory 200 can provide temporary storage space for the operation of the above instructions during operation. The memory 200 may include random access memory (RAM), read-only memory, flash memory, or any other suitable storage system.

[0092] The computer program 201 used to perform the operations of this invention may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages ​​and procedural programming languages. The computer program 201 may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer can connect to the user's computer via any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can connect to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, to perform aspects of the invention, electronic circuits, including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can execute computer-readable program instructions to personalize the electronic circuits by utilizing state information of computer-readable program instructions.

[0093] The technical solutions of the present invention have been described in conjunction with several embodiments above. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is not limited to these specific embodiments. Without departing from the technical principles of the present invention, those skilled in the art can disassemble and combine the technical solutions in the above embodiments, and can also make equivalent changes or substitutions to related technical features. Any changes, equivalent substitutions, improvements, etc., made within the technical concept and / or technical principles of the present invention will fall within the scope of protection of the present invention.

Claims

1. A method for recommending coffee beverages based on multiple contexts, comprising: Collect multiple contextual data at the current moment, including time contextual data, weather contextual data, location contextual data, and social contextual data; According to the preset core scenario determination rules, a dynamic weight is assigned to each scenario data; the sum of all the dynamic weights is 1. For each coffee beverage in the beverage library, the contextual data is structured to convert all the contextual data into structured numerical values ​​with a unified dimension. For each of the coffee drinks, all the structured values ​​and dynamic weights are fused and calculated to obtain a comprehensive score for each coffee drink. The overall scores of all the coffee drinks are ranked, and one or more of the coffee drinks with the highest overall scores are recommended.

2. The recommendation method according to claim 1, wherein, The preset core context determination rules include: When the time-priority triggering condition is met, the time-context data is assigned the highest weight; When the time-priority triggering condition is not met but the weather-priority triggering condition is met, the weather scenario data is assigned the highest weight. When the weather priority triggering condition is not met but the location priority triggering condition is met, the location context data is assigned the highest weight. When the location-priority triggering condition is not met but the social-priority triggering condition is met, the social context data is assigned the highest weight. If none of the priority triggering conditions are met, the default weight is used.

3. The recommendation method according to claim 2, wherein, When one of the time context data, the weather context data, the location context data, and the social context data is assigned the highest weight, the other three context data are assigned equal weights; and / or, The highest weight is 0.

4.

4. The recommended method according to claim 3, wherein, The time-priority triggering conditions include: the current time is either early morning or late at night; The weather priority triggering conditions include: temperature above a first threshold, temperature below a second threshold, rain or snow, or relative humidity above a humidity threshold. The location priority triggering conditions include: the current location is an office, hotel, or outdoors; The social priority triggering conditions include: the current social context involves multiple people.

5. The recommendation method according to claim 1, wherein, Each of the coffee drinks mentioned has a pre-defined scenario-numerical mapping table; For each coffee beverage in the beverage library, the contextual data is structured to convert all contextual data into structured numerical values ​​with uniform dimensions, including: For each coffee beverage in the beverage library, retrieve the structured numerical value corresponding to each context data from the context-value mapping table.

6. The recommendation method according to claim 1, wherein, For each of the coffee drinks, all the structured values ​​and dynamic weights are fused and calculated to obtain a comprehensive score for each coffee drink, including: Calculate the mean of the basic linear score based on each of the structured numerical values ​​and the dynamic weights; Based on the structured numerical values ​​described above, a dynamic adaptive threshold is calculated in real time. Based on the dynamic adaptive threshold, positive and negative feature splitting is performed on each of the structured values ​​to obtain positive context adaptation gain and negative context conflict loss. Four-dimensional higher-order tensor coupling calculations are performed on each of the structured numerical values, and benchmark feature corrections are made in conjunction with the mean of the basic linear scores. Second-order cross-fusion is performed on any two of the structured numerical values ​​to obtain contextual interaction gain features; The tensor fusion baseline features are modified by beverage differentiation by configuring a fusion coefficient for each coffee beverage individually, so as to obtain tensor fusion modified features. The overall score of the coffee beverage is calculated based on the positive context adaptation gain, the negative context conflict loss, the context interaction gain feature, and the tensor fusion correction feature.

7. The recommended method according to claim 6, wherein, The calculation of the overall score for the coffee beverage includes: Wherein, Score(i) is the overall score of the coffee beverage described in item i; S t S w S l and S s These are the structured numerical values ​​corresponding to the time context, weather context, location context, and social context, respectively; W is a weight matrix containing the dynamic weights mentioned above. S x and S y Represents any two distinct structured numerical values; w x and w y For S x and S y Dynamic weights; ⨂ represents the operation of four-dimensional higher-order tensor multiplication; K i Let K be the fusion coefficient of the coffee beverage described in the i-th paragraph, and 0.85 ≤ K. i ≤1.15; δ is the tensor reference correction coefficient, and 0.12≤δ≤0.17; λ is the second-order cross-fusion gain coefficient, and 0.1≤λ≤0.2; μ is the negative loss adjustment coefficient, and 0.9≤μ≤1.1; The mean of the basic linear fusion score; θ The threshold is dynamically adaptive, and 0.1 ≤ θ ≤0.2; L(θ) ) is the negative situational conflict loss function.

8. The recommended method according to claim 7, wherein, Where θ0 is the baseline adaptation threshold, and 0.4≤θ0≤0.6; τ is the threshold dynamic adjustment coefficient, and 0.07≤τ≤0.09; σ(S x ) represents the standard deviation of all the structured values.

9. The recommended method according to claim 8, wherein, The positive context adaptation gain and the negative context conflict loss are calculated using the following formulas: Wherein, G(i) is the positive scenario adaptation gain, and L(i) is the negative scenario conflict loss; And / or, The step of calculating the mean of the basic linear score based on each of the structured numerical values ​​and the dynamic weights includes: 。 10. A coffee machine comprising a processor and a memory, the memory storing a computer program, wherein the processor, when executing the computer program, is capable of implementing the recommended method of any one of claims 1 to 9.