Method, device, electronic device and storage medium for marking out-of-stock products

By counting the number of unstocked products in the unstocked product combination and creating a statistical table, the problems of unstocked products query delay and insufficient terminal computing power in the existing technology are solved, and more efficient unstocked marking and better user experience.

CN117149851BActive Publication Date: 2025-02-07CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311117469.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-02-07
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

The prior art has a delay when querying unstocked goods, which affects the user experience, and the terminal computing power is limited, and the traversal query method leads to reduced performance and increased battery consumption.

Method used

By obtaining the product combination list, count the number of unstocked times of each product specification in the unstocked product combination, create an unstocked product statistics table, judge whether the unstocked times equal to the maximum number of combinations to determine whether the product specification is completely out of stock, and in the user When entering the product details page, the mark is completely out of stock.

Benefits of technology

It reduces the number of queries when the product is completely out of stock, improves computing efficiency, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117149851B_ABST
    Figure CN117149851B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and provides a method, device, electronic device and storage medium for marking out-of-stock products. The method includes: obtaining a product combination list, the product combination list includes all combinations of all specifications of the product; obtaining out-of-stock product combinations in the product combination list, and creating an out-of-stock product combination list; creating an out-of-stock product statistics table based on the out-of-stock product combination list, the out-of-stock product statistics table at least includes the corresponding stored out-of-stock product specifications and the out-of-stock times of the specifications, and the first maximum combination number of each product specification; in response to the out-of-stock times of a specific specification being equal to the first maximum combination number of the specific specification, determining that the specific specification is completely out of stock; when the user enters the product details homepage in the terminal application, marking all completely out-of-stock product specifications as out of stock. The method can improve the computing efficiency of out-of-stock products and enhance the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for marking out-of-stock goods. Background Art

[0002] In application scenarios such as e-commerce platforms, it is often necessary to mark out-of-stock products. Out-of-stock marking includes marking one or more specifications of products as out of stock when the user first enters the product details, and marking one or more specification combinations of products under a certain product specification as out of stock when the user clicks on the product specification.

[0003] In the related art, the out-of-stock mark is usually obtained by the server by querying the database traversal method, calculating the number of goods corresponding to each specification combination of the goods, and marking the out-of-stock specification combination as out-of-stock. Since it takes a certain amount of time for the terminal to send a request to the server and receive the data sent by the server, this method has a certain delay, which may affect the user experience when the user queries whether the goods are out of stock. In some implementations of the related art, the terminal can also use a traversal query method to calculate the number of goods corresponding to each specification combination of the goods. However, this traversal query method has a large amount of calculation, and the terminal usually has limited computing power. Excessive calculations may lead to reduced terminal performance, increased battery consumption, etc., which also affect the user experience. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a method, device, electronic device and storage medium for marking out-of-stock products to solve the problem in the prior art that users cannot easily and quickly check out-of-stock products.

[0005] In a first aspect of an embodiment of the present application, a method for marking a commodity as out of stock is provided, comprising:

[0006] Get the product combination list, which includes all combinations of all product specifications;

[0007] Get the out-of-stock product combinations in the product combination list and create an out-of-stock product combination list;

[0008] Creating an out-of-stock commodity statistics table based on the out-of-stock commodity combination list, the out-of-stock commodity statistics table at least includes corresponding stored out-of-stock commodity specifications and out-of-stock times of the specifications, and the first maximum combination number of each commodity specification;

[0009] In response to the number of out-of-stock times of the specific specification being equal to the first maximum combination number of the specific specification, determining that the specific specification is completely out of stock;

[0010] When the user enters the product details homepage in the terminal application, all product specifications that are completely out of stock are marked as out of stock.

[0011] According to a second aspect of the embodiments of the present application, a commodity out of stock marking device is provided, comprising:

[0012] An acquisition unit is configured to acquire a commodity combination list, where the commodity combination list includes all combinations of all specifications of the commodity;

[0013] A list determination unit, the list determination unit is configured to obtain out-of-stock commodity combinations in the commodity combination list and create an out-of-stock commodity combination list;

[0014] Creating an out-of-stock commodity statistics table based on the out-of-stock commodity combination list, the out-of-stock commodity statistics table at least includes corresponding stored out-of-stock commodity specifications and out-of-stock times of the specifications, and the first maximum combination number of each commodity specification;

[0015] an out-of-stock determination unit, the out-of-stock determination unit being configured to determine that the specific specification is completely out of stock in response to the number of out-of-stock times of the specific specification being equal to the first maximum combination number of the specific specification;

[0016] The marking unit is configured to mark all completely out-of-stock product specifications as out of stock when the user enters the product details homepage in the terminal application.

[0017] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0018] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0019] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application count the number of out-of-stock occurrences of each product specification in the out-of-stock product combination, and create an out-of-stock product statistics table that includes at least the corresponding stored out-of-stock product specifications and the number of out-of-stock occurrences of the specifications based on the statistical results, and then determine whether the product of the specification is completely out of stock by judging whether the number of out-of-stock occurrences of the product specification in the out-of-stock product statistics table is equal to the maximum number of combinations of the specification, which can reduce the number of queries for completely out-of-stock products, improve computing efficiency, and enhance user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 It is a scenario diagram of an application scenario of an embodiment of the present application.

[0022] Figure 2 This is a schematic diagram of a display interface in which out-of-stock items are marked.

[0023] Figure 3 It is a flow chart of a method for marking a product as out of stock provided in an embodiment of the present application.

[0024] Figure 4 It is a flowchart of a method for determining the maximum number of combinations of specifications provided in an embodiment of the present application.

[0025] Figure 5 It is a flow chart of a method for marking a product as out of stock provided in an embodiment of the present application.

[0026] Figure 6 It is a flow chart of a method for marking a product as out of stock provided in an embodiment of the present application.

[0027] Figure 7 It is a flowchart of a method for determining a second maximum number of combinations of a first out-of-stock commodity specification or a second out-of-stock commodity specification provided in an embodiment of the present application.

[0028] Figure 8 It is a flowchart of a method for creating an out-of-stock commodity statistics table based on an out-of-stock commodity combination list provided in an embodiment of the present application.

[0029] Fig. 9 It is a flow chart of a method for marking a product as out of stock provided in an embodiment of the present application.

[0030] Fig.10 It is a schematic diagram of a commodity out-of-stock marking device provided in an embodiment of the present application.

[0031] Fig.11 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0033] A method and device for marking out-of-stock goods according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0034] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include terminal devices 1, 2 and 3, a server 4 and a network 5.

[0035] Terminal devices 1, 2 and 3 can be hardware or software. When terminal devices 1, 2 and 3 are hardware, they can be various electronic devices with display screens and supporting communication with server 4, including but not limited to smart phones, tablet computers, laptop portable computers and desktop computers, etc.; when terminal devices 1, 2 and 3 are software, they can be installed in the above electronic devices. Terminal devices 1, 2 and 3 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present application are not limited to this. Furthermore, various applications can be installed on terminal devices 1, 2 and 3, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.

[0036] The server 4 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 4 may be a single server, a server cluster composed of several servers, or a cloud computing service center, which is not limited in the present application.

[0037] It should be noted that the server 4 can be hardware or software. When the server 4 is hardware, it can be various electronic devices that provide various services for the terminal devices 1, 2, and 3. When the server 4 is software, it can be multiple software or software modules that provide various services for the terminal devices 1, 2, and 3, or it can be a single software or software module that provides various services for the terminal devices 1, 2, and 3, and the embodiments of the present application are not limited to this.

[0038] The network 5 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present application.

[0039] The user can establish a communication connection with the server 4 via the network 5 through the terminal devices 1, 2 and 3 to receive or send information, etc. Specifically, the terminal devices 1, 2 and 3 can send the query duration to the server 4. After receiving the query duration, the server 4 compares it with the request duration between the terminal device and the server. If the query duration is less than the request duration, the server 4 can configure the terminal to obtain the product out-of-stock information by local calculation. Otherwise, the server 4 can configure the terminal to obtain the product out-of-stock information from the server.

[0040] It should be noted that the specific types, quantities and combinations of the terminal devices 1, 2 and 3, the server 4 and the network 5 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.

[0041] As mentioned above, in application scenarios such as e-commerce platforms, it is often necessary to mark out-of-stock products. Figure 2 This is a schematic diagram of the display interface that marks out-of-stock products. Figure 2 As shown, out of stock marking includes marking one or more specifications of the product as out of stock when the user just enters the product details. The out of stock judgment rule at this time is that if a certain specification is combined with all other specifications, the corresponding products are all out of stock, then this specification is marked as out of stock. Out of stock marking also includes marking one or more specifications of the product under the product specification as out of stock when the user clicks on a certain product specification. The out of stock judgment rule at this time is that if a certain specification is combined with the specification selected by the user and other specifications, and the corresponding products are all out of stock, then this specification is marked as out of stock.

[0042] In the related art, the out-of-stock mark is usually calculated by the server through the way of querying the database traversal to obtain the number of commodities corresponding to each specification combination of commodities, and the out-of-stock specification combination is marked as out-of-stock. Specifically, the server can directly find out the commodities corresponding to the specification combination by querying the database, and return the specifications that need to be marked as out-of-stock to the terminal. For example, the query statement select count(product)from xx where spec1=""and spec2=""and spec3=""...... can be used for query.

[0043] Since it takes a certain amount of time for the terminal to send a request to the server and receive data sent by the server, this method has a certain delay, which may affect the user experience when the user inquires whether the product is out of stock. At the same time, the terminal request to the server may also be affected by the network situation, and the interface must be refreshed after the result is obtained, which is a very bad thing for the user experience. No matter how good the network situation is, the clock will have at least 1-2 seconds of delay, especially when the customer clicks on a certain specification, each click will have to wait 1-2 seconds to get the new specification.

[0044] In some implementations of the related technology, the terminal can also use a traversal query method to calculate the number of commodities corresponding to each specification combination of commodities. Specifically, the terminal can save a list of specifications, each specification has a specific value list, for example, color is a specification, gray, black, navy blue are specification values; size is another specification, 160 / 76A / XS is a specification value, that is, specifications and specification values ​​are a one-to-many relationship. The commodity list after all the specific values ​​of the specifications are combined, each commodity has its inventory number, and also has its specification value combination list. The terminal can arrange and combine all the specifications by itself, and search the commodity list by looping through it to obtain the out-of-stock commodities, and then mark the corresponding specifications in reverse.

[0045] However, this traversal query method requires a large amount of calculation, and the terminal usually has limited computing power. Excessive calculation may lead to reduced terminal performance, increased battery consumption, etc., which also affects the user experience. In other words, when the terminal arranges and combines all specifications by itself, if there are n product specifications and each product specification has an average of m values, then the arrangement and combination needs to execute m n-1 Search again and search the product list by looping through it. The loop product list is m n-1 When marking the corresponding specification, you need to find the position of this specification value in the specification list, so you also need m n-1 operations, where n and m are both positive integers.

[0046] Whether it is when the user first enters the product details or each time the user clicks, the above search must be performed many times, which consumes a lot of mobile phone performance and battery. Moreover, the exponential growth rate is very fast. If n and m are relatively large, the algorithm will run slower and slower, and the user's waiting time may even exceed the time it takes to request the server.

[0047] In view of this, an embodiment of the present application provides a method for marking out-of-stock products, by counting the number of out-of-stock times for each product specification in an out-of-stock product combination, and creating an out-of-stock product statistics table that includes at least the corresponding stored out-of-stock product specifications and the number of out-of-stock times for each specification based on the statistical results, and then determining whether the out-of-stock time for a product specification in the out-of-stock product statistics table is equal to the maximum number of combinations of the specification to determine whether the product of that specification is completely out of stock. This can reduce the number of queries for completely out-of-stock products, improve computing efficiency, and enhance user experience.

[0048] Figure 3 It is a flow chart of a method for marking a product as out of stock provided in an embodiment of the present application. Figure 3 The out-of-stock marking method for products can be Figure 1 The terminal device is executed. Figure 3 As shown, the out-of-stock marking method for the product includes the following steps:

[0049] In step S301, a commodity combination list is obtained, where the commodity combination list includes all combinations of all specifications of the commodities.

[0050] In step S302, out-of-stock commodity combinations in the commodity combination list are obtained, and an out-of-stock commodity combination list is created.

[0051] In step S303, a statistical table of out-of-stock commodities is determined based on the out-of-stock commodity combination list, where the statistical table of out-of-stock commodities at least includes corresponding stored out-of-stock commodity specifications and out-of-stock times of the specifications, and a first maximum combination number of each commodity specification.

[0052] In step S304, in response to the out-of-stock times of a specific specification being equal to the first maximum combination number of the specific specification, it is determined that the specific specification is completely out of stock.

[0053] In step S305, when the user enters the product details homepage in the terminal application, all product specifications that are completely out of stock are marked as out of stock.

[0054] In the embodiment of the present application, the out-of-stock product marking method can be executed by a terminal to mark out-of-stock products on the product details page of the terminal application.

[0055] In an embodiment of the present application, the terminal can obtain a commodity combination list including all combinations of all specifications of the commodity. Specifically, the terminal can obtain a commodity specification list from a server, in which each specification includes a specific specification value, that is, each specification consists of a specification display value name and a specification identifier value, where name can be, for example, color-red, color-blue, etc., and value is a unique identifier of the specification. Combining all specifications in an unordered manner can obtain a commodity combination list of all combinations of all specifications.

[0056] In an example, assuming that the specification values ​​corresponding to a certain product include color-red, color-blue, color-green, size-large, size-small, shape-square, and shape-round, the product combination list may be as shown in Table 1. The product combination list shown in Table 1 may include a product combination identifier and a product specification combination. Furthermore, the product combination list shown in Table 1 may also include the inventory number of various product combinations, which may also be obtained from the specification list.

[0057] Table 1

[0058] Combination logo Product Specifications Inventory Product 1 Red+Big+Square 0 Product 2 Red+Big+Round 0 Product 3 Red+Small+Square 0 Product 4 Red+Small+Round 0 Product 5 Blue + Big + Square 0 Product 6 Blue+Big+Round 1 Product 7 Blue+Small+Square 0 Product 8 Blue+Small+Round 3 Item 9 Green + Big + Square 0 Item 10 Green+Big+Round 0 Product 11 Green+Small+Square 5 Product 12 Green+Small+Round 4

[0059] In the embodiment of the present application, the terminal can obtain the out-of-stock commodity combination in the commodity combination list and create an out-of-stock commodity combination list. Still taking the embodiment shown in Table 1 as an example, the created out-of-stock commodity combination list is shown in Table 2:

[0060] Table 2

[0061]

[0062]

[0063] In the embodiment of the present application, a statistical table of out-of-stock goods can be determined based on the out-of-stock goods combination list, and the out-of-stock goods statistical table at least includes the corresponding stored out-of-stock goods specifications and the out-of-stock times of the specifications. Specifically, the list of product combinations can be filtered, for example, a filter function of an array is called to filter out product combinations whose inventory counts are not 0 in the product combination list, and the remaining product combinations are counted to construct a statistical table of out-of-stock goods. In the iOS system, the filter function can be a filter function.

[0064] In the embodiment of the present application, the number of times each product specification appears in the filtered product combination can be counted.

[0065] Specifically, a non-repeating dictionary can be established to store out-of-stock specifications. The dictionary includes key-value pairs, where the key is the unique identifier of the product specification and the value is the number of times the specification appears during the statistical process. Traverse the filtered product combination and count the number of times each specification appears. When the specification included in this statistics does not exist in the dictionary, add the specification to the dictionary and record the specification value of the specification as 1. When the specification included in this statistics exists in the dictionary, add 1 to the specification value of the specification in the dictionary.

[0066] On the other hand, a non-repetitive set can also be established, which includes objects and fields corresponding to the objects. The set object is a specification, and the field is the number of times the specification appears. Traverse the filtered product combination and count the number of times each specification appears. When the specification included in this statistics does not exist in the set, add the object of the specification to the set and record the field of the object as 1. When the specification included in this statistics exists in the set, perform a plus 1 operation on the field of the object of the specification in the set. Using the above two methods, a statistical table of out-of-stock products can be determined. Still taking the embodiment shown in Table 1 as an example, the list of out-of-stock product combinations shown in Table 2 is counted, and the corresponding out-of-stock product statistical table can be determined as shown in Table 3:

[0067] Table 3

[0068]

[0069]

[0070] In the embodiment of the present application, the out-of-stock commodity statistics table may also include the maximum number of combinations of each commodity specification. The method for determining the maximum number of combinations may be described in detail below.

[0071] In the embodiment of the present application, the terminal can determine whether the number of out-of-stock times for each specification in the out-of-stock product statistics table is equal to the maximum number of combinations of specifications. If the number of out-of-stock times for a certain specification is equal to the maximum number of combinations of the specification, it can be determined that the specification is completely out of stock. For completely out-of-stock products, when the user enters the product details homepage in the terminal application, the specifications of the completely out-of-stock products can be directly marked as out of stock.

[0072] Still taking the embodiments shown in Tables 1 to 3 as an example, in Table 3, if the number of times the product specification "red" is out of stock is equal to its maximum combination number, it can be determined that the red specification of the product is completely out of stock, and then when the user enters the product details homepage of the product in the terminal application, the red specification of the product is marked as out of stock. Among them, marking the product specification as out of stock can be achieved by graying out the specification view corresponding to the product, or adding an out of stock mark in the upper right corner of the specification view corresponding to the product.

[0073] According to the technical solution provided in the embodiment of the present application, by counting the number of out-of-stock times of each product specification in the out-of-stock product combination, and creating an out-of-stock product statistics table that includes at least the corresponding stored out-of-stock product specifications and the out-of-stock times of the specifications based on the statistical results, and then determining whether the out-of-stock times of a product specification in the out-of-stock product statistics table is equal to the maximum number of combinations of the specification to determine whether the product of the specification is completely out of stock, the number of queries for completely out-of-stock products can be reduced, computing efficiency can be improved, and user experience can be enhanced.

[0074] In the embodiment of the present application, the commodity may include N types of specifications, and each type of specification may include M i Still taking the embodiments shown in Tables 1 to 3 as an example, in this embodiment, the commodity includes three types of specifications, namely color, size and shape, wherein the color category specifications include M1=3 types of specification values, namely red, blue and green, the size category specifications include M2=2 types of specification values, namely large and small, and the shape category specifications include M3=2 types of specification values, namely square and round.

[0075] Figure 4 It is a flowchart of a method for determining the maximum number of combinations of specifications provided in an embodiment of the present application.

[0076] like Figure 4 As shown, the method comprises the following steps:

[0077] In step S401, it is determined that the commodity specification belongs to the kth category of commodity specifications.

[0078] In step S402, the first maximum number of combinations of product specifications is determined to be M1 to M N The product of k The business.

[0079] Among them, N and M i are all positive integers, i is a positive integer greater than or equal to 1 and less than or equal to N, and k is a positive integer greater than or equal to 1 and less than or equal to N.

[0080] In the embodiment of the present application, the terminal first determines which category of N categories of commodity specifications the specification belongs to, and then determines the product of the specification values ​​of all categories of specifications and the quotient of the specification value of the specification as the first maximum combination number of the specification.

[0081] Still taking the embodiments shown in Tables 1 to 3 above as an example, in this embodiment, for color specifications, the first maximum number of combinations can be determined to be (M1*M2*M3) / M1=(3*2*2) / 3=4; for size specifications, the first maximum number of combinations can be determined to be (M1*M2*M3) / M2=(3*2*2) / 2=6; for shape specifications, the first maximum number of combinations can be determined to be (M1*M2*M3) / M3=(3*2*2) / 2=6.

[0082] In an embodiment of the present application, when the goods include two or more categories of product specifications, there is a situation where some of the goods are out of stock, that is, a certain category of specifications is not completely out of stock, but the combination of this category of specifications and some specifications in other categories of specifications are out of stock. When the user clicks on the specification combination corresponding to these out-of-stock goods, the terminal needs to calculate that the product specification combination is out of stock and mark it, that is, the terminal also needs to mark the product specification combination that is partially out of stock.

[0083] Marking of partially out-of-stock product specifications is usually done after marking all product specifications as completely out-of-stock. At this time, there are two different business requirements. The first business requirement is to still perform subsequent processing on completely out-of-stock specifications, and the second business requirement is to no longer perform subsequent processing on completely out-of-stock specifications. For these two different business requirements, the methods for partially out-of-stock marking can be different. The following will introduce in detail two different methods for partially out-of-stock marking proposed for the above two business requirements.

[0084] Figure 5 : is a flow chart of a method for marking a product out of stock provided in an embodiment of the present application. Figure 5 Steps S501 to S505 in the embodiment shown are Figure 3 Steps S301 to S305 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 5 As shown, the method also includes the following steps:

[0085] In step S506, in response to the user clicking on the first specific product specification combination of products, a first out-of-stock product combination sub-list is created based on the out-of-stock product combination list.

[0086] The first out-of-stock product combination sub-list includes the out-of-stock product combination list, including product specification combinations of all specifications in the first specific product specification combination.

[0087] In step S507, a first out-of-stock commodity statistical table is created based on the first out-of-stock commodity combination sub-list, and the first out-of-stock commodity statistical table at least includes the corresponding stored first out-of-stock commodity specifications and the out-of-stock times corresponding to the first out-of-stock commodity specifications, and the second maximum combination number of each first out-of-stock commodity specification.

[0088] The first out-of-stock commodity specifications include other commodity specifications in the first out-of-stock commodity combination sub-list except for the specification category to which each specification in the first specific commodity specification combination belongs.

[0089] In step S508, in response to the out-of-stock times of each first out-of-stock commodity specification being equal to the second maximum combination number of each first out-of-stock commodity specification, the first specific commodity specification combination is marked as out of stock.

[0090] In an embodiment of the present application, when a user clicks on a first specific product specification combination of a product, the terminal may create a first out-of-stock product combination sub-list based on the out-of-stock product combination list, wherein the first out-of-stock product combination sub-list includes the out-of-stock product combination list, including product specification combinations of all specifications in the first specific product specification combination.

[0091] Subsequently, it can be determined whether the number of lists in the first out-of-stock commodity combination sublist is 0. If so, it can be directly determined that the first specific commodity specification combination is in stock, and there is no need to perform the out-of-stock marking operation. If the number of lists in the first out-of-stock commodity combination sublist is not 0, a first out-of-stock commodity statistical table can be further created based on the first out-of-stock commodity combination sublist. The first out-of-stock commodity statistical table at least includes the corresponding first out-of-stock commodity specifications and the out-of-stock times corresponding to the first out-of-stock commodity specifications, and the second maximum number of combinations of each first out-of-stock commodity specification, wherein the first out-of-stock commodity specifications include other commodity specifications in the first out-of-stock commodity combination sublist except for the specification category of each specification in the first specific commodity specification combination.

[0092] Finally, the relationship between the out-of-stock times of each first out-of-stock commodity specification and the second maximum combination number of each first out-of-stock commodity specification can be determined. When the out-of-stock times of a certain commodity specification in the first out-of-stock commodity specification is equal to the second maximum combination number of the commodity specification, the commodity specification is marked as out of stock. When the out-of-stock times of a certain commodity specification in the first out-of-stock commodity specification is less than the second maximum combination number of the commodity specification, it can be determined that the commodity specification is in stock and no marking is required.

[0093] In an example, assuming that the specification values ​​corresponding to a certain product include color-red, color-blue, color-green, size-large, size-small, shape-square, shape-round, texture-texture 1, texture-texture 2, and texture-texture 3, the out-of-stock product combination list may be shown in Table 4:

[0094] Table 4

[0095]

[0096]

[0097] If the user clicks on the first specific product specification combination "blue+square" of the product, the out-of-stock product combination list in Table 4 is first filtered according to the product specification "blue+square" to obtain the first out-of-stock product combination sub-list as shown in Table 5:

[0098] Table 5

[0099] Combination logo Product Specifications Inventory Product 13 Blue+Big+Square+Texture1 0 Product 14 Blue+Big+Square+Texture2 0 Item 15 Blue + Big + Square + Texture 3 0 Product 16 Blue+Small+Square+Texture2 0 Product 17 Blue+Small+Square+Texture3 0

[0100] First, it can be determined whether the number of lists in the first out-of-stock product combination sublist is 0. If so, it can be directly determined that the first specific product specification combination is in stock. Since the number of lists in the above Table 5 is not 0, further determination is required.

[0101] In further judgment, a first out-of-stock commodity statistics table as shown in Table 6 can be created based on the first out-of-stock commodity combination sub-list:

[0102] Table 6

[0103] First Out of Stock Product Specifications Out of stock times The second largest number of combinations big 3 3 Small 2 3 Texture 1 1 2 Texture 2 2 2 Texture 3 2 2

[0104] Among them, the first out-of-stock commodity specifications included in the first out-of-stock commodity statistics table are the specifications of other commodities in the first out-of-stock commodity combination sublist, except for the specification categories of each specification in the first specific commodity specification combination. As can be seen from Table 5, the specification categories included in the first out-of-stock commodity combination sublist are color, size, shape and texture. The first specific commodity specification combination clicked by the user includes the color specification category and the shape specification category, so the first out-of-stock commodity specifications are all specifications in the size specification category, namely "large" and "small", and all specifications in the texture category, namely "texture 1", "texture 2" and "texture 3". Then the second maximum combination number of each first out-of-stock commodity specification is calculated, and the specific calculation method is described in detail below. In this embodiment, the second maximum combination number of the specifications "large" and "small" is 3, and the second maximum combination number of "texture 1", "texture 2" and "texture 3" is 2.

[0105] Next, the relationship between the out-of-stock times of each first out-of-stock commodity specification in the first out-of-stock commodity statistics table and the second maximum combination number of each first out-of-stock commodity specification can be determined. When the out-of-stock times of a certain commodity specification in the first out-of-stock commodity specification is equal to the second maximum combination number of the commodity specification, it can be determined that the commodity specification combination is out of stock, and then the commodity specification combination is marked as out of stock. For example, in the embodiment shown in Table 6, the out-of-stock times of the commodity specifications "large", "texture 2" and "texture 3" in the first out-of-stock commodity specification are all equal to the second maximum combination number of each commodity specification. Therefore, when the user clicks the first specific commodity combination, i.e., "blue+square", the commodity specifications "large", "texture 2" and "texture 3" can be marked as out of stock.

[0106] Further, when the number of times a certain product specification in the first out-of-stock product specification is out of stock is less than the second maximum combination number of the product specification, it can be determined that the product specification is in stock without marking. For example, in the embodiment shown in Table 6, the product specifications "small" and "texture 1" in the first out-of-stock product specification are both less than the second maximum combination number of each product specification, so when the user clicks the first specific product combination, i.e., "blue+square", it can be determined that the product specifications are "small" and "texture 1" without marking.

[0107] Figure 6 : is a flow chart of a method for marking a product out of stock provided in an embodiment of the present application. Figure 6 Steps S601 to S605 in the embodiment shown are Figure 3 Steps S301 to S305 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 6As shown, the method also includes the following steps:

[0108] In step S606, the commodity combination including the completely out-of-stock specifications is deleted from the commodity combination list to obtain a second out-of-stock commodity combination sub-list.

[0109] In step S607 , in response to the user clicking on the second specific product specification combination of the product, a third out-of-stock product combination sub-list is created based on the second out-of-stock product combination sub-list.

[0110] The third out-of-stock commodity combination sub-list includes commodity specification combinations of all specifications in the second specific commodity specification combination in the second out-of-stock commodity combination sub-list.

[0111] In step S608, a second out-of-stock commodity statistics table is created based on the third out-of-stock commodity combination sub-list, and the second out-of-stock commodity statistics table at least includes the corresponding stored second out-of-stock commodity specifications and the out-of-stock times corresponding to the second out-of-stock commodity specifications, and the second maximum combination number of each second out-of-stock commodity specification.

[0112] The second out-of-stock commodity specifications include other commodity specifications in the second out-of-stock commodity combination sub-list except for the specification category to which each specification in the second specific commodity specification combination belongs.

[0113] In step S609, in response to the out-of-stock times of each second out-of-stock commodity specification being equal to the second maximum combination number of each second out-of-stock commodity specification, the second specific commodity specification combination is marked as out of stock.

[0114] In the embodiment of the present application, the commodity combination including the completely out-of-stock specifications can be first deleted from the out-of-stock commodity combination list to obtain a second out-of-stock commodity combination sub-list. Then, when the user clicks on the second specific commodity specification combination of the commodity, a third out-of-stock commodity combination sub-list can be created based on the second out-of-stock commodity combination sub-list. The third out-of-stock commodity combination sub-list includes the commodity specification combinations of all specifications in the second specific commodity specification combination in the second out-of-stock commodity combination sub-list.

[0115] Furthermore, a second out-of-stock commodity statistics table may be created based on the third out-of-stock commodity combination sublist, the second out-of-stock commodity statistics table at least including the corresponding second out-of-stock commodity specifications and the out-of-stock times corresponding to the second out-of-stock commodity specifications, and the second maximum number of combinations of the second out-of-stock commodity specifications. The second out-of-stock commodity specifications include other commodity specifications in the second out-of-stock commodity combination sublist, except for the specification category to which each specification in the second specific commodity specification combination belongs.

[0116] Finally, the relationship between the out-of-stock times of each second out-of-stock commodity specification and the second maximum number of combinations of each second out-of-stock commodity specification can be determined. When the out-of-stock times of a commodity specification in the second out-of-stock commodity specification is equal to the second maximum number of combinations of the commodity specification, the commodity specification is marked as out of stock. When the out-of-stock times of a commodity specification in the second out-of-stock commodity specification is less than the second maximum number of combinations of the commodity specification, it can be determined that the commodity specification is in stock and no marking is required.

[0117] The specific implementation method of creating a third out-of-stock commodity combination sub-list based on the second out-of-stock commodity combination sub-list, creating a second out-of-stock commodity statistics table based on the third out-of-stock commodity combination sub-list, and performing out-of-stock judgment and marking based on the relationship between the out-of-stock times of each second out-of-stock commodity specification and the second maximum combination number of each second out-of-stock commodity specification is as follows: Figure 5 The implementation methods in the illustrated embodiments are basically the same and will not be described in detail here.

[0118] Figure 7 1 is a flow chart of a method for determining the second maximum number of combinations of first out-of-stock commodity specifications provided in an embodiment of the present application. The first out-of-stock commodity specifications include L1 category specifications, each category of specifications includes M j Specification values, such as Figure 7 The method for determining the second maximum number of combinations of the first out-of-stock commodity specifications includes the following steps:

[0119] In step S701, it is determined that the commodity specification belongs to the nth category of commodity specifications.

[0120] In step S702, the second maximum combination number of the first out-of-stock product specification is determined to be the specification value M of all product specifications in category L1 except for the nth category product specification. j The product of .

[0121] Among them, N and M j are all positive integers, and L1, j and n are all positive integers greater than or equal to 1 and less than or equal to N.

[0122] In the embodiment of the present application, it is assumed that the first out-of-stock product specifications include L1 specifications, and each specification includes M j Assuming that the product specification for which the second largest number of combinations is to be determined belongs to the nth category of product specifications, then the product of the specification values ​​of all product specifications other than the nth category of product specifications, that is, the product of the product values ​​​​excluding M n All other M j The product of is the second maximum combination number of the first out-of-stock product specifications.

[0123] Further, in the embodiment of the present application, the method for calculating the second maximum number of combinations of the second out-of-stock product specifications is the same as the method for calculating the second maximum number of combinations of the first out-of-stock product specifications. Assume that the second out-of-stock product specifications include L2 specifications, each of which includes M j Assuming that the product specification for which the second largest number of combinations is to be determined belongs to the nth category of product specifications, then the product of the specification values ​​of all product specifications other than the nth category of product specifications, that is, the product of the product values ​​​​excluding M n All other M j The product of is the second maximum combination number of the second out-of-stock product specifications.

[0124] Still taking the embodiment shown in Table 6 as an example, in this embodiment, the first out-of-stock commodity specifications include size specifications and texture specifications, that is, L=2, where the size specification value is 2, that is, M1=2, and the texture specification value is 3, that is, M2=3. At this time, the second maximum number of combinations of the specifications "large" and "small" is determined by all M except M1. j The product of M2 is M2=3. That is, as shown in Table 6, the second maximum number of combinations of the specifications "large" and "small" is 3. At the same time, the second maximum number of combinations of the specifications "texture 1", "texture 2" and "texture 3" is determined by all M2 except M2. j The product of is determined as M1=2, that is, as shown in Table 6, the second maximum number of combinations of the specifications "texture 1", "texture 2" and "texture 3" is 2. It can be understood that when L=1, the first out-of-stock commodity specification or the second out-of-stock commodity specification only includes one type of specification, and at this time the second maximum number of combinations of each specification in this type of specification is 1.

[0125] In some other embodiments of the present application, if the second specific product specification combination clicked by the user is "green", the second out-of-stock product specification includes size specifications and shape specifications, that is, L = 2. At this time, if the specification value included in the size specification is M1 = 2, and the specification value included in the shape specification is M2 = 2, then the second maximum number of combinations of the specifications "large" and "small" is determined by all M values ​​except M1. j The product of M2 is M2=2, which means that the second largest combination number of the specifications "large" and "small" is 2; the second largest combination number of the specifications "square" and "round" can be determined by all M except M2. j The product of is M1=2, which means that the second maximum number of combinations of the specifications "square" and "round" are both 2.

[0126] In some other embodiments of the present application, if the commodity specification class also includes a status class and an address class, the specification value included in the status class is M3=3, the specification value included in the address class is M4=6, and the specification value included in the size class specification is still M1=2. At this time, if the second specific commodity specification combination clicked by the user is "blue+square", the second out-of-stock commodity specification includes the size class specification, the status class specification and the address class specification, that is, L=3. Then the second maximum number of combinations of each specification in the size class specification can be determined by all M except M1. j The product of M3*M4=3*6=18, that is, the second maximum number of combinations of each size specification is 18; the second maximum number of combinations of each status specification can be determined by all M except M3. j The product of M1*M4=2*6=12, that is, the second maximum combination number of each specification in the status specification is 12; the second maximum combination number of each specification in the address specification can be determined by all M except M4. j The product of is M1*M3=2*3=6, which means that the second maximum combination number of each specification in the address class specification is 6.

[0127] The technical solution of the embodiment of the present application can reduce the number of out-of-stock calculations for goods, improve the efficiency of out-of-stock marking, and enhance user experience.

[0128] Figure 8 1 is a flow chart of a method for creating a statistical table of out-of-stock goods based on an out-of-stock goods combination list provided in an embodiment of the present application. Figure 8 As shown, the method comprises the following steps:

[0129] In step S801, a unique dictionary is established, which includes keys and values.

[0130] The key is used to identify the specification, and the value is used to indicate the number of times the specification is out of stock.

[0131] In step S802, the out-of-stock product combination list is traversed, the specification values ​​included in the out-of-stock product combination list are used as the keys of the dictionary, and the number of occurrences of the specification values ​​is used as the value of the key corresponding to the specification value, so as to obtain the out-of-stock product specifications and the out-of-stock times of the specifications in the out-of-stock product statistics table.

[0132] In step S803, the first maximum combination number of out-of-stock commodity specifications is calculated, and the out-of-stock commodity statistics table is obtained based on the out-of-stock commodity specifications, the out-of-stock times of the specifications, and the first maximum combination number of each commodity specification in the out-of-stock commodity statistics table.

[0133] In step S804, a non-repetitive set is established, and the dictionary includes a set object and a number field.

[0134] The collection object is used to identify the specification, and the number field is used to indicate the number of times the specification is out of stock.

[0135] In step S805, the out-of-stock product combination list is traversed, the specification value included in the out-of-stock product combination list is taken as the collection object of the collection, the number of occurrences of the specification value is taken as the number field of the collection object corresponding to the specification value, and the out-of-stock product specifications and the out-of-stock times of the specifications in the out-of-stock product statistics table are obtained.

[0136] In step S806, the first maximum combination number of out-of-stock commodity specifications is calculated, and the out-of-stock commodity statistics table is obtained based on the out-of-stock commodity specifications, the out-of-stock times of the specifications, and the first maximum combination number of each commodity specification in the out-of-stock commodity statistics table.

[0137] In the embodiment of the present application, there are two ways to create an out-of-stock commodity statistics table based on the out-of-stock commodity combination list.

[0138] In the first implementation, a non-repetitive dictionary may be first established, the dictionary including keys and values, the keys are used to identify specifications, and the values ​​are used to indicate the number of times a specification is out of stock. Then, the out-of-stock commodity combination list is traversed, the specification values ​​included in the out-of-stock commodity combination list are used as the keys of the dictionary, and the number of occurrences of the specification values ​​is used as the value of the key corresponding to the specification value, to obtain the out-of-stock commodity specifications and the number of times the specifications are out of stock in the out-of-stock commodity statistics table. Finally, the first maximum number of combinations of out-of-stock commodity specifications is calculated, and the out-of-stock commodity statistics table is obtained based on the out-of-stock commodity specifications, the number of times the specifications are out of stock, and the first maximum number of combinations of each commodity specification in the out-of-stock commodity statistics table.

[0139] In the second implementation, a non-repeating set may be first established, wherein the dictionary includes a set object and a frequency field, wherein the set object is used to identify the specification, and the frequency field is used to indicate the number of times the specification is out of stock. Then, the out-of-stock commodity combination list is traversed, and the specification value included in the out-of-stock commodity combination list is used as the set object of the set, and the number of occurrences of the specification value is used as the frequency field of the collection object corresponding to the specification value, so as to obtain the out-of-stock commodity specifications and the out-of-stock times of the specifications in the out-of-stock commodity statistics table. Finally, the first maximum number of combinations of out-of-stock commodity specifications is calculated, and the out-of-stock commodity statistics table is obtained based on the out-of-stock commodity specifications, the out-of-stock times of the specifications, and the first maximum number of combinations of each commodity specification in the out-of-stock commodity statistics table.

[0140] In other words, a non-repeating dictionary can be established to store out-of-stock specifications. The dictionary includes key-value pairs, where the key is the unique identifier of the product specification and the value is the number of times the specification appears during the statistical process. Traverse the filtered product combination and count the number of times each specification appears. When the specification included in this statistics does not exist in the dictionary, add the specification to the dictionary and record the specification value of the specification as 1. When the specification included in this statistics exists in the dictionary, add 1 to the specification value of the specification in the dictionary.

[0141] On the other hand, you can also create a non-repeating set, which includes objects and fields corresponding to the objects. The set object is the specification, and the field is the number of times the specification appears. Traverse the filtered product combination and count the number of times each specification appears. When the specification included in this statistics does not exist in the set, add the object of the specification to the set and record the field of the object as 1. When the specification included in this statistics exists in the set, perform an increment operation on the field of the object of the specification in the set.

[0142] In the embodiment of the present application, the out-of-stock commodity specifications and the out-of-stock times of the specifications stored in the out-of-stock commodity statistics table are stored in the form of key-value pairs; or in the form of collection objects and object fields.

[0143] The above-mentioned out-of-stock marking method for goods is executed by the terminal, which can improve the out-of-stock calculation speed of goods and improve the marking efficiency. However, as the types of goods specifications increase, or the specification values ​​included in each type of specifications increase, the calculation complexity will increase accordingly, and the out-of-stock calculation time of the terminal itself may exceed the request response time of the terminal to obtain the out-of-stock information of the goods from the server. At this time, the calculation method can be switched.

[0144] Fig. 9 : is a flow chart of a method for marking a product out of stock provided in an embodiment of the present application. Fig. 9 Steps S901 to S905 in the embodiment shown are Figure 3 Steps S301 to S305 in the illustrated embodiment are substantially the same and will not be described in detail herein. Fig. 9 As shown, the method also includes the following steps:

[0145] In step S906, the terminal reports the calculated time for marking the product as out of stock and the request response time between the terminal and the server to the server.

[0146] In step S907, the terminal receives a first instruction sent by the server, and in response to the first instruction, the terminal marks the out-of-stock commodity using a commodity out-of-stock marking method; or

[0147] In step S908, the terminal receives a second instruction sent by the server. In response to the second instruction, the terminal receives a calculation result of marking the product as out of stock from the server, and marks the product as out of stock based on the calculation result.

[0148] In an embodiment of the present application, the terminal can report the calculation time for marking the goods out of stock, as well as the request response time between the terminal and the server to the server in real time or at a fixed time. After receiving the calculation time and request response time reported by the terminal, the server compares the two values. When the calculation time is less than or equal to the request response time, the server sends a first instruction to the terminal, and after the terminal receives the first instruction, it uses the goods out of stock marking method to mark the out of stock goods. When the calculation time is greater than the request response time, the server sends a second instruction to the terminal, and after the terminal receives the second instruction, the terminal receives the calculation result of the goods out of stock marking from the server, and marks the goods out of stock based on the calculation result.

[0149] The out-of-stock marking method for goods provided in the embodiment of the present application may include four main steps: filtering out-of-stock goods, counting the number of occurrences of out-of-stock specifications, finding out completely out-of-stock specifications, and finding out partially out-of-stock specifications. Among them, the terminal can obtain a specification list specConfigList from the server. Among them, each specification has a specific value list specItems, and each specification consists of name and value. Name is the display value of the specification, such as color-red, color-blue, and value is the unique identifier of the specification. Assuming that the number of specification lists is n, the number of specific value lists for each specification is m1, m2...mn, etc. The list of goods after all specifications are combined in an unordered manner, each product has its inventory number, and the inventory number can also be a purchase limit number, that is, the number that the user can obtain, and also has its specification value combination list specItems, where the number of product lists must be m1*m2*...*mn.

[0150] When entering a product detail, you can first set all product specifications to the in-stock interface style. Then perform the step of filtering out out-of-stock products. Specifically, you can filter the product list to obtain a statistical table of out-of-stock products. For example, you can call an array filter function, such as the filter function in the iOS system to implement filtering.

[0151] Then execute the step of counting the number of times the out-of-stock specifications appear. Specifically, each data item in the out-of-stock product statistics table has a list of specification value combinations, specItems, and the number of times these specifications appear is counted. When counting, you can create a non-repeating dictionary to store out-of-stock specifications. The key is the unique identifier of the specification, and the value is the number of times the specification appears. Traverse the out-of-stock product statistics table, and then traverse the specification list of each product. For each specification, access the dictionary. If the specification already exists in the dictionary, add 1 to the number of times, otherwise initialize the number to 1. Alternatively, you can also create a non-repeating collection to store out-of-stock specifications. The collection object is the specification, but the object also has a number field. Traverse the out-of-stock product statistics table, and then traverse the specification list of each product. For each specification, access the collection. If the specification already exists in the collection, add 1 to the number field of the object, otherwise initialize the number field to 1.

[0152] Next, we will perform the step of finding the completely out-of-stock specifications. When the user first enters the product details, a certain specification should be marked as out of stock. When a certain specification is combined with any other specifications, the corresponding products are all out of stock, then this specification is marked as out of stock. The above out-of-stock situation can be called an out-of-stock specification.

[0153] In the previous text, for the sake of simplicity, the number of each specification list is represented by m. In fact, the number of value lists of each specification list is not equal. Let them be m1, m2, ..., mn, and assume that the out-of-stock specification is in the nth specification list. Therefore, the number of occurrences of the out-of-stock specification is: the product of the number of specific value lists of other items excluding the nth specification item (mn) where the out-of-stock specification is located, that is, the quotient of the product of all specification items and the nth specification item where the out-of-stock specification is located: (m1*m2*...*mn) / mn, which is the maximum number of times each specification may appear, and also the maximum number of combinations of specifications defined above. Therefore, while traversing in the previous step, the maximum number of combinations of each specification can also be calculated and attached to the dictionary or set element. Specifically, the above dictionary or set can be traversed to find the specification dictionary or set with the number of occurrences equal to the maximum number, that is, the completely out-of-stock specification set is obtained. Subsequently, the corresponding specification view can be marked as out of stock on the interface, for example: grayed out, or marked in the upper right corner, etc.

[0154] Finally, the step of calculating the partially out-of-stock specifications is executed. When the user clicks on a certain product specification value, the corresponding specification is marked as out of stock. If a certain specification is combined with the specification selected by the user and other specifications, and the corresponding products are all out of stock, then this specification is marked as out of stock. The above out-of-stock situation can be called partially out of stock. It can be seen that the calculation of this step is performed only when the user clicks on a certain specification.

[0155] When executing this step, it is necessary to distinguish the rules for business needs to handle specifications that are completely out of stock. If the business needs are to no longer process the specifications that are completely out of stock: for example, they cannot be clicked, or there is no response after clicking. Then, when the user clicks, it can be excluded. This can be done by performing a close gesture on the control corresponding to the specification value that is completely out of stock, or by the following steps: first filter out the specifications that are completely out of stock from the out-of-stock product statistics table. Specifically, the list of specifications that are completely out of stock can be filtered out to obtain a statistics table for some out-of-stock products. For example, the filter function provided by the system can be called on the out-of-stock product statistics table, and the filtering condition is: a certain specification of the product has appeared in the out-of-stock specification set. For example, the method in the iOS system can be to call the contain function on the product's specification value combination list, and write inside the function: call the contain function of the out-of-stock specification set, and it returns true.

[0156] For specifications that are completely out of stock, if the business requirement is to perform subsequent processing on them, omit the above filtering operation and go directly to the following steps. When a user clicks on a product specification value, first filter out a list of products containing the clicked specification value from the out-of-stock product statistics table. Specifically, you can call the filter function provided by the system on the partial out-of-stock product statistics table, with the condition that the list of its specification value combinations includes the clicked specification. For example, in the iOS system, you can call the filter function on the partial out-of-stock product statistics table, and write inside the function: If its specification value combination list includes the clicked specification, return true.

[0157] Then determine whether the number of the product list containing the selected specification value is 0. If it is 0, it means that the specification value is in stock, and no action is performed, and the process ends. If it is not 0, it means that some of the specification values ​​are out of stock, and further determination is required.

[0158] Next, count the number of occurrences of all specifications in the product list that contains the ordered specifications. The statistical method is the same as the above step of finding the specifications that are completely out of stock, and will not be repeated here.

[0159] At this time, the maximum number of combinations of specifications needs to be updated. The updated maximum number of combinations is the product of the number of value lists of other specifications except the specifications where the selected specification value and the specification value being traversed are located.

[0160] Finally, according to the rules, the number of times a partially out-of-stock specification appears must be: excluding the row of the specification in the specification list specConfigList, excluding the selected rules, if there are other remaining rows, it is the product of the number of other remaining rows; if there are no other remaining rows, it is 1. For specifications that meet this number condition and are not the selected specification value, the corresponding control on the interface is marked as out of stock. For example: grayed out, or marked in the upper right corner, etc. At this point, the out-of-stock mark of the product can be achieved.

[0161] Furthermore, as the size of the specification list increases, the computational complexity of the terminal will inevitably increase. If the computation time of a terminal exceeds the time required for the request server to return, the terminal's computation can be transferred to the request server and wait for the result. Therefore, the method of obtaining product out-of-stock information can be dynamically adjusted.

[0162] Specifically, the terminal can perform statistical reporting for the specification selection module of the product details. When reporting, the terminal can count the number of specification lists each time, calculate the specifications that are completely out of stock, calculate the duration of some specifications that are out of stock, and report them to the server for statistics.

[0163] Subsequently, the server can generate a configuration, allowing the terminal to temporarily request the server to obtain the full stock-out specifications and partial stock-out specifications, and the terminal accepts this configuration and executes it. This configuration can be switched on and off, and the server can update the configuration at any time and let the terminal use the new configuration.

[0164] Next, the terminal will collect statistics and report the round-trip time of the network request for the specification selection module of the product details. Because the network status changes with the movement of the terminal device, the server will use the round-trip time of the most recent / several terminal requests to the server as the basis to predict the time it will take for the terminal to obtain the specifications that are completely out of stock or partially out of stock from the server. Comparing the above records, under a certain number of specification lists, the terminal calculates the time for the specifications that are completely out of stock and the time for the specifications that are partially out of stock. And compare the sizes of the two to determine whether it is faster to request the server or the terminal to calculate locally under the current network status and specification list size.

[0165] Furthermore, the usage of all users can be comprehensively considered to finally obtain a threshold value for the number of specification lists: under normal network conditions, when the number of specification lists is greater than the threshold, it is faster to request the server; when the number of specification lists is less than the threshold, the terminal calculation is faster.

[0166] Finally, the server can issue a policy when the terminal requests the product details data interface. That is to say, based on the analysis above, the server can return a policy at the same time as the data when the terminal requests the product details data interface: Under the current network status, under the number of specification lists owned by this product details: Whether to request the server or the terminal to calculate the out-of-stock judgment of this specification.

[0167] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0168] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0169] Fig.10 Schematic diagram of a commodity out of stock marking device provided in an embodiment of the present application. Fig.10 As shown, the commodity out of stock marking device includes:

[0170] The acquisition module 1001 is configured to acquire a commodity combination list, where the commodity combination list includes all combinations of all specifications of the commodity.

[0171] The creation module 1002 is configured to obtain out-of-stock commodity combinations in the commodity combination list and create an out-of-stock commodity combination list.

[0172] The creation module 1002 is further configured to create an out-of-stock commodity statistics table based on the out-of-stock commodity combination list, wherein the out-of-stock commodity statistics table at least includes corresponding stored out-of-stock commodity specifications and out-of-stock times of the specifications, and the first maximum combination number of each commodity specification.

[0173] The determination module 1003 is configured to determine that the specific specification is completely out of stock in response to the number of out-of-stock times of the specific specification being equal to the first maximum combination number of the specific specification.

[0174] The marking module 1004 is configured to mark all completely out-of-stock product specifications as out of stock when the user enters the product details homepage in the terminal application.

[0175] According to the technical solution provided in the embodiment of the present application, by counting the number of out-of-stock times of each product specification in the out-of-stock product combination, and creating an out-of-stock product statistics table that includes at least the corresponding stored out-of-stock product specifications and the out-of-stock times of the specifications based on the statistical results, and then determining whether the out-of-stock times of a product specification in the out-of-stock product statistics table is equal to the maximum number of combinations of the specification to determine whether the product of the specification is completely out of stock, the number of queries for completely out-of-stock products can be reduced, computing efficiency can be improved, and user experience can be enhanced.

[0176] In the embodiment of the present application, the commodity includes N types of specifications, each type of specification includes M i The first maximum number of combinations of commodity specifications is determined by the following method: determining that the commodity specifications belong to the kth category of commodity specifications; determining that the first maximum number of combinations of commodity specifications is M1 to M N The product of k The quotient of N and M i are all positive integers, i is a positive integer greater than or equal to 1 and less than or equal to N, and k is a positive integer greater than or equal to 1 and less than or equal to N.

[0177] In an embodiment of the present application, the determination module and the marking module are further configured to: in response to a user clicking on a first specific product specification combination of a product, create a first out-of-stock product combination sub-list based on the out-of-stock product combination list, the first out-of-stock product combination sub-list includes a product specification combination in the out-of-stock product combination list that includes all specifications in the first specific product specification combination; create a first out-of-stock product statistics table based on the first out-of-stock product combination sub-list, the first out-of-stock product statistics table at least includes the corresponding stored first out-of-stock product specifications and the number of out-of-stock times corresponding to the first out-of-stock product specifications, and the second maximum number of combinations of each first out-of-stock product specification, wherein the first out-of-stock product specifications include other product specifications in the first out-of-stock product combination sub-list except for the specification category to which each specification in the first specific product specification combination belongs; in response to the number of out-of-stock times of each first out-of-stock product specification being equal to the second maximum number of combinations of each first out-of-stock product specification, mark the first specific product specification combination as out of stock.

[0178] In the embodiment of the present application, the determination module and the marking module are further configured to: delete the commodity combination including the completely out-of-stock specifications from the commodity combination list to obtain a second out-of-stock commodity combination sub-list; in response to the user clicking on the second specific commodity specification combination of the commodity, create a third out-of-stock commodity combination sub-list based on the second out-of-stock commodity combination sub-list, the third out-of-stock commodity combination sub-list including the commodity specification combinations in the second out-of-stock commodity combination sub-list including all the specifications in the second specific commodity specification combination; create a second out-of-stock commodity statistics table based on the third out-of-stock commodity combination sub-list, the second out-of-stock commodity statistics table at least including the correspondingly stored second out-of-stock commodity specifications and the number of out-of-stock times corresponding to the second out-of-stock commodity specifications, and the second maximum number of combinations of each second out-of-stock commodity specification, wherein the second out-of-stock commodity specifications include other commodity specifications in the second out-of-stock commodity combination sub-list except for the specification category to which each specification in the second specific commodity specification combination belongs; in response to the number of out-of-stock times of each second out-of-stock commodity specification being equal to the second maximum number of combinations of each second out-of-stock commodity specification, mark the second specific commodity specification combination as out of stock.

[0179] In the embodiment of the present application, the first out-of-stock commodity specifications include L1 specifications, each specification includes M jThe second maximum number of combinations of the first out-of-stock product specifications is determined by: determining that the product specifications belong to the nth category of product specifications; determining that the second maximum number of combinations of the first out-of-stock product specifications is M1 to M L The product of n The quotient of N and M j are all positive integers, and L1, j and n are all positive integers greater than or equal to 1 and less than or equal to N.

[0180] In the embodiment of the present application, the second out-of-stock product specifications include L2 specifications, each of which includes M j The second maximum number of combinations of the second out-of-stock product specifications is determined by: determining that the product specifications belong to the nth category of product specifications; determining that the second maximum number of combinations of the second out-of-stock product specifications is M1 to M L The product of n The quotient of N and M j are all positive integers, and L2, j and n are all positive integers greater than or equal to 1 and less than or equal to N.

[0181] In an embodiment of the present application, a statistical table of out-of-stock goods is created based on a list of out-of-stock goods combinations, including: establishing a non-repeating dictionary, the dictionary including keys and values, the keys being used to identify specifications, and the values ​​being used to indicate the number of times a specification is out of stock; traversing the list of out-of-stock goods combinations, taking the specification values ​​included in the list of out-of-stock goods combinations as the keys of the dictionary, taking the number of occurrences of the specification values ​​as the values ​​of the keys corresponding to the specification values, obtaining the out-of-stock goods specifications and the number of times the specifications are out of stock in the statistical table of out-of-stock goods; calculating the first maximum number of combinations of out-of-stock goods specifications, and obtaining the out-of-stock goods based on the out-of-stock goods specifications, the number of times the specifications are out of stock, and the first maximum number of combinations of each product specification in the statistical table of out-of-stock goods. A statistical table; or a non-repeating set is established, in which the dictionary includes a set object and a frequency field, the set object is used to identify the specification, and the frequency field is used to indicate the number of times the specification is out of stock; traverse the out-of-stock commodity combination list, take the specification value included in the out-of-stock commodity combination list as the collection object of the set, and take the number of occurrences of the specification value as the number field of the collection object corresponding to the specification value, to obtain the out-of-stock commodity specifications and the out-of-stock times of the specifications in the out-of-stock commodity statistical table; calculate the first maximum combination number of out-of-stock commodity specifications, and obtain the out-of-stock commodity statistical table based on the out-of-stock commodity specifications in the out-of-stock commodity statistical table, the out-of-stock times of the specifications and the first maximum combination number of each commodity specification.

[0182] In the embodiment of the present application, the out-of-stock product specifications and the out-of-stock times of the specifications stored in the out-of-stock product statistics table are stored in the form of key-value pairs; or in the form of collection objects and object fields.

[0183] In an embodiment of the present application, it also includes: the terminal reports the calculation time for marking the out-of-stock product and the request response time between the terminal and the server to the server; the terminal receives a first instruction sent by the server, and in response to the first instruction, the terminal uses the product out-of-stock marking method to mark the out-of-stock product; or the terminal receives a second instruction sent by the server, and in response to the second instruction, the terminal receives the calculation result of the product out-of-stock marking from the server, and marks the product out of stock based on the calculation result.

[0184] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0185] Fig.11 Schematic diagram of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device 11 of this embodiment includes: a processor 1101, a memory 1102, and a computer program 1103 stored in the memory 1102 and executable on the processor 1101. When the processor 1101 executes the computer program 1103, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 1101 executes the computer program 1103, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0186] The electronic device 11 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 11 may include, but is not limited to, a processor 1101 and a memory 1102. Those skilled in the art will appreciate that Fig.11 The electronic device 11 is merely an example and does not limit the electronic device 11 , and may include more or less components than those shown in the figure, or different components.

[0187] Processor 1101 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0188] The memory 1102 may be an internal storage unit of the electronic device 11, for example, a hard disk or memory of the electronic device 11. The memory 1102 may also be an external storage device of the electronic device 11, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 11. The memory 1102 may also include both an internal storage unit of the electronic device 11 and an external storage device. The memory 1102 is used to store computer programs and other programs and data required by the electronic device.

[0189] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0190] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0191] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for marking a commodity as out of stock, characterized in that: The method is executed by a terminal, and includes: Obtain a product combination list, wherein the product combination list includes all combinations of all specifications of the product; Obtain out-of-stock product combinations in the product combination list, and create an out-of-stock product combination list; Creating a out-of-stock commodity statistics table based on the out-of-stock commodity combination list, the out-of-stock commodity statistics table at least includes corresponding stored out-of-stock commodity specifications and out-of-stock times of the specifications, and a first maximum combination number of each commodity specification, wherein the out-of-stock times of the specifications is the number of times the specifications appear in the out-of-stock commodity combination list, the first maximum combination number of the target commodity specification is the maximum number of times the target commodity specification can appear in the out-of-stock commodity combination list, and the target commodity specification is any commodity specification in the out-of-stock commodity statistics table; In response to the number of out-of-stock times of a specific specification being equal to the first maximum number of combinations of the specific specification, determining that the specific specification is completely out of stock; When the user enters the product details homepage in the terminal application, all product specifications that are completely out of stock are marked as out of stock.

2. The method according to claim 1, characterized in that The goods include N types of specifications, each type of specification includes M i The first maximum number of combinations of commodity specifications is determined in the following manner: Determining that the commodity specifications belong to the kth category of commodity specifications; Determine the first maximum number of combinations of the product specifications as M1 to M N The product of k The business of Among them, N and M i are all positive integers, i is a positive integer greater than or equal to 1 and less than or equal to N, and k is a positive integer greater than or equal to 1 and less than or equal to N.

3. The method according to claim 1, characterized in that The method further comprises: In response to the user clicking on the first specific product specification combination of the product, creating a first out-of-stock product combination sub-list based on the out-of-stock product combination list, wherein the first out-of-stock product combination sub-list includes product specification combinations in the out-of-stock product combination list that include all specifications in the first specific product specification combination; Creating a first out-of-stock commodity statistical table based on the first out-of-stock commodity combination sub-list, wherein the first out-of-stock commodity statistical table at least includes correspondingly stored first out-of-stock commodity specifications and out-of-stock times corresponding to the first out-of-stock commodity specifications, and a second maximum number of combinations of each first out-of-stock commodity specification, wherein the first out-of-stock commodity specifications include other commodity specifications in the first out-of-stock commodity combination sub-list except for the specification category to which each specification in the first specific commodity specification combination belongs; In response to the out-of-stock times of each first out-of-stock commodity specification being equal to the second maximum combination number of each first out-of-stock commodity specification, the first specific commodity specification combination is marked as out of stock.

4. The method according to claim 1, characterized in that: The method further comprises: Deleting the commodity combination including the completely out-of-stock specifications from the commodity combination list to obtain a second out-of-stock commodity combination sub-list; In response to the user clicking on the second specific product specification combination of the product, creating a third out-of-stock product combination sub-list based on the second out-of-stock product combination sub-list, the third out-of-stock product combination sub-list including product specification combinations in the second out-of-stock product combination sub-list that include all specifications in the second specific product specification combination; creating a second out-of-stock commodity statistical table based on the third out-of-stock commodity combination sub-list, wherein the second out-of-stock commodity statistical table at least includes correspondingly stored second out-of-stock commodity specifications and the number of out-of-stock times corresponding to the second out-of-stock commodity specifications, and a second maximum number of combinations of each second out-of-stock commodity specification, wherein the second out-of-stock commodity specifications include other commodity specifications in the second out-of-stock commodity combination sub-list except for the specification category to which each specification in the second specific commodity specification combination belongs; In response to the out-of-stock times of each second out-of-stock commodity specification being equal to the second maximum combination number of each second out-of-stock commodity specification, the second specific commodity specification combination is marked as out of stock.

5. The method according to claim 3, characterized in that: The commodity includes N types of specifications, the first unavailable commodity specifications include L1 type specifications, and each type of specifications includes M j The second maximum number of combinations of the first out-of-stock commodity specifications is determined in the following manner: Determining that the commodity specifications belong to the nth category of commodity specifications; Determine that the second maximum combination number of the first out-of-stock product specifications is the specification value M of all product specifications in the L1 category except the nth category product specifications. j The product of Among them, N and M j are all positive integers, and L1, j and n are all positive integers greater than or equal to 1 and less than or equal to N.

6. The method according to claim 4, characterized in that The commodity includes N types of specifications, the second unavailable commodity specifications include L2 types of specifications, and each type of specifications includes M j The second maximum number of combinations of the second out-of-stock commodity specifications is determined in the following manner: Determining that the commodity specifications belong to the nth category of commodity specifications; Determine the second maximum combination number of the second out-of-stock product specifications as the specification value M of all product specifications in the L2 category except the nth category product specifications. j The product of Among them, N and M j are all positive integers, and L2, j and n are all positive integers greater than or equal to 1 and less than or equal to N.

7. The method according to claim 1, characterized in that The step of creating a statistical table of out-of-stock commodities based on the out-of-stock commodity combination list includes: Establishing a non-repetitive dictionary, the dictionary including keys and values, the key being used to identify the specification, and the value being used to indicate the number of times the specification is out of stock; Traversing the out-of-stock commodity combination list, taking the specification value included in the out-of-stock commodity combination list as the key of the dictionary, taking the number of occurrences of the specification value as the value of the key corresponding to the specification value, and obtaining the out-of-stock commodity specification and the out-of-stock number of the specification in the out-of-stock commodity statistics table; Calculate the first maximum combination number of the out-of-stock commodity specifications, and obtain the out-of-stock commodity statistics table based on the out-of-stock commodity specifications, the number of out-of-stock times of the specifications, and the first maximum combination number of the specifications of each commodity; or Establishing a non-repeating set, the dictionary includes a set object and a times field, the set object is used to identify the specification, and the times field is used to indicate the times that the specification is out of stock; Traversing the out-of-stock commodity combination list, taking the specification value included in the out-of-stock commodity combination list as the set object of the set, taking the number of occurrences of the specification value as the number field of the set object corresponding to the specification value, and obtaining the out-of-stock commodity specification and the out-of-stock number of the specification in the out-of-stock commodity statistics table; The first maximum combination number of the out-of-stock commodity specifications is calculated, and the out-of-stock commodity statistics table is obtained based on the out-of-stock commodity specifications, the out-of-stock times of the specifications, and the first maximum combination number of the specifications of each commodity.

8. The method according to claim 1, characterized in that The out-of-stock commodity specifications and the out-of-stock times of the specifications stored in the out-of-stock commodity statistics table are stored in a corresponding manner in the form of key-value pairs; or in a corresponding manner in the form of collection objects and object fields.

9. The method according to claim 1, characterized in that: The method further comprises: The terminal reports the calculated time for marking the commodity as out of stock and the request response time between the terminal and the server to the server; The terminal receives a first instruction sent by the server, and in response to the first instruction, the terminal marks the out-of-stock commodity using the out-of-stock commodity marking method; or The terminal receives a second instruction sent by the server. In response to the second instruction, the terminal receives a calculation result of a product out of stock mark from the server, and marks the product out of stock based on the calculation result.

10. A commodity out of stock marking device, characterized in that: include: An acquisition module is configured to acquire a commodity combination list, wherein the commodity combination list includes all combinations of all specifications of the commodity; A creation module is configured to obtain out-of-stock commodity combinations in the commodity combination list and create an out-of-stock commodity combination list; The creation module is further configured to create an out-of-stock commodity statistical table based on the out-of-stock commodity combination list, wherein the out-of-stock commodity statistical table at least includes correspondingly stored out-of-stock commodity specifications and out-of-stock times of the specifications, and a first maximum combination number of each commodity specification, wherein the out-of-stock times of the specifications are the number of times the specifications appear in the out-of-stock commodity combination list, the first maximum combination number of the target commodity specification is the maximum number of times the target commodity specification can appear in the out-of-stock commodity combination list, and the target commodity specification is any commodity specification in the out-of-stock commodity statistical table; A determination module, configured to determine that the specific specification is completely out of stock in response to the number of out-of-stock times of the specific specification being equal to the first maximum combination number of the specific specification; The marking module is configured to mark all completely out-of-stock product specifications as out of stock when the user enters the product details homepage in the terminal application.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Method and apparatus for monitoring the effective velocity of items through a store or warehouse

    AU2006200145A1

  • Replenishment data processing method and device, computer equipment and storage medium

    CA3136051A1