A Clothing Selection Method Based on Context Awareness and Cognitive Adaptation
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-02
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]本发明提出了一种基于上下文感知与认知自适应的服装选品方法,解决了现有服装选品系统缺乏对用户操作行为的主动感知与协同能力,导致交互断裂、意图理解能力差的问题
[0067]1、本发明通过前端交互事件捕获技术实时获取用户浏览行为和商品标识符,构建全局意图上下文,结合多维文本特征提取与综合评分算法,将用户查询从孤立文本转化为带场景语义的结构化意图,实现从关键词匹配到情境理解的技术跃迁,显著降低用户操作负担;
Smart Images

Figure CN122573553A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent e-commerce technology, specifically to a clothing product selection method based on context awareness and cognitive adaptation. Background Technology
[0002] With the rapid development of the apparel e-commerce industry and increasingly fierce market competition, the accuracy and efficiency of product selection decisions directly affect a company's inventory turnover and profit levels. The product selection process is essentially a complex decision-making process that integrates multi-dimensional information such as market trend analysis, consumer insights, and supply chain assessment, and it highly relies on the decision-maker's experience and intuition. However, existing tools are inadequate in handling this complex decision-making scenario, and there is an urgent need for more intelligent technological solutions to improve the accuracy and efficiency of product selection decisions.
[0003] In recent years, to overcome the limitations of traditional product selection tools, the industry has begun to explore the introduction of general chatbots based on large language models into e-commerce support scenarios. This type of technology, through natural language interaction, can theoretically provide users with a more flexible query experience and richer information feedback, attempting to act as an intelligent assistant in the product selection decision-making process to improve the rigid interaction and limited information presentation of traditional software.
[0004] However, existing technologies still have significant shortcomings: Current systems cannot capture the products a user is currently viewing and the interface state. When a user asks a question about a specific product, they cannot associate the question with the current focused context, often requiring the user to manually specify the product number or name, leading to a broken and inefficient interaction flow. Furthermore, they cannot accurately identify the complex intent behind user queries, lack the ability to automatically break down complex needs into executable tasks and dynamically optimize the execution order, making it difficult to handle complex multi-step product selection analysis. There is a lack of mechanisms to assess user expertise, resulting in homogenized information output to all users. Novices struggle to interpret the massive amounts of raw data, while experts believe that shallow summarization cannot meet the needs of in-depth analysis, necessitating secondary processing using other tools. Most importantly, general models lack structured embedding of professional knowledge in the apparel industry, resulting in fixed, templated output that cannot adaptively adjust its professional depth based on user cognitive characteristics. Answers are often superficial, failing to provide in-depth analysis with practical business guidance. These systems are essentially still isolated question-and-answer interaction units, unable to deeply integrate into the user's product selection workflow, lacking the proactive perception and collaborative capabilities of user behavior, and therefore unable to fulfill the professional role of a digital buyer. Summary of the Invention
[0005] This invention proposes a clothing selection method based on context awareness and cognitive adaptation, which solves the problem that existing clothing selection systems lack the ability to actively perceive and coordinate user operation behaviors, resulting in interaction breaks and poor intent understanding.
[0006] To address the aforementioned technical problems, this invention provides a clothing selection method based on context awareness and cognitive adaptation, comprising the following steps:
[0007] Step S1: Capture user interaction events with products on the front-end interface, calculate the context relevance score of each product based on the behavior type weight and time decay of each interaction event, and sort the products with scores exceeding the threshold in descending order to form a global intent context.
[0008] Step S2: Extract the text features of the user's input query statement and calculate the overall query score. Identify the user's query intent based on the text features and the global intent context. Decompose the query intent into multiple sub-tasks with dependencies. Execute each sub-task after dynamically calculating its priority.
[0009] Step S3: Based on the forgetting curve, the user's historical professional index is decayed over time. The decay result is then weighted and fused with the query comprehensive score to update the user's current professional index.
[0010] Step S4: Obtain business data and extract summaries based on the execution results of subtasks, map the current professional index to a mixed weight, fill the summaries into the expert response template and novice response template respectively according to the mixed weight, and perform fusion rendering to generate a clothing selection recommendation report for users.
[0011] Preferably, the calculation of the context relevance score for each product in step S1 includes the following steps:
[0012] Step S11: For any product identifier, assign corresponding basic weights to the various interactive events associated with the current product identifier;
[0013] Step S12: Calculate the retention value of each interaction event using the exponential decay model:
[0014] ;
[0015] In the formula, Product identifier At any moment Corresponding to the The retention value of secondary interaction events; Indicates the first The specific behavior type of this interaction event The corresponding basic weights; Indicates the attenuation constant; The timestamp indicating the current moment when the user initiated the query; Indicates the first The absolute timestamp of the next interactive event;
[0016] Step S13: Sum all retention values corresponding to the same product identifier and multiply by a visibility inhibition factor related to the state of the front-end visible area to obtain the context relevance score of the current product identifier. The expression for the visibility inhibition factor is:
[0017] ;
[0018] In the formula, For product identifiers Visual inhibitory factors; This is the lower bound protection constant for the visible inhibition factor; The attenuation coefficient for the visible area; For product identifiers The duration of the most recent time the character was scrolled out of the foreground visible area;
[0019] Step S14: Arrange the product identifiers with context relevance scores greater than a preset threshold in descending order of scores to form a score vector, which serves as the global intent context.
[0020] Preferably, step S2, which involves extracting the text features of the user-input query and calculating the overall query score, includes the following steps:
[0021] Step S21: Extract the lexical complexity features of the query statement. syntactic structural features of logical clauses Domain terminology frequency characteristics and the characteristics of explicit intent The quantification methods for each feature are as follows:
[0022] ;
[0023] ;
[0024] ;
[0025] ;
[0026] In the formula, To query the number of clothing-related technical terms in the query statement; This represents the total number of words in the query statement; This represents the number of logical clauses in the query statement; This represents the total number of query statements. The number of high-frequency technical terms that appear two or more times in the query statement; The average occurrence of frequently used terms by professional users; The number of limiting conditions in the query statement; The maximum number of conditions is preset;
[0027] Step S22: Assign weights to each feature. , , , The overall score is calculated by weighted summation:
[0028] ;
[0029] In the formula, For users in the first Next interaction time The overall score for the query.
[0030] Preferably, in step S2, the query intent is broken down into multiple subtasks with dependencies, and the priority of each subtask is dynamically calculated before execution. This includes the following steps:
[0031] The subtasks are organized into a directed acyclic graph, where nodes in the directed acyclic graph represent subtasks and directed edges represent dependencies between subtasks.
[0032] The expression for the dynamic priority score of each subtask is:
[0033] ;
[0034] ;
[0035] ;
[0036] In the formula, Dynamic priority scoring; For the first Sub-tasks Initial priority; For the first Sub-tasks The business urgency factor; For the first Sub-tasks Topological depth factor; For the first Sub-tasks The waiting compensation factor; It is a load suppression factor; The damping coefficient; For a directed acyclic graph that depends on The set of subsequent subtasks; For subtasks The estimated cost; This is the upper bound cutoff constant for the topological depth factor; For the task The time when the item enters the scheduling queue; This is the maximum service delay time limit; For exponential parameters; This is the upper bound threshold for the waiting compensation factor; This refers to the current moment.
[0037] Preferably, the expression for the business urgency factor is:
[0038] ;
[0039] ;
[0040] In the formula, The gain coefficient is marked as urgent. For indicator functions, when The value is 1 if the corresponding query intent belongs to the preset urgent intent set, and 0 otherwise. This is the time remaining sensitivity coefficient; The remaining time ratio; for The business cutoff time; for The moment of its creation.
[0041] Preferably, the expression for the load suppression factor is:
[0042] ;
[0043] In the formula, Indicates the current real-time load rate of the requested heterogeneous data source; This represents the resource load sensitivity index; This is the lower bound protection constant for the load suppression factor.
[0044] Preferably, the time decay of the user's historical professionalism index based on the forgetting curve in step S3 includes the following steps:
[0045] Step S31: Determine whether the current user has a historical professional index record. If not, set an initial professional index based on the query comprehensive score; otherwise, obtain the historical professional index of the user after the last interaction and the time interval between the last interaction and the current interaction.
[0046] Step S32: Calculate the user's diminished expertise level before initiating the current query.
[0047] ;
[0048] ;
[0049] In the formula, For users in the first The time corresponding to the next interaction The professionalism diminished before initiating the query statement; For users in the first The time corresponding to the next interaction Professionalism index; For time intervals; This refers to the cognitive half-life constant; This is a professionalism protection factor.
[0050] Step S33: Utilize an exponentially weighted moving average to fuse the decayed professionalism score with the overall query score, and update the user's current professionalism index:
[0051] ;
[0052] In the formula, This indicates the user's current level of expertise. The learning rate is dynamic. This is the overall score for the current query.
[0053] Preferably, the extraction of the summary in step S4 includes the following steps:
[0054] Step S41: Perform word segmentation on the business data and construct a graph model containing candidate word nodes;
[0055] Step S42: Calculate the domain comprehensive weight for each candidate word node based on the domain dictionary and pre-trained word vectors.
[0056] ;
[0057] In the formula, Candidate word nodes The overall weight of the domain; To adjust the parameters; for Inverse document frequency enhancement score; for The maximum cosine similarity with the preset centroid vector of the apparel product selection business;
[0058] Step S43: Based on the comprehensive weight of the domain and the co-occurrence relationship between nodes, construct a non-uniform state transition probability matrix;
[0059] Step S44: Perform iterative calculations on all candidate word nodes according to the non-uniform state transition probability matrix until the global node weights converge;
[0060] Step S45: Sort the source text sentences in descending order according to the converged node weights, and extract the top-ranked preset number of sentences as the summary.
[0061] Preferably, the expression for the iterative operation in step S44 is:
[0062] ;
[0063] ;
[0064] In the formula, , Representing candidate word nodes respectively and In the The second iteration and the first The weights for the next iteration; The damping coefficient; To point to candidate word nodes The set of all source nodes; Indicates that it is from the source node Transfer to adjacent target node The transition probability; For nodes and The number of co-occurrences within a preset length sliding window; The field gravity index parameter; Represents a node The set of adjacent nodes it points to.
[0065] Preferably, in step S4, mapping the current professionalism index to a hybrid weight and fusing the outputs of the expert response template and the novice response template according to the hybrid weight includes the following steps: performing a smooth nonlinear mapping on the current professionalism index, calculating the probability value of triggering the expert response template, and using the probability value as the hybrid weight; based on the proportion indicated by the hybrid weight, calling a natural language generation model to dynamically assemble and fuse the data analysis content generated by the expert response template and the conclusive text generated by the novice response template to generate the clothing selection recommendation report.
[0066] The advantages of this invention include at least the following:
[0067] 1. This invention uses front-end interactive event capture technology to obtain user browsing behavior and product identifiers in real time, constructs a global intent context, and combines multi-dimensional text feature extraction and comprehensive scoring algorithms to transform user queries from isolated text into structured intents with contextual semantics, achieving a technological leap from keyword matching to contextual understanding and significantly reducing the user's operational burden.
[0068] 2. By employing intent decomposition and task dependency graph construction techniques, complex product selection decisions are broken down into sub-tasks with dependencies, overcoming the limitation of traditional systems that can only handle single-step queries; and by using a dynamic priority scoring algorithm to achieve adaptive optimization of task execution order, it is more adaptable to the complex business scenarios of multiple intertwined factors in apparel product selection compared to fixed rule scheduling.
[0069] 3. The professionalism index model, which introduces a time decay mechanism, transforms users' historical behavior data into quantifiable cognitive ability assessment indicators. This overcomes the deficiency that static user profiles cannot reflect changes in ability. By balancing historical accumulation and recent performance through the exponential decay formula, it achieves dynamic tracking of users' professional level and provides a data foundation for personalized services. Attached Figure Description
[0070] Figure 1 This is a schematic diagram of the system structure according to an embodiment of the present invention;
[0071] Figure 2 This is a schematic diagram of the method flow according to an embodiment of the present invention;
[0072] Figure 3 As an example of an embodiment of the present invention, an expert user inquires about the supply chain of a specific product, and the message sequence between the user interface, the intelligent agent, and the database is displayed in chronological order. Detailed Implementation
[0073] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0074] The core of this invention lies in constructing a hierarchical multi-agent collaborative system. This system is specifically designed for the product selection scenario of apparel e-commerce. It aims to perceive the task context formed by the user's operation focus in the graphical interface in real time, and to implicitly infer the user's professional cognitive state by analyzing the user's interaction behavior. In turn, it dynamically allocates system resources and generates an adaptive response that is accurately matched with the current scenario and user identity in terms of information granularity, analysis depth, and expression method.
[0075] like Figure 1As shown, the system mainly consists of five core intelligent agents: a context-aware agent, a user profiling agent, a central coordination agent, a data query agent, and a report generation agent. The context-aware agent is deployed at the user interaction front end, responsible for continuously monitoring user interaction events with the graphical interface. When a user hovers the mouse or clicks on a clothing product card, the agent can capture the unique identifier of the product corresponding to this visual focus in real time and add a timestamp, forming a timely conversation context. The user profiling agent resides at the service back end, focusing on analyzing the natural language queries input by the user. Through a classifier integrating a rule engine and a lightweight machine learning model, it implicitly and dynamically classifies the user's professional cognitive state. The central coordination agent, as the system's control center, undertakes task scheduling and decision-making functions. It receives requests from the front end containing the original user query and context identifier, decomposes complex queries into a series of sub-tasks, and is responsible for task orchestration and execution supervision. The data query agent encapsulates all access operations to the underlying database, performs efficient data retrieval, and returns structured raw business data. The report-generating agent is responsible for transforming raw data into user-readable responses, and it contains response templates and generation logic for different cognitive states.
[0076] like Figure 2 As shown, the complete workflow of the method in this embodiment of the invention includes the following four main steps:
[0077] Step S1: Capture user interaction events with products on the front-end interface, calculate the context relevance score of each product based on the behavior type weight and time decay of each interaction event, and sort the products with scores exceeding the threshold in descending order to form a global intent context.
[0078] Specifically, the goal of this step is to capture user interaction events from the front-end interface, extract product identifiers associated with the interaction events, and generate a global intent context based on the temporal relationship and behavioral weights of multiple interactions, thereby providing accurate scene information for subsequent intent recognition and task scheduling.
[0079] The context-aware agent is embedded in the front-end application as a JavaScript library. It utilizes the DOM event listening API provided by the browser to bind mouseenter, click, and click event listeners for buttons such as favorites and follow to each product card element on the product list page. Once an event is triggered, the listener extracts the pre-set unique product ID from the data attributes and temporarily stores it in the front-end state management container, while recording the absolute timestamp of each interaction event.
[0080] In multi-product operation scenarios, the system employs a mechanism combining recent-time priority and user-marked reinforcement to determine the current valid context. Recent-time priority means that the product ID corresponding to the user's last hover or click operation is used as the current valid context by default. User-marked reinforcement means that if a user explicitly marks a product through the front-end interface, such as by adding it to favorites or following it, that product ID will take precedence over the product ID corresponding to ordinary operations, ensuring that the system always focuses on the products that the user is most interested in.
[0081] Furthermore, the system sets differentiated context judgment rules for various specific scenarios. In the scenario of combining favorites with hovering questions, if a user favorites product A and then hovers over product B, asking a question involving comparison of multiple products such as "Which of these two is more suitable for summer?", the system will automatically identify keywords such as "both products" in the query statement, including both product A and product B in the context, forming a dual-product comparison context.
[0082] In product comparison pages, if a user views multiple products simultaneously, the system treats all product IDs within the comparison group as context and associates them with the comparison query intent. In historical context retracing scenarios, when a user's question includes retrospective phrases like "previous product" or "the one I just saw," the system performs a backtracking match using the session's context history stack. This stack stores the five most recently focused product IDs in reverse chronological order. In ordinary scenarios without special keywords, the system follows the default rule that product IDs marked as favorites have higher priority than ordinary hovered or clicked product IDs.
[0083] To protect user privacy, context information exists only within the current browser session and is not persisted to the server. The validity period of the session context is controlled via a front-end timer, with a default validity period of thirty minutes. If the user does not interact with the interface within thirty minutes, the context automatically expires and is cleared. If the user performs a new product focus operation, or searches for or favorites products associated with the current context within thirty minutes, the validity period is recalculated upon triggering the new operation, thus achieving dynamic renewal and updating of the context.
[0084] After capturing the interaction events, the system needs to aggregate the discrete interaction events into a structured global intent context. This process comprehensively considers factors such as differences in the type of interaction behavior, time decay effect, and front-end visual state, and specifically includes the following steps:
[0085] Step S11: For any product identifier, assign corresponding basic weights to the various interactive events associated with the current product identifier.
[0086] Different types of interactive behaviors reflect varying degrees of user attention, thus requiring differentiated weighting values. For example, simple mouse hover events have a lower base weight than active click events, while explicit marking behaviors such as adding to favorites or following are given a higher base weight to reflect a stronger and clearer signal of user interest in the product.
[0087] Step S12: Calculate the retention value of each interaction event using the exponential decay model.
[0088] The earlier an interaction event occurs, the smaller its contribution to the current query context should be; that is, its retention value gradually diminishes over time. The formula for calculating retention value is as follows:
[0089] ;
[0090] In the formula, Product identifier At any moment Corresponding to the The retention value of secondary interaction events; Indicates the first The specific behavior type of this interaction event The corresponding basic weights; This represents the decay constant, used to control the rate at which retention value decays over time, and its value ranges from 0.001 to 0.05 min. -1 In this embodiment, 0.01 min is preferred. -1 ; The timestamp indicating the current moment when the user initiated the query; Indicates the first The absolute timestamp of the interaction event. In the product selection scenario of apparel e-commerce, a user's attention to a single product is typically concentrated within a few minutes to tens of minutes. Take 0.01 min -1 At that time, the retention value of interactive events decayed to about 50% of the original value after about 70 minutes, which is consistent with the time characteristics of clothing selection browsing behavior.
[0091] In the formula This ensures that the time difference is always non-negative, avoiding calculation errors caused by abnormal situations such as system clock deviation.
[0092] Step S13: Sum all retention values corresponding to the same product identifier and multiply by a visibility inhibition factor related to the state of the front-end visible area to obtain the context relevance score of the current product identifier. The expression for the visibility inhibition factor is:
[0093] ;
[0094] In the formula, For product identifiers The visibility inhibition factor is used to adjust the context-related weight of a product based on its visibility status in the front-end interface. The lower bound protection constant of the visible inhibition factor has a value range of 0.1 to 0.5, and is preferably 0.3 in this embodiment; The attenuation coefficient for the visible area ranges from 0.005 to 0.05 min. -1 In this embodiment, the preferred time is 0.02 min. -1 ; For product identifiers The duration of the most recent time the character scrolled out of the foreground's visible area.
[0095] The determination of whether a product is within the front-end's visible area is achieved through the browser's Intersection Observer API. This API asynchronously monitors the intersection state between the target DOM element and the viewport. When the visibility of the product card element drops to zero, the system records this moment as the scrollout time and begins accumulating it. When the product card re-enters the visible area, Reset to zero. Restored to 1.
[0096] Step S14: Sort the product identifiers with context relevance scores greater than a preset threshold in descending order of scores to form a score vector, which serves as the global intent context.
[0097] After calculating the context relevance scores of all product identifiers, a preset threshold is set. Only product identifiers with context relevance scores greater than this threshold are retained and sorted in descending order of score to form a score vector. This score vector is the final output global intent context, which accurately depicts the set of products that the user is interested in when initiating a query and the intensity of their respective interest, in the form of an ordered list. The introduction of the preset threshold effectively filters out low-relevance historical interaction noise, ensuring the refinement and accuracy of the context information.
[0098] Step S2: Extract the text features of the user's input query statement and calculate the overall query score. Identify the user's query intent based on the text features and global intent context. Decompose the query intent into multiple sub-tasks with dependencies. Execute each sub-task after dynamically calculating its priority.
[0099] This step is the core scheduling component of the entire method. Its goal is to extract multi-dimensional features from the natural language query input by the user and calculate a comprehensive score. With the assistance of the global intent context, the query intent is identified, the query intent is decomposed into sub-tasks with dependencies, and the execution order of the tasks is reasonably arranged through a dynamic priority scheduling mechanism.
[0100] The user profiling agent is responsible for extracting multi-dimensional text features from the user's input query and calculating the overall query score. Specifically, it includes the following sub-steps:
[0101] Step S21: Feature extraction and quantization.
[0102] The system extracts lexical complexity features from the query statement. syntactic structural features of logical clauses Domain terminology frequency characteristics and the characteristics of explicit intent Four dimensions of text features, and each feature is quantified in the following way:
[0103] (1) Lexical complexity features The quantification uses the proportion of clothing-related professional terms in the query statement as the metric, and its calculation formula is as follows:
[0104] ;
[0105] In the formula, To query the number of clothing-related technical terms in the query statement, This represents the total number of words in the query. The identification of specialized terms is based on a pre-built dictionary of apparel terminology, covering at least 2000 entries, including fabric names (such as "silk," "chiffon," "lyocell"), manufacturing techniques (such as "overlock stitching," "blind stitching," "pleating"), pattern design terms (such as "A-line skirt," "H-line," "cocoon skirt"), and supply chain terms (such as "MOQ," "FOB," "delivery time"). This feature reflects the user's familiarity with apparel terminology. The value range is from 0 to 1, and a higher score indicates that the user is more likely to have a deeper knowledge of the domain.
[0106] (2) Syntactic features of logical clauses This is quantified by counting the number of clauses in the query statement, and the calculation formula is as follows:
[0107] ;
[0108] In the formula, To determine the number of logical clauses in the query statement. This represents the total number of sentences in the query. A subordinate clause is a clause that contains a conjunction and has a complete logical relationship; for example, "if the delivery cycle is less than or equal to seven days" and "styles suitable for summer sales in the south" are each counted as a subordinate clause. A single sentence without a subordinate clause is... Record it as zero. Function ensures The value range does not exceed 1. This feature captures the logical complexity of a user's query request; more clauses mean that the user can perform more refined condition combinations and logical reasoning.
[0109] (3) Frequency characteristics of domain terms The formula for calculating the number of high-frequency technical terms that appear two or more times in a statistical query is as follows:
[0110] ;
[0111] In the formula, This is the number of high-frequency technical terms that appear two or more times in the query statement. The average occurrence of frequently used terms by professional users. These parameters are derived from the business logic of the apparel product selection field: professional users typically focus on one or two core themes in a single query, and high-frequency terms generally appear no more than five times. The value ranges from 4 to 6, and in this embodiment, 5 is preferred. This feature identifies the behavioral pattern of users repeatedly mentioning certain professional concepts in their queries, reflecting their ability to delve deeper into specific topics.
[0112] (4) Characteristics of clear intent limiting conditions The calculation formula is based on the number of limiting conditions included in the query:
[0113] ;
[0114] In the formula, The number of conditions to limit in the query statement. This is the maximum number of preset conditions. The limiting conditions refer to explicit constraints on the dimensions of clothing selection, such as "XL size", "price not exceeding 300 yuan", "delivery cycle less than ten days", "fabric contains wool", etc. Each independent constraint is counted as one limiting condition. In this embodiment, a value of 6 is used, meaning that a single query containing six or more limiting conditions is considered to be at the typical level of a professional user. This feature measures the precision of the user's expressed needs.
[0115] Step S22: Calculate the overall query score using weighted summation.
[0116] Feature quantization results of the above four dimensions , , , The values have all fallen within the range of 0 to 1. The system calculates the overall query score by performing a weighted summation based on the weights corresponding to each dimension. :
[0117] ;
[0118] In the formula, , , , The sum of the four weights is one, ensuring The value ranges from 0 to 1. A higher score indicates a higher level of user expertise.
[0119] The weights for each dimension were determined as follows: Lexical complexity was assigned the highest weight of 0.35 because, in apparel product selection, the use of professional terminology is the most direct and stable signal distinguishing experts from novices; the domain terminology frequency feature had a weight of 0.25 because repeated use of specific professional terms reflects a user's deep focus on the topic; logical clause syntactic structure features and intent clarity constraint features each accounted for 0.20, both representing complementary aspects of language organization ability and precision in demand expression, respectively, to characterize the user's professional level. This weighting was determined through a 50% cross-validation of product selection interaction logs from the apparel e-commerce platform over the past three years, achieving optimal classification accuracy.
[0120] In practical engineering implementation, the user profiling agent can also employ an auxiliary classification method based on fine-tuning of a pre-trained model to further improve the reliability of the judgment. The specific method is as follows:
[0121] First, the query statement is converted into a vector representation by distilling the pre-trained language model DistilBERT, and then this vector is combined with the four types of manually extracted text features mentioned above. The features are then combined to form a comprehensive feature vector.
[0122] The Lightweight Gradient Boosting Machine (LightGBM) algorithm is used as the classification model for training, outputting the classification results for expert or novice users and the classification confidence scores in the range of 0 to 1. The training data comes from anonymized product selection interaction logs from apparel e-commerce platforms over the past three years. After removing privacy information, 100,000 valid samples were selected. The sample labeling criteria are as follows: queries containing two or more professional terms in the apparel industry, with no fewer than three query conditions, and involving in-depth analysis needs such as supply chain stability or best-selling potential assessment are labeled as expert samples; queries that only inquire about basic information such as price, size, and fabric comfort, without professional terms, and with no more than two query conditions are labeled as novice samples.
[0123] The weighted summation of the query comprehensive score calculated in step S22 confidence level of LightGBM classification The results are weighted and merged according to a 50% weighting to obtain the fusion judgment score. :
[0124] ;
[0125] Fusion Judgment Score The classification threshold is used for determining the classification threshold for both experts and beginners. The threshold is determined through five-fold cross-validation and set to 0.7. If you are judged as an expert user, then you are judged as a novice user.
[0126] It should be noted that the comprehensive query score used for updating the professionalism index in step S3 is the one calculated in step S22. rather than the fusion judgment score This is because It directly reflects the level of professional characteristics embodied in the current query itself, making it suitable as an input signal for the dynamic updating of the professionalism index; while The introduction of classification confidence from machine learning models makes it more suitable for immediate expert / novice classification decisions. Both play different functional roles within the system: Driving the long-term dynamic evolution of the professionalism index The selection of an immediate response strategy to drive the current interaction.
[0127] The central coordinating agent receives requests from the front end containing the original user query and a global intent context, and identifies the query intent of the query statement based on the product scenario information provided by the global intent context. The identification of query intent is achieved through a three-step method: intent recognition, dimension segmentation, and task mapping.
[0128] In the intent recognition phase, the system uses the BERT-base-Chinese natural language understanding model to identify the user's query intent. The preset intent types cover twelve core scenarios in apparel selection, including supply chain assessment, best-selling product prediction, inventory query, size matching, fabric analysis, price comparison, trend matching, procurement suggestions, competitor analysis, styling recommendations, production capacity assessment, and certification queries. In the dimension segmentation phase, the system segments key analysis dimensions based on the query intent. The dimension segmentation rules combine predefined and dynamic adaptation: for query intent types, the system presets fixed combinations of segmentation dimensions; for example, supply chain assessment is fixedly segmented into four dimensions: supplier qualifications, on-time delivery rate, production capacity stability, and quality inspection. For non-query intents, the natural language understanding model dynamically segments dimensions based on an apparel domain knowledge base. In the task mapping phase, the system maps each analysis dimension to preset subtasks. Each subtask includes core attributes such as task ID, data type, query parameters, and priority, ensuring accurate execution by the data query agent.
[0129] The decomposed subtasks are organized into a directed acyclic graph structure, where nodes represent subtasks and directed edges represent dependencies between subtasks. Dependencies between subtasks are defined by dependency identifiers preset in a rule base. For example, the task "querying historical delivery on-time rates" depends on the task "querying supplier basic information." The central coordinating agent parses the dependency identifiers and automatically arranges the execution order according to the dependency-first principle. Tasks without dependency identifiers are executed sequentially or in parallel according to preset rules.
[0130] For cases where user queries do not fall into preset categories, the system has designed a fallback strategy: the central coordinating agent calls the natural language understanding model to extract the core keywords of the query and generate a general data query instruction. After the data query agent returns the relevant basic data, the report generating agent responds to the user in the form of basic information plus guiding questions. At the same time, the query and keywords are recorded in the unmatched intent library for subsequent iteration and optimization of the rule base.
[0131] After the subtasks are decomposed, the system needs to dynamically calculate the dynamic priority score of each subtask based on the dependencies and business constraints between them, and then distribute the subtasks for execution according to the score. The calculation of the dynamic priority score comprehensively considers multiple dimensions such as the initial baseline priority, business urgency, topology dependency depth, waiting time, and system load, and its expression is as follows:
[0132] ;
[0133] In the formula, For the first Sub-tasks The dynamic priority score at time t; For the first Sub-tasks The initial baseline priority score is preset and determined in the policy rule base maintained by the central coordinating agent. The policy rule base is stored in a standardized JSON format and includes core fields such as rule ID, query intent type, user type, policy name, subtask list, priority, and effective status. For the first Sub-tasks The dynamic business urgency factor reflects the urgency of the current business scenario in terms of the timeliness of completing the task.
[0134] Specifically, dynamic business urgency factors Taking into account both the inherent urgency of the business scenario to which the task belongs and the remaining percentage of the task before the business deadline, the calculation expression is as follows:
[0135] ;
[0136] ;
[0137] In the formula, The gain coefficient is set to indicate business urgency, with a value ranging from 0.5 to 2.0, and preferably 1.0 in this embodiment; For a binary indicator function, when The value is 1 when the corresponding query intent belongs to the preset urgent intent set, and 0 otherwise. The urgent intent set includes inventory query and capacity assessment. These two types of intents usually involve business data with high timeliness and need to be processed first to ensure the timeliness of the data. The time remaining sensitivity coefficient ranges from 0.5 to 3.0, and is preferably 1.5 in this embodiment; This represents the remaining time ratio, with a value between 0 and 1. The closer to the deadline, the larger the value, thus increasing the urgency score of the task. for The deadline for business operations is determined by the central coordinating agent based on the sum of the maximum allowable response time for various tasks and the task creation time preset in the policy rule base.
[0138] The baseline value for this factor is 1, meaning it does not affect the dynamic priority score when there is no urgency marker and sufficient time remaining before the deadline; when the task belongs to the urgency category, The term increases the factor. Increase the scheduling priority of this task; as the task approaches its business deadline, The priority of each item gradually increases to 1, further increasing its priority and ensuring that tasks that are about to time out are processed in a timely manner.
[0139] For the first Sub-tasks The topology depth blocking factor is calculated as follows:
[0140] ;
[0141] In the formula, The global damping coefficient is used to control the impact of subsequent task costs on the priority of the current task. Its value ranges from 0.001 to 0.1, and in this embodiment, it is preferably 0.01. This represents all elements in a directed acyclic graph that are directly or indirectly dependent on each other. The set of subsequent subtasks; For subtasks The estimated cost; is the upper bound cutoff constant for the topology depth blocking factor.
[0142] To prevent the extreme situation where the topology depth blocking factor grows infinitely due to an excessively long subsequent task chain, causing the priority of a task to far exceed that of other tasks, this embodiment of the invention introduces an upper bound truncation for the accumulated cost. The upper bound truncation constant is... The value of can be set to 10 to 20 times the average estimated cost of all tasks. In this embodiment, it is preferably 15 times the average estimated cost of all sub-tasks in the current task set.
[0143] The intention of this factor is to increase the priority of a subtask if it is depended on by a large number of subsequent tasks to avoid blocking effects and ensure that tasks on the critical path are processed first.
[0144] For the first Sub-tasks The anti-starvation aging compensation factor is calculated as follows:
[0145] ;
[0146] In the formula, For the task The absolute initial time when it was created and entered the central scheduling queue; This represents the maximum business delay limit for the task. The value of is an exponential parameter, ranging from 1.0 to 3.0, and is preferably 1.5 in this embodiment; The upper limit threshold for the hunger compensation factor.
[0147] To prevent tasks that have exceeded the business delay threshold from receiving unreasonably high priority due to the continuous increase of the compensation factor, thus affecting the scheduling of other normal tasks, this embodiment of the invention sets an upper bound threshold for the anti-starvation compensation factor. In this embodiment The value is 5.0, meaning that when the task's waiting time far exceeds the business delay threshold, the compensation factor will not exceed 5.0 times. Meanwhile, when the task's waiting time exceeds 2 times the threshold... Afterwards, the system will trigger a timeout alarm mechanism, and the central coordinating agent will determine whether to abandon the task or mark it as abnormal.
[0148] This factor increases monotonically with the waiting time of the task in the queue. Its function is to prevent low-priority tasks from being continuously preempted by high-priority tasks and thus ensure the fairness of system scheduling.
[0149] The load suppression factor is calculated as follows:
[0150] ;
[0151] In the formula, Indicates the current real-time load rate of the requested heterogeneous data source; The value represents the resource load sensitivity index, which ranges from 1.0 to 5.0, and is preferably 2.0 in this embodiment; This is the lower bound protection constant for the load suppression factor.
[0152] To prevent the system from completely stalling when all tasks have their priorities reduced to zero when the data source is fully loaded, this embodiment of the invention sets a lower bound protection constant for the load suppression factor. In this embodiment The value is 0.05, meaning that even under extreme conditions where the data source is fully loaded, the task still retains 5% of its original priority base score, ensuring that high-priority critical tasks can be processed first after the system load recovers. At the same time, it works in conjunction with the queue backlog monitoring mechanism of the central coordinating agent to achieve gradual recovery.
[0153] The value of this factor ranges from 0 to 1. When the data source load is high, the load suppression factor decreases, thereby reducing the overall priority of the task and playing a role in system rate limiting and overload protection, preventing a large number of query requests from continuing to flood in when the data source is under high load, which could lead to a service avalanche.
[0154] The central coordinating agent sorts all pending subtasks based on the aforementioned dynamic priority scores and distributes them to the data query agent in descending order of score. When multiple policy rules match simultaneously, the system prioritizes the rule with the highest priority; if priorities are the same, they are executed in reverse chronological order of rule creation time. The data query agent is responsible for interacting with various heterogeneous data sources, including relational databases and Elasticsearch indexes. It employs data virtualization technology to build a unified data access layer, defining standardized data models to map fields from different data sources to uniform field names and data formats.
[0155] The data conflict resolution mechanism employs a dual-judgment rule combining data source priority and timestamp: the preset data source priority order is supply chain system data > e-commerce platform core data > third-party interface data. When the same data item retrieves different values from different data sources, the data from the higher-priority data source is used first; if priorities are the same, the latest data with the most up-to-date timestamp is selected. This intelligent agent utilizes database connection pooling technology to optimize concurrency performance and returns query results in JSON format.
[0156] Step S3: Based on the forgetting curve, the user's historical professional index is decayed over time. The decay result is then weighted and fused with the overall query score to update the user's current professional index.
[0157] The goal of this step is to dynamically update a user's current professional competence index by combining their historical professional competence index with a time-based natural decay mechanism. This mechanism draws on research findings in cognitive psychology regarding knowledge forgetting and learning consolidation, suggesting that a user's professional competence level is not static but naturally decays over time, while simultaneously being consolidated and enhanced through continuous querying and interaction.
[0158] Before updating the professionalism index, the system first determines whether the current user has a historical professionalism index record. For new users using the system for the first time, since there is no historical interaction data, the system uses the following cold start strategy to determine the initial professionalism index:
[0159] Step A: Initialization based on the initial query. The system will calculate the overall query score based on the user's initial query. It is used directly as the initial professionalism index, that is If the initial query score is below 0.3, the initial professionalism index will be set to 0.3 as the default baseline value for beginners; if the initial query score is above 0.8, the initial professionalism index will be set to 0.65, setting a conservative upper limit to avoid judging the user as an advanced expert based on a single query, and gradually adjusting to the true level through multiple subsequent interactions.
[0160] Step B: Initialization based on user registration information. If the user filled in occupational information related to the apparel industry during registration, such as apparel buyer, designer, brand manager, etc., the system can set the initial professionalism index to 0.6, as the default upper-middle starting point for industry practitioners; if the user's occupational information is not directly related to the apparel industry, the initial professionalism index will be set to 0.35. This method takes the larger value between the initial query and the initial setting.
[0161] ;
[0162] In the formula, This is the truncation result from step A; This is an auxiliary value for the registration information in step B.
[0163] Step C: Rapid calibration mechanism. Dynamic learning rate during the first five user interactions with the system. Temporarily upgraded to This allows the system to quickly calibrate its professionalism index based on the user's actual query performance, converging to a level close to the user's true professionalism after approximately five interactions. From the sixth interaction onwards, Restore to the normal value.
[0164] Through the aforementioned cold start strategy, the system can provide new users with a reasonable initial professional level assessment even in the absence of historical data, and achieve accurate personalized matching after a small number of interactions through a rapid calibration mechanism, thus avoiding new users receiving recommendation reports that do not match their actual level for a long period of time.
[0165] The system employs a decay model based on the forgetting curve to simulate the natural forgetting process of users' professional knowledge, specifically including the following sub-steps:
[0166] Step S31: Obtain the user's historical professionalism index after the last interaction. and the time interval since the current interaction .
[0167] Step S32: Construct a natural decay mechanism to calculate the user's base decay expertise before initiating the current query.
[0168] ;
[0169] ;
[0170] In the formula, For users in the first The time corresponding to the next interaction The initial decrease in professionalism before initiating a query statement; For users in the first The time corresponding to the next interaction Professionalism index; For time intervals; The cognitive half-life constant represents the reference time required for a user's professional cognition to decay to half of its original level without external input. The value ranges from 12 to 168 hours, and is preferably 72 hours in this embodiment. The value is a professionalism protection coefficient, ranging from 0.5 to 5.0, and is preferably 2.0 in this embodiment.
[0171] Cognitive half-life constant The determination is based on statistical analysis of user behavior data from apparel e-commerce platforms. By retrospectively analyzing the query logs of active users on the platform over the past three years, the comprehensive query score was calculated when users initiated queries again after different time intervals. Compared to the previous score The retention rate was analyzed. The results showed that for users who queried again within 24 hours, the retention rate of their overall query score was approximately 80%–90%; for users who queried again after 72 hours, the retention rate dropped to 45%–55%; and for users who queried again after 168 hours, the retention rate dropped to 20%–30%. This decay trend approximates an exponential distribution, and the half-life, after fitting using the least squares method, was determined to be approximately 68–76 hours. In this embodiment, it is rounded to 72 hours.
[0172] A key design feature of this attenuation model is that the attenuation rate is negatively correlated with the user's current level of expertise. Specifically, in the denominator... This feature causes the decay rate in the exponential function to automatically slow down when a user's historical expertise index is high. This means that users with higher expertise levels forget their knowledge more slowly.
[0173] Step S33: Introduce a dynamic learning rate and use an exponentially weighted moving average algorithm to fuse the basic decaying professional score with the overall query score, updating the user's current professional score index:
[0174] ;
[0175] In the formula, This indicates the user's current level of expertise. The learning rate is dynamic, ranging from 0.1 to 0.5, and is preferably 0.3 in this embodiment; This is the overall score for the current query.
[0176] This index-weighted moving average mechanism ensures that the professionalism index update considers both the user's historical knowledge and the skill level demonstrated in the current interaction. Dynamic learning rate. The value of determines the trade-off between the two: a larger ... The value makes the system more sensitive to the user's latest performance and can quickly respond to changes in the user's capabilities; a smaller value... This value makes the system more robust, preventing significant fluctuations due to a single abnormal query. Dynamic learning rate It can adaptively adjust based on the confidence level of the current query. The adaptive adjustment rule is:
[0177] ;
[0178] In the formula, The base learning rate is set to 0.3. To adjust the sensitivity coefficient, a value of 0.2 was set. This represents the classification confidence level for the current query, with a value ranging from 0 to 1.
[0179] This rule makes It fluctuates dynamically between 0.2 and 0.4, maintaining system robustness while adapting to changes in user capabilities.
[0180] In addition to the aforementioned real-time update mechanism based on a single query, the system also possesses the capability for long-term dynamic adjustment of user profiles. To address the gradual improvement in user expertise during use, the system has the following evolutionary rules: If the overall score of three consecutive valid business queries (excluding casual queries such as "hello" and "thank you" or queries without substantial product selection needs) improves by at least 0.2 compared to the initial score, or if the cumulative score of ten queries within a six-month period reaches 0.7 or higher, the system automatically upgrades the user profile from novice to expert level, and subsequent interactions are responded to according to expert strategies.
[0181] The image upgrade / downgrade mechanism serves as an anomaly calibration method for correction. Potential lag or deviation during continuous updates. When the profile upgrade condition is triggered, if the current... If it is below 0.6, then Force calibration to 0.6; when the profile downgrade condition is triggered and the user confirms the simplified response, if the current... If it is higher than 0.5, then... Calibrate to 0.5. After calibration. The update continues according to the normal exponentially weighted moving average mechanism. The mixed weights of the report template in step S4 are always determined by... The mapping value is determined, and the profile label is only used as an auxiliary parameter for matching the policy rule base in step S2.
[0182] Meanwhile, if an expert user makes five consecutive queries based on basic needs without technical jargon and with no more than two query conditions, the system triggers a profile review process. The system sends a confirmation prompt to the user asking if they want to simplify the response. If the user confirms, the system switches to the novice strategy; otherwise, it maintains the expert strategy to ensure accurate adaptation and consistent user experience.
[0183] Step S4: Obtain business data and extract summaries based on the execution results of subtasks, map the current professional index to a mixed weight, fill the summaries into the expert response template and novice response template respectively according to the mixed weight, and perform fusion rendering to generate a clothing selection recommendation report for users.
[0184] This step is the final output of the entire method. Its goal is to obtain business data from the data source based on the execution results of the subtasks, map the user's current professionalism index to a mixed weight, extract the core summary of the business data, and render the core summary into an apparel selection recommendation report containing apparel selection decision suggestions based on the mixed weight.
[0185] The raw business data returned by the data query agent typically contains a large amount of structured and unstructured information. To extract the core content with the highest decision-making value, the report generation agent employs a summary extraction method based on an improved graph sorting algorithm. This method first performs text preprocessing on the JSON-formatted structured business data returned by the data query agent. For numeric fields, they are converted into declarative sentences according to a preset natural language description template; for example, {'delivery_rate':0.92} is converted to "This supplier's historical on-time delivery rate is 92%". For tabular data, it is converted into descriptive text row by row. For fields that already contain text descriptions, the original text is retained. The preprocessed text set is then used as input for word segmentation in step S41. The specific steps are as follows:
[0186] Step S41: Perform text slicing and word segmentation on the business data, extract candidate words, and construct an initial graph model containing at least one candidate word node; in this graph model, each candidate word is a node, and the connection relationship between nodes will be established based on co-occurrence relationship in subsequent steps.
[0187] Step S42: Based on the preset domain dictionary and multi-dimensional business centroid semantic space, calculate the domain comprehensive weight for each candidate word node. This process includes three sub-steps:
[0188] Step S421: Calculate the inverse document frequency enhancement score for each candidate word node in the domain corpus. .
[0189] Step S422: Extract the multi-dimensional vector coordinates of each candidate word node in the pre-trained word vector space, calculate the cosine similarity of the vector coordinates to multiple business centroid vectors representing the clothing selection dimension, and take the maximum similarity as the multi-dimensional business centroid semantic similarity score. .
[0190] Multiple business centroid vectors were obtained in advance by vectorizing core concepts in the apparel product selection field, such as fabric characteristics, processing costs, fashion cycles, and supply chain management. Together, they constitute a multi-dimensional business centroid semantic space. The higher the maximum similarity between a word and these centroid vectors, the more relevant that word is to the core business concepts in the apparel product selection field.
[0191] Step S423: By adjusting the parameters as set, the inverse document frequency enhancement score and the multidimensional business centroid semantic similarity score are weighted and fused to generate the domain comprehensive weight of the candidate word nodes:
[0192] ;
[0193] In the formula, Candidate word nodes The overall weight of the domain; To adjust the parameters and balance the contribution ratio of statistical frequency information and semantic similarity information in the comprehensive weight, the value ranges from 0.0 to 1.0, and in this embodiment, it is preferably 0.6.
[0194] Step S43: Based on the domain comprehensive weight and the co-occurrence relationship between nodes, construct a non-uniform state transition probability matrix with bias.
[0195] The co-occurrence relationship between nodes is obtained by sliding a window of preset length across the source text; that is, the number of times two candidate words co-occur within the sliding window is taken as their co-occurrence strength. The calculation of the non-uniform state transition probability not only considers the co-occurrence strength but also introduces the target node's domain-specific weight as a bias factor, causing the transition probability to tend towards nodes with higher domain relevance. Specifically, from the source node... Transfer to adjacent target node Non-uniform state transition probability The expression is:
[0196] ;
[0197] In the formula, For nodes and The number of co-occurrences within a preset length sliding window; The domain gravity index parameter is used to control the bias strength of the domain comprehensive weight on the transition probability, and its value ranges from 0.5 to 3.0. In this embodiment, it is preferably 1.5. Represents a node The set of adjacent nodes it points to.
[0198] Step S44: Perform iterative walk operations on all candidate word nodes based on the non-uniform state transition probability matrix until the sum of the absolute differences of the weights of global nodes in the initial graph model is less than the preset convergence threshold. The expression for the iterative update is:
[0199] ;
[0200] In the formula, , Representing candidate word nodes respectively and In the The second iteration and the first Dynamic weights for each iteration; Candidate word nodes The overall weight of the domain; The value is the damping coefficient, ranging from 0.80 to 0.90, and is preferably 0.85 in this embodiment; To point to candidate word nodes The set of all source nodes.
[0201] The first term of the iterative formula introduces a normalized bias based on the comprehensive weight of the domain, which allows nodes with higher domain weights to obtain higher base scores in the initial stage of the iteration. The second term further improves the scores of nodes closely associated with high-weight nodes through weighted propagation of neighboring nodes.
[0202] The iterative process continues until the sum of the absolute differences in the weights of the global nodes in the initial graph model is less than the preset convergence threshold, at which point the dynamic weights of each node tend to stabilize.
[0203] Step S45: Sort the source text sentences in descending order based on the total score of the converged nodes, and extract the top-ranked sentences as the core summary of the business data.
[0204] After iterative convergence, the system scores each sentence in the source text based on the total score of the converged nodes. The score of a sentence is the sum of the converged weights of all candidate word nodes it contains, and the sentences are globally sorted in descending order of their scores. A predetermined number of sentences with the highest scores are extracted as the core summary of the business data. These core summary sentences condense the most domain-relevant and information-dense content in the original business data, laying a high-quality material foundation for subsequent adaptive report generation.
[0205] After the core summary extraction is completed, the system maps the user's current professionalism index obtained in step S3 to a mixed weight. Specifically, the system uses the Sigmoid function to perform a smooth non-linear mapping on the current professionalism index, calculates the dynamic probability value that triggers the deep expert chart response template, and configures this dynamic probability value as the mixed weight:
[0206] ;
[0207] In the formula, The probability value for triggering the expert response template, i.e., the mixed weight; To map the steepness parameter, the width of the transition zone from novice to expert is controlled, with a value range of 8 to 15, and 10 is preferred in this embodiment; The center point of the mapping, i.e. The professionalism index value corresponding to a value of 0.5 ranges from 0.4 to 0.6, and is preferably 0.5 in this embodiment. This non-linear mapping design ensures that when the user's professionalism index is in the middle range, it doesn't simply choose between an expert template or a novice template, but rather mixes the outputs of both templates in a certain proportion. This achieves a smooth transition in response content from novice-friendly to expert-level, avoiding abrupt changes in experience caused by hard threshold switching. When... When <0.1, the system only calls the novice response template; when When the value is greater than 0.9, the system only calls the expert response template; when 0.1 ≤ When the value is ≤0.9, the system simultaneously calls two templates, with the content generated by the expert template accounting for the remaining percentage. The proportion of content generated by the beginner template is (1- ).
[0208] The report-generating agent uses a hybrid rendering mechanism based on a large natural language generation model to dynamically assemble and render the data analysis content generated by the deep expert chart response template and the conclusive text generated by the basic novice response template, based on the proportional allocation indicated by the hybrid weights. Finally, it generates and presents an apparel selection recommendation report.
[0209] In this hybrid rendering mechanism, the report generation agent contains two types of core templates. The generation logic of the novice response template is as follows: First, the core conclusions in the original data are extracted using the summary extraction method in steps S44 to S45. Then, the colloquialization conversion model is called to transform the professional data into easy-to-understand expressions. The content is organized according to the structure of conclusion + simple reason + guiding question. The guiding question selects one or two questions related to the current query from a preset question bank to help novice users gradually deepen their understanding.
[0210] The expert response template generation logic adopts a structure of data tables + chart links + in-depth analysis, generating a comprehensive in-depth report that includes detailed data tables, visualization chart links, and multi-dimensional text analysis, meeting the high requirements of expert users for data granularity and analytical depth.
[0211] Template switching and blending are driven by the cognitive state labels output by the user profile agent and the blending weights. When the blending weights indicate a pure novice mode, the system only uses the novice template to generate conclusive text output; when the blending weights indicate a pure expert mode, the system only uses the expert template to generate in-depth analysis reports; when the blending weights are in the middle range, the system uses both templates simultaneously and dynamically assembles their outputs according to their weight ratios. For example, it might present a summary conclusion at the beginning of the report, followed by detailed data analysis and charts, achieving a progressive unfolding of information hierarchy. The template engine uses Freemarker for data filling and integrates a Transformer-based natural language generation model to optimize the fluency and naturalness of the expression.
[0212] To make the technical solutions of the embodiments of the present invention clearer, the following describes the operation process of the entire method through a complete clothing selection scenario.
[0213] Ms. Zhang, a clothing buyer, is browsing new dresses using this system. She becomes interested in a French-style puff-sleeved printed dress with the product number PROD-2024-SUM-058 and hovers her mouse over the product card. At this moment, the event listener of the front-end context-aware agent is triggered, extracting the product ID (PROD-2024-SUM-058) from the product card's data attributes, recording the current timestamp, and setting this product ID as a context-valid product for the current session. Figure 3 As shown in the sequence diagram, this context information is temporarily stored in the front-end state management container, waiting to be sent to the back-end along with subsequent query requests.
[0214] Ms. Zhang entered the query in the chat box: "What is the expected potential for this product to become a bestseller, and how stable is the production capacity of its core supplier?" The user profiling AI then performed a multi-dimensional text feature analysis on the query. The query contained several professional terms in the apparel industry, such as "potential for becoming a bestseller," "core supplier," and "production capacity stability," resulting in a high score for lexical complexity. The query consisted of a compound question with two clear branching intentions, demonstrating a high level of logical organization in its syntactic structure. It also included several limiting conditions. After weighted calculation of the features across all dimensions, the classification model determined that the query possessed extremely high professional characteristics and marked the user as an expert.
[0215] Upon receiving the query text, the product ID "PROD-2024-SUM-058", and expert tags, the central coordinating agent identifies two query intents: best-selling product prediction and supply chain assessment. Based on preset dimensional segmentation rules, the system breaks down the best-selling product prediction intent into three dimensions: historical sales trend analysis, similar style comparison, and social media popularity assessment. The supply chain assessment intent is broken down into four dimensions: supplier basic information query, factory scale and capacity data acquisition, historical order delivery record retrieval, and quality inspection report retrieval. Each dimension is mapped to a corresponding subtask, organized into a directed acyclic graph, and then dynamically prioritized and scheduled for execution.
[0216] Taking the task of predicting best-selling products as an example, the data acquisition and calculation logic is explained. The historical sales trend task retrieves the sales data of the product for the past three months from the core database of the e-commerce platform and calculates the average monthly growth rate. The similar style comparison task uses a combination of tag matching and price range clustering to query ten similar products of the same style and price range. First, style tags are matched, such as French style, puff sleeves, and dresses. Then, a price range is defined by plus or minus 20%. The product with the highest similarity is selected from the search engine Elasticsearch, and the sales ranking percentage and popularity ranking percentage of the current product are calculated. The social media popularity task retrieves the product's discussion volume, collection volume, and sharing volume on social media platforms from a third-party data interface. A comprehensive popularity index is calculated with discussion volume weighted at 30%, collection volume at 40%, and sharing volume at 30%.
[0217] The report-generating agent integrated the aforementioned multi-dimensional data into an in-depth analysis report. Since Ms. Zhang was identified as an expert user, the system invoked an expert response template, presenting the report in a structure of data tables, chart links, and in-depth analysis. One of the core indicators in the report is the "Bestseller Index," which is calculated based on market performance, trend matching, and competitive advantage: Market performance accounts for 35% of the weight, including historical sales growth rate and inventory turnover rate. For new products without historical sales, the former is replaced by the average year-on-year growth rate of similar styles, and the latter by the category's average inventory turnover rate; Trend matching accounts for 40% of the weight, including social media popularity index and seasonal adaptability. Seasonal adaptability is calculated by weighting parameter matching and temperature adaptability each at 50%; Competitive advantage accounts for 25% of the weight, including the sales and popularity ranking share compared to similar styles. The data from each dimension are standardized and then weighted and summed, with the final score mapped to a range of 0 to 100.
[0218] The calculation method for the seasonal adaptability parameter matching degree is as follows: First, set the seasonal adaptability benchmark range for the weight, thickness, and breathability of the fabric. For example, the benchmark for summer clothing is weight ≤150g / m². 2 Thickness ≤ 2mm, air permeability ≥ 8000g / (m³)2 • 24h), then calculate the overlap between the actual parameters of the product and the benchmark interval. The overlap of each parameter is equal to Span = maximum value - minimum value, and the final parameter matching degree is the arithmetic mean of the overlap of the three parameters.
[0219] The temperature adaptability is calculated as follows: Obtain the average daily temperature of the target sales area for the corresponding season over the past three years, and set the clothing temperature adaptability range. For example, the suitable temperature range for summer clothing is 25-35℃, and the temperature adaptability is equal to... .
[0220] Ultimately, the structured report presented to Ms. Zhang by the system contained the following core conclusions: "The best-selling index for product PROD-2024-SUM-058 is 85 / 100. The main risk lies in the fabric supplier's capacity adjustment plan for the third quarter. It is recommended to simultaneously contact alternative supplier B as a contingency plan." The report also included detailed data tables and multi-dimensional analysis charts, facilitating Ms. Zhang's in-depth product selection decisions as a seasoned buyer.
[0221] If the same query is initiated by a novice user, the system, after recognizing their novice status, will use a novice response template to present the conclusion in more easily understandable language. For example: "This dress is performing well in the market, with a potential bestseller score of 85 out of 100, making it a high-potential style. However, it's important to note that the supplier may adjust production capacity in the third quarter, so it's recommended to prepare alternative solutions in advance. Would you like to learn more about the fabric characteristics of this dress?" Through this personalized response strategy, the system effectively reduces the cognitive load for novices while meeting the needs of experts for in-depth information.
[0222] This embodiment fully demonstrates the entire workflow from capturing front-end interactive events, generating global intent context, analyzing multi-dimensional features of query text, identifying query intent and decomposing and scheduling subtasks, dynamically updating user professionalism index, to extracting core summaries of business data and generating apparel selection recommendation reports. It fully illustrates the feasibility and practicality of the context-aware and cognitively adaptive apparel selection method proposed in this invention.
[0223] In summary, this invention successfully integrates artificial intelligence technology into the professional workflow of apparel product selection by introducing a multi-agent system architecture. Its technical effectiveness is not only reflected in a significant improvement in the interactive experience, but also in providing unprecedented contextualized and personalized intelligent support for the decision-making process. The system can understand domain-specific terminology such as "puff sleeves," "chiffon fabric," and "delivery cycle," and can discern the true intent behind user inquiries.
[0224] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described; only preferred embodiments of the present invention are illustrated. The descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. As long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0225] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this invention should be determined by the appended claims.
Claims
1. A clothing selection method based on context awareness and cognitive adaptation, characterized in that, Includes the following steps: Step S1: Capture user interaction events with products on the front-end interface, calculate the context relevance score of each product based on the behavior type weight and time decay of each interaction event, and sort the products with scores exceeding the threshold in descending order to form a global intent context. Step S2: Extract the text features of the user's input query statement and calculate the overall query score. Identify the user's query intent based on the text features and the global intent context. Decompose the query intent into multiple sub-tasks with dependencies. Execute each sub-task after dynamically calculating its priority. Step S3: Based on the forgetting curve, the user's historical professional index is decayed over time. The decay result is then weighted and fused with the query comprehensive score to update the user's current professional index. Step S4: Obtain business data and extract summaries based on the execution results of subtasks, map the current professional index to a mixed weight, fill the summaries into the expert response template and novice response template respectively according to the mixed weight, and perform fusion rendering to generate a clothing selection recommendation report for users.
2. The clothing selection method based on context awareness and cognitive adaptation according to claim 1, characterized in that: Step S1, which calculates the contextual relevance score for each product, includes the following steps: Step S11: For any product identifier, assign corresponding basic weights to the various interactive events associated with the current product identifier; Step S12: Calculate the retention value of each interaction event using the exponential decay model: ; In the formula, Product identifier At any moment Corresponding to the The retention value of secondary interaction events; Indicates the first The specific behavior type of this interaction event The corresponding basic weights; Indicates the attenuation constant; Indicates the timestamp of the current moment when the user initiated the query; Indicates the first The absolute timestamp of the next interactive event; Step S13: Sum all retention values corresponding to the same product identifier and multiply by a visibility inhibition factor related to the state of the front-end visible area to obtain the context relevance score of the current product identifier. The expression for the visibility inhibition factor is: ; In the formula, For product identifiers Visual inhibitory factors; This is the lower bound protection constant for the visible inhibition factor; The attenuation coefficient is the visible area. For product identifiers The duration of the most recent time the character was scrolled out of the foreground visible area; Step S14: Arrange the product identifiers with context relevance scores greater than a preset threshold in descending order of scores to form a score vector, which serves as the global intent context.
3. The clothing selection method based on context awareness and cognitive adaptation according to claim 1, characterized in that: Step S2, which involves extracting the text features of the user-input query and calculating the overall query score, includes the following steps: Step S21: Extract the lexical complexity features of the query statement. syntactic structural features of logical clauses Domain terminology frequency characteristics and the characteristics of explicit intent The quantification methods for each feature are as follows: ; ; ; ; In the formula, To query the number of clothing-related technical terms in the query statement; This represents the total number of words in the query statement; This represents the number of logical clauses in the query statement; This represents the total number of query statements. The number of high-frequency technical terms that appear two or more times in the query statement; The average occurrence of frequently used terms by professional users; The number of limiting conditions in the query statement; The maximum number of conditions is preset; Step S22: Assign weights to each feature. , , , The overall score is calculated by weighted summation: ; In the formula, For users in the first Next interaction time The overall score for the query.
4. The clothing selection method based on context awareness and cognitive adaptation according to claim 1, characterized in that: Step S2 involves breaking down the query intent into multiple subtasks with dependencies, dynamically calculating the priority of each subtask, and then issuing them for execution. This includes the following steps: The subtasks are organized into a directed acyclic graph, where nodes in the directed acyclic graph represent subtasks and directed edges represent dependencies between subtasks. The expression for the dynamic priority score of each subtask is: ; ; ; In the formula, Dynamic priority scoring; For the first Sub-tasks Initial priority; For the first Sub-tasks The business urgency factor; For the first Sub-tasks Topological depth factor; For the first Sub-tasks The waiting compensation factor; It is a load suppression factor; The damping coefficient; For a directed acyclic graph that depends on The set of subsequent subtasks; For subtasks The estimated cost; This is the upper bound cutoff constant for the topological depth factor; For the task The time when the item enters the scheduling queue; This is the maximum service delay time limit; For exponential parameters; This is the upper bound threshold for the waiting compensation factor; This refers to the current moment.
5. The clothing selection method based on context awareness and cognitive adaptation according to claim 4, characterized in that: The expression for the business urgency factor is: ; ; In the formula, The gain coefficient is marked as urgent. For indicator functions, when The value is 1 if the corresponding query intent belongs to the preset urgent intent set, and 0 otherwise. This is the time remaining sensitivity coefficient; The remaining time ratio; for The business cutoff time; for The moment of its creation.
6. The clothing selection method based on context awareness and cognitive adaptation according to claim 4, characterized in that: The expression for the load suppression factor is: ; In the formula, Indicates the current real-time load rate of the requested heterogeneous data source; This represents the resource load sensitivity index; This is the lower bound protection constant for the load suppression factor.
7. The clothing selection method based on context awareness and cognitive adaptation according to claim 1, characterized in that: Step S3, which describes the time-decrease of a user's historical professionalism index based on the forgetting curve, includes the following steps: Step S31: Determine whether the current user has a historical professional index record. If not, set an initial professional index based on the query comprehensive score; otherwise, obtain the historical professional index of the user after the last interaction and the time interval between the last interaction and the current interaction. Step S32: Calculate the user's diminished expertise level before initiating the current query. ; ; In the formula, For users in the first The time corresponding to the next interaction The professionalism diminished before initiating the query statement; For users in the first The time corresponding to the next interaction Professionalism index; For time intervals; This refers to the cognitive half-life constant; This is a professionalism protection factor. Step S33: Utilize an exponentially weighted moving average to fuse the decayed professionalism score with the overall query score, and update the user's current professionalism index: ; In the formula, This indicates the user's current level of expertise. The learning rate is dynamic. This is the overall score for the current query.
8. The clothing selection method based on context awareness and cognitive adaptation according to claim 1, characterized in that: The extraction of the summary in step S4 includes the following steps: Step S41: Perform word segmentation on the business data and construct a graph model containing candidate word nodes; Step S42: Calculate the domain comprehensive weight for each candidate word node based on the domain dictionary and pre-trained word vectors. ; In the formula, Candidate word nodes The overall weight of the domain; To adjust the parameters; for Inverse document frequency enhancement score; for The maximum cosine similarity with the preset centroid vector of the apparel product selection business; Step S43: Based on the comprehensive weight of the domain and the co-occurrence relationship between nodes, construct a non-uniform state transition probability matrix; Step S44: Perform iterative calculations on all candidate word nodes according to the non-uniform state transition probability matrix until the global node weights converge; Step S45: Sort the source text sentences in descending order according to the converged node weights, and extract the top-ranked preset number of sentences as the summary.
9. The clothing selection method based on context awareness and cognitive adaptation according to claim 8, characterized in that: The expression for the iterative operation in step S44 is: ; ; In the formula, , Representing candidate word nodes respectively and In the The second iteration and the first The weights for the next iteration; The damping coefficient; To point to candidate word nodes The set of all source nodes; Indicates that it is from the source node Transfer to adjacent target node The transition probability; For nodes and The number of co-occurrences within a preset length sliding window; For the field gravity index parameter; Represents a node The set of adjacent nodes it points to.
10. The clothing selection method based on context awareness and cognitive adaptation according to claim 1, characterized in that: Step S4 maps the current professionalism index to a hybrid weight, and performs fusion rendering on the outputs of the expert response template and the novice response template according to the hybrid weight. This includes the following steps: performing a smooth nonlinear mapping on the current professionalism index, calculating the probability value of triggering the expert response template, and using the probability value as the hybrid weight; based on the proportion indicated by the hybrid weight, calling a natural language generation model to dynamically assemble and fuse the data analysis content generated by the expert response template and the conclusive text generated by the novice response template to generate the clothing selection recommendation report.