Commodity inventory determination method and device, equipment, medium and program product
By filtering inventory information based on specification combination relationships in multi-attribute product scenarios, the problem of high computational complexity and large storage resource consumption of traditional inventory status update methods is solved, achieving efficient inventory status determination and improving system performance and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional inventory status update methods have high computational complexity and large storage resource consumption in multi-attribute product scenarios, making them difficult to adapt to the needs of multi-attribute products.
By responding to user selections, inventory information is filtered based on the relationship between specification combinations. Only the inventory status of the selected specification and its associated specifications needs to be queried, avoiding traversing all combinations, and a combined inventory table is generated to determine the inventory status.
It reduces the computational complexity and storage resource consumption of inventory queries, improves system performance and user experience, and adapts to product scenarios with more attributes.
Smart Images

Figure CN121745804A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of big data and the technical field of financial technology, in particular to a commodity inventory determination method, device, equipment, medium and program product. BACKGROUND
[0002] In the scenarios of e-commerce, online marketing of merchants, etc., the multi-attribute specifications of commodities, such as color, version, size, etc., need to be displayed, and the inventory states of the remaining specifications need to be updated synchronously when the user selects the specifications, and the page display style needs to be adjusted to guide the user to efficiently select and purchase.
[0003] The traditional inventory state updating method generally adopts an exhaustive filtering method. First, all attribute complete specification combinations of a commodity are enumerated to form a set, and when the user selects a specification, the set needs to be traversed to filter the combination containing the selected specification, and the inventory of the remaining specifications needs to be determined. With the increase of commodity attributes, the number of complete combinations increases exponentially, resulting in high time complexity of calculation, and a large amount of complete combination data needs to be stored, causing storage redundancy, high resource occupation, and difficulty in adapting to the scenario of multi-attribute commodities. SUMMARY
[0004] In view of the above problems, the present disclosure provides a commodity inventory determination method, device, equipment, medium and program product.
[0005] According to a first aspect of the present disclosure, a commodity inventory determination method is provided, comprising: in response to a selection operation of a user on a first target specification of at least one selectable specification of a first attribute of a commodity, determining at least one second attribute according to at least one first specification combination associated with the first target specification, wherein the selectable specification is at least one first specification of the first attribute, and the first specification combination is composed of the first target specification and a second specification of the second attribute; obtaining at least one second specification combination according to a third target specification of a third attribute and at least one second specification of each of the at least one second attribute, wherein the third attribute is the attribute targeted by the last selection operation; obtaining commodity inventory information under the selected specifications according to commodity inventory state information of the at least one first specification combination and commodity inventory information of the at least one second specification combination, wherein the selected specifications include the first target specification and the third target specification.
[0006] According to an embodiment of the present disclosure, the commodity inventory information in the case of the selected specifications is obtained according to the commodity inventory state information of at least one first specification combination and the commodity inventory information of at least one second specification combination, and includes at least one of the following: in the case that the commodity inventory state information of the first specification combination and the commodity inventory state information of the second specification combination associated with the same second specification indicate that one of the commodity inventory state information of the first specification combination and the commodity inventory state information of the second specification combination indicates no commodity inventory, the commodity inventory information in the case of the selected specifications is obtained as no commodity inventory; in the case that the commodity inventory state information of the first specification combination and the commodity inventory state information of the second specification combination both indicate that there is commodity inventory, the commodity inventory information in the case of the selected specifications is obtained as having commodity inventory.
[0007] According to an embodiment of the present disclosure, the commodity inventory determination method further includes at least one of the following: in the case that it is indicated that there is no commodity inventory, determining that the second specification is a non-selectable specification; and in the case that it is indicated that there is commodity inventory, determining that the second specification is a selectable specification.
[0008] According to an embodiment of the present disclosure, the commodity inventory determination method further includes: in response to a selection operation of a third target specification of a third attribute by a user, obtaining a plurality of third specification combinations associated with the third target specification, wherein the third specification combination is composed of the third target specification and a specification of another attribute; and determining a selectable specification from the plurality of third specification combinations according to commodity inventory information of each of the plurality of third specification combinations, wherein the first attribute is an attribute to which the selectable specification belongs.
[0009] According to an embodiment of the present disclosure, the at least one second attribute is determined according to at least one first specification combination associated with the first target specification, including: determining the at least one first specification combination associated with the first target specification from a combination inventory table according to the first target specification, wherein the combination inventory table includes a plurality of specification combinations and commodity inventory information of each of the plurality of specification combinations; determining commodity inventory information of each of the at least one first specification combination from the combination inventory table; and determining the at least one second attribute according to the commodity inventory information of each of the at least one first specification combination.
[0010] According to an embodiment of the present disclosure, the commodity inventory determination method further includes: obtaining a plurality of attributes of a commodity and a specification of each of the plurality of attributes; combining any two specifications belonging to different attributes to generate a plurality of specification combinations; determining commodity inventory information of each of the plurality of specification combinations according to actual commodity inventory information; and generating a combination inventory table according to the plurality of specifications and the commodity inventory information of each of the plurality of specifications.
[0011] The second aspect of the present disclosure provides a commodity inventory determination apparatus, comprising: a first determination module configured to determine at least one second attribute according to at least one first specification combination associated with a first target specification in response to a selection operation of a user on a first target specification of at least one selectable specification of a first attribute, wherein the selectable specification is one of at least one first specification of the first attribute, and the first specification combination is composed of the first target specification and at least one second specification of the second attribute; a first obtaining module configured to obtain at least one second specification combination according to a third target specification of a third attribute and at least one second specification of each of the at least one second attribute, wherein the third attribute is an attribute targeted by a previous selection operation; and a second obtaining module configured to obtain commodity inventory information under selected specifications according to commodity inventory state information of the at least one first specification combination and commodity inventory information of the at least one second specification combination, wherein the selected specifications comprise the first target specification and the third target specification.
[0012] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method.
[0013] The fourth aspect of the present disclosure further provides a computer-readable storage medium having stored thereon a computer program or instructions, which, when executed by a processor, implement the steps of the method.
[0014] The fifth aspect of the present disclosure further provides a computer program product comprising a computer program or instructions, which, when executed by a processor, implement the steps of the method.
[0015] According to the embodiments of the present disclosure, when the user selects a specification, the system first filters out the second attribute that needs to be focused on based on the combination relationship associated with the specification, and then further narrows down the range of valid specifications in combination with the third attribute and the third target specification involved in the last selection operation, and finally determines the available options under the currently selected specifications by querying the inventory information of the related combinations. This process can ensure that each selection of the user can exclude commodity specifications without inventory, without traversing all possible complete combinations, and only by combining the inventory information of the selected specifications and the specifications directly associated with the selected specifications, the inventory validity of the corresponding specifications can be determined. Therefore, without pre-processing and storing all complete commodity specification combinations, the inventory validity can be derived only through the association relationship between two specifications, which not only greatly reduces the storage amount of the combination inventory state table, but also reduces the computational complexity during inventory query, especially when the number of attributes of commodity specifications increases, the problem of exponential growth of resource consumption with the increase of dimensions can be effectively avoided, and the system performance and user experience are improved. Attached Figure Description
[0016] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0017] Figure 1 The illustration shows an application scenario of the product inventory determination method, apparatus, device, medium, and program according to embodiments of the present disclosure;
[0018] Figure 2 A flowchart illustrating a method for determining merchandise inventory according to an embodiment of the present disclosure is shown schematically.
[0019] Figure 3 A flowchart illustrating a method for determining merchandise inventory according to another embodiment of this disclosure is shown schematically;
[0020] Figure 4 A flowchart illustrating a method for determining a second attribute according to an embodiment of the present disclosure is shown schematically.
[0021] Figure 5 The schematic diagram illustrates the display interface diagrams of optional and non-optional specifications according to embodiments of the present disclosure;
[0022] Figure 6 A schematic diagram illustrating the structure of a commodity inventory determination apparatus according to an embodiment of the present disclosure; and
[0023] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing a merchandise inventory determination method according to an embodiment of the present disclosure. Detailed Implementation
[0024] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0027] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0028] The commodity inventory determination method and apparatus disclosed herein can be used in the fields of financial technology and big data technology, as well as in any field other than financial technology and big data technology. The application fields of the commodity inventory determination method and apparatus disclosed herein are not limited.
[0029] In the technical solution disclosed herein, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, and necessary measures have been taken to ensure that they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.
[0030] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this disclosure all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.
[0031] Embodiments of this disclosure provide a method for determining product inventory. In response to a user's selection operation of a first target specification among at least one optional specification of a first attribute of a product, at least one second attribute is determined based on at least one combination of first specifications associated with the first target specification, wherein the optional specifications are among at least one first specification of the first attribute, and the first specification combination is composed of the first target specification and the second specifications of the second attribute; at least one combination of second specifications is obtained based on the third target specification of the third attribute and at least one second specification of each of the at least one second attribute, wherein the third attribute is the attribute targeted by the previous selection operation; and product inventory information is obtained based on product inventory status information of at least one combination of first specifications and product inventory information of at least one combination of second specifications, wherein the selected specifications include the first target specification and the third target specification.
[0032] Figure 1 The illustration shows an application scenario of the commodity inventory determination method according to an embodiment of the present disclosure.
[0033] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0034] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0035] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0036] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0037] It should be noted that the inventory determination method provided in this embodiment can generally be executed by server 105. Correspondingly, the inventory determination device provided in this embodiment can generally be located in server 105. The inventory determination method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the inventory determination device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0038] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0039] The following will be based on Figure 1 The described scene, through Figures 2-5 The method for determining commodity inventory according to the disclosed embodiments is described in detail.
[0040] Figure 2 A flowchart illustrating a method for determining commodity inventory according to an embodiment of the present disclosure is shown schematically.
[0041] like Figure 2 As shown, the product inventory determination method 200 of this embodiment includes operations S210 to S230.
[0042] In operation S210, in response to a user's selection of a first target specification from at least one optional specification of a first attribute of a product, at least one second attribute is determined based on at least one combination of first specifications associated with the first target specification, wherein the optional specification is one of at least one first specification of the first attribute, and the combination of first specifications is composed of the first target specification and the second specification of the second attribute.
[0043] According to embodiments of this disclosure, the first attribute is used to characterize the specification dimension currently selected by the user. For example, if the user first selects a specification related to color in the product selection interface, then the color attribute is the first attribute. Multiple displayable specification options correspond to the first attribute; for example, the color attribute may include red, black, etc. Optional specifications are used to characterize the first specification determined to be in stock before the current selection. For example, if both red and black satisfy at least one combination of being in stock, then both red and black are optional specifications. When multiple optional specifications are displayed in the product selection interface, the optional specification actually selected by the user is determined as the first target specification. For example, if the user clicks "small," then "small" is the first target specification. The second attribute is other specification dimensions besides the first attribute that form a first specification combination with the first target specification, such as the color attribute or memory attribute. Specifications of these two dimensions can both be combined with "small" to form a first specification combination.
[0044] For example, if the second attribute is color, and its corresponding specifications can be red or black, then the first specification combination can be red + small, or black + small; or, if the second attribute is memory, and its corresponding specifications can be 128G or 256G, then the first specification combination can be small + 128G or small + 256G.
[0045] According to embodiments of this disclosure, when a user selects a specification under a certain attribute, all pairwise combinations related to the selected specification can be filtered from the combined inventory table. Furthermore, from all pairwise combinations related to the selected specification, other specification dimensions to be displayed subsequently, i.e., the second attribute, can be determined. For example, the initial displayable specifications for a product are shown in Table 1.
[0046] Table 1
[0047]
[0048] In the optional specifications (large, small) of color (first attribute), the user selects small as the first target specification; all first specification combinations containing small are filtered from the combined inventory table, including small + red, small + black, small + 128G, and small + 256G. Subsequently, based on the combined inventory of small, the displayable specifications of color attribute and memory attribute can be filtered.
[0049] In operation S220, at least one combination of second specifications is obtained based on the third target specification of the third attribute and at least one second specification of each of the at least one second attribute, wherein the third attribute is the attribute targeted by the previous selection operation.
[0050] According to embodiments of this disclosure, the third attribute is the attribute targeted by the previous selection operation, that is, the attribute that the user selected before selecting the first target specification. If the operation of selecting the first target specification is a second selection, then the attribute selected in the first selection is the third attribute. The third target specification is the specific specification selected by the user from the optional specifications of the third attribute in the previous selection operation, such as selecting red from the color attribute in the previous selection.
[0051] This can be understood as follows: when making the first selection, the user selects the optional specification corresponding to the third attribute as the third target specification, for example, red; when making the second selection, the user selects the optional specification corresponding to the first attribute as the first target specification, for example, small.
[0052] Furthermore, at least one second attribute is a dimension to be subsequently filtered, determined in operation S210. For example, if the third target specification and the first target specification have already been selected, the remaining unselected attributes can be determined as second attributes, such as the memory attribute that has not been selected. Multiple specifications corresponding to the second attributes are paired with the third target specification to obtain multiple combinations of second specifications. For example, if the memory attribute corresponds to 128G and 256G specifications, then the second specification combinations include red + 128G and red + 256G; if the memory attribute corresponds to 128G, 256G, and 1TB specifications, then the second specification combinations include red + 128G, red + 256G, and red + 1TB. Therefore, a second specification combination is a combination of the third target specification and at least one of the second specifications.
[0053] In operation S230, based on the inventory information of at least one second specification combination, the inventory information of the selected specifications is obtained, wherein the selected specifications include a first target specification and a third target specification.
[0054] According to embodiments of this disclosure, product inventory information is used to characterize the status of whether a second specification combination recorded in a preset combined inventory table is in stock, such as red + large = in stock, red + small = out of stock. Selected specifications refer to all specifications selected by the user up to the current time, such as red (third target specification) and small (first target specification). The product inventory information under the selected specifications is derived from the product inventory information of the second specification combination, indicating the current selected specifications and the combined inventory status of the second specifications. For example, if the red specification and the small specification have already been selected, it is necessary to determine the product inventory information for the combination of red + small + 128G or red + small + 256G. If it is determined that red + small + 128G is out of stock, the user cannot select the 128G specification in the memory attributes.
[0055] According to embodiments of this disclosure, traditional exhaustive methods require storing all complete combinations of product specifications. When processing product specification inventory determination based on user selections, this method is often limited by the increasing number of products and specification dimensions. Specifically, as the number of product specification dimensions increases, the number of complete product specification combinations grows exponentially, and inventory information for all complete combinations needs to be pre-stored. When a user queries or selects, these combinations are traversed to determine inventory. When the number of products is large or the specification dimensions further increase, storage resources are heavily consumed, and computational complexity increases dramatically, leading to slower system response and even processing bottlenecks, making it difficult to adapt to multi-dimensional, multi-product scenarios.
[0056] According to embodiments of this disclosure, the embodiments replace exhaustive enumeration of complete combinations with pairwise combination derivation, avoiding excessive consumption of storage and computing resources and adapting to product scenarios with more attributes. Specifically, when a user selects a specification (such as a first target specification), the system first filters out the second attribute that needs to be considered based on the combination relationship associated with that specification. Then, it combines the third attribute involved in the previous selection operation and its third target specification to further narrow down the range of valid specifications. Finally, by querying the inventory information of related combinations, it clarifies the available options under the currently selected specification. This process ensures that each step of the user's selection excludes product specifications that are out of stock. It does not require traversing all possible complete combinations; it only needs to perform combination judgment based on the selected specifications and the inventory information of the specifications directly associated with these selected specifications to determine whether the corresponding specification is out of stock. Therefore, there is no need to preprocess and store all complete product specification combinations (such as multi-dimensional combinations like color + size + memory). Inventory validity can be deduced simply by the relationship between pairs of specification combinations (such as first target specification + second specification + third target specification + second specification). This not only significantly reduces the storage volume of the combined inventory status table, but also reduces the computational complexity of inventory queries. Especially when the number of product specification attributes increases, it can effectively avoid the problem of resource consumption growing exponentially with the increase of dimensions, thereby improving system performance and user experience.
[0057] According to embodiments of this disclosure, the combined inventory table can be pre-stored in a database before the user selects any product. Specifically, generating the combined inventory table can include the following four steps.
[0058] Step 1: Obtain the product's multiple attributes and their individual specifications. For example, the color, size, and memory of a mobile phone; the size, color, and fabric of clothing. The specifications of each attribute are the specific optional specifications under each attribute, that is, the sub-options corresponding to each attribute. For example, red, black, and white under the color attribute; 128G, 256G, and 512G under the memory attribute; and large, medium, and small under the size attribute.
[0059] Step Two: Combine any two specifications belonging to different attributes to generate multiple specification combinations. For any two specifications belonging to different attributes, firstly, the two specifications must belong to different attributes. For example, red belongs to the color attribute, and 128G belongs to the memory attribute; they can be combined. However, red and black both belong to the color attribute and cannot be combined. Secondly, it must cover all specification combinations between different attributes; that is, any two specifications with different attributes must be combined, without omitting any possible cross-attribute relationships.
[0060] Step 3: Determine the individual inventory information for each of the multiple specification combinations based on the actual inventory information. Actual inventory information refers to the actual sellable inventory data in the warehouse. This data is typically stored in units of complete product specifications (e.g., red + 5.5-inch + 128G), recording the inventory quantity of each complete specification (e.g., 10 units, 0 units). The logic for determining the inventory information of multiple specification combinations is that whether a pair of specification combinations has inventory depends on whether at least one complete product specification containing that pair has inventory. For example, when determining the inventory of the red + 128G combination, if either red + large + 128G or red + small + 128G has inventory, then the red + 128G combination is considered to have inventory; if neither complete specification has inventory, then the red + 128G combination is considered to have no inventory.
[0061] Step 4: Generate a combined inventory table based on multiple specifications and their individual product inventory information. When generating the combined inventory table, the specification combination is used as the core index, and it is associated with and stored with the corresponding inventory status information. The table structure typically includes fields such as a description of the specification combination and the inventory status. Taking the color, size, and memory attributes of a mobile phone as an example, the combined inventory table is shown in Table 2.
[0062] Table 2
[0063]
[0064] According to embodiments of this disclosure, in response to a user's page query request for a product, the inventory status of multiple product specifications is initialized. Specifically, whether the initial inventory status of a product specification is in stock depends on whether the specification participates in at least one pairwise combination that is in stock. As long as there is at least one combination containing the specification that is in stock, such as red + large in stock, the specification should be determined to be initially in stock and can be displayed; only when all pairwise combinations in which the specification participates are out of stock should it be determined to be out of stock and cannot be displayed. The initialized interface is then displayed to the user.
[0065] Figure 3 A flowchart illustrating a method for determining commodity inventory according to another embodiment of this disclosure is shown schematically.
[0066] like Figure 3As shown, based on operations S210 and S230, the commodity inventory determination method 300 also includes operations S310 and S320.
[0067] In operation S310, in response to the user's selection operation of the third target specification of the third attribute, multiple combinations of third specifications associated with the third target specification are obtained, wherein the combination of third specifications is composed of the third target specification and the specifications of other attributes.
[0068] In operation S320, based on the product inventory information of each of the multiple third specification combinations, the optional specification is determined from the multiple third specification combinations, where the first attribute is the attribute to which the optional specification belongs.
[0069] According to an embodiment of this disclosure, when a user selects any specification for the third target specification of the third attribute for the first time, multiple third specification combinations associated with the third target specification are obtained, wherein the third specification combination is composed of the third target specification and specifications of other attributes; based on the product inventory information of each of the multiple third specification combinations, optional specifications are determined from the multiple third specification combinations, wherein the first attribute is the attribute to which the optional specification belongs.
[0070] According to the embodiments of this disclosure, when a user selects a product specification for the first time, such as clicking "color-red" for the first time, all pairs of products containing "red" and other attribute specifications are first obtained, as shown in Table 3, and the product inventory status information of these pairs is queried.
[0071] Table 3
[0072]
[0073] Based on the product inventory status information, the system filters out specifications that are in stock when combined with the red color, such as those shown in Table 3: Red + Large, Red + 128G, and Red + 256G are in stock. The remaining specification, Red + Small, is out of stock. Therefore, the "Large" size will be displayed as in stock in the size attributes and clicked as available; similarly, 128G and 256G will be available specifications. Finally, the front-end interface displays these available specifications for the user to continue selecting, ensuring that subsequent user operations always lead to in-stock product combinations. For the unavailable "Red + Small" combination, the option is removed, for example, by graying out the specification. Thus, after the user's initial selection, subsequent available specifications only need to be filtered based on the inventory status of related specification combinations, eliminating the need for multiple inventory comparisons, saving inventory query time, and improving response speed.
[0074] Figure 4 A flowchart illustrating a method for determining a second attribute according to an embodiment of the present disclosure is shown schematically.
[0075] like Figure 4As shown, the method 400 for determining the second attribute includes operation S410 and operation S430.
[0076] In operation S410, at least one first specification combination associated with the first target specification is determined from the combination inventory table according to the first target specification, wherein the combination inventory table includes multiple specification combinations and the product inventory information of each of the multiple specification combinations.
[0077] In operation S420, the inventory information of each commodity for at least one first specification combination is determined from the combined inventory table.
[0078] According to an embodiment of this disclosure, after receiving a first target specification (e.g., small), the inventory information of all pairs containing the specification and the specification combinations formed by combining the first target specifications is filtered out in the combined inventory table using the specification as an index, as shown in Table 4.
[0079] Table 4
[0080]
[0081] In operation S430, at least one second attribute is determined based on the respective product inventory information of at least one first specification combination.
[0082] According to embodiments of this disclosure, in a specification combination including a first target specification, a second specification in the in-stock specification combination is determined as an optional specification, and its associated attribute is determined as a second attribute. For example, black + small is in stock, but black belongs to the same attribute as the already selected third target specification (red), therefore, black cannot be displayed and is excluded. Small + 128G is in stock, therefore, after selecting red and small, 128G is displayed as an optional specification, which the user can click to select, and when the user selects it, it is determined as the second attribute.
[0083] According to embodiments of this disclosure, by directly filtering associated first specification combinations from the combined inventory table using the first target specification as an index, and selectively obtaining inventory information for these combinations, the traversal of all specification combinations is avoided. There is no need to process combination data unrelated to the selected specifications; only necessary associated combinations are focused on. This makes resource consumption at each step more controllable. Even with an increase in product attribute dimensions, efficient query and processing speeds are maintained, solving the performance bottleneck caused by the increase in dimensions in traditional exhaustive methods and reducing computational complexity. By filtering specification combinations with inventory and belonging to different attributes, the second attribute and optional specifications can be accurately determined, ensuring that the front end only displays options that can truly constitute a valid product with the selected specifications. This clearly guides users through the selection process, reducing operational trial-and-error costs.
[0084] According to embodiments of this disclosure, based on inventory status information of at least one first specification combination and inventory information of at least one second specification combination, inventory-related information is obtained, including at least one of the following: for a first specification combination and a second specification combination associated with the same second specification, if the inventory status information of one of the first specification combination and the second specification combination indicates no inventory, the inventory information for the selected specification is obtained as no inventory; if both the inventory status information of the first specification combination and the inventory status information of the second specification combination indicate that there is inventory, the inventory information for the selected specification is obtained as having inventory.
[0085] In the above example, as shown in Table 5, if the first target specification is small and the second specification is 128G or 256G, then the first specification combination includes small + 128G and small + 256G.
[0086] Table 5
[0087]
[0088] In the example above, as shown in Table 6, if the third target specification is red and the second specification is 128G and 256G, then the second specification combination includes red + 128G and red + 256G.
[0089] Table 6
[0090]
[0091] For a first specification combination associated with the same second specification, it means that the first specification combination contains the second specification, and the second specification combination also contains the second specification. As shown in Tables 5 and 6.
[0092] At this point, after selecting the third target specification for the first time and the first target specification for the second time, it is necessary to determine which second specification in the second attribute is optional and which is not. A complete specification combination of a product is composed of interconnected specifications across multiple attributes. For a complete combination to have inventory, each pair of its constituent pairs must also have inventory. This is because if any core pair of pairs has no inventory, it means that there are no salable products associated with that combination of specifications. Therefore, any complete combination formed by adding other specifications on top of that combination will naturally also have no inventory. Thus, if any one of these pairs has no inventory, the complete combination will inevitably have no inventory.
[0093] Take the complete combination of color (red) + size (large) + memory (128G) as an example. It contains two key pairwise related combinations: red + 128G and large + 128G. Red + 128G is a combination of color attribute and memory attribute, while large + 128G is a combination of size attribute and memory attribute. If red + 128G is out of stock, it means that there are no available products that match the specifications of red and 128G. Even if large + 128G is in stock, red + large + 128G cannot exist; similarly, if large + 128G is out of stock, red + large + 128G must also be out of stock.
[0094] Therefore, instead of traversing all complete combinations related to the selected specifications, the second specification that is out of stock can be directly derived by simply combining each pair of the previous selected specification with the current candidate specification (the second specification combination), avoiding the cumulative computational load caused by multi-dimensional combinations. Even if product specification attributes are added (such as adding a new material), only the pairwise combinations of the previous selected specification and the material attribute need to be added. Compared to the exponential growth of the traditional complete combination method, this reduces computational complexity and backend processing pressure, and improves the response speed of inventory determination.
[0095] Furthermore, if no product is in stock, the second specification is determined to be a non-optional specification; if product is in stock, the second specification is determined to be an optional specification.
[0096] Figure 5 The schematic diagram illustrates the display interface diagrams of optional and non-optional specifications according to embodiments of the present disclosure.
[0097] like Figure 5 As shown, dark colors indicate available or selected specifications, while light colors indicate unavailable specifications or specifications that are in stock but have been selected by other specifications with the same attribute. Specifically, for example... Figure 5 As shown, if 128G is out of stock when red and small are selected, the specification will stop being displayed on the front-end interface, for example, by displaying it with a light shadow so that the user cannot click it, thus preventing the user from accidentally selecting it and finding that it is out of stock; if 256G is in stock when red and small are selected, the specification will be displayed normally on the front-end interface (displayed with a dark shadow) and will be clickable, guiding the user to continue to select the second attribute. Figure 5The number of attributes and specifications listed are merely illustrative. When a product has more attributes, the remaining unselected attributes are selected sequentially using the method described above until all attributes are selected, at which point the user can purchase the product with the complete specification combination. For example, attributes may also include processor model (e.g., XX800, XX900); screen refresh rate (e.g., 60Hz, 120Hz, 144Hz); and battery capacity (e.g., 4500mAh, 5000mAh, 5500mAh).
[0098] Based on the above-described method for determining commodity inventory, this disclosure also provides a device for determining commodity inventory. The following will be combined with... Figure 6 The device is described in detail.
[0099] Figure 6 A schematic block diagram of a commodity inventory determination apparatus according to an embodiment of the present disclosure is shown.
[0100] like Figure 6 As shown, the commodity inventory determination device 600 of this embodiment includes a first determination module 610, a first acquisition module 620, and a second acquisition module 630.
[0101] The first determining module 610 is configured to, in response to a user's selection of a first target specification from at least one optional specification of a first attribute of a product, determine at least one second attribute based on at least one combination of first specifications associated with the first target specification, wherein the optional specification is one of at least one first specification of the first attribute, and the combination of first specifications is composed of the first target specification and the second specification of the second attribute. In one embodiment, the first determining module 610 may be used to perform the operation S210 described above, which will not be repeated here.
[0102] The first obtaining module 620 is configured to obtain at least one combination of second specifications based on the third target specification of the third attribute and at least one second specification of each of the at least one second attribute, wherein the third attribute is the attribute targeted by the previous selection operation. In one embodiment, the first obtaining module 620 may be used to perform the operation S220 described above, which will not be repeated here.
[0103] The second obtaining module 630 is used to obtain product inventory information when specifications have been selected, based on product inventory status information of at least one first specification combination and product inventory information of at least one second specification combination, wherein the selected specifications include a first target specification and a third target specification. In one embodiment, the second obtaining module 630 may be used to perform the operation S230 described above, which will not be repeated here.
[0104] According to embodiments of this disclosure, the first obtaining module 630 includes a first obtaining submodule and a second obtaining submodule.
[0105] For a first specification combination and a second specification combination associated with the same second specification, a first obtaining submodule is configured to obtain the product inventory information as "no product inventory" when one of the product inventory status information of the first specification combination and the second specification combination indicates no product inventory; a second obtaining submodule is configured to obtain the product inventory information as "product inventory" when the selected specification is selected when both the product inventory status information of the first specification combination and the product inventory status information of the second specification combination indicate that there is product inventory.
[0106] According to embodiments of this disclosure, the commodity inventory determination device further includes a second determination module and a third determination module.
[0107] The second determining module is used to determine that the second specification is a non-optional specification when it is indicated that there is no product in stock; the third determining module is used to determine that the second specification is an optional specification when it is indicated that there is product in stock.
[0108] According to embodiments of this disclosure, the commodity inventory determination device further includes a first acquisition module and a fourth determination module.
[0109] The first acquisition module is used to acquire multiple third specification combinations associated with the third target specification in response to the user's selection operation of the third target specification of the third attribute, wherein the third specification combination is composed of the third target specification and the specifications of other attributes; the fourth determination module is used to determine the optional specification from the multiple third specification combinations based on the product inventory information of each of the multiple third specification combinations, wherein the first attribute is the attribute to which the optional specification belongs.
[0110] According to embodiments of this disclosure, the first determining module 610 includes: a first determining submodule, a second determining submodule, and a third determining submodule.
[0111] The first determining submodule is used to determine at least one first specification combination associated with the first target specification from the combined inventory table according to the first target specification, wherein the combined inventory table includes multiple specification combinations and the product inventory information of each of the multiple specification combinations; the second determining submodule is used to determine the product inventory information of each of the at least one first specification combination from the combined inventory table; the third determining submodule is used to determine at least one second attribute according to the product inventory information of each of the at least one first specification combination.
[0112] According to embodiments of this disclosure, the commodity inventory determination device further includes: a second acquisition module, a first generation module, a fifth determination module, and a second generation module.
[0113] The second acquisition module is used to acquire multiple attributes of the product and the specifications of each attribute; the first generation module is used to combine any two specifications belonging to different attributes to generate multiple specification combinations; the fifth determination module is used to determine the product inventory information of each of the multiple specification combinations based on the actual product inventory information; the second generation module is used to generate a combined inventory table based on the multiple specifications and the product inventory information of each specification.
[0114] According to embodiments of this disclosure, when a user selects a specification (such as a first target specification), the first determining module first filters out the second attribute that needs to be considered based on the combination relationship associated with that specification. The second obtaining module combines the third attribute involved in the previous selection operation and its third target specification to further narrow down the range of valid specifications. Finally, by querying the inventory information of the relevant combinations, the available options under the currently selected specification are determined. This process ensures that each step of the user's selection excludes product specifications that are out of stock. It does not require traversing all possible complete combinations; it only needs to make a combination judgment based on the selected specifications and the inventory information of the specifications directly associated with these selected specifications to determine whether the corresponding specification is out of stock. Therefore, it is not necessary to preprocess and store all complete product specification combinations (such as multi-dimensional combinations such as color + size + memory). Inventory validity can be derived only through the association relationship of pairwise specification combinations (such as first target specification + second specification + third target specification + second specification). This not only significantly reduces the storage volume of the combined inventory status table but also reduces the computational complexity of inventory queries. Especially when the number of product specification attributes increases, it can effectively avoid the problem of resource consumption increasing exponentially with the increase of dimensions, thereby improving system performance and user experience.
[0115] According to embodiments of this disclosure, any plurality of modules among the first determining module 610, the first obtaining module 620, and the second obtaining module 630 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the first determining module 610, the first obtaining module 620, and the second obtaining module 630 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the first determining module 610, the first obtaining module 620, and the second obtaining module 630 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0116] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing a merchandise inventory determination method according to an embodiment of the present disclosure.
[0117] like Figure 7 As shown, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0118] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0119] According to embodiments of this disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the input / output (I / O) interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0120] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0121] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 702 and / or RAM 703 and / or one or more memories other than ROM 702 and RAM 703 described above.
[0122] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the merchandise inventory determination method provided in embodiments of this disclosure.
[0123] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0124] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0125] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0126] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0128] Those skilled in the art will understand that the features described in the various embodiments of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0129] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for determining commodity inventory, characterized in that, The method includes: In response to a user's selection of a first target specification from at least one optional specification of a first attribute of a product, at least one second attribute is determined based on at least one combination of first specifications associated with the first target specification, wherein the optional specification is one of at least one first specification of the first attribute, and the first specification combination is composed of the first target specification and the second specification of the second attribute. Based on the third target specification of the third attribute and at least one second specification of each of the at least one second attribute, at least one combination of second specifications is obtained, wherein the third attribute is the attribute targeted by the previous selection operation. Based on the inventory status information of the at least one first specification combination and the inventory information of the at least one second specification combination, the inventory information of the selected specifications is obtained, wherein the selected specifications include the first target specification and the third target specification.
2. The method according to claim 1, characterized in that, The step of obtaining product inventory information with selected specifications based on the product inventory status information of at least one first specification combination and the product inventory information of at least one second specification combination includes at least one of the following: For combinations of first and second specifications associated with the same second specification, If the inventory status information of one of the first specification combination and the second specification combination indicates no inventory, the inventory information for the selected specification is no inventory. If both the inventory status information for the first specification combination and the inventory status information for the second specification combination indicate that there is inventory, then the inventory information for the selected specification is that there is inventory.
3. The method according to claim 2, characterized in that, The method further includes at least one of the following: If no product is in stock, the second specification is determined to be an unavailable specification; If it is indicated that there is product inventory, the second specification is determined to be an optional specification.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to a user's selection of a third target specification for the third attribute, multiple combinations of third specifications associated with the third target specification are obtained, wherein the combination of third specifications is composed of the third target specification and specifications of other attributes; Based on the product inventory information of each of the plurality of third specification combinations, the optional specification is determined from the plurality of third specification combinations, wherein the first attribute is the attribute to which the optional specification belongs.
5. The method according to any one of claims 1 to 3, characterized in that, Determining at least one second attribute based on at least one combination of first specifications associated with the first target specification includes: Based on the first target specification, at least one first specification combination associated with the first target specification is determined from the combined inventory table, wherein the combined inventory table includes multiple specification combinations and product inventory information for each of the multiple specification combinations; Determine the product inventory information for each of the at least one first specification combination from the combined inventory table; The at least one second attribute is determined based on the respective product inventory information of the at least one first specification combination.
6. The method according to claim 5, characterized in that, The method further includes: Obtain multiple attributes of the product and the specifications of each of the multiple attributes; Combine any two specifications that belong to different attributes to generate the multiple specification combinations; Based on the actual product inventory information, determine the product inventory information for each of the multiple specification combinations; The combined inventory table is generated based on the multiple specifications and their respective product inventory information.
7. A device for determining commodity inventory, characterized in that, The device includes: A first determining module is configured to, in response to a user's selection operation of a first target specification among at least one optional specification of a first attribute of a product, determine at least one second attribute based on at least one combination of first specifications associated with the first target specification, wherein the optional specification is one of at least one first specification of the first attribute, and the first specification combination is composed of the first target specification and the second specification of the second attribute. A first obtaining module is configured to obtain at least one combination of second specifications based on the third target specification of the third attribute and at least one second specification of each of the at least one second attribute, wherein the third attribute is the attribute targeted by the previous selection operation; and The second obtaining module is configured to obtain product inventory information under the condition of selected specifications based on the product inventory status information of the at least one first specification combination and the product inventory information of the at least one second specification combination, wherein the selected specifications include the first target specification and the third target specification.
8. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 6.