Method, device, electronic device and storage medium for storing item information
By adopting the time-period price-level storage model in the inventory system, the problem of storing items whose prices change in the time dimension is solved, the dynamic update of price information and the flexibility of the inventory system are achieved, and the data processing burden is reduced.
Patent Information
- Application Number
- CN202010544545.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-15
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-06-15
AI Technical Summary
It is difficult for the existing inventory system to effectively handle items whose prices change in the time dimension, resulting in frequent operations and increased data processing burden.
The time period price level storage mode is used to store price information and inventory information in multiple different time periods within a preset time period, including price inventory level storage files and time period price level storage files, to achieve dynamic updates and queries of price information.
It reduces frequent changes to item information and data processing burdens, simplifies operations, meets price change needs, and improves the flexibility of the inventory system.
Smart Images

Figure CN113762818B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for storing item information. Background Art
[0002] Currently, in inventory systems, fixed prices for individual items and inventory information for the overall inventory are usually stored. In this way, since each item is stored at a fixed price, the price of the item will not change.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0004] The storage mode of item information in the above inventory system is only applicable to some items whose prices and inventory do not change frequently, and is not applicable to some items whose prices change over time. For example, the ticket prices of scenic spots and other holiday tickets may fluctuate from those of ordinary days. Since the prices of items change over time, the prices of items in the inventory system need to be changed frequently to make the item information in the inventory system meet the needs of price changes. Frequent operations increase the burden of data processing in the inventory system. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method, device, system and storage medium for storing item information, which can solve the problem that for items whose prices change over time, the prices of items in the inventory system need to be frequently changed, which results in frequent operations and an increased burden on data processing in the inventory system.
[0006] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for storing item information is provided.
[0007] A method for storing item information in an embodiment of the present invention includes: receiving an item identification and target item information of a target item; determining a target storage mode corresponding to the target item based on the target item information, wherein the storage mode includes time period price level storage, and the item information corresponding to the time period price level storage includes price information and inventory information for multiple different time periods within a preset time length; if the target storage mode is the time period price level storage, querying a data storage file corresponding to the target item based on the target storage mode and the item identification; and storing the target item information in the data storage file corresponding to the target item.
[0008] In one embodiment, if the target storage mode is time period price level storage, the target item information includes price information and inventory quantity of the target item in different time periods within a preset time period, and the data storage file includes a price inventory level storage file and a time period price level storage file corresponding to the target item;
[0009] The step of storing the target item information in a data storage file corresponding to the target item includes:
[0010] Determine the lowest price and total inventory information of the target item within the preset time period according to the price information and inventory quantity of the target item in different time periods within the preset time period;
[0011] Storing the lowest price and the total inventory information in the price-inventory level storage file;
[0012] The price information and inventory quantity of the target item in different time periods within a preset time period are stored in the time period price level storage file.
[0013] In another embodiment, the preset time period includes at least two consecutive first-level time periods, the first-level time period includes multiple second-level time periods, the price information and inventory quantity of the target item in different time periods within the preset time period include the price information and inventory quantity of the target item in each of the second-level time periods; the time period price level storage file includes a first-level time period price level storage file and a second-level time period price level storage file;
[0014] The step of storing the price information and inventory quantity of the target item in different time periods within a preset time period into the time period price level storage file includes:
[0015] For each first-level time period, determine the lowest price and total inventory information of the first-level time period according to the price information and inventory quantity of the target item in each second-level time period, and store the lowest price and total inventory information of the first-level time period in the first-level time period price level storage file;
[0016] The price information and inventory quantity of the target item in each of the second time periods are stored in the second-level time period price level storage file.
[0017] In yet another embodiment, determining the target storage mode corresponding to the target item according to the target item information includes:
[0018] Determining whether the target item information includes a time parameter;
[0019] If yes, determining that the target storage mode corresponding to the target item is time period price level storage;
[0020] If not, it is determined that the target storage mode corresponding to the target item is sku (Stock Keeping Unit) price inventory level storage, and the item information corresponding to the sku price inventory level storage includes the fixed price and inventory information of the item.
[0021] In yet another embodiment, after storing the target item information in the data storage file corresponding to the target item, the method further includes:
[0022] receiving a query request sent by a display terminal, wherein the query request includes an item identifier of the target item and query request information;
[0023] Determining a target storage mode corresponding to the target item according to the query request information;
[0024] According to the target storage mode corresponding to the target item and the query request information, querying the data corresponding to the query request from the data storage file corresponding to the item identifier;
[0025] The data corresponding to the query request is sent to the display terminal.
[0026] In yet another embodiment, after storing the target item information in the data storage file corresponding to the target item, the method further includes:
[0027] Receiving order information corresponding to the target item;
[0028] The inventory quantity in the data storage file is updated according to the order information.
[0029] To achieve the above objective, according to another aspect of the present invention, a device for storing item information is provided.
[0030] A storage device for item information of the present invention comprises: a receiving unit, used to receive an item identification and target item information of a target item; a determining unit, used to determine a target storage mode corresponding to the target item based on the target item information, wherein the storage mode comprises time period price level storage, and the item information corresponding to the time period price level storage comprises price information and inventory information for a plurality of different time periods within a preset time length; a query unit, used to query a data storage file corresponding to the target item based on the target storage mode and the item identification if the target storage mode is the time period price level storage; and a storage unit, used to store the target item information in the data storage file corresponding to the target item.
[0031] In one embodiment, if the target storage mode is time period price level storage, the target item information includes price information and inventory quantity of the target item in different time periods within a preset time period, and the data storage file includes a price inventory level storage file and a time period price level storage file corresponding to the target item;
[0032] The storage unit is specifically used for:
[0033] Determine the lowest price and total inventory information of the target item within the preset time period according to the price information and inventory quantity of the target item in different time periods within the preset time period;
[0034] Storing the lowest price and the total inventory information in the price-inventory level storage file;
[0035] The price information and inventory quantity of the target item in different time periods within a preset time period are stored in the time period price level storage file.
[0036] In another embodiment, the preset time period includes at least two consecutive first-level time periods, the first-level time period includes multiple second-level time periods, the price information and inventory quantity of the target item in different time periods within the preset time period include the price information and inventory quantity of the target item in each of the second-level time periods; the time period price level storage file includes a first-level time period price level storage file and a second-level time period price level storage file;
[0037] The storage unit is specifically used for:
[0038] For each first-level time period, determine the lowest price and total inventory information of the first-level time period according to the price information and inventory quantity of the target item in each second-level time period, and store the lowest price and total inventory information of the first-level time period in the first-level time period price level storage file;
[0039] The price information and inventory quantity of the target item in each of the second time periods are stored in the second-level time period price level storage file.
[0040] In yet another embodiment, the determining unit is specifically configured to:
[0041] Determining whether the target item information includes a time parameter;
[0042] If yes, determining that the target storage mode corresponding to the target item is time period price level storage;
[0043] If not, it is determined that the target storage mode corresponding to the target item is sku price inventory level storage, and the item information corresponding to the sku price inventory level storage includes the fixed price and inventory information of the item.
[0044] In yet another embodiment, the receiving unit is further configured to receive a query request sent by a display terminal, wherein the query request includes an item identifier of the target item and query request information;
[0045] The determining unit is further configured to determine a target storage mode corresponding to the target item according to the query request information;
[0046] The query unit is further used to query the data corresponding to the query request from the data storage file corresponding to the item identifier according to the target storage mode corresponding to the target item and the query request information;
[0047] The device also includes:
[0048] A sending unit is used to send the data corresponding to the query request to the display terminal.
[0049] In yet another embodiment, the receiving unit is further configured to receive order information corresponding to the target item;
[0050] The device also includes:
[0051] An updating unit is used to update the inventory quantity in the data storage file according to the order information.
[0052] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.
[0053] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for storing item information provided by the embodiment of the present invention.
[0054] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.
[0055] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, the method for storing item information provided by the embodiment of the present invention is implemented.
[0056] One embodiment of the above invention has the following advantages or beneficial effects: In the embodiment of the present invention, the storage mode includes time period price level storage, and the corresponding item information of the time period price level storage may include price information and inventory information of multiple different time periods within a preset time length; therefore, after receiving the item identification and target item information of the target item, the target storage mode corresponding to the target item can be determined according to the target item information; for the target item whose target storage mode is time period price level storage, the target item information, that is, the price information and inventory quantity of the target item in different time periods within the preset time length, can be stored in the data storage file corresponding to the target item. In this way, when the target storage mode is time period price level storage, the price information of the target item in multiple different time periods within the preset time length can be stored, thereby realizing the demand that the price information of the target item within the preset time length can change, without the need to frequently change the item information, the operation is simple, and the burden of data processing is reduced.
[0057] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0059] Figure 1 is a schematic diagram of a structure of an inventory system according to an embodiment of the present invention;
[0060] Figure 2 is a schematic diagram of a main process of a method for storing item information according to an embodiment of the present invention;
[0061] Figure 3 is a schematic diagram of another main process of the method for storing item information according to an embodiment of the present invention;
[0062] Figure 4 is a structural schematic diagram of a sku level price and inventory table according to an embodiment of the present invention;
[0063] Figure 5 is a schematic diagram of a structure of a date-level price and inventory table according to an embodiment of the present invention;
[0064] Figure 6 is a schematic diagram of a structure of a time level price and inventory table according to an embodiment of the present invention;
[0065] Figure 7 It is a schematic diagram of a main process of a method for processing pre-occupied inventory according to an embodiment of the present invention;
[0066] Figure 8 is a schematic diagram of sku level prices and inventory in an inventory table according to an embodiment of the present invention;
[0067] Fig. 9 is a schematic diagram of the sku level price and the reserved inventory in the inventory table according to an embodiment of the present invention;
[0068] Fig.10 is a schematic diagram of sku level price and inventory deduction in the inventory table according to an embodiment of the present invention;
[0069] Fig.11 is a schematic diagram of sku level price and inventory backwash in the inventory table according to an embodiment of the present invention;
[0070] Fig.12 is a schematic diagram of returned data according to an embodiment of the present invention;
[0071] Fig.13 is a schematic diagram of main units of a storage device for item information according to an embodiment of the present invention;
[0072] Fig.14 is another exemplary system architecture diagram to which the embodiments of the present invention can be applied;
[0073] Fig.15 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiment of the present invention. DETAILED DESCRIPTION
[0074] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0075] It should be pointed out that the embodiments of the present invention and the features in the embodiments may be combined with each other if there is no conflict.
[0076] An embodiment of the present invention provides an inventory system, in which item information of each item, such as price information and inventory information of the item, can be stored. Specifically, the inventory system may include three modules, namely a data input module, a data storage module, and a data output module. The data input module is mainly used to provide interface services to the outside, for writing operations on item information and data sorting of item information. The data storage module is mainly responsible for data storage, and can store item information in different data storage files according to different storage modes. The data output module provides data input interface services to the outside, mainly providing data reading operations.
[0077] Since the price information of some items may fluctuate over time, the storage of item information in the embodiment of the present invention may be divided into different storage modes. In the embodiment of the present invention, the storage mode may include sku price inventory level storage and time period price level storage. Among them, the price information of the item in the sku price inventory level storage corresponding to the item information is a fixed price, which cannot reflect the change of price over time. The price information in the time period price level storage corresponding to the item information is the price information of multiple different time periods within a preset time length, which can reflect the change of price over time. Multiple different time periods can be connected to form a preset time length, and the size of the preset time length can be set according to the specific scenario, for example, it can be one week. In the embodiment of the present invention, the preset time length can be divided to obtain multiple different time periods within the preset time length, and the preset time length can be specifically divided according to the price change trend of the item.
[0078] For different storage modes, different data storage files are established in the embodiment of the present invention to store the item information of different storage modes. For sku price inventory level storage, only the fixed price and inventory information of the item need to be stored, so usually only one data storage file is needed, that is, the price inventory level storage file, such as the sku level price and inventory table. For time period price level storage, it is necessary to store the price information and inventory information of multiple different time periods within the preset time length of the item, so usually a price inventory level storage file and a time period price level storage file are required. The price inventory level storage file is used to store the overall price and total inventory information of the item, and the time period price level storage file is used to store the price and inventory information of the item corresponding to each time period. In the embodiment of the present invention, the overall price can be the lowest price of the item.
[0079] In order to store the price information of items in a more fine-grained manner, for items whose storage mode is time period price level storage, the time periods in the preset time length can be divided into multiple levels. The embodiment of the present invention takes the division into two levels as an example, that is, the preset time length includes a first-level time period and a second-level time period. Specifically, the preset time length may include at least two consecutive first-level time periods, and the first-level time period may include multiple consecutive second-level time periods. For example, taking the preset time length of one week as an example, the first-level time period may be a time period divided by day, and the second-level time period may be divided by hour. For example, taking one day as a first-level time period, that is, the preset time length may include 7 first-level time periods, each first-level time period corresponds to one day, and each first-level time period is divided by hour, that is, each first-level time period can be divided into 24 second-level time periods.
[0080] In the embodiment of the present invention, the preset duration is greater than the duration of a day, the first-level time period is a time period divided by days, and each first-level time period is divided into a second-level time period by hours as an example for explanation, then the storage mode for the time period price level storage can also be divided into date price level storage and time price level storage, and the time period price level storage file can include a first-level time period price level storage file and a second-level time period price level storage file, the first-level time period price level storage file can include a date level price and inventory table, and the second-level time period price level storage file can include a time level price and inventory table. Among them, the price information corresponding to the date price level storage is the storage mode of items that change according to the first-level time period, and the price information corresponding to the time price level storage is the storage mode of items that change according to the second-level time period.
[0081] The embodiment of the present invention is explained by taking the storage mode including sku price inventory level storage, date price level storage and time price level storage as an example. For sku price inventory level storage, only the fixed price and inventory information of the item need to be stored, so usually only one data storage file is needed, that is, the price inventory level storage file, such as the sku level price and inventory table, which is used to store the price information and inventory information of the item. For date price level storage, it is necessary to store the price and inventory information of the item corresponding to the first-level time period, so usually a price inventory level storage file and a first-level time period price level storage file are needed, such as the sku level price and inventory table and the date level price and inventory table. The sku level price and inventory table is used to store the overall price and total inventory information of the item, and the date level price and inventory table is used to store the price and inventory information of the first-level time period of the item, wherein the overall price can be the lowest price of the item. For time-price level storage, it is necessary to store the price and inventory information of the second-level time period of the items, so usually price-inventory level storage files, first-level time period price-level storage files and second-level time period price-level storage files are required, such as sku-level price and inventory table, date-level price and inventory table and time-level price and inventory table. The sku-level price and inventory table is used to store the overall price and total inventory information of the items, the date-level price and inventory table is used to store the overall price and total inventory information of the items corresponding to each first-level time period, and the time-level price and inventory table is used to store the price and inventory information of the items corresponding to each second-level time period, where the overall price can be the lowest price of the item in the corresponding time period.
[0082] Based on the above structure, the specific structure diagram of the inventory system can be as follows Figure 1 As shown. Figure 1In the structure shown, the data input module can receive information for performing write operations on items, such as writing item information, inventory pre-occupancy backwash, inventory sorting, etc.; the data storage module stores data storage files corresponding to each storage mode; the data output module provides data input interface services to the outside world and can provide interfaces for various query information, such as price query and inventory query corresponding to each storage mode.
[0083] The embodiment of the present invention provides a method for storing item information. Figure 1 The inventory system shown is executed as Figure 2 As shown, the method includes the following steps.
[0084] S201: Receive an item identifier and target item information of a target item.
[0085] The target item information may include price information and inventory information of the target item. The target item indicates an item for which item information needs to be stored. The target item information is item information of the target item. The item identifier of the target item includes an identifier that can uniquely identify the target item.
[0086] When storing item information of each item, the inventory system can receive the item identification and the target item information of the target item. Since the item information stored in each storage mode in the embodiment of the present invention is different, the target item information in the received information is different.
[0087] S202: Determine a target storage mode corresponding to the target item according to the target item information.
[0088] In an embodiment of the present invention, the storage mode includes sku price inventory level storage and time period price level storage. The item information corresponding to the sku price inventory level storage may include the price and inventory of the target item. Since the price is a fixed price of the target item, the time parameter will not be included in the item information. The item information corresponding to the time period price level storage includes price information and inventory information of multiple different time periods within a preset time length, so as to meet the demand that the price information of the target item within the preset time length can change, so the item information includes a time parameter. Therefore, according to whether the target item information includes the time parameter, the target storage mode corresponding to the target item can be determined. The specific method is: determine whether the target item information includes the time parameter; if so, determine that the target storage mode corresponding to the target item is the time period price level storage; if not, determine that the target storage mode corresponding to the target item is the sku price inventory level storage.
[0089] S203: If the target storage mode is time period price level storage, query the data storage file corresponding to the target item according to the target storage mode and the item identifier.
[0090] Among them, Figure 1As shown, different storage modes usually correspond to different data storage files. After determining the target storage mode corresponding to the target item, in this step, the data storage file corresponding to the target item can be queried from each data storage file based on the target storage mode and item identification.
[0091] Specifically, if the target storage mode is time period price level storage, the target item information includes the price information and inventory quantity of the target item in different time periods within a preset time length. Therefore, when storing item information, price inventory level storage files and time period price level storage files are required. The price inventory level storage files and time period price level storage files can be queried through the item identifier.
[0092] In the embodiment of the present invention, the preset duration can be divided into multiple levels of time periods, such as the preset duration includes at least two consecutive first-level time periods, and the first-level time period includes multiple second-level time periods, that is, the preset duration is divided into two levels of time periods, and the time period price level storage file is also divided into two levels, namely, the first-level time period price level storage file and the second-level time period price level storage file. Therefore, when the price information and inventory of the target item in different time periods within the preset duration include the price information and inventory of the target item in each second-level time period, the time period price level storage file queried in this step will also include the first-level time period price level storage file and the second-level time period price level storage file. When the price information and inventory of the target item in different time periods within the preset duration include the price information and inventory of the target item in each second-level time period, the time period price level storage file queried in this step will also include the first-level time period price level storage file.
[0093] S204: Storing the target item information in a data storage file corresponding to the target item.
[0094] After obtaining the data storage file corresponding to the target item, the target item information can be directly stored in the data storage file corresponding to the target item.
[0095] Specifically, when the target storage mode is time period price level storage, the target item information includes the price information and inventory quantity of the target item in different time periods within the preset time length, and the data storage file includes the price inventory level storage file and the time period price level storage file corresponding to the target item. At this time, this step can be specifically performed as follows: according to the price information and inventory quantity of the target item in different time periods within the preset time length, determine the lowest price and total inventory information of the target item within the preset time length; store the lowest price and total inventory information in the price inventory level storage file; store the price information and inventory quantity of the target item in different time periods within the preset time length in the time period price level storage file.
[0096] When the target storage mode is time period price level storage, the time period price inventory level storage file is used to store the overall price and total inventory information of the target item, and the time period price level storage file is used to store the specific price information and specific inventory information of different time periods within the preset time length. In the embodiment of the present invention, the overall price of the target item is expressed as the lowest price of the target item within the preset time length, so in this step, the lowest price and total inventory information of the target item within the preset time length can be determined based on the price information and inventory quantity of the target item in different time periods within the preset time length; then the lowest price and total inventory information of the target item within the preset time length are stored in the price inventory level storage file; the price information and inventory quantity of the target item in different time periods within the preset time length are stored in the time period price level storage file.
[0097] In the embodiment of the present invention, the preset time length may include at least two consecutive first-level time periods, and the first-level time period may include one or more consecutive second-level time periods, that is, the preset time length is divided into two levels of time periods, and at this time, the time period price level storage file is also divided into two levels, namely, the first-level time period price level storage file and the second-level time period price level storage file. Therefore, when the price information of the target item in different time periods within the preset time length may include the price information of the target item in each second-level time period, the above-mentioned storage of the price information and inventory quantity of the target item in different time periods within the preset time length into the time period price level storage file may be specifically performed as follows: for each first-level time period, according to the price information and inventory quantity of the target item in each second-level time period, the minimum price and total inventory information of the first-level time period are determined, and the minimum price and total inventory information of the first-level time period are stored in the first-level time period price level storage file; the price information and inventory quantity of the target item in each second time period are stored in the second-level time period price level storage file.
[0098] The price information and inventory quantity of the target item in different time periods within a preset time length may include the price information and inventory quantity of the target item in each second-level time period, and the price information and inventory quantity of the target item in each second-level time period need to be stored through the first-level time period price level storage file and the second-level time period price level storage file, wherein the first-level time period price level storage file stores the overall price and total inventory information of the target item in each first-level time period, and the second-level time period price level storage file stores the specific price information and specific inventory quantity of the target item in each second-level time period. In the embodiment of the present invention, for each first-level time period, the overall price is represented by the lowest price, so according to the price information of the target item in different time periods within the preset time length, the lowest price and total inventory information of the first-level time period are determined, and the lowest price and total inventory information of the first-level time period are stored in the corresponding first-level time price level storage file.
[0099] In one implementation of the embodiment of the present invention, the inventory system can also provide a data query of the target item for the display terminal. Specifically, it can be: receiving a query request sent by the display terminal, the query request including the item identification of the target item and the query request information; determining the target storage mode corresponding to the target item according to the query request information; querying the data corresponding to the query request from the data storage file corresponding to the item identification according to the target storage mode corresponding to the target item and the query request information; and sending the data corresponding to the query request to the display terminal.
[0100] When the display terminal or the like needs the data of the target item, it can send a query request to the inventory system. The query request includes the item identification of the target item and the query request information. For example, if the display terminal needs the price, the query request information may include price-related information. Since different storage modes correspond to different data storage files, this step can determine the target storage mode corresponding to the target item according to the query request information. The method of determining the target storage mode corresponding to the target item according to the query request information in this step can be the same as the method of determining the target storage mode corresponding to the target item according to the target item information in step S202. After determining the storage mode of the target item, the data storage file corresponding to the item identification can be queried, and the data corresponding to the query request can be queried, and then the data corresponding to the query request can be sent to the display terminal.
[0101] For example, the display terminal requires a price. Since the price of the target item is different at different times, the inventory system can first determine the time information corresponding to the query request after receiving the price query request, and then query the price information of the target item from the data storage file corresponding to the item identifier based on the time information corresponding to the price query request, that is, the price of the target item at the time corresponding to the price query request, and then return the queried price information to the display terminal.
[0102] In the embodiment of the present invention, the storage mode includes time period price level storage, and the corresponding item information of the time period price level storage may include price information and inventory information of multiple different time periods within a preset time length; therefore, after receiving the item identification and target item information of the target item, the target storage mode corresponding to the target item can be determined according to the target item information; for the target item whose target storage mode is time period price level storage, the target item information, that is, the price information and inventory quantity of the target item in different time periods within the preset time length, can be stored in the data storage file corresponding to the target item. In this way, when the target storage mode is time period price level storage, the price information of the target item in multiple different time periods within the preset time length can be stored, thereby realizing the demand that the price information of the target item within the preset time length can change, without the need to frequently change the item information, the operation is simple, and the burden of data processing is reduced.
[0103] Combination Figure 1 The structure of the inventory system shown and Figure 2 In the embodiment shown, the present invention takes the storage mode including sku price inventory level storage, date price level storage and time price level storage as an example to illustrate the storage method of item information. Figure 3 As shown, the method includes the following steps.
[0104] S301: Receive an item identifier and target item information of a target item.
[0105] like Figure 1 As shown, the data input module in the inventory system is the data entry, and the item identification and target item information of the target item can be received by calling the inventory and price adding interface.
[0106] S302: Determine a target storage mode corresponding to the target item according to the target item information.
[0107] Among them, the storage modes include sku price inventory level storage, date price level storage and time price level storage. In the sku price inventory level storage mode, the price is fixed, so the target item information does not include the time parameter, only the price and inventory; in the date price level storage mode, the price is differentiated according to the first-level time period, that is, the target item information needs to include the time parameter of the first-level time period, that is, the date parameter of a certain year, month and day, so the target item information includes the time parameter of the first-level time period, the price and inventory corresponding to each time period; in the time price level storage mode, the price is differentiated according to the second-level time period, that is, the target item information needs to include the time parameter of the second-level time period, that is, the time parameter of a certain year, month, day and time, so the target item information only includes the time parameter of the second-level time period, the price and inventory corresponding to each time period.
[0108] Based on the above content, in this step, the target storage mode corresponding to the target item can be determined according to whether the target item information includes a time parameter and which time parameter is included.
[0109] It should be noted that if the target item information includes parameters that do not conform to the parameters included in the item information corresponding to the above storage mode, it can be determined that the target item information is wrong and the process ends.
[0110] S303: If the target storage mode is sku price inventory level storage, query the sku level price and inventory table corresponding to the target item according to the sku price inventory level storage and the item identifier.
[0111] For the sku price inventory level storage mode, the item information is stored in the sku level price and inventory table. The sku level price and inventory table usually includes the item ID, price and inventory quantity. Specifically, the structure of the sku level price and inventory table can be as follows Figure 4 shown.
[0112] Figure 4 In the example, skuLevelId represents the primary key of the sku level price and inventory table, wareId represents the identifier of the item to which the target item belongs, skuId represents the identifier of the target item, price represents the price of the target item, stock represents the inventory of the target item, and preStock represents the pre-occupied inventory of the target item. In the embodiment of the present invention, the item identifier may include wareId and skuId. In the e-commerce field and system, sku usually refers to the smallest inventory unit that can be sold for a specific item.
[0113] S304: Store the item information of the target item into the sku-level price and inventory table corresponding to the target item.
[0114] For example, if the target item is a red A model, B brand mobile phone, that is, the item identifier of the target item is the red A model, B brand mobile phone identifier, the target item belongs to the A model, B brand mobile phone identifier, the price is 1000, the target item inventory is 30, and the target item pre-occupied inventory is 5, the result after storage is as follows Figure 4 shown.
[0115] After this step, you can end the process.
[0116] S305: If the target storage mode is date-price level storage, then according to the date-price level storage and the item identifier, the sku-level price and inventory table and the date-level price and inventory table corresponding to the target item are queried.
[0117] For the date-price level storage mode, item information is stored in the sku-level price and inventory table and the date-level price and inventory table. The sku-level price and inventory table is used to store the target item's item ID, minimum price, and total inventory. The date-level price and inventory table is used to store the specific price and specific inventory corresponding to each first-level time period within the preset duration of the target item. Specifically, the structure of the sku-level price and inventory table and the date-level price and inventory table can be as follows: Figure 5 shown.
[0118] Figure 5In the sku-level price and inventory table, skuLevelId indicates the primary key of the sku-level price and inventory table, wareId indicates the identifier of the item to which the target item belongs, skuId indicates the identifier of the target item, price indicates the lowest price of the target item, stock indicates the total inventory of the target item, and preStock indicates the total pre-occupied inventory of the target item. In the date-level price and inventory table, dateLevelId indicates the primary key of the date-level price and inventory table, skuLevelId indicates the primary key corresponding to the target item in the sku-level price and inventory table, date indicates the specific time of the first-level time period, wareId indicates the identifier of the item to which the target item belongs, skuId indicates the identifier of the target item, price indicates the price corresponding to the target item in the first-level time period, stock indicates the inventory corresponding to the target item in the first-level time period, and preStock indicates the pre-occupied inventory corresponding to the target item in the first-level time period.
[0119] S306: storing the item information of the target item into the sku-level price and inventory table and the date-level price and inventory table corresponding to the target item.
[0120] This step requires first calculating the minimum price and total inventory of the target item based on the target item information, and then storing the minimum price and total inventory of the target item in the sku-level price and inventory table, and storing the specific price and specific inventory corresponding to each first-level time period within the preset time length in the date-level price and inventory table.
[0121] Take the target item as a red A model, B brand mobile phone as an example. The target item belongs to the logo of A model, B brand mobile phone. The price of the target item on December 1, 2019 is 2000, the inventory is 5, and the reserved inventory is 1. The price of the target item on December 2, 2019 is 1000, the inventory is 10, and the reserved inventory is 2. The price of the target item on December 3, 2019 is 1500, the inventory is 15, and the reserved inventory is 3. From the above, it can be calculated that the lowest price of the target item is 1000, the total inventory of the target item is 30, and the reserved inventory of the target item is 6. The result after storage is as follows Figure 5 shown.
[0122] After this step, you can end the process.
[0123] S307: If the target storage mode is time-price level storage, then query the sku-level price and inventory table, date-level price and inventory table, and time-level price and inventory table corresponding to the target item according to the time period price-level storage and item identification.
[0124] Among them, for the time-price level storage mode, the item information is stored in the sku-level price and inventory table, the date-level price and inventory table, and the time-level price and inventory table. The sku-level price and inventory table is used to store the target item's item identification, minimum price, and total inventory. The date-level price and inventory table is used to store the minimum price and total inventory corresponding to each first-level time period within a preset time length of the target item. The time-level price and inventory table is used to store the price and inventory corresponding to each second-level time period of the target item. Specifically, the structure of the sku-level price and inventory table, the date-level price and inventory table, and the time-level price and inventory table can be as follows Figure 6 shown.
[0125] Figure 6 In the sku-level price and inventory table, skuLevelId indicates the primary key of the sku-level price and inventory table, wareId indicates the identifier of the item to which the target item belongs, skuId indicates the identifier of the target item, price indicates the lowest price of the target item, stock indicates the total inventory of the target item, and preStock indicates the total pre-occupied inventory of the target item. In the date-level price and inventory table, dateLevelId indicates the primary key of the date-level price and inventory table, skuLevelId indicates the primary key corresponding to the target item in the sku-level price and inventory table, date indicates the specific time of the first-level time period, wareId indicates the identifier of the item to which the target item belongs, skuId indicates the identifier of the target item, price indicates the lowest price corresponding to the target item in the first-level time period, stock indicates the total inventory corresponding to the target item in the first-level time period, and preStock indicates the pre-occupied inventory corresponding to the target item in the first-level time period. In the time-level price and inventory table, timeLevelId represents the primary key of the time-level price and inventory table, dateLevelId represents the primary key of the target item in the date-level price and inventory table, date represents the specific time of the second-level time period, wareId represents the ID of the item to which the target item belongs, skuId represents the ID of the target item, price represents the price of the target item in the second-level time period, stock represents the inventory of the target item in the second-level time period, and preStock represents the pre-occupied inventory of the target item in the second-level time period.
[0126] S308: storing the item information of the target item into the sku-level price and inventory table, the date-level price and inventory table, and the time-level price and inventory table corresponding to the target item.
[0127] This step requires first calculating the lowest price and total inventory of the target item, as well as the lowest price and total inventory corresponding to each first-level time period based on the target item information, and then storing the lowest price and total inventory of the target item in the sku-level price and inventory table, storing the lowest price and total inventory corresponding to each first-level time period in the date-level price and inventory table, and storing the specific price and specific inventory corresponding to each second-level time period within the preset time length in the time-level price and inventory table.
[0128] The target item is a red A-type, B-brand mobile phone; the target item belongs to the logo of A-type, B-brand mobile phone; the target item on December 3, 2019: the price at 8:00 is 2000, the inventory is 2, and the reserved inventory is 1, the price at 9:00 is 2100, the inventory is 10, the reserved inventory is 1, and the price at 10:00 is 1500, the inventory is 2, and the reserved inventory is 1; the price of the target item on December 2, 2019 is 1000, the inventory is 10, and the reserved inventory is 2; the price of the target item on December 1, 2019 is 1500, the inventory is 15, and the reserved inventory is 1. From the above, we can calculate that the lowest price of the target item is 1000, the total inventory of the target item is 30, and the reserved inventory of the target item is 6. The result after storage is as follows Figure 6 shown.
[0129] After this step, you can end the process.
[0130] In an embodiment of the present invention, when the target storage mode is time period price level storage, the price information of the target item in multiple different time periods within a preset time period can be stored, thereby realizing the demand that the price information of the target item within the preset time period can change. There is no need to frequently change the item information, the operation is simple, and the burden of data processing is reduced.
[0131] After the inventory system stores the target item information, it can also pre-occupy the inventory according to the item order information. Figure 2 and Figure 3 The embodiment shown in the figure illustrates a method for processing inventory pre-occupancy of items in an inventory system, taking the adjustment of the inventory of a target object as an example, such as Figure 7 As shown, the method includes the following steps.
[0132] S701: Receive order information of target items.
[0133] The order information includes the item ID and the reserved inventory information of the target item. The reserved inventory information may include different parameters according to different storage modes of the target item.
[0134] The storage modes include sku price inventory level storage, date price level storage and time price level storage. For the storage mode of sku price inventory level storage, the pre-occupied inventory information only includes the quantity of pre-occupied inventory, but does not include the time parameter. For the storage mode of date price level storage, the pre-occupied inventory information includes not only the quantity of pre-occupied inventory, but also the time parameter of the first-level time period corresponding to the pre-occupied inventory. For the storage mode of time price level storage, the pre-occupied inventory information includes not only the quantity of pre-occupied inventory, but also the time parameter of the second-level time period corresponding to the pre-occupied inventory.
[0135] S702: Determine the storage mode of the target item according to the order information.
[0136] Since the pre-occupied inventory information includes different parameters according to different storage modes of the target items, the storage mode of the target items can be determined according to the parameters included in the pre-occupied inventory information.
[0137] S703: If the target storage mode is sku price inventory level storage, determine whether the sku level price corresponding to the target item and the inventory quantity in the inventory table meet the demand based on the reserved inventory information. If so, execute step S704; if not, end the process.
[0138] If the target storage mode is sku price inventory level storage, the sku level price and inventory table corresponding to the target item can be queried based on the sku price inventory level storage and item identification. Then, determine whether the current pre-occupied inventory demand is met based on the inventory and pre-occupied inventory in the sku level price and inventory table. If the pre-occupied inventory in the sku level price and inventory table is greater than 0, it means that pre-occupied inventory already exists for the target item. Therefore, the inventory that can be pre-occupied this time should be the inventory in the sku level price and inventory table minus the pre-occupied inventory in the sku level price and inventory table, that is, the inventory that can be pre-occupied this time is the value of stock-preStock in the sku level price and inventory table. In this step, the pre-occupied inventory information can be used to determine the pre-occupied inventory quantity. Taking the pre-occupied inventory quantity of 2 as an example, in this step, it can be determined whether the sku-level price and the value of stock-preStock in the inventory table are greater than or equal to 2. If so, it means that the sku-level price corresponding to the target item and the inventory quantity in the inventory table meet the demand for the pre-occupied inventory, and step S704 is executed; if not, it means that the sku-level price corresponding to the target item and the inventory quantity in the inventory table cannot meet the demand for the pre-occupied inventory, that is, the inventory is insufficient, and the process ends.
[0139] S704: Update the sku level price and the reserved inventory quantity in the inventory table according to the reserved inventory information.
[0140] After determining that the sku-level price and the inventory quantity in the inventory table corresponding to the target item meet the demand for this reserved inventory, the sku-level price and the reserved inventory quantity in the inventory table can be increased by the reserved inventory quantity in the reserved inventory information, that is, the sku-level price and the reserved inventory quantity in the inventory table are updated.
[0141] For example, the identification of the target item is 20001, and the reserved inventory quantity in the reserved inventory information is 5. Figure 8 This is a schematic diagram of the target item's price and item information stored in the sku level table. Figure 8 It can be seen that the sku-level price and the inventory quantity in the inventory table are 100, and the reserved inventory quantity is 0. The inventory quantity that can be reserved this time is 100-0=100, which is greater than or equal to 5. Therefore, it can be determined that the sku-level price and the inventory quantity in the inventory table corresponding to the target item meet the demand. In this step, the sku-level price and the reserved inventory quantity in the inventory table can be updated, that is, the reserved inventory quantity is increased by 5. The updated result is as follows Fig. 9 shown.
[0142] After the inventory is successfully reserved, the inventory system can record the order ID corresponding to this inventory reservation operation as the unique identifier of this inventory reservation operation, and can record the reserved quantity and target item information.
[0143] S705: If the target storage mode is date-price level storage, determine whether the date-level price of the target item and the inventory quantity in the corresponding time period in the inventory table meet the demand based on the reserved inventory information. If so, execute step S704; if not, end the process.
[0144] If the target storage mode is date-price level storage, the sku-level price and inventory table and date-level price and inventory table corresponding to the target item can be queried according to the date-price level storage and item identification. Determine the first-level time period corresponding to the date-level price and inventory table according to the time parameter in the pre-occupied inventory information, and then determine the inventory and pre-occupied inventory corresponding to the first-level time period, and then determine whether the pre-occupied inventory demand is met based on the inventory and pre-occupied inventory corresponding to the first-level time period. If the pre-occupied inventory corresponding to the first-level time period is greater than 0, it means that pre-occupied inventory already exists in the first-level time period. Therefore, the inventory that can be pre-occupied this time should be the inventory corresponding to the first-level time period minus the pre-occupied inventory corresponding to the first-level time period, that is, the inventory that can be pre-occupied this time is the stock-preStock value corresponding to the first-level time period. In this step, the pre-occupied inventory quantity can be determined through the pre-occupied inventory information. Taking the pre-occupied inventory quantity of 2 as an example, in this step, it can be determined whether the stock-preStock value corresponding to the first-level time period is greater than or equal to 2. If so, it means that the date-level price of the target item and the inventory quantity in the corresponding time period in the inventory table meet the pre-occupied inventory demand this time, and step S706 is executed; if not, it means that the date-level price of the target item and the inventory quantity in the corresponding time period in the inventory table do not meet the pre-occupied inventory demand this time, that is, the inventory is insufficient, and the process ends.
[0145] S706: Update the reserved inventory quantity in the sku-level price and inventory table and the date-level price and inventory table according to the reserved inventory information.
[0146] After determining that the target item's date-level price and inventory quantity in the corresponding time period in the inventory table meet the demand, the reserved inventory quantity in the sku-level price and inventory table can be increased by the reserved inventory quantity in the reserved inventory information, and the reserved inventory quantity in the corresponding time period in the date-level price and inventory table can be increased by the reserved inventory quantity in the reserved inventory information, that is, the reserved inventory quantity in the sku-level price and inventory table and the date-level price and inventory table.
[0147] After the inventory is successfully reserved, the inventory system can record the order ID corresponding to this inventory reservation operation as the unique identifier of this inventory reservation operation, and can record the reserved quantity and target item information.
[0148] S707: If the target storage mode is time-price level storage, determine whether the time-level price of the target item and the inventory quantity in the corresponding time period in the inventory table meet the demand based on the reserved inventory information. If so, execute step S704; if not, end the process.
[0149] If the target storage mode is time-price level storage, the sku-level price and inventory table, date-level price and inventory table, and time-level price and inventory table corresponding to the target item can be queried according to the time-price level storage and item identification. Determine the corresponding second-level time period in the time-level price and inventory table according to the time parameter in the pre-occupied inventory information, and then determine the inventory and pre-occupied inventory corresponding to the second-level time period, and then determine whether the current pre-occupied inventory demand is met based on the inventory and pre-occupied inventory corresponding to the second-level time period. If the pre-occupied inventory corresponding to the second-level time period is greater than 0, it means that the second-level time period already has pre-occupied inventory, so the inventory that can be pre-occupied this time should be the inventory corresponding to the second-level time period minus the pre-occupied inventory corresponding to the second-level time period, that is, the inventory that can be pre-occupied this time is the stock-preStock value corresponding to the second-level time period. In this step, the pre-occupied inventory information can be used to determine the pre-occupied inventory quantity. For example, if the pre-occupied inventory quantity is 2, it can be determined in this step whether the stock-preStock value corresponding to the second-level time period is greater than or equal to 2. If so, it means that the date-level price of the target item and the inventory quantity in the corresponding time period in the inventory table meet the pre-occupied inventory demand, and step S708 is executed; if not, it means that the date-level price of the target item and the inventory quantity in the corresponding time period in the inventory table do not meet the pre-occupied inventory demand, that is, the inventory is insufficient, and the process ends.
[0150] S708: Update the reserved inventory quantity in the sku-level price and inventory table, the date-level price and inventory table, and the time-level price and inventory table according to the reserved inventory information.
[0151] According to the time parameter in the reserved inventory information, the corresponding time period in the date-level price and inventory table and the corresponding time period in the time-level price and inventory table of this reserved inventory can be determined.
[0152] After determining that the target item's time-level price and inventory quantity in the corresponding time period in the inventory table meet the demand, the reserved inventory quantity in the sku-level price and inventory table can be increased by the reserved inventory quantity in the reserved inventory information, the reserved inventory quantity in the corresponding time period in the date-level price and inventory table can be increased by the reserved inventory quantity in the reserved inventory information, and the reserved inventory quantity in the corresponding time period in the time-level price and inventory table can be increased by the reserved inventory quantity in the reserved inventory information, that is, the reserved inventory quantity in the sku-level price and inventory table, the date-level price and inventory table and the time-level price and inventory table.
[0153] After the inventory is successfully reserved, the inventory system can record the order ID corresponding to this inventory reservation operation as the unique identifier of this inventory reservation operation, and can record the reserved quantity and target item information.
[0154] It should be noted that after the above-mentioned pre-occupied inventory is successful, if the order is successful, it is necessary to perform inventory deductions, that is, to perform real deduction operations on the pre-occupied inventory. Specifically, when deducting inventory, you can use the order ID of the pre-occupied inventory to query the corresponding item ID and pre-occupied inventory quantity, that is, the current deduction quantity, and then deduct the inventory. The specific operation is to reduce the corresponding inventory quantity by the current deduction quantity, and at the same time reduce the current deduction quantity from the pre-occupied quantity. For example, for Fig. 9 The result after the reserved inventory processing is shown. After the inventory deduction is performed, it can be obtained Fig.10 The deduction result is shown. In an embodiment of the present invention, after the above-mentioned pre-occupied inventory is successful, inventory backwash can also be performed. Inventory backwash is the opposite operation of the corresponding inventory deduction. Inventory backwash refers to the need to backwash the pre-occupied inventory due to payment failure and other reasons, and release the pre-occupied inventory. Similar to inventory deduction, when backwashing inventory, the order ID of the pre-occupied inventory can be used to query the item ID and the pre-occupied inventory quantity corresponding to the pre-occupied inventory, that is, the current backwash quantity, and then backwash the inventory. The specific operation is to reduce the current backwash quantity from the pre-occupied quantity. For example, for Fig. 9 The result after the reserved inventory processing is shown. After the inventory backflush is performed, Fig.11 Results shown.
[0155] In the embodiment of the present invention, the inventory system can also be scheduled. The scheduled inventory arrangement is a scheduled task for the storage mode of date price level storage and time price level storage, and its function is to automatically set the inventory before the current time to an unavailable state. Because in the display and sales scenario of items, the inventory before the current time is meaningless, for example, it is impossible to book yesterday's movie tickets today, so the embodiment of the present invention automatically sets the inventory before the current time to an unavailable state through a scheduled task.
[0156] There are two types of scheduled tasks for scheduled inventory sorting. One is to sort out the storage mode of date-price level storage. This scheduled task can be set to sort out at midnight every night, and set the inventory corresponding to the time period before the current date to an unavailable state. The other is to sort out the storage mode of time-price level storage. This scheduled task can be set to sort out at every hour, and set the inventory corresponding to the time period before the current time point to an unavailable state.
[0157] In the embodiment of the present invention, various processing of inventory can be achieved through the above process, thereby achieving the accuracy of item information in the inventory system.
[0158] It should be noted that, combined with Figure 1In the structure shown, the data output module in the inventory system provides a standardized output interface to the outside, which can determine the storage mode of the item corresponding to the query request according to the different parameters included in the received query request, and then return the result corresponding to the storage mode. For example, if the query request only includes the item identification but not the time parameter, the storage mode corresponding to the query request is sku price inventory level storage, so the returned parameters are the data in the corresponding sku level price and inventory table; if the query request includes the item identification and the time parameter of the first level time period, the storage mode corresponding to the query request is date price level storage, so the returned parameters are the data in the corresponding sku level price and inventory table and date level price and inventory table; if the query request includes the item identification and the time parameter of the second level time period, the storage mode corresponding to the query request is time price level storage, so the returned parameters are the data in the corresponding sku level price and inventory table, date level price and inventory table and time level price and inventory table.
[0159] The inventory system receives a query request to query the item information of an item. The query request may include an item identifier and a parameter indicating a storage mode. After querying the corresponding data, the inventory system may return the data in the form of nested objects. For example, the first layer of the returned data is the data stored in the sku-level price and inventory table. The data in the date-level price and inventory storage table are nested in the first layer, which is the second layer. If the date-level price and inventory storage table includes multiple data items, multiple second layers are nested in parallel in the first layer. The data in the time-level price and inventory storage table are nested in the second layer, which is the third layer. If the time-level price and inventory storage table includes multiple data items, multiple third layers are nested in parallel in the first layer. Fig.12 The following is a schematic diagram of the return parameters.
[0160] In order to solve the problems existing in the prior art, the embodiment of the present invention provides a device 1300 for storing item information, such as Fig.13 As shown, the device 1300 includes:
[0161] The receiving unit 1301 is used to receive the object identification and the object information of the target object;
[0162] The determining unit 1302 is used to determine the target storage mode corresponding to the target item according to the target item information, wherein the storage mode includes time period price level storage, and the item information corresponding to the time period price level storage includes price information and inventory information of multiple different time periods within a preset time period;
[0163] A query unit 1303 is configured to query a data storage file corresponding to the target item according to the target storage mode and the item identifier if the target storage mode is the time period price level storage;
[0164] The storage unit 1304 is used to store the target item information in a data storage file corresponding to the target item.
[0165] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 2 The method of the illustrated embodiment is the same and will not be repeated here.
[0166] In an implementation of the embodiment of the present invention, if the target storage mode is time period price level storage, the target item information includes price information and inventory quantity of the target item in different time periods within a preset time period, and the data storage file includes a price inventory level storage file and a time period price level storage file corresponding to the target item;
[0167] The storage unit 1304 is specifically used for:
[0168] Determine the lowest price and total inventory information of the target item within the preset time period according to the price information and inventory quantity of the target item in different time periods within the preset time period;
[0169] Storing the lowest price and the total inventory information in the price-inventory level storage file;
[0170] The price information and inventory quantity of the target item in different time periods within a preset time period are stored in the time period price level storage file.
[0171] In another implementation of the embodiment of the present invention, the preset time length includes at least two consecutive first-level time periods, the first-level time period includes multiple second-level time periods, the price information and inventory quantity of the target item in different time periods within the preset time length include the price information and inventory quantity of the target item in each of the second-level time periods; the time period price level storage file includes a first-level time period price level storage file and a second-level time period price level storage file;
[0172] The storage unit 1304 is specifically used for:
[0173] For each first-level time period, determine the lowest price and total inventory information of the first-level time period according to the price information and inventory quantity of the target item in each second-level time period, and store the lowest price and total inventory information of the first-level time period in the first-level time period price level storage file;
[0174] The price information and inventory quantity of the target item in each of the second time periods are stored in the second-level time period price level storage file.
[0175] In another implementation of the embodiment of the present invention, the determining unit 1302 is specifically configured to:
[0176] Determining whether the target item information includes a time parameter;
[0177] If yes, determining that the target storage mode corresponding to the target item is time period price level storage;
[0178] If not, it is determined that the target storage mode corresponding to the target item is sku price inventory level storage, and the item information corresponding to the sku price inventory level storage includes the fixed price and inventory information of the item.
[0179] In another implementation of the embodiment of the present invention, the receiving unit 1301 is further configured to receive a query request sent by a display terminal, wherein the query request includes an item identifier of the target item and query request information;
[0180] The determining unit 1302 is further configured to determine a target storage mode corresponding to the target item according to the query request information;
[0181] The query unit 1303 is further configured to query data corresponding to the query request from the data storage file corresponding to the item identifier according to the target storage mode corresponding to the target item and the query request information;
[0182] The device 1300 further includes:
[0183] A sending unit is used to send the data corresponding to the query request to the display terminal.
[0184] In another implementation of the embodiment of the present invention, the receiving unit 1301 is further configured to receive order information corresponding to the target item;
[0185] The device 1300 further includes:
[0186] An updating unit is used to update the inventory quantity in the data storage file according to the order information.
[0187] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 2 , Figure 3 or Figure 7 The method of the illustrated embodiment is the same and will not be repeated here.
[0188] In an embodiment of the present invention, when the target storage mode is time period price level storage, the price information of the target item in multiple different time periods within a preset time period can be stored, thereby realizing the demand that the price information of the target item within the preset time period can change. There is no need to frequently change the item information, the operation is simple, and the burden of data processing is reduced.
[0189] According to an embodiment of the present invention, the present invention also provides an electronic device and a readable storage medium.
[0190] The electronic device of the present invention comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the method for storing item information provided in an embodiment of the present invention.
[0191] Fig.14 An exemplary system architecture 1400 is shown to which the method for storing item information or the device for storing item information according to the embodiment of the present invention can be applied.
[0192] like Fig.14 As shown, system architecture 1400 may include terminal devices 1401, 1402, 1403, a network 1404, and a server 1405. Network 1404 is used to provide a medium for communication links between terminal devices 1401, 1402, 1403 and server 1405. Network 1404 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0193] Users can use terminal devices 1401, 1402, 1403 to interact with server 1405 through network 1404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 1401, 1402, 1403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0194] The terminal devices 1401 , 1402 , and 1403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0195] The server 1405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 1401, 1402, and 1403. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as product information - only an example) to the terminal device.
[0196] It should be noted that the method for storing item information provided in the embodiment of the present invention is generally executed by the server 1405 , and accordingly, the storage device for item information is generally set in the server 1405 .
[0197] It should be understood that Fig.14The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0198] Reference below Fig.15 , which shows a schematic diagram of the structure of a computer system 1500 suitable for implementing an embodiment of the present invention. Fig.15 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0199] like Fig.15 As shown, the computer system 1500 includes a central processing unit (CPU) 1501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1502 or a program loaded from a storage part 1508 into a random access memory (RAM) 1503. In the RAM 1503, various programs and data required for the operation of the system 1500 are also stored. The CPU 1501, the ROM 1502, and the RAM 1503 are connected to each other through a bus 1504. An input / output (I / O) interface 1505 is also connected to the bus 1504.
[0200] The following components are connected to the I / O interface 1505: an input section 1506 including a keyboard, a mouse, etc.; an output section 1507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1508 including a hard disk, etc.; and a communication section 1509 including a network interface card such as a LAN card, a modem, etc. The communication section 1509 performs communication processing via a network such as the Internet. A drive 1510 is also connected to the I / O interface 1505 as needed. A removable medium 1511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1510 as needed, so that a computer program read therefrom is installed into the storage section 1508 as needed.
[0201] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1509, and / or installed from the removable medium 1511. When the computer program is executed by the central processing unit (CPU) 1501, the above-mentioned functions defined in the system of the present invention are executed.
[0202] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0203] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a unit, a program segment, or a part of a code, and the above-mentioned unit, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0204] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be arranged in a processor, for example, it may be described as: a processor includes a receiving unit, a determining unit, a query unit and a storage unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the receiving unit may also be described as a "unit of the function of the receiving unit".
[0205] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes the method for storing item information provided by the present invention.
[0206] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for storing item information, characterized in that: include: receiving an item identifier and target item information of a target item, wherein the target item indicates an item for which item information needs to be stored, and the target item information includes price information and inventory information of the target item; Determining the target storage mode corresponding to the target item according to the target item information includes: judging whether the target item information includes a time parameter; if so, determining that the target storage mode corresponding to the target item is time period price level storage; if not, determining that the target storage mode corresponding to the target item is sku price inventory level storage, wherein the item information corresponding to the sku price inventory level storage includes a fixed price and inventory information of the item; wherein the item information corresponding to the time period price level storage includes price information and inventory information of multiple different time periods within a preset time period; If the target storage mode is the time period price level storage, querying the data storage file corresponding to the target item according to the target storage mode and the item identifier; The target item information is stored in a data storage file corresponding to the target item; if the target storage mode is time period price level storage, the target item information includes the price information and inventory quantity of the target item in different time periods within a preset time period, and the data storage file includes a price inventory level storage file and a time period price level storage file corresponding to the target item; The step of storing the target item information in a data storage file corresponding to the target item includes: Determine the lowest price and total inventory information of the target item within the preset time period according to the price information and inventory quantity of the target item in different time periods within the preset time period; Storing the lowest price and the total inventory information in the price-inventory level storage file; The price information and inventory quantity of the target item in different time periods within a preset time period are stored in the time period price level storage file.
2. The method according to claim 1, characterized in that: The preset time length includes at least two consecutive first-level time periods, the first-level time period includes multiple second-level time periods, the price information and inventory quantity of the target item in different time periods within the preset time length include the price information and inventory quantity of the target item in each of the second-level time periods; the time period price level storage file includes a first-level time period price level storage file and a second-level time period price level storage file; The step of storing the price information and inventory quantity of the target item in different time periods within a preset time period into the time period price level storage file includes: For each first-level time period, determine the lowest price and total inventory information of the first-level time period according to the price information and inventory quantity of the target item in each second-level time period, and store the lowest price and total inventory information of the first-level time period in the first-level time period price level storage file; The price information and inventory quantity of the target item in each of the second time periods are stored in the second-level time period price level storage file.
3. The method according to claim 1, characterized in that After storing the target item information in the data storage file corresponding to the target item, the method further includes: receiving a query request sent by a display terminal, wherein the query request includes an item identifier of the target item and query request information; Determining a target storage mode corresponding to the target item according to the query request information; According to the target storage mode corresponding to the target item and the query request information, querying the data corresponding to the query request from the data storage file corresponding to the item identifier; The data corresponding to the query request is sent to the display terminal.
4. The method according to claim 1, characterized in that: After storing the target item information in the data storage file corresponding to the target item, the method further includes: Receiving order information corresponding to the target item; The inventory quantity in the data storage file is updated according to the order information.
5. A storage device for item information, characterized in that: include: A receiving unit, configured to receive an item identifier and target item information of a target item, wherein the target item indicates an item for which item information needs to be stored, and the target item information includes price information and inventory information of the target item; A determination unit is used to determine the target storage mode corresponding to the target item according to the target item information, including: judging whether the target item information includes a time parameter; if so, determining that the target storage mode corresponding to the target item is time period price level storage; if not, determining that the target storage mode corresponding to the target item is sku price inventory level storage, wherein the item information corresponding to the sku price inventory level storage includes a fixed price and inventory information of the item; wherein the item information corresponding to the time period price level storage includes price information and inventory information of multiple different time periods within a preset time period; A query unit, configured to query a data storage file corresponding to the target item according to the target storage mode and the item identifier if the target storage mode is the time period price level storage; A storage unit, used to store the target item information in a data storage file corresponding to the target item; If the target storage mode is time period price level storage, the target item information includes the price information and inventory quantity of the target item in multiple different time periods within a preset time period, and the data storage file includes the price inventory level storage file and the time price level storage file corresponding to the target item; The storage unit is specifically used for: Determine the lowest price and total inventory information of the target item within the preset time period according to the price information and inventory quantity of the target item in different time periods within the preset time period; The lowest price and the total inventory of the target item within a preset period of time are stored in a price-inventory level storage file; The price information and inventory quantity of the target item in different time periods within a preset time period are stored in the time-price level storage file.
6. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
7. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
