CN109739865B - Commodity data processing method and device - Google Patents

Commodity data processing method and device Download PDF

Info

Publication number
CN109739865B
CN109739865B CN201811418359.5A CN201811418359A CN109739865B CN 109739865 B CN109739865 B CN 109739865B CN 201811418359 A CN201811418359 A CN 201811418359A CN 109739865 B CN109739865 B CN 109739865B
Authority
CN
China
Prior art keywords
commodity
inventory
commodity data
time
time axis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811418359.5A
Other languages
Chinese (zh)
Other versions
CN109739865A (en
Inventor
李泽源
彭更红
汤恩清
杨慧强
兰杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Koubei Shanghai Information Technology Co Ltd
Original Assignee
Koubei Shanghai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Koubei Shanghai Information Technology Co Ltd filed Critical Koubei Shanghai Information Technology Co Ltd
Priority to CN201811418359.5A priority Critical patent/CN109739865B/en
Publication of CN109739865A publication Critical patent/CN109739865A/en
Application granted granted Critical
Publication of CN109739865B publication Critical patent/CN109739865B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a device for processing commodity data, relates to the technical field of data processing, and can reduce the redundancy of commodity data in inventory and reduce the storage pressure of the inventory. The method comprises the following steps: acquiring the storage time granularity of commodity data; generating a time axis of the commodity data within a preset time length by taking the storage time granularity of the commodity data as a unit, wherein the time axis records inventory state identification of the commodity data on the storage time granularity; storing the commodity data into inventory in a time axis form according to the inventory state identification; and when the processing request is received, updating the inventory state identification of the commodity data in the inventory on the time axis according to the preset inventory rule.

Description

Commodity data processing method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing commodity data.
Background
Through the Internet platform, a merchant can publish own commodities on the Internet, and a user can purchase required commodities through the Internet platform to realize commodity transaction, wherein the commodities can be entity commodities or service commodities.
When a user purchases a commodity of a predetermined type with a required date, such as a predetermined air ticket, a predetermined housing, a predetermined site and the like, the user needs to select the commodity and select the predetermined date, the site, the number of persons participating and the like corresponding to the commodity. Therefore, when storing commodity data of a date reservation class, attribute information such as corresponding commodities and reservation dates needs to be stored, the commodity data of each date can be stored into the stock according to a specific format according to the time granularity of commodity purchase, and once a commodity query or a commodity order is received, the commodity data in the stock can be conveniently processed.
However, in the prior art, in the process of storing date reservation type commodity data, the thickness of time granularity is ignored, and commodity data of a corresponding time interval is created in each time interval, so that each commodity data in the inventory is distributed over a plurality of time intervals, and as time passes, a lot of commodity data in the time intervals which are not reserved or are expired exist in the inventory, so that the commodity data in the inventory are redundant, and the storage pressure of the inventory is increased.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for processing commodity data, and mainly aims to solve the problem of redundancy of commodity data in existing inventory.
According to an aspect of the present invention, there is provided a method for processing commodity data, the method including:
acquiring the storage time granularity of commodity data;
generating a time axis of the commodity data within a preset time length by taking the storage time granularity of the commodity data as a unit, wherein the time axis records inventory state identification of the commodity data on the storage time granularity;
storing the commodity data into inventory in a time axis form according to the inventory state identification, wherein each commodity data corresponds to one time axis;
and when the processing request is received, updating the inventory state identification of the commodity data in the inventory on the time axis according to the preset inventory rule.
Further, when the processing request is a predetermined request, the preset inventory rule includes a predetermined policy, and when the processing request is received, updating the inventory status identifier of the commodity data in the inventory on the time axis according to the preset inventory rule includes:
receiving a predetermined request carrying a commodity identification and a predetermined time interval, and searching commodity data corresponding to the commodity identification from an inventory;
and updating the inventory state identifier of the commodity data corresponding to the commodity identifier in the inventory within a preset time interval according to the preset strategy.
Further, the updating of the inventory status identifier of the commodity data corresponding to the commodity identifier in the inventory within the predetermined time interval according to the predetermined policy includes:
and if the inventory state identifier of the commodity data corresponding to the commodity identifier in the inventory is in an idle state within a preset time interval, locking the commodity data corresponding to the commodity identifier, and updating the inventory state identifier to be in an occupied state.
Further, when the processing request is an inquiry request, the preset inventory rule includes an inquiry policy, and when the processing request is received, updating the inventory status identifier of the commodity data in the inventory on the time axis according to the preset inventory rule includes:
receiving a query request carrying a commodity identifier, and searching commodity data corresponding to the commodity identifier from the commodity data;
and updating the time axis of the commodity data corresponding to the commodity identification in the stock according to the query strategy.
Further, the updating the time axis of the commodity data corresponding to the commodity identification in the inventory according to the query strategy includes:
and updating the time axis of the commodity data corresponding to the commodity identification by taking the current time recorded in the query request as the starting time of the time axis and taking the preset time as the time interval of the time axis.
Further, the updating the time axis of the commodity data corresponding to the commodity identifier with the current time recorded in the query request as the start time of the time axis and a preset time as the time interval of the time axis includes:
emptying inventory state identifiers of the commodity data corresponding to the commodity identifiers recorded on the time axis before the starting time;
and supplementing the inventory state identification of the commodity data corresponding to the commodity identification recorded on the time axis within the preset time.
According to another aspect of the present invention, there is provided an apparatus for processing merchandise data, the apparatus comprising:
the acquisition unit is used for acquiring the storage time granularity of the commodity data;
the generation unit is used for generating a time axis of the commodity data within a preset time length by taking the storage time granularity of the commodity data as a unit, and the time axis is recorded with inventory state identification of the commodity data on the storage time granularity;
the storage unit is used for storing the commodity data into inventory in a time axis form according to the inventory state identification, and each commodity data corresponds to one time axis;
and the updating unit is used for updating the inventory state identification of the commodity data in the inventory on the time axis according to the preset inventory rule when the processing request is received.
Further, when the processing request is a predetermined request, the preset inventory rule includes a predetermined policy, and the updating unit includes:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a predetermined request carrying a commodity identifier and a predetermined time interval and searching commodity data corresponding to the commodity identifier from inventory;
and the first updating module is used for updating the inventory state identifier of the commodity data corresponding to the commodity identifier in the inventory within a preset time interval according to the preset strategy.
Further, the first updating module is specifically configured to, if the inventory status identifier of the commodity data corresponding to the commodity identifier in the inventory is in an idle status within a predetermined time interval, perform a locking operation on the commodity data corresponding to the commodity identifier, and update the inventory status identifier to an occupied status.
Further, when the processing request is an inquiry request, the preset inventory rule includes an inquiry policy, and the updating unit further includes:
the second receiving module is used for receiving a query request carrying a commodity identifier and searching commodity data corresponding to the commodity identifier from the commodity data;
and the second updating module is used for updating the time axis of the commodity data corresponding to the commodity identification in the stock according to the query strategy.
Further, the second updating module is specifically configured to update the time axis of the commodity data corresponding to the commodity identifier, with the current time recorded in the query request as a start time of the time axis and a preset time as a time interval of the time axis.
Further, the second update module includes:
the emptying submodule is used for emptying the inventory state identifier of the commodity data corresponding to the commodity identifier recorded on the time axis before the starting time;
and the completion submodule is used for completing the inventory state identification of the commodity data corresponding to the commodity identification recorded on the time axis within the preset time.
According to still another aspect of the present invention, there is provided a storage device having stored thereon a computer program which, when executed by a processor, implements the above-described processing method of article data.
According to still another aspect of the present invention, there is provided a processing apparatus for merchandise data, including a storage device, a processor, and a computer program stored on the storage device and operable on the processor, wherein the processor implements the processing method for the merchandise data when executing the program.
By the technical scheme, compared with the mode of directly distributing each commodity data in the inventory in a plurality of time interval storages at present, the commodity data processing method, the commodity data processing device and the computer storage medium provided by the invention can generate the time axis of the commodity data in the presettable time length by taking the storage time granularity of the commodity data as a unit, the inventory state identification of the commodity data in the storage time granularity is recorded on the time axis, the commodity data are stored in the inventory in the form of the time axis according to the inventory state identification, each commodity data in the inventory respectively corresponds to one time axis, the time axis can summarize a plurality of time intervals, corresponding commodity data do not need to be established for each time interval, the storage pressure of the inventory can be reduced, the time interval corresponding to the time axis is in the presettable time length range, and the expired or unsubscribed commodity data cannot be stored, the redundancy of the commodity data in the stock is reduced, and in the operation process of the commodity data, only the commodity data on the corresponding time axis needs to be updated, so that the stock operation time is reduced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flow chart illustrating a method for processing commodity data according to an embodiment of the present invention;
FIG. 2 is a flow chart of another merchandise data processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another merchandise data processing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating a commodity data processing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus for processing merchandise data according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of another apparatus for processing commodity data according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides a method for processing commodity data, which can achieve the purpose of reducing storage pressure of an inventory, and as shown in fig. 1, the method includes:
101. and acquiring the storage time granularity of the commodity data.
The commodity data may be predetermined commodity data transacted via the internet, such as data of a commodity name, a serial number, a predetermined date, and the like, where the predetermined commodity may be an air ticket, a KTV ward, a badminton court, a hotel accommodation, and the like, and since a user needs to select a predetermined date or time while selecting the predetermined commodity when purchasing the predetermined commodity, for example, a predetermined air ticket flying from beijing to shanghai at a time point of 8 months, 15 days, and 15 points of 8, and a predetermined hotel accommodation at a time point of 9 months and 10 days, the predetermined commodity data is usually stored according to a date or time sequence.
For the embodiment of the present invention, the commodity data may form a large amount of data tables, the data in these data tables are stored with what granularity, which affects many aspects of the data, and in general, the storage time granularity of the commodity data may be day, hour, minute, second, etc., and the commodity data herein has particularity in the selling time, and a commodity scheduled time is required when the commodity order is generated, and the commodity scheduled time is usually attached with reference to the storage time granularity of the commodity data, which may be day, hour, minute, second, etc., and is not limited herein
102. And generating a time axis of the commodity data within a preset time length by taking the storage time granularity of the commodity data as a unit.
The time interval of the time axis is a predeterminable time which is equivalent to the predeterminable commodity time interval issued by a merchant when selling commodities and can be several days, one week or two weeks, the unit of the time axis is the storage time granularity of the commodity data, for example, the storage granularity of the commodity data is days, and the predeterminable time is one week, then the commodity data of 7 days are recorded on the time axis, and each unit is the commodity data of 1 day.
For the embodiment of the present invention, each commodity corresponds to its own commodity identification information, such as information of a commodity label and a commodity name, in the process of storing commodity data, a time axis of the commodity data corresponding to different commodity identifications is generated for different commodity identifications, the time axis records an inventory status identification of the commodity data on a storage time granularity, the status identification of the commodity data is mainly used to indicate a predetermined status of the commodity data on the time granularity, for example, a predeterminable time period of a KTV bungalow a on the time axis is from 8 months 1 days to 8 months 7 days, the storage time granularity is small, if a reservation order from 3 points on 8 months 4 days to 6 points is received, the inventory status identification of the KTV bungalow a on the storage time granularity from 8 months 4 days to 6 points on the time axis is a predetermined status, and the inventory statuses on the remaining storage time granularities are not predetermined statuses, of course, the predetermined state may be added, such as the predetermined middle state, or the predetermined state may be solved according to the requirement, which is not limited herein.
103. And storing the commodity data into inventory in a time axis form according to the inventory state identification, wherein each commodity data corresponds to one time axis.
For the embodiment of the invention, when a merchant issues commodity information, the preset time of the commodity is attached, the inventory state identification of the commodity data on the storage time granularity is usually in a preset state, and then the commodity data is stored into the inventory in a time axis form according to the inventory state identification of the commodity data on the storage time granularity, so that each commodity corresponds to one time axis, the commodity data of a plurality of time partitions are gathered on one time axis to be represented, the storage data amount in the inventory is reduced, as time passes, the time point corresponding to the preset time on the time axis is shifted along with the time point, expired commodity data is invalid, and redundant data in the inventory is reduced.
For example, if the current time is 7 months and 20 days, and the scheduled time is one week, the time interval corresponding to the time axis is from 7 months and 20 days to 7 months and 26 days, and if the current time is updated to 7 months and 23 days, the time interval corresponding to the time axis of the product data is also updated to 7 months and 23 days to 7 months and 29 days.
104. And when the processing request is received, updating the inventory state identification of the commodity data in the inventory on the time axis according to the preset inventory rule.
The processing request may be a query request or a reservation request, in order to further facilitate processing of the commodity data in the inventory, the inventory is provided with a preset inventory rule, for example, a preset policy predetermined for the commodity and a query policy for the commodity query, and the commodity data in the inventory is logically operated according to the preset inventory rule, so that processing of different functions on the commodity data can be realized.
Compared with the current mode of directly distributing each commodity data in the inventory in a plurality of time intervals, the commodity data processing method can generate the time axis of the commodity data in the preset time interval by taking the storage time granularity of the commodity data as a unit, record the inventory state identification of the commodity data in the storage time granularity on the time axis, store the commodity data in the inventory in the form of the time axis according to the inventory state identification, wherein each commodity data in the inventory respectively corresponds to one time axis, the time axis can summarize a plurality of time intervals without creating corresponding commodity data for each time interval, can reduce the storage pressure of the inventory, the time interval corresponding to the time axis is a preset time interval range, can not store expired or unpredicted commodity data, and reduces the redundancy of the commodity data in the inventory, in the commodity data operation process, only the commodity data on the corresponding time axis needs to be updated, and the inventory operation time is reduced.
An embodiment of the present invention provides another method for processing commodity data, which can achieve the purpose of reducing inventory reservation operation time, as shown in fig. 2, the method includes:
201. and acquiring the storage time granularity of the commodity data.
For the embodiment of the present invention, since the predetermined type of goods are sold according to the specific time granularity, in the process of storing the goods data, the storage time granularity of the goods data can be specifically obtained according to the time granularity according to which the goods are sold in the process of storing the goods data, for example, a KTV bunk is usually sold according to hours, so the storage time granularity of the goods data corresponding to the KTV bunk is hours, and hotel accommodations are usually sold according to days, so the storage time granularity of the goods data corresponding to the hotel accommodations is days.
202. And generating a time axis of the commodity data within a preset time length by taking the storage time granularity of the commodity data as a unit.
For the embodiment of the present invention, a time axis corresponds to each commodity data, and the time axis records the stock state identifier of the commodity data on the storage time granularity, where the stock state identifier may include two states 0 and 1, where 1 indicates that the commodity on the storage time granularity is bookable, and 0 indicates that the commodity on the storage time granularity is not bookable, and of course, the stock state identifier is not limited to two states 0 and 1, and may also be in other forms such as A, B, and may also include more states, such as indicating that the commodity on the storage time granularity is booked, and the like.
203. And storing the commodity data into inventory in a time axis form according to the inventory state identification.
For the embodiment of the invention, in the process of storing the commodity data to the stock in the form of a time axis, in order to facilitate the understanding of the commodity data from multiple dimensions, attribute information of the commodity data, such as a commodity number, a stock-in price, a stock-in position, stock-in time and the like, can be correspondingly added to the stock.
204. Receiving a preset request carrying a commodity identification and a preset time interval, and searching commodity data corresponding to the commodity identification from an inventory.
The reservation request is a request for reservation operation of commodity data in inventory, for example, for reservation of KTV boxes, and a user reserves an airline ticket, and the reservation request carries a commodity identifier, such as a commodity name and a commodity number, and when the user selects a predetermined type of commodity, the user selects a time for reserving the commodity in addition to the commodity identifier, so that a predetermined time interval is recorded in the reservation request, for example, the user may reserve 18: a badminton court from 00 to 24: 00.
For the embodiment of the invention, the commodity data of different commodity identifications are stored in the stock, the corresponding commodity data can be searched from the stock through the commodity identifications, and certainly, if the commodity identifications in the stock are too many, the commodity data can be divided according to the commodity types corresponding to the commodity identifications in the process of storing the commodity data so as to facilitate the search of the commodity data of the same commodity type.
205. And updating the inventory state identifier of the commodity data corresponding to the commodity identifier in the inventory within a preset time interval according to the preset strategy.
For the embodiment of the invention, the predetermined strategy is used for logical operation of updating corresponding commodity data in the stock when a user reserves commodities, because the commodity data corresponding to the commodity identification in the stock is stored in a time axis form, the stock state identification of the commodity data on the granularity of storage time is recorded on the time axis, and the stock state of the commodity data in each granularity of storage time can be known according to the stock state identification, so that when the commodity is reserved, the stock state identification is locked according to the condition that the stock state identification of the commodity data corresponding to the commodity identification in the stock is in an idle state in a predetermined time interval, and the stock state identification is updated to an occupied state to update the corresponding commodity data.
If the inventory state identifier of the commodity data corresponding to the commodity identifier in the inventory is in an idle state in the preset time interval, the commodity data corresponding to the commodity identifier is indicated to be not reserved in the preset time interval, locking operation is further performed on the commodity data corresponding to the commodity identifier, so that other reservation requests cannot perform updating operation on the inventory state identifier of the commodity data in the preset time interval, and the inventory state identifier of the commodity data in the preset time interval is updated to be in an occupied state.
It should be noted that, if the inventory status identifier of the product data corresponding to the product identifier in the inventory is in the occupied status within the predetermined time interval, which indicates that the product has been reserved within the predetermined time interval, the reservation request cannot update the inventory status identifier of the product data within the predetermined time interval.
Compared with the current mode of directly distributing each commodity data in the inventory in a plurality of time intervals, the commodity data processing method can generate the time axis of the commodity data in the preset time interval by taking the storage time granularity of the commodity data as a unit, record the inventory state identification of the commodity data in the storage time granularity on the time axis, store the commodity data in the inventory in the form of the time axis according to the inventory state identification, wherein each commodity data in the inventory respectively corresponds to one time axis, the time axis can summarize a plurality of time intervals without creating corresponding commodity data for each time interval, can reduce the storage pressure of the inventory, the time interval corresponding to the time axis is a preset time interval range, can not store expired or unpredicted commodity data, and reduces the redundancy of the commodity data in the inventory, in the commodity data operation process, only the commodity data on the corresponding time axis needs to be updated, and the inventory operation time is reduced.
An embodiment of the present invention provides another method for processing commodity data, which can achieve the purpose of reducing redundancy of commodity data in inventory, and as shown in fig. 3, the method includes:
301. and acquiring the storage time granularity of the commodity data.
For the embodiment of the present invention, the specific implementation process of obtaining the storage time granularity of the commodity data may refer to the contents described in step 101 and step 201, which is not described herein again.
302. And generating a time axis of the commodity data within a preset time length by taking the storage time granularity of the commodity data as a unit.
For the embodiment of the present invention, specifically, the storage time granularity of the commodity data is taken as a unit, and the implementation process of generating the time axis of the commodity data within the preset time period may refer to the contents described in step 102 and step 202, which is not described herein again.
For example, the commodity is 2 hotel rooms, each room is correspondingly numbered bg001 and bg002, the storage time granularity is day, the predeterminable time period is 7 days, the inventory state identification of each room in the predeterminable time period can be represented by 0 and 1, 0 represents that the room of the day is reserved, 1 represents that the room of the day is not reserved, if the room bg001 has no user reservation in the predeterminable time period, the room bg001 data in the form of the time axis can be represented as 1111111, and if the room bg002 has user reservation in the third day and the fourth day in the predeterminable time period, the room bg002 data in the form of the time axis can be represented as 1100111.
303. And storing the commodity data into inventory in a time axis form according to the inventory state identification.
For the embodiment of the present invention, the implementation process of storing the commodity data in the inventory in the form of a time axis according to the inventory status identifier may refer to the contents described in step 103 and step 203, which is not described herein again.
304. And receiving a query request carrying a commodity identifier, and searching the commodity data corresponding to the commodity identifier from the commodity data.
The query request is a request for querying commodity data in the inventory, and of course, the query operation may also be triggered after a predetermined operation, for example, whether a KTV ward is predetermined in a certain time interval is queried, and the same query request carries a commodity identifier, and the corresponding commodity data may be searched from the inventory through the commodity identifier.
305. And updating the time axis of the commodity data corresponding to the commodity identification in the stock according to the query strategy.
For the embodiment of the invention, the query strategy is used for carrying out logic operation of updating corresponding commodity data in the stock when a user queries commodities, because the stock in a time interval is returned when the commodity data corresponding to the commodity identification in the stock is queried each time, the time interval recorded on the time axis is continuously updated along with the continuous movement of time, and further, the time axis of the commodity data corresponding to the commodity identification is updated by taking the current time recorded in the query request as the starting time of the time axis and taking the preset time as the time interval of the time axis.
Specifically, in the process of updating the time axis of the commodity data corresponding to the commodity identifier, the stock state identifier of the commodity data corresponding to the commodity identifier recorded on the time axis before the starting time may be emptied, and then the stock state identifiers of the commodity data corresponding to the commodity identifier recorded on the time axis within a predeterminable time period are supplemented.
For example, the granularity of the storage time is days, the starting time of the time axis is 8 months and 1 day, the ending time is 8 months and 7 days, the presettable duration is 7 days, inventory state identifiers of commodity data every day are recorded on the time axis, when the current time of the query is 8 months and 4 days, 8 months and 4 days on the time axis in the inventory are taken as time nodes, the inventory state identifiers of the commodity data before 8 months and 4 days are emptied, and 8 months and 4 days are taken as the starting time of the time axis, the ending time of the time axis is calculated to be 8 months and 10 days according to the predeterminable time length, since the stock state marks of the commodity data do not exist between 8 month and 7 days to 8 month and 10 days, the stock state marks of the commodity data on the time axis are supplemented, because the inventory status identifier in the completed time interval on the time axis is the newly added commodity data, the completed inventory status identifier is the idle status.
For the embodiment of the present invention, the logic operation of the corresponding room in the inventory when the user reserves the room may specifically include, but is not limited to, the following implementation manners: first, the receiving room 001 has a predetermined time interval of 10:00 to 14: 00, by searching the time axis of the 001 data of the room in the inventory, judging that the time axis of the 001 data of the room in the inventory is 10:00 to 14: the inventory status mark on 00 is in an idle state, if so, the data of the pack room 001 is shown in the range from 10:00 to 14: 00 is not predetermined, and data for the booth 001 is recorded at 10:00 to 14: and 00, locking the stock state identifier, updating the stock state identifier to an occupied state, finishing the reservation operation of the room, and if the stock state identifier is not in an idle state, indicating that the data of the room 001 is in a range from 10:00 to 14: 00, the reservation cannot be carried out, and the room reservation fails.
It should be noted that, in the process of executing the reservation request, the commodity data in the inventory needs to be updated, if the start time corresponding to the time axis of the commodity data in the inventory is not the current time, but is a long-term previous start time, which may cause the commodity data to be invalid in the query or update, in order to facilitate the logic operation of the commodity data under normal circumstances, a preset time interval may be set to query the commodity data in the inventory, so as to ensure that the time interval on the time axis of the commodity data is within the current time range, or the time axis of the commodity data may be set to be updated according to the current time while reserving the commodity data, which is not limited in the embodiment of the present invention.
Compared with the current mode of directly distributing each commodity data in the inventory in a plurality of time intervals, the commodity data processing method can generate the time axis of the commodity data in the preset time interval by taking the storage time granularity of the commodity data as a unit, record the inventory state identification of the commodity data in the storage time granularity on the time axis, store the commodity data in the inventory in the form of the time axis according to the inventory state identification, wherein each commodity data in the inventory respectively corresponds to one time axis, the time axis can summarize a plurality of time intervals without creating corresponding commodity data for each time interval, can reduce the storage pressure of the inventory, the time interval corresponding to the time axis is a preset time interval range, can not store expired or unpredicted commodity data, and reduces the redundancy of the commodity data in the inventory, in the commodity data operation process, only the commodity data on the corresponding time axis needs to be updated, and the inventory operation time is reduced.
Further, as a specific implementation of the method shown in fig. 1, an embodiment of the present invention provides a device for processing commodity data, where as shown in fig. 4, the device includes: acquisition section 41, generation section 42, storage section 43, and update section 44.
An obtaining unit 41, configured to obtain a storage time granularity of the commodity data;
the generating unit 42 may be configured to generate a time axis of the commodity data within a predeterminable time period by taking the storage time granularity of the commodity data as a unit, where the time axis records an inventory status identifier of the commodity data on the storage time granularity;
a storage unit 43, configured to store the product data in inventory in a time axis form according to the inventory status identifier;
the updating unit 44 may be configured to update the inventory status identifier of the product data in the inventory on the time axis according to a preset inventory rule when the processing request is received.
Compared with the current mode of directly distributing each item of commodity data in the inventory in a plurality of time intervals, the commodity data processing device provided by the embodiment of the invention can generate the time axis of the commodity data within the preset time length by taking the storage time granularity of the commodity data as a unit, the time axis records the inventory state identification of the commodity data on the storage time granularity, and stores the commodity data into the inventory in the form of the time axis according to the inventory state identification, wherein each item of commodity data in the inventory corresponds to one time axis respectively, the time axis can summarize a plurality of time intervals without creating corresponding commodity data for each time interval, the storage pressure of the inventory can be reduced, the time interval corresponding to the time axis is the preset time length range, the expired or unscheduled commodity data can not be stored, and the redundancy of the commodity data in the inventory can be reduced, in the commodity data operation process, only the commodity data on the corresponding time axis needs to be updated, and the inventory operation time is reduced.
In a specific application scenario, as shown in fig. 5, when the processing request is a predetermined request, the preset inventory rule includes a predetermined policy, and the updating unit 44 includes:
the first receiving module 441 may be configured to receive a predetermined request carrying a commodity identifier and a predetermined time interval, and search commodity data corresponding to the commodity identifier from an inventory;
the first updating module 442 may be configured to update the inventory status identifier of the product data corresponding to the product identifier in the inventory within a predetermined time interval according to the predetermined policy.
Further, the first updating module 441 may be specifically configured to, if the inventory status identifier of the product data corresponding to the product identifier in the inventory is in an idle status within a predetermined time interval, lock the product data corresponding to the product identifier, and update the inventory status identifier to an occupied status.
In a specific application scenario, as shown in fig. 6, when the processing request is an inquiry request, the preset inventory rule includes an inquiry policy, and the updating unit 44 further includes:
the second receiving module 443 may be configured to receive a query request carrying a product identifier, and search product data corresponding to the product identifier from the product data;
the second updating module 444 may be configured to update a time axis of the commodity data corresponding to the commodity identifier in the inventory according to the query policy.
Further, the second updating module 444 may be specifically configured to update the time axis of the commodity data corresponding to the commodity identifier, with the current time recorded in the query request as a start time of the time axis and a preset time duration as a time interval of the time axis.
Further, the second updating module 444 includes:
an emptying submodule 4441, configured to empty inventory status identifiers of the commodity data corresponding to the commodity identifiers recorded on the time axis before the starting time;
the completion sub-module 4442 may be configured to complete the inventory status identifier of the commodity data corresponding to the commodity identifier recorded on the time axis within the predeterminable time period.
It should be noted that other corresponding descriptions of the functional units related to the commodity data processing apparatus provided in this embodiment may refer to the corresponding descriptions in fig. 1 and fig. 2, and are not described herein again.
Based on the above-mentioned methods as shown in fig. 1, fig. 2 and fig. 3, correspondingly, the present embodiment further provides a storage medium, on which a computer program is stored, which when executed by a processor, implements the above-mentioned method for processing the commodity data as shown in fig. 1, fig. 2 and fig. 3.
Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, or the like), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the method described in the embodiments of the present application.
Based on the methods shown in fig. 1, fig. 2, and fig. 3 and the virtual device embodiments shown in fig. 4, fig. 5, and fig. 6, in order to achieve the above object, an embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the above-described processing method of the article data as shown in fig. 1, 2 and 3.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
Those skilled in the art will appreciate that the physical device structure of the commodity data processing provided by the present embodiment does not constitute a limitation to the physical device, and may include more or less components, or combine some components, or arrange different components.
The storage medium may further include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the computer device described above, supporting the operation of information handling programs and other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. By applying the technical scheme of the application, compared with the prior art, the time axis of the commodity data in the presettable time length is generated by taking the storage time granularity of the commodity data as a unit, the time axis records the inventory state identification of the commodity data on the storage time granularity, the commodity data is stored in the inventory in the form of the time axis according to the inventory state identification, each commodity data in the inventory respectively corresponds to one time axis, the time axis can summarize a plurality of time intervals, corresponding commodity data do not need to be established for each time interval, the storage pressure of the inventory can be reduced, the time interval corresponding to the time axis is the presettable time length range, expired or unsubscribed commodity data can not be stored, the redundancy of the commodity data in the inventory is reduced, and in the operation process of the commodity data, only the commodity data on the corresponding time axis need to be updated, reducing inventory handling time.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (14)

1. A commodity data processing method is characterized by comprising the following steps:
acquiring the storage time granularity of commodity data;
generating a time axis of the commodity data within a preset time length by taking the storage time granularity of the commodity data as a unit, wherein the time axis records inventory state identification of the commodity data on the storage time granularity;
storing the commodity data into inventory in a time axis form according to the inventory state identification, wherein each commodity data corresponds to one time axis;
when a processing request is received, the inventory state identification of the commodity data in the inventory on the time axis is updated according to preset inventory rules, wherein the preset inventory rules comprise a preset strategy and an inquiry strategy.
2. The method according to claim 1, wherein the preset inventory rule comprises a preset policy when the processing request is a predetermined request, and the updating the inventory status identifier of the product data in the inventory on the time axis according to the preset inventory rule when the processing request is received comprises:
receiving a predetermined request carrying a commodity identification and a predetermined time interval, and searching commodity data corresponding to the commodity identification from an inventory;
and updating the inventory state identifier of the commodity data corresponding to the commodity identifier in the inventory within a preset time interval according to the preset strategy.
3. The method according to claim 2, wherein the updating the inventory status identifier of the product data corresponding to the product identifier in the inventory within a predetermined time interval according to the predetermined policy comprises:
and if the inventory state identifier of the commodity data corresponding to the commodity identifier in the inventory is in an idle state within a preset time interval, locking the commodity data corresponding to the commodity identifier, and updating the inventory state identifier to be in an occupied state.
4. The method according to claim 1, wherein the preset inventory rule comprises an inquiry policy when the processing request is an inquiry request, and the updating the inventory status identifier of the product data in the inventory on the time axis according to the preset inventory rule when the processing request is received comprises:
receiving a query request carrying a commodity identifier, and searching commodity data corresponding to the commodity identifier from the commodity data;
and updating the time axis of the commodity data corresponding to the commodity identification in the stock according to the query strategy.
5. The method of claim 4, wherein the updating the time axis of the commodity data corresponding to the commodity identification in the inventory according to the query strategy comprises:
and updating the time axis of the commodity data corresponding to the commodity identification by taking the current time recorded in the query request as the starting time of the time axis and taking the preset time as the time interval of the time axis.
6. The method according to claim 5, wherein the updating the time axis of the commodity data corresponding to the commodity identification with the current time recorded in the query request as a starting time of the time axis and a preset time as a time interval of the time axis comprises:
emptying inventory state identifiers of the commodity data corresponding to the commodity identifiers recorded on the time axis before the starting time;
and supplementing the inventory state identification of the commodity data corresponding to the commodity identification recorded on the time axis within the preset time.
7. An apparatus for processing commodity data, comprising:
the acquisition unit is used for acquiring the storage time granularity of the commodity data;
the generation unit is used for generating a time axis of the commodity data within a preset time length by taking the storage time granularity of the commodity data as a unit, and the time axis is recorded with inventory state identification of the commodity data on the storage time granularity;
the storage unit is used for storing the commodity data into inventory in a time axis form according to the inventory state identification, and each commodity data corresponds to one time axis;
and the updating unit is used for updating the inventory state identification of the commodity data in the inventory on the time axis according to a preset inventory rule when the processing request is received, wherein the preset inventory rule comprises a preset strategy and an inquiry strategy.
8. The apparatus according to claim 7, wherein when the processing request is a predetermined request, the preset inventory rule includes a predetermined policy, and the updating unit includes:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a predetermined request carrying a commodity identifier and a predetermined time interval and searching commodity data corresponding to the commodity identifier from inventory;
and the first updating module is used for updating the inventory state identifier of the commodity data corresponding to the commodity identifier in the inventory within a preset time interval according to the preset strategy.
9. The apparatus of claim 8,
the first updating module is specifically configured to, if an inventory status identifier of the commodity data corresponding to the commodity identifier in the inventory is in an idle state within a predetermined time interval, perform locking operation on the commodity data corresponding to the commodity identifier, and update the inventory status identifier to an occupied state.
10. The apparatus according to claim 7, wherein when the processing request is a query request, the preset inventory rule includes a query policy, and the updating unit further includes:
the second receiving module is used for receiving a query request carrying a commodity identifier and searching commodity data corresponding to the commodity identifier from the commodity data;
and the second updating module is used for updating the time axis of the commodity data corresponding to the commodity identification in the stock according to the query strategy.
11. The apparatus of claim 10,
the second updating module is specifically configured to update the time axis of the commodity data corresponding to the commodity identifier, with the current time recorded in the query request as a start time of the time axis and a preset time as a time interval of the time axis.
12. The apparatus of claim 11, wherein the second update module comprises:
the emptying submodule is used for emptying the inventory state identifier of the commodity data corresponding to the commodity identifier recorded on the time axis before the starting time;
and the completion submodule is used for completing the inventory state identification of the commodity data corresponding to the commodity identification recorded on the time axis within the preset time.
13. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any of claims 1 to 6.
14. A computer storage medium on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201811418359.5A 2018-11-26 2018-11-26 Commodity data processing method and device Active CN109739865B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811418359.5A CN109739865B (en) 2018-11-26 2018-11-26 Commodity data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811418359.5A CN109739865B (en) 2018-11-26 2018-11-26 Commodity data processing method and device

Publications (2)

Publication Number Publication Date
CN109739865A CN109739865A (en) 2019-05-10
CN109739865B true CN109739865B (en) 2020-12-11

Family

ID=66359047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811418359.5A Active CN109739865B (en) 2018-11-26 2018-11-26 Commodity data processing method and device

Country Status (1)

Country Link
CN (1) CN109739865B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110738340B (en) * 2019-09-06 2022-04-19 口碑(上海)信息技术有限公司 Reserved product inventory management method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160125321A1 (en) * 2014-11-03 2016-05-05 Amadeus S.A.S. Segmented availability cache
CN106022490A (en) * 2015-11-06 2016-10-12 刘翔英 Commodity and service online ordering and management Internet platform
CN108363772A (en) * 2018-02-08 2018-08-03 竞技世界(北京)网络技术有限公司 A kind of register date storage method and device based on caching

Also Published As

Publication number Publication date
CN109739865A (en) 2019-05-10

Similar Documents

Publication Publication Date Title
US6466915B1 (en) Customer history management method and system in online shopping
US20170278152A1 (en) Personalized item trading card generation and management
WO2024109558A1 (en) Recommendation data processing method, recommendation method, and electronic device and storage medium
JP5941366B2 (en) Unit price setting device, unit price setting method, and unit price setting program
CN110889608A (en) Engineering change flow control method and device, electronic equipment and storage medium
CN109739865B (en) Commodity data processing method and device
JP2015115016A (en) Supply chain management apparatus, and method, system, and program of the same
US8123129B2 (en) Information provision intermediation apparatus
JP7167993B2 (en) Information processing system, information processing method and program
CN110069499B (en) Data management method, device, system and storage medium
JP7463480B2 (en) Information processing device, information processing method, and computer program
JP6553774B1 (en) Information processing apparatus, information processing method, and information processing program
CN109035070B (en) Catering system based on internet of things search
JP2008176507A (en) System, method and program for changing price in automatic vending machine
CN109447293B (en) Product data processing method and device
US20040143517A1 (en) System and method for managing material distribution and returned materials
US20200089200A1 (en) Production management support apparatus and production management support method
CN107608690B (en) Configuration management method and device
US20120253992A1 (en) Systems and methods for inventory generation and management
KR101119127B1 (en) Method for managing product integration information between headquarter and affiliate, and computer readable recording medium applying the same
JP7179386B1 (en) Information processing device and information processing method
US20220318733A1 (en) Radio frequency identification (rfid) driven stocking priority determination
US20230010844A1 (en) Enterprise resource planning system and method
CN109472668B (en) Commodity data processing method, system, server and storage medium
JPH1173470A (en) Shared type inventory retrieval/commodity order system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant