Product name search prompting method, device, equipment, medium and product
Patent Information
- Application Number
- CN202611171578.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]然而,该类方案主要依据短期统计特征或通用词频进行预测,难以识别用户行为序列所反映的长期目标及其阶段性变化;当输入内容对应多个语义候选时,推荐结果易偏向高频热门项,导致与当前真实需求匹配度不足
[0046]本申请提供的品名搜索提示方法、装置、设备、介质及产品,该方法,通过获取包含托寄物名称与对应物流行为时间的用户历史托寄物序列,依据各条物流行为时间与当前时间的间隔确定出差异化的行为权重,结合托寄物名称与预设状态标签的语义相似度加权判定用户长期目标对应的目标状态标签,再依托该目标状态标签计算输入信息生成的候选词集合内各候选词语义适配度并完成排序输出,使品名搜索提示结果同时受到输入内容、历史时序行为和状态语义信息的约束。相较于现有仅依托短期统计、全网热度或通用词频生成品名提示推荐的方案,本申请方法能够充分挖掘用户时序行为序列承载的长期目标及目标阶段性变化特征,摆脱高频热门词的推荐偏向干扰,提升终端品名输入提示过程中对用户长期目标状态的识别精度,有效增强输出候选词与用户当下真实寄件、购物输入需求的匹配一致性,减少无关推荐内容干扰,缩短用户品名输入操作时长,优化物流寄件、电商购物场景下品名输入辅助的使用体验。
Smart Images

Figure CN123011043A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to methods, apparatus, equipment, media and products for product name search suggestions. Background Technology
[0002] In scenarios such as logistics parcel delivery and e-commerce shopping, existing input assistance typically generates suggested names for items to be shipped based on the user's historical parcel delivery records, online popularity data, or language models.
[0003] However, such schemes mainly rely on short-term statistical features or general word frequencies for prediction, making it difficult to identify the long-term goals and their phased changes reflected in the user behavior sequence; when the input content corresponds to multiple semantic candidates, the recommendation results tend to favor high-frequency popular items, resulting in insufficient matching with the current real needs.
[0004] Therefore, improving the ability to identify users' long-term goal states during the item association process and enhancing the consistency between recommendation results and current needs has become a technical problem that needs to be solved. Summary of the Invention
[0005] The product name search suggestion method, apparatus, equipment, medium and product provided in this application are intended to solve the aforementioned existing technical problems.
[0006] Firstly, the product name search suggestion method provided in this application is applied to a terminal and includes:
[0007] In response to receiving information input from a target user, the system obtains the target user's historical shipment sequence; wherein, the historical shipment sequence includes multiple shipment names and the logistics behavior time corresponding to each shipment name;
[0008] Based on the time interval between each logistics behavior time and the current system time, determine the behavior weight corresponding to each consignment name;
[0009] Based on the semantic similarity between each of the consignment names and each of the preset status tags, and the behavioral weight of each of the consignment names, the target status tag corresponding to the target user is determined from the multiple preset status tags;
[0010] Based on the target state label, the semantic fit between each candidate word in the candidate word set and the target state label is determined; the candidate word set is determined based on the information input by the target user.
[0011] The candidate words are sorted according to their semantic fit, and a preset number of target candidate words are determined and output based on the sorting results.
[0012] In one possible design, determining the behavior weight corresponding to each consignment name based on the time interval between each logistics behavior time and the current system time includes:
[0013] Obtain the preset time decay coefficient;
[0014] Based on the time interval and the time decay coefficient, the preset initial weight of each of the entrusted item names is decayed;
[0015] The weights after attenuation processing are determined as the behavioral weights corresponding to each of the consignment names; wherein, the behavioral weights are negatively correlated with the time interval.
[0016] In one possible design, determining the target status label corresponding to the target user from a plurality of preset status labels based on the semantic similarity between each of the consignment names and each preset status label, and the behavioral weight of each of the consignment names, includes:
[0017] For each preset status label, the semantic similarity between each consignment name and the current preset status label is multiplied by the behavior weight corresponding to each consignment name and then summed.
[0018] The accumulated results are normalized to obtain the confidence score of the preset state label;
[0019] Select the preset state label with the highest confidence score. If the highest confidence score is greater than the preset confidence threshold, the preset state label with the highest confidence score is determined as the target state label.
[0020] In one possible design, the step of determining the semantic similarity between each of the consignment names and each preset status label includes:
[0021] Each of the consigned items names and each of the preset state labels are input into a pre-trained text representation model to obtain a first vector corresponding to each of the consigned items names and a second vector corresponding to each of the preset state labels.
[0022] Calculate the vector similarity between each of the first vectors and each of the second vectors, and determine the vector similarity as the semantic similarity.
[0023] In one possible design, the sorting of the candidate words based on their semantic fit includes:
[0024] Obtain the basic prediction score corresponding to each candidate word; wherein, the basic prediction score is used to characterize the semantic matching degree between the candidate word and the information input by the target user;
[0025] The basic prediction score and the semantic fit are weighted and summed according to a preset weight ratio to obtain the ranking score corresponding to each candidate word.
[0026] The candidate words are sorted in descending order of their sorting scores.
[0027] In one possible design, before the weighted summation of the basic prediction score and the semantic fit according to a preset weight ratio, the method further includes:
[0028] Determine whether the target status tag corresponding to the target user has been identified;
[0029] Once the target state label is determined, the weighted summation step is performed;
[0030] If the target state label is not determined, the candidate words are sorted according to the basic prediction scores.
[0031] In one possible design, the steps for constructing the preset status label include:
[0032] Obtain co-occurrence records of items entrusted by multiple sample users within a preset historical period;
[0033] Based on the co-occurrence records of the entrusted items, a clustering algorithm is used to group multiple co-occurring entrusted items into the same item cluster;
[0034] Semantic features are extracted from the item clusters to generate the preset state labels corresponding to the item clusters.
[0035] Secondly, the product name search suggestion device provided in this application includes:
[0036] The acquisition module is used to acquire the target user's historical consignment sequence in response to receiving information input by the target user; wherein the historical consignment sequence includes multiple consignment names and the logistics behavior time corresponding to each consignment name;
[0037] The weight determination module is used to determine the behavior weight corresponding to each of the consigned items names based on the time interval between each of the logistics behavior times and the current system time.
[0038] The tag determination module is used to determine the target status tag corresponding to the target user from multiple preset status tags based on the semantic similarity between each of the consignment names and each preset status tag, as well as the behavioral weight of each of the consignment names.
[0039] The adaptation determination module is used to determine the semantic adaptation degree between each candidate word in the candidate word set and the target state label based on the target state label; the candidate word set is determined based on the information input by the target user.
[0040] The sorting module is used to sort each candidate word according to the semantic fit, determine a preset number of target candidate words based on the sorting results, and output them.
[0041] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0042] The memory stores computer-executed instructions;
[0043] The processor executes computer execution instructions stored in the memory to implement the method as described in any of the first aspects.
[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any of the first aspects.
[0045] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the first aspects.
[0046] The product name search suggestion method, apparatus, device, medium, and product provided in this application are as follows: The method obtains the user's historical shipment sequence containing the name of the shipment and the corresponding logistics behavior time, determines the differentiated behavior weight based on the interval between each logistics behavior time and the current time, and determines the target status label corresponding to the user's long-term goal by combining the semantic similarity between the shipment name and the preset status label. Then, it calculates the semantic fit of each candidate word in the candidate word set generated by the input information based on the target status label and completes the sorting and output, so that the product name search suggestion result is simultaneously constrained by the input content, historical time sequence behavior, and status semantic information. Compared to existing solutions that rely solely on short-term statistics, online popularity, or general word frequency to generate product name suggestions and recommendations, this application's method fully leverages the long-term goals and phased changes in user behavior sequences. It eliminates the bias interference from high-frequency popular words, improves the accuracy of identifying the user's long-term goal state during product name input suggestions, effectively enhances the consistency between output candidate words and the user's current actual needs for shipping and shopping, reduces interference from irrelevant recommended content, shortens the user's product name input operation time, and optimizes the user experience of product name input assistance in logistics shipping and e-commerce shopping scenarios. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0048] Figure 1 An application scenario diagram corresponding to the product name search suggestion method provided in an embodiment of this application;
[0049] Figure 2 A flowchart illustrating a product name search suggestion method provided in an embodiment of this application;
[0050] Figure 3 A flowchart illustrating a product name search suggestion method provided in yet another embodiment of this application;
[0051] Figure 4 A schematic diagram of the structure of a product name search suggestion device provided in an embodiment of this application;
[0052] Figure 5 This is a structural example diagram of an electronic device provided in an embodiment of this application.
[0053] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0054] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0055] To clearly understand the technical solution of this application, the solutions of the prior art will be described in detail first.
[0056] In logistics parcel delivery scenarios, after receiving user input, the terminal utilizes local or server-side suggestion capabilities to provide search suggestions for the name of the parcel, thereby improving filling efficiency. In existing solutions, name suggestions typically rely on user's historical parcel delivery records, popular online terms, or general language models to predict candidate words. When the user inputs partial characters or pinyin, the system generates a set of candidate words from historically high-frequency parcels, popular product names, or language model predictions, and then sorts and outputs them according to frequency, popularity, or matching probability.
[0057] Existing solutions primarily focus on statistical matching or forward prediction of existing terms, which can meet routine input completion needs to a certain extent. However, they lack the ability to identify persistent preferences, phased goals, and changes in needs reflected in historical search behavior. Especially when the same input information corresponds to multiple semantic directions, the system often prioritizes outputting high-frequency and popular terms, failing to distinguish which candidate words better match the user's current actual needs. Therefore, while search suggestions can return product names that appear to match, they may be inconsistent with the user's recent search behavior, thus reducing the candidate word hit rate and input efficiency. Furthermore, when user needs have changed, old behaviors or general popularity may continue to interfere with the suggestion results, making the dynamic adaptability of recommended content weak.
[0058] Therefore, how to improve the ability to identify users' long-term goal status during product name search suggestions, and thereby improve the consistency between recommendation results and current needs, has become an urgent technical problem to be solved.
[0059] Figure 1 An application scenario diagram corresponding to the product name search suggestion method provided in an embodiment of this application is shown, such as... Figure 1 As shown, the application scenario provided in this embodiment includes: a parcel delivery terminal 10, a data processing platform 11, and a database 12. The parcel delivery terminal 10 can be an entry point for parcel delivery operations, such as a mobile app or an e-commerce merchant backend. After the user enters the product name, it is uploaded to the data processing platform 11 in real time. The data processing platform 11 establishes a data reading link with the database 12, which stores the user's complete historical parcel delivery sequence, corresponding logistics behavior time, and preset status tags.
[0060] The product name search suggestion method provided in this application is applicable to product name input assistance scenarios such as personal logistics shipments and e-commerce bulk shipments.
[0061] Specifically, the data processing interaction flow in the product name search suggestion is as follows: First, the parcel terminal 10 detects the user's input characters and sends a product name suggestion request to the data processing platform 11. After receiving the product name suggestion request, the data processing platform 11 retrieves the user's historical parcel delivery sequence and status tags from the database 12. The historical parcel delivery sequence includes the names of each parcel delivery and the corresponding logistics operation time. Next, the data processing platform 11 calculates the behavioral weight of each type of parcel delivery based on the difference between the logistics operation time and the current system time. Based on the semantic similarity between the status tags, parcel names, and each status tag, as well as the behavioral weight, the platform determines the target status tag corresponding to the user. A basic candidate word set is generated based on the user's input content, and the semantic fit between each candidate word and the target status tag is calculated. The candidate words are sorted from high to low according to the semantic fit, and a preset number of target candidate words are selected. The selected target candidate words are then sent to the parcel terminal for display and recommendation. This solution combines the user's long-term parcel delivery behavior weight to identify stable needs, weakens the interference of popular words, and significantly improves the consistency between product name recommendations and the user's real-time needs.
[0062] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0063] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0064] Figure 2 This is a flowchart illustrating a product name search suggestion method provided in an embodiment of this application, as shown below. Figure 2 As shown, the execution entity in this embodiment is a product name search suggestion device, which is deployed on a terminal, such as a mobile phone or tablet computer. The product name search suggestion method provided in this embodiment includes the following steps:
[0065] S201. In response to receiving information input by the target user, obtain the target user's historical consignment sequence; wherein, the historical consignment sequence includes multiple consignment names and the logistics behavior time corresponding to each consignment name.
[0066] In this application, the terminal serves as the application carrier of the method and is equipped with a mail sending page input interface, a historical data access interface, and a candidate word suggestion processing program.
[0067] Optionally, when the target user enters characters or pinyin in the mail name input box on the mailing page, or enters content through voice-to-text, the terminal responds to the input operation in real time and activates the prompting method in this embodiment.
[0068] The information input by the target user is used to limit the current prompt range. It can be a real-time string formed by continuous input or an updated string formed after deletion or modification.
[0069] The historical shipment sequence is an ordered sequence composed of the shipment name and corresponding logistics time extracted from the target user's local historical shipment orders in the currently logged-in account / terminal, sorted chronologically. The shipment name represents the specific item the user previously shipped, and the logistics time can be the order placement time, pickup time, or payment time, representing the time node where the action occurred.
[0070] Optionally, the terminal can identify the target user based on the currently logged-in account, the sender's / receiver's mobile phone number, the device-bound identity identifier, or the local user identifier, and initiate a retrieval request to the local parcel record cache or the server-side historical parcel data storage unit to read the historical parcel records associated with the target user. At least the item name field and the parcel timestamp field are extracted from each historical parcel record. The item name field undergoes noise reduction, synonym normalization, case unification, special character filtering, and null value removal to form the name of the consigned item. The parcel timestamp is converted to a unified time zone to form the logistics activity time. The terminal then sorts the historical consigned items according to the logistics activity time, from most recent to oldest or from oldest to most recent, organizing them into a chronological sequence.
[0071] Optionally, the terminal only extracts historical mailing records within a preset time window. The time window can be set to the last three months, the last six months, or the last year to control the sequence length and maintain the sensitivity of status judgment to recent behavior.
[0072] Optionally, the terminal does not simply deduplicate the multiple occurrences of the same consignment name at different logistics time points, but instead retains them as multiple event nodes in the sequence, so that subsequent steps can calculate their contribution based on the time interval. If the terminal has a local cache of historical consignments after the most recent synchronization, it can first read the local cache; if the local cache is missing or times out, it can then request data completion from the server and write the latest result back to the local cache.
[0073] S202. Based on the time interval between each logistics behavior time and the current system time, determine the behavior weight corresponding to each consignment name.
[0074] The current system time is the standard timestamp obtained by the terminal when it triggers the product name prompt process. The time interval is obtained by subtracting the time of each logistics behavior from the current system time. The unit can be minutes, hours or days.
[0075] Optionally, before calculating the time interval, the terminal first verifies the validity of the time of each logistics behavior, and removes or corrects records with missing time, future time, or abnormal format, while retaining valid historical nodes that can participate in the calculation.
[0076] Among them, the behavior weight is used to characterize the contribution of each consignment name to the current target state judgment, and it is negatively correlated with the time interval, that is, the closer the logistics behavior time is to the current system time, the higher the behavior weight. In specific implementation, the terminal can determine the corresponding behavior weight for each consignment name based on the time interval between each logistics behavior time and the current system time, so that consignment names with shorter time intervals have a relatively higher influence in subsequent processing.
[0077] Alternatively, the terminal may also adopt a segmented processing method, maintaining a higher weight within a preset near time interval, reducing the weight after exceeding the interval, or assigning a lower weight to records that exceed a preset time period or no longer participating in the calculation.
[0078] Optionally, the terminal can adjust the behavior weights based on the distribution characteristics of the target user's historical mailing sequence. For example, when a user sends the same type of item multiple times in a short period of time, the relevant records within that period can be processed to avoid excessive amplification of a single semantic direction due to a large number of repeated mailings on the same day. Or, when the total number of historical mailing records of a user is small, the weights of all behaviors can be adjusted to ensure that the status judgment has sufficient numerical stability.
[0079] Optionally, after the behavior weight is determined, the terminal generates a one-to-one mapping relationship between the name of the consigned item and the behavior weight, which serves as the input for the subsequent determination of the status label.
[0080] This embodiment converts the time of logistics activities into quantifiable timeliness weights, allowing the impact of historical shipment names on current demand to automatically adjust over time. This enables subsequent status identification to better reflect recent shipment behavior and status changes, rather than being solely driven by cumulative frequency. It should be understood that the above example is merely illustrative and not limiting.
[0081] S203. Based on the semantic similarity between each consignment name and each preset status label, and the behavioral weight of each consignment name, determine the target status label corresponding to the target user from multiple preset status labels.
[0082] The preset status tags are pre-established sets of states used to represent the target state or demand direction that a user may correspond to during the item selection process. In this embodiment, the preset status tags can be stored in the terminal's local configuration file or the server-side knowledge base in the form of tag identifiers and tag names.
[0083] The semantic similarity between the item name and the preset status label is used to characterize the degree of semantic association between a historical item and a preset status label. For example, if a historical item name is "chicken breast", its semantic similarity with the preset status label "weight loss" can be higher than its semantic similarity with the preset status label "office relocation"; if a historical item name is "yoga mat", its semantic similarity with the preset status labels "health management" or "outdoor sports" can be relatively high.
[0084] Specifically, the terminal compares and analyzes multiple preset status tags based on the semantic similarity between each item name and each preset status tag, as well as the behavioral weight corresponding to each item name, and determines the target status tag that is more suitable for the target user.
[0085] Optionally, to reduce noise introduced by low-relevance consignment names, the terminal can reduce the impact of less relevant consignment names on the results when determining the target status label. Optionally, if the relevance of multiple preset status labels is relatively close, the terminal can combine the semantic direction reflected by the consignment names from more recent times for determination, so as to strengthen the guiding role of the latest behavior in status determination.
[0086] Specifically, this embodiment incorporates both semantic and temporal information of historical shipments into the target status label determination process. This allows the terminal to identify a target status label that is more consistent with the user's current shipment stage from multiple possible status directions, thereby addressing the problem of insufficient differentiation of actual needs when relying solely on popular words or historical frequency for candidate word association. It should be understood that the above example is merely illustrative and not limiting.
[0087] S204. Based on the target state label, determine the semantic fit between each candidate word in the candidate word set and the target state label; the candidate word set is determined based on the information input by the target user.
[0088] Specifically, after determining the target state label, the terminal generates a candidate word set based on the information input by the target user. The candidate word set is used to carry multiple candidate product names related to the current input content, and the generation methods can include prefix matching recall, pinyin transcription recall, homophone recall, local matching recall after word segmentation, and language model prediction recall.
[0089] For example, when the target user inputs "chicken breast", the terminal can retrieve candidate words such as "chicken breast meat", "ready-to-eat chicken breast meat", and "chicken breast meatball" from the product name database, historical product name index and candidate word suggestion module; when the input information is a pinyin fragment, the terminal first performs pinyin segmentation and then retrieves the corresponding candidate words from the pinyin inverted index.
[0090] Specifically, after the candidate word set is formed, the terminal determines the semantic fit between each candidate word and the target status label. Semantic fit characterizes the degree of matching between the candidate word and the target status label. For example, when the target status label is "weight loss," the semantic fit between the candidate words "chicken breast," "meal replacement powder," and "whole wheat bread" and this target status label is higher than that of candidate words such as "potato chips" and "cream cake." When the target status label is "infant care," the semantic fit of candidate words such as "baby bottle," "baby wipes," and "feeding bowl" is relatively higher.
[0091] It should be noted that, to ensure that the literal matching constraints of the current input are not violated, the terminal only determines the semantic fit within the set of candidate words recalled by the information already input by the target user, without introducing additional candidate words unrelated to the input. Therefore, the target state label serves as the basis for reordering.
[0092] It should be noted that, without changing the input triggering method and the basic candidate word recall mechanism, this embodiment introduces target state labels into the semantic evaluation process at the candidate word level, enabling subsequent ranking to distinguish multiple candidate words with different semantic directions under the same input segment. It should be understood that the above example is merely illustrative and not limiting.
[0093] S205. Sort each candidate word according to its semantic fit, determine a preset number of target candidate words based on the sorting results and output them.
[0094] Optionally, the sorting can be done directly based on semantic fit, from highest to lowest. After sorting, the terminal extracts a corresponding number of candidate words from the top of the sorting results as target candidate words, according to a preset number. The preset number can be pre-set to 3, 5, 8, or 10 words based on the display area of the terminal's input interface, and a collapsed display method can be used when interface space is limited. The output method can be to refresh the candidate word list in real time below the product name input box on the shipping page, or to pop up the candidate word panel all at once after the user finishes typing.
[0095] Optionally, if there are identical standardized product names among the target candidate words, the terminal performs deduplication before output and retains the one with the higher ranking. If some candidate words in the ranking result can match the information entered by the target user but the text is too long or contains non-standard characters, the terminal can also generate a standard display name and a full product name mapping before output to ensure stable interface display.
[0096] In this step, by sorting candidate words according to semantic fit and outputting a preset number of target candidate words, the terminal can prioritize candidate words that are more consistent with the target status label. This allows users to see product name suggestions that match the current shipping stage when entering the same character fragment. Therefore, even when user needs have changed but frequently used historical items still exist, the target status label inferred from recent behavior will influence the sorting results through semantic fit, resulting in a higher consistency between the output candidate words and current needs.
[0097] Optionally, if the number of candidate words is less than a preset number, the terminal outputs all candidate words while maintaining the existing sorting order. It should be understood that the above example is for demonstration purposes only and is not a limitation.
[0098] The product name search suggestion method provided in this application obtains the user's historical shipment sequence containing the shipment name and the corresponding logistics behavior time. It determines differentiated behavior weights based on the interval between each logistics behavior time and the current time, and combines the semantic similarity between the shipment name and preset status tags to weightedly determine the target status tag corresponding to the user's long-term goal. Then, based on this target status tag, it calculates the semantic fit of each candidate word in the candidate word set generated from the input information and completes the sorting and output. This ensures that the product name search suggestion result is simultaneously constrained by the input content, historical temporal behavior, and status semantic information. Compared to existing schemes that rely solely on short-term statistics, overall network popularity, or general word frequency to generate product name suggestion recommendations, this application method can fully explore the long-term goals and the characteristics of goal phase changes carried by the user's temporal behavior sequence, eliminate the interference of recommendation bias from high-frequency popular words, improve the recognition accuracy of the user's long-term goal status during terminal product name input suggestion, effectively enhance the matching consistency between the output candidate words and the user's current actual shipment and shopping input needs, reduce interference from irrelevant recommended content, shorten the user's product name input operation time, and optimize the user experience of product name input assistance in logistics shipment and e-commerce shopping scenarios.
[0099] Figure 3 A flowchart illustrating a product name search suggestion method provided in another embodiment of this application; as shown Figure 3 As shown, as an optional implementation, based on any of the above embodiments, the behavior weight corresponding to each consignment name is determined based on the time interval between each logistics behavior time and the current system time, including:
[0100] S301, Obtain the preset time decay coefficient.
[0101] The time decay coefficient is a preset positive real constant used to characterize how quickly the reference value of the consignment behavior decays over time. The larger the time decay coefficient, the faster the weight decays, and the more sensitive the system is to the user's recent behavior; the smaller the time decay coefficient, the slower the weight decays, and the more the system tends to retain the influence of the user's long-term behavior patterns.
[0102] Optionally, the time decay coefficient can be configured through two paths: one is to obtain it through offline training based on a large amount of historical logistics parcel sending data, and to back-deduce the optimal time decay coefficient value by maximizing the accuracy index of target state recognition; the other is to preset it manually according to the business scenario. In the logistics parcel sending scenario, the value range can be 0.02~0.1, of which the commonly selected value is 0.05, which corresponds to the behavior reference value decaying to about 36% of the initial value after about 20 days, adapting to the periodic change pattern of most users' parcel sending goals.
[0103] Optionally, different time decay coefficients can be configured for different user groups and different shipping scenarios. For example, a smaller time decay coefficient can be set for e-commerce merchants who frequently ship packages to preserve the characteristics of long-term business categories, while a larger time decay coefficient can be set for individual users to quickly adapt to changes in short-term shipping targets.
[0104] S302. Based on the time interval and time decay coefficient, the preset initial weight of each consignment name is decayed.
[0105] The preset initial weight is the baseline weight on the day the item is consigned, with a default value of 1.0. The initial weight can also be differentiated based on dimensions such as the type of item (sent / received), the value of the item, and the order type to further refine the contribution of the behavior.
[0106] Optionally, first calculate the time interval Δt between the logistics activity time corresponding to each consignment name and the current system time, i.e., Δt = - ;in, The current system time. The time for the logistics activity corresponding to the i-th consignment can be set to days, hours, or minutes according to the business accuracy requirements. In the logistics consignment scenario, days are preferred.
[0107] Optionally, the preset initial weights are decayed using a natural exponential decay function, calculated as follows: .in, The intermediate weights after attenuation processing. To preset the initial weights, Here, is the time decay coefficient, and e is the natural constant. The physical meaning of this formula is that the reference value of the act of entrusting goods decreases exponentially with the time interval. For every unit increase in the time interval, the weight decreases by a fixed proportion, which conforms to the time-sensitivity decay law of the behavioral intention.
[0108] For example, with preset initial weights =1.0, time decay coefficient For example, =0.05:
[0109] Chicken breast delivered on the same day, with a time interval Δt=0 days, has a median weight after decay = =1.0. The yoga mat was shipped 10 days ago, with a time interval Δt = 10 days. The median weight after decay is = ≈0.607. "Spicy chicken wings" shipped 60 days ago, time interval Δt = 60 days, after decay, the median weight = ≈0.05.
[0110] This shows that the weight of long-term behavior is significantly reduced, and its contribution to subsequent state judgment is significantly decreased.
[0111] S303. The weights after attenuation processing are determined as the behavioral weights corresponding to each consignment name; wherein, the behavioral weights are negatively correlated with the time interval.
[0112] Specifically, the intermediate weight obtained after the attenuation process in step S302 is directly determined as the behavior weight corresponding to the name of the consigned item; the behavior weight is strictly negatively correlated with the time interval: the smaller the time interval, the higher the behavior weight; the larger the time interval, the lower the behavior weight.
[0113] Optionally, the behavioral weights of all entrusted items can be normalized, that is, the sum of the behavioral weights of all entrusted items is made to 1, so that the subsequent state confidence calculation can directly obtain the probabilistic result by weighted summation, simplifying the cross-state comparison logic, and avoiding the interference of the number of behavioral samples on the absolute value of the score.
[0114] It should be noted that when the time interval is 0, the behavior weight is equal to the initial weight, reaching the maximum value; when the time interval approaches the upper limit of the preset historical period, the behavior weight approaches 0, which can directly filter out long-term consignment records with weights lower than the preset minimum value, reduce invalid calculations, and improve overall computing efficiency.
[0115] The product name search suggestion method provided in this application introduces a preset time decay coefficient combined with time intervals to attenuate the initial weight of the consigned item. This weakens the influence of long-standing consignment records, amplifies the reference value of recent logistics behavior, and accurately distinguishes the importance of users' consignment behavior at different times. This helps the target status label obtained based on weighted semantic similarity to better match the user's current real needs, thereby improving the accuracy of candidate word semantic fit calculation and optimizing the matching effect between product name recommendation and the user's current consignment needs.
[0116] As an optional implementation, based on any of the above embodiments, the target status label corresponding to the target user is determined from multiple preset status labels according to the semantic similarity between each consignment name and each preset status label, and the behavioral weight of each consignment name, including the following steps:
[0117] First, for each preset status label, the semantic similarity between each consignment name and the current preset status label is multiplied by the behavioral weight corresponding to each consignment name and then summed.
[0118] Specifically, for each preset status label, the semantic similarity between all the entrusted item names in the weighted behavior sequence and the preset status label is multiplied by the corresponding entrusted item's behavior weight, and then all the product results are summed to obtain the original matching total score of the preset status label.
[0119] For example, for the k-th preset state label The calculation logic for the original matching total score is as follows: The i-th consignment item... and semantic similarity Multiply by the behavior weight corresponding to the consigned item. After iterating through all entrusted items, sum up all product values. The calculation formula can be expressed as: Raw =Σ[ × The summation range covers all consignments in the historical consignment sequence.
[0120] For example, taking a user's weighted action sequence as (chicken breast, 1.0), (yoga mat, 0.607), and (spicy chicken wings, 0.050), with a status label of "weight loss / health management", the semantic similarities between the three actions and the status are 0.95, 0.90, and 0.10, respectively. The total original matching score is: 1.0×0.95+0.607×0.90+0.050×0.10=0.95+0.5463+0.005=1.5013.
[0121] Secondly, the accumulated results are normalized to obtain the confidence score of the preset state label.
[0122] Optionally, the original total matching score for each preset status label is normalized, mapping the score to the interval [0,1] to obtain the confidence score for that preset status label. Further, a weighted normalization method can be used, dividing the original total matching score by the sum of the behavioral weights of all consignments, calculated as follows: =Raw / Σ Where, the denominator Σ The sum of the weights of all entrusted item behaviors is used as a normalization factor.
[0123] The role of normalization is to eliminate the influence of the number of entrusted samples. Regardless of the amount of user history, the confidence score falls within the range of [0,1], enabling horizontal comparability of state scores for different users and different amounts of data. The confidence score directly represents the credibility of the user's current state. The closer the score is to 1, the higher the matching degree between the user's behavior and the state; the closer the score is to 0, the lower the matching degree.
[0124] For example, following the example from the previous step, the total weight of all entrusted items is 1.0 + 0.607 + 0.050 = 1.657. Therefore, the confidence score of the "weight loss / health management" status is 1.5013 / 1.657≈0.906, which means that the credibility of the user being in this status label is about 90.6%.
[0125] Finally, the preset state label with the highest confidence score is selected. If the highest confidence score is greater than the preset confidence threshold, the preset state label with the highest confidence score is determined as the target state label.
[0126] Optionally, all preset state labels are traversed first, and the label with the highest confidence score is selected as the candidate target state. Then, the highest confidence score is compared with a preset confidence threshold. Only when the highest score is greater than the preset confidence threshold is the candidate label determined as the final target state label.
[0127] The preset reliability threshold is a constant between 0 and 1, preferably between 0.5 and 0.7, with a preferred value of 0.6. This preset reliability threshold can be determined through training with historical data to balance the recall and precision of state recognition.
[0128] Specifically, if the highest confidence score is greater than the preset confidence threshold, the user is determined to be in the target state, and subsequent candidate word rearrangement and intervention logic based on the target state is activated; if the highest confidence score is less than or equal to the preset confidence threshold, the user is determined not to have a clear and identifiable long-term target state, the target intervention mechanism is not activated, and the logic degenerates into the regular product name suggestion recommendation logic to avoid erroneous intervention interfering with the user's normal input.
[0129] The product name search suggestion method provided in this application obtains the confidence score of each status label by weighted summation and normalization of the semantic similarity of the consigned item name and the behavior weight, and then combines it with a preset confidence threshold to filter out the target status label. Thus, it can take into account the importance of the time sequence of the user's historical behavior and the semantic features of the item, filter out invalid status label judgment results with insufficient confidence scores, avoid misjudgment of user status caused by single historical records or semantic deviation of high-frequency words, and ensure that the identified target status label matches the user's real long-term needs.
[0130] As an optional implementation, based on any of the above embodiments, the step of determining the semantic similarity between each consignment name and each preset status tag includes the following steps:
[0131] First, the names of each consignment item and each preset state label are input into a pre-trained text representation model to obtain the first vector corresponding to each consignment item name and the second vector corresponding to each preset state label.
[0132] Optionally, the pre-trained text representation model can be a semantic representation model pre-trained based on a large-scale general corpus, such as a pre-trained model optimized for sentence-level semantic matching. Through self-supervised learning of massive text data, the model learns the representation capabilities of vocabulary, syntax and deep semantics, and can map semantically similar texts to positions with similar distances in a high-dimensional space.
[0133] Optionally, to further adapt to logistics parcel delivery scenarios, the model can be fine-tuned in advance using corpora from the logistics field, including names of consigned items, item classification systems, and descriptions of delivery scenarios. This enhances the model's recognition accuracy for logistics-specific vocabulary and category semantics, and reduces computational bias caused by domain ambiguity.
[0134] Optionally, after inputting the name of the entrusted item into the text representation model, the output fixed-dimensional dense vector is denoted as the first vector, which is used to represent the complete semantic information of the corresponding entrusted item; after inputting the preset state label text (such as "weight loss / health management" or "home life") into the text representation model, the output same-dimensional dense vector is denoted as the second vector, which is used to represent the semantic boundary and core connotation of the corresponding target state. Since both types of vectors have the same dimension, spatial distance calculations can be performed directly.
[0135] Optionally, for a preset set of status tags, the second vectors of all tags can be pre-calculated offline and stored as a vector dictionary; for a standard consignment lexicon, the first vectors of all consignments can also be pre-calculated and cached. In actual operation, only non-standard consignments in the user's historical sequence need to be vectorized in real time, and the rest can directly call the cached vectors, which can reduce the real-time computing overhead and adapt to the low-latency operation requirements of the terminal side.
[0136] Next, the vector similarity between each first vector and each second vector is calculated, and the vector similarity is determined as semantic similarity.
[0137] Alternatively, cosine similarity can be used as a metric for vector similarity, and the calculation formula is as follows:
[0138]
[0139] in, Let i be the first vector corresponding to the i-th consignment. Let be the second vector corresponding to the k-th preset state label; the numerator is the dot product of the two vectors, and the denominator is the product of the L2 norms of the two vectors. The cosine similarity ranges from [0,1]. The closer the value is to 1, the more consistent the orientation of the object and the state label in the semantic space, and the higher the semantic correlation between them; the closer the value is to 0, the weaker the semantic correlation between them.
[0140] For example, in the context of logistics parcel delivery, the semantic similarity between the parcel "chicken breast" and the status tag "weight loss / health management" can reach 0.95, indicating a high degree of semantic correlation; however, the semantic similarity between the parcel "spicy chicken wings" and "weight loss / health management" is only about 0.10, indicating a low degree of semantic fit.
[0141] It should be noted that the advantage of using cosine similarity is that it is not affected by the absolute length of the vector, but only focuses on the consistency of semantic direction. It can more accurately measure the semantic similarity between texts, avoid the interference of differences in the length of the entrusted item name and the length of the label description on the similarity results, and match the quantitative requirements of semantic similarity.
[0142] As an optional implementation, based on any of the above embodiments, the candidate words are sorted according to their semantic fit, including the following steps:
[0143] First, obtain the basic prediction score for each candidate word; the basic prediction score is used to characterize the semantic matching degree between the candidate word and the information input by the target user.
[0144] Herein, the base prediction score reflects the direct matching strength between the candidate word and the user input characters, and is an important indicator for ensuring input prompts. A higher score indicates that the candidate word is more consistent with the literal orientation of the content currently typed by the user and conventional language habits, ensuring that the recommendation results do not deviate from the basic semantic scope of the user's current input.
[0145] Optionally, the base prediction score can directly reuse the output of an existing input association model, and the calculation dimensions include: character matching features, language model probability, and statistical popularity features.
[0146] Herein, the character matching features refer to prefix matching length, character coincidence rate, pinyin matching degree (full pinyin / abbreviated pinyin matching), edit distance, and the like. The language model probability is a context generation probability calculated based on a general pre-trained language model, that is, the occurrence probability of the candidate word under the current input context. The statistical popularity features refer to statistical features such as the usage popularity of the consignment items across the entire network and the user's historical input frequency. The above features can be output as a standardized base prediction score through weighted summation or a ranking model, with the value range normalized to the interval [0, 1].
[0147] As an example, taking the user input of the character "xiang" as an example, the base prediction scores of each candidate word under the conventional model can be expressed as: "spicy chicken wings" 0.85 (high popularity across the network, high input matching degree), "banana" 0.60, "shiitake mushroom" 0.40, which reflects the feature that high-frequency popular words are ranked higher in the conventional scheme.
[0148] Next, the base prediction score and the semantic adaptability are weighted and summed according to a preset weight ratio to obtain the ranking score corresponding to each candidate word.
[0149] Optionally, the calculation formula for the ranking score is as follows:
[0150]
[0151] Herein, is the final ranking score of the j-th candidate word; is the base prediction score corresponding to this candidate word; is the semantic adaptability between this candidate word and the target state label; is a preset weight ratio coefficient, with a value range of 0 to 1; is a target state activation indicator function, which takes a value of 1 when the confidence score of the target state label is greater than a preset confidence threshold to enable target intervention; otherwise, it takes a value of 0, which degenerates to pure base prediction score ranking.
[0152] Optionally, the preset weight ratio coefficient The optimal value can be determined through offline training using historical data, with the recommended click-through rate and user selection accuracy as optimization goals. In the logistics and parcel delivery scenario, the value range can be 0.3~0.6; when focusing on goal guidance, a smaller value (e.g., 0.4) can be selected, and when focusing on preserving user input habits, a larger value (e.g., 0.6) can be selected. The value can be lowered for users with high confidence in the target status. Strengthen goal-oriented guidance; increase support for new users and users with unclear goals. To ensure a smooth experience with basic product name prompts.
[0153] For example, following the fat loss goal scenario in the previous step, the goal state has been activated. =1, take the balance coefficient =0.4, then the ranking score for each candidate word is calculated as follows:
[0154] Spicy chicken wings = 0.4 × 0.85 + 0.6 × 0.10 = 0.40; Shiitake mushrooms: 0.4 × 0.40 + 0.6 × 0.85 = 0.67; Bananas = 0.4 × 0.60 + 0.6 × 0.60 = 0.60. It can be seen that "Spicy chicken wings," which originally had the highest base score, was demoted due to its conflict with the target, while "shiitake mushrooms," which was originally ranked lower, was boosted because it aligned with the target.
[0155] Finally, the candidate words are sorted in descending order of their ranking scores.
[0156] Optionally, candidate words with higher ranking scores will be displayed earlier in the suggestion list; the top N ranked words (such as the top 5 or top 10) will be selected as the final recommended items for display, and the value of N can be flexibly set according to the display space of the interactive interface.
[0157] The product name search suggestion method provided in this application integrates the basic prediction score of candidate words and the semantic fit of the corresponding target status label to calculate the ranking score. It balances the semantic matching of ordinary input and the constraints of user stage behavior features, avoids the recommendation bias towards popular irrelevant words due to relying solely on the literal matching of input, and ensures that the ranking results are consistent with the current input content and the user's long-term shipping needs, thereby improving the comprehensive matching accuracy of product name suggestion candidate words.
[0158] As an optional implementation, based on any of the above embodiments, before weighting and summing the basic prediction score and semantic fit according to a preset weight ratio, the following steps are also included:
[0159] First, determine whether the target status tag corresponding to the target user has been identified.
[0160] Optionally, if the highest-confidence preset state label has been selected in the foregoing steps and its confidence score is greater than a preset confidence threshold, it is determined that the target state label corresponding to the target user has been determined; if the highest confidence score does not reach the preset confidence threshold, the user has no valid historical consignment item sequence to complete state inference, or the historical behaviors are too scattered to have obvious clustering features, it is determined that the target state label has not been determined.
[0161] Optionally, when it is determined that the target state label has been determined, the value is set to 1, and the target intervention mechanism is officially enabled; when it is determined that the target state label has not been determined, the value is set to 0, and the target intervention mechanism is disabled.
[0162] The scenarios where the target state label is not determined include but are not limited to: cold start of new users (no historical shipping data), highly dispersed categories of users' historical consignment items, short-term occasional shipments that cannot support long-term target determination, and scenarios where the highest confidence of the target state is lower than the preset confidence threshold.
[0163] Next, in the case where the target state label is determined, the step of weighted summation is performed. Finally, in the case where the target state label is not determined, each candidate word is sorted according to the basic prediction score.
[0164] Optionally, when the target state label is not determined, there is no need to calculate the semantic fitness between the candidate words and the state labels, nor to perform the weighted fusion operation, and the candidate words are directly sorted in descending order of the basic prediction scores to output the conventional product name prompt result. Thus, by reusing the output of the existing product name prompt technology, it is ensured that in scenarios where state recognition fails, the recommendation effect is not lower than that of the traditional solution, avoiding the degradation of recommendation quality and fragmentation of user experience caused by blind intervention.
[0165] For example, for a new user who uses the shipping function for the first time, when the character "xiang" is input, the target state cannot be determined due to no historical consignment item data, and the conventional recommendation results of "spicy chicken wings", "banana" and "shiitake mushroom" are output directly according to the basic prediction score sorting, so as to guarantee the user's basic input efficiency.
[0166] As an optional implementation, on the basis of any one of the foregoing embodiments, the step of constructing the preset state label includes the following steps:
[0167] First, co-occurrence records of consignment items of a plurality of sample users within a preset historical period are acquired.
[0168] The sample users cover the entire historical mail sending user group. The preset historical period can be set according to the typical target period of the mail sending scenario. For example, the range can be 30 to 180 days, and the conventional value is 90 days. Within this period, all mailing names generated under the same user account constitute a set of co-occurrence records, that is, by default, mailings of the same user within the same period are related at the scenario target level.
[0169] Optionally, the original consignment names can be normalized and cleaned, including merging synonyms, removing redundant modifiers, and standardizing category descriptions, to eliminate the interference of textual differences on co-occurrence statistics.
[0170] Optionally, the total frequency of co-occurrence of each pair of consigned items within the same user's historical period is calculated to form an item co-occurrence frequency matrix; the higher the co-occurrence frequency, the greater the probability that the two items belong to the same scene target, and the stronger the scene association.
[0171] Secondly, based on the co-occurrence records of consigned items, a clustering algorithm is used to group multiple co-occurring consigned items into the same item cluster.
[0172] This step uses an unsupervised clustering algorithm to mine strongly correlated item combinations from co-occurrence data, forming item clusters corresponding to different target scenarios.
[0173] Optionally, an undirected weighted co-occurrence graph of items can be constructed using the standardized names of the consigned items as graph nodes and the co-occurrence frequency between consigned items as edge weights. The higher the co-occurrence frequency, the greater the edge weight between nodes, and the stronger the scene correlation between the two items.
[0174] Alternatively, community detection clustering algorithms can be used to divide the co-occurrence graph into communities, such as the DBSCAN density clustering algorithm. The DBSCAN algorithm does not require presetting the number of clusters and can automatically discover clusters of items of any shape based on node density, while automatically isolating isolated outliers, making it more suitable for unsupervised mining in unknown and emerging scenarios.
[0175] Optionally, after clustering, each tightly connected community of items corresponds to an item cluster, which contains multiple frequently co-occurring items, representing a typical shipping target scenario. For example, item clusters can be obtained such as C1={chicken breast, yoga mat, body fat scale}, C2={sofa cover, storage box, curtains}, and C3={cat food, cat litter, pet toys}.
[0176] Finally, semantic features are extracted from the item clusters to generate preset state labels corresponding to the item clusters.
[0177] Optionally, core items with high co-occurrence frequency and strong representativeness are selected from each item cluster as semantic summary input. Typically, the top 3 to 10 core items in terms of weight within the cluster are selected to ensure sufficient semantic information while avoiding redundant items from interfering with the accuracy of the summary. The extracted set of core items is input into a pre-trained large language model, which instructs the model to perform scene generalization and semantic abstraction on the item set, automatically generating concise target state labels with clear scene meaning.
[0178] For example, the tag "weight loss / health management" can be generated for the item cluster {chicken breast, yoga mat, body fat scale}, and the tag "home furnishing" can be generated for {sofa cover, storage box, curtains}.
[0179] Optionally, the generated tags can be deduplicated, merged, and hierarchically sorted to combine tags with highly overlapping semantics and construct a hierarchical and categorized tag system. Furthermore, the above co-occurrence mining, clustering, and generation process can be repeated at a preset period (such as monthly / quarterly) to discover new item co-occurrence patterns based on newly added user behavior data, supplement new status tags into the system, and achieve continuous iteration and scenario coverage expansion of the tag system.
[0180] The product name search suggestion method provided in this application relies on a large number of sample users' historical co-occurrence records of consigned items. It uses a clustering algorithm to divide the items into clusters and extract semantic features to generate preset status labels. The status labels are consistent with the distribution of real logistics consignment behavior, which can objectively distinguish different types of long-term user needs. There is no need for manual subjective setting of label classification, which reduces the label construction cost and improves the coverage and semantic representativeness of status labels for various consignment scenarios. This ensures the rationality of subsequent identification of users' long-term goals and calculation of candidate word suitability based on status labels.
[0181] Figure 4 This is a schematic diagram of the structure of a product name search suggestion device provided in an embodiment of this application, as shown below. Figure 4 As shown, the product name search suggestion device provided in this embodiment is located in an electronic device. The product name search suggestion device 40 provided in this embodiment includes: an acquisition module 41, a weight determination module 42, a tag determination module 43, a suitability determination module 44, and a sorting module 45.
[0182] Specifically, the acquisition module 41 is used to acquire the target user's historical consignment sequence in response to receiving information input from the target user; wherein, the historical consignment sequence includes multiple consignment names and the logistics behavior time corresponding to each consignment name; the weight determination module 42 is used to determine the behavior weight corresponding to each consignment name based on the time interval between each logistics behavior time and the current system time; the label determination module 43 is used to determine the target status label corresponding to the target user from multiple preset status labels based on the semantic similarity between each consignment name and each preset status label, and the behavior weight of each consignment name; the fit determination module 44 is used to determine the semantic fit between each candidate word in the candidate word set and the target status label based on the target status label; the candidate word set is determined based on the information input by the target user; the sorting module 45 is used to sort each candidate word according to each semantic fit, determine a preset number of target candidate words based on the sorting result, and output them.
[0183] Optionally, the weight determination module 42, when determining the behavior weight corresponding to each consignment name based on the time interval between each logistics behavior time and the current system time, is specifically used for: obtaining a preset time decay coefficient; performing decay processing on the preset initial weight of each consignment name based on the time interval and the time decay coefficient; and determining the weight after decay processing as the behavior weight corresponding to each consignment name; wherein, the behavior weight is negatively correlated with the time interval.
[0184] Optionally, the label determination module 43, when determining the target status label corresponding to the target user from multiple preset status labels based on the semantic similarity between each consignment name and each preset status label, and the behavioral weight of each consignment name, specifically performs the following: for each preset status label, multiply the semantic similarity between each consignment name and the current preset status label by the behavioral weight corresponding to each consignment name and then sum them up; normalize the summed result to obtain the confidence score of the preset status label; select the preset status label with the highest confidence score, and if the highest confidence score is greater than a preset confidence threshold, determine the preset status label with the highest confidence score as the target status label.
[0185] Optionally, the label determination module 43, in the step of determining the semantic similarity between each consignment name and each preset state label, specifically involves: inputting each consignment name and each preset state label into a pre-trained text representation model to obtain a first vector corresponding to each consignment name and a second vector corresponding to each preset state label; calculating the vector similarity between each first vector and each second vector, and determining the vector similarity as semantic similarity.
[0186] Optionally, the sorting module 45, when sorting each candidate word according to each semantic fit, is specifically used to: obtain the basic prediction score corresponding to each candidate word; wherein, the basic prediction score is used to characterize the semantic matching degree between the candidate word and the information input by the target user; weight the basic prediction score and the semantic fit according to a preset weight ratio to obtain the sorting score corresponding to each candidate word; and sort each candidate word in descending order of sorting score.
[0187] Optionally, before the sorting module 45 performs a weighted summation of the basic prediction score and semantic fit according to a preset weight ratio, it is also used to: determine whether the target status label corresponding to the target user has been determined; if the target status label has been determined, perform the weighted summation step; if the target status label has not been determined, sort each candidate word according to the basic prediction score.
[0188] Optionally, the product name search suggestion device provided in this embodiment also includes a construction module.
[0189] Optionally, the construction module, in the step of constructing the preset status label, is specifically used for: obtaining co-occurrence records of entrusted items by multiple sample users within a preset historical period; based on the co-occurrence records of entrusted items, using a clustering algorithm to divide the multiple co-occurring entrusted items into the same item cluster; extracting semantic features from the item clusters to generate preset status labels corresponding to the item clusters.
[0190] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, as shown below. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: a processor 51 and a memory 52 communicatively connected to the processor 51.
[0191] The memory 52 stores computer-executable instructions; the processor 51 executes the computer-executable instructions stored in the memory 52 to implement the method provided in any of the above embodiments.
[0192] The program may include program code, which includes computer-executable instructions. Memory 52 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device.
[0193] In this embodiment, the memory 52 and the processor 51 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single straight line, but this does not mean that there is only one bus or one type of bus.
[0194] This application also provides a computer-readable storage medium, including computer-executable instructions stored in the computer-readable storage medium, which, when executed by a processor, are used to implement the method provided in any of the above embodiments.
[0195] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method provided in any of the above embodiments.
[0196] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0197] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0198] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0199] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0200] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0201] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0202] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.
[0203] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A product name search suggestion method, characterized in that, The method is applied to a terminal, and the method includes: In response to receiving information input from a target user, the system obtains the target user's historical shipment sequence; wherein, the historical shipment sequence includes multiple shipment names and the logistics behavior time corresponding to each shipment name; Based on the time interval between each logistics behavior time and the current system time, determine the behavior weight corresponding to each consignment name; Based on the semantic similarity between each of the consignment names and each of the preset status tags, and the behavioral weight of each of the consignment names, the target status tag corresponding to the target user is determined from the multiple preset status tags; Based on the target state label, the semantic fit between each candidate word in the candidate word set and the target state label is determined; the candidate word set is determined based on the information input by the target user. The candidate words are sorted according to their semantic fit, and a preset number of target candidate words are determined and output based on the sorting results.
2. The method according to claim 1, characterized in that, The determination of the behavior weight corresponding to each consignment name based on the time interval between each logistics behavior time and the current system time includes: Obtain the preset time decay coefficient; Based on the time interval and the time decay coefficient, the preset initial weight of each of the entrusted item names is decayed; The weights after attenuation processing are determined as the behavioral weights corresponding to each of the consignment names; wherein, the behavioral weights are negatively correlated with the time interval.
3. The method according to claim 1, characterized in that, The step of determining the target status label corresponding to the target user from a plurality of preset status labels based on the semantic similarity between each of the consignment item names and each preset status label, and the behavioral weight of each of the consignment item names, includes: For each preset status label, the semantic similarity between each consignment name and the current preset status label is multiplied by the behavior weight corresponding to each consignment name and then summed. The accumulated results are normalized to obtain the confidence score of the preset state label; Select the preset state label with the highest confidence score. If the highest confidence score is greater than the preset confidence threshold, the preset state label with the highest confidence score is determined as the target state label.
4. The method according to claim 1, characterized in that, The steps for determining the semantic similarity between each of the consigned item names and each preset status tag include: Each of the consigned items names and each of the preset state labels are input into a pre-trained text representation model to obtain a first vector corresponding to each of the consigned items names and a second vector corresponding to each of the preset state labels. Calculate the vector similarity between each of the first vectors and each of the second vectors, and determine the vector similarity as the semantic similarity.
5. The method according to claim 1, characterized in that, The step of sorting the candidate words according to their semantic fit includes: Obtain the basic prediction score corresponding to each candidate word; wherein, the basic prediction score is used to characterize the semantic matching degree between the candidate word and the information input by the target user; The basic prediction score and the semantic fit are weighted and summed according to a preset weight ratio to obtain the ranking score corresponding to each candidate word. The candidate words are sorted in descending order of their sorting scores.
6. The method according to claim 5, characterized in that, Before the step of weighting and summing the basic prediction score and the semantic fit according to a preset weight ratio, the method further includes: Determine whether the target status tag corresponding to the target user has been identified; Once the target state label is determined, the weighted summation step is performed; If the target state label is not determined, the candidate words are sorted according to the basic prediction scores.
7. The method according to any one of claims 1-6, characterized in that, The steps for constructing the preset status label include: Obtain co-occurrence records of items entrusted by multiple sample users within a preset historical period; Based on the co-occurrence records of the entrusted items, a clustering algorithm is used to group multiple co-occurring entrusted items into the same item cluster; Semantic features are extracted from the item clusters to generate the preset state labels corresponding to the item clusters.
8. A product name search suggestion device, characterized in that, include: The acquisition module is used to acquire the target user's historical consignment sequence in response to receiving information input by the target user; wherein the historical consignment sequence includes multiple consignment names and the logistics behavior time corresponding to each consignment name; The weight determination module is used to determine the behavior weight corresponding to each of the consigned items names based on the time interval between each of the logistics behavior times and the current system time. The tag determination module is used to determine the target status tag corresponding to the target user from multiple preset status tags based on the semantic similarity between each of the consignment names and each preset status tag, as well as the behavioral weight of each of the consignment names. The adaptation determination module is used to determine the semantic adaptation degree between each candidate word in the candidate word set and the target state label based on the target state label; the candidate word set is determined based on the information input by the target user. The sorting module is used to sort each candidate word according to the semantic fit, determine a preset number of target candidate words based on the sorting results, and output them.
9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-7.
