CN115204981A - Table processing method, device and equipment based on article occupation and storage medium - Google Patents

Table processing method, device and equipment based on article occupation and storage medium Download PDF

Info

Publication number
CN115204981A
CN115204981A CN202210861827.6A CN202210861827A CN115204981A CN 115204981 A CN115204981 A CN 115204981A CN 202210861827 A CN202210861827 A CN 202210861827A CN 115204981 A CN115204981 A CN 115204981A
Authority
CN
China
Prior art keywords
node
article
occupation
item
information
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.)
Pending
Application number
CN202210861827.6A
Other languages
Chinese (zh)
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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202210861827.6A priority Critical patent/CN115204981A/en
Publication of CN115204981A publication Critical patent/CN115204981A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders
    • G06Q10/0875Itemisation or classification of parts, supplies or services, e.g. bill of materials

Abstract

The application provides a table processing method, device and equipment based on article occupation and a storage medium. The method comprises the following steps: the method comprises the steps that an article pre-occupation calling request sent by at least one terminal device is received, and pre-occupation mode information on a first node is called according to identification information of an article in the article pre-occupation calling request; if the identification information meets the pre-occupation mode information in the first node, locking an article corresponding to the identification information on the second node, and obtaining an article pre-occupation result table; after receiving the article real occupation calling request, acquiring the state of the article in the article pre-occupation result table, and calling real occupation mode information on a third node according to the state of the article; and if the state of the article accords with the occupation mode information, generating a sales table of the article on the fourth node, and determining the sales table of the article as an occupation result. By adopting the technical scheme, the problem of low performance when network sales are frequent can be solved.

Description

Table processing method, device and equipment based on article occupation and storage medium
Technical Field
The present application relates to data table processing technologies, and in particular, to a table processing method, apparatus, device, and storage medium based on article occupancy.
Background
At present, the selling modes of commodities are more and more diversified, and network selling becomes the most convenient one.
In the network selling process, the transaction process and the inventory information updating process are important, at present, most of the inventory information updating process takes open source information as a development component, and the problem of low performance occurs when the network selling is frequent.
Therefore, there is a need for an inventory information updating method that overcomes the above-mentioned problems.
Disclosure of Invention
The application provides a table processing method, a table processing device, a table processing equipment and a table processing storage medium based on article occupation, which are used for solving the problem of low performance when network sales are frequent.
In a first aspect, the present application provides a method for processing a table based on item occupancy, including:
receiving an article pre-occupation calling request sent by at least one terminal device, and calling pre-occupation mode information on a first node according to identification information of an article in the article pre-occupation calling request; the pre-occupation mode information represents an occupation mode allowing the article to be pre-occupied;
if the identification information meets the pre-occupation mode information in the first node, locking an article corresponding to the identification information on a second node, and obtaining an article pre-occupation result table;
after receiving an article real occupation calling request, acquiring the state of an article in the article pre-occupation result table, and calling real occupation mode information on a third node according to the state of the article; the occupation mode information represents an occupation mode allowing the article to be actually occupied;
if the state of the article accords with the real occupation mode information, generating a sales table of the article on a fourth node, and determining the sales table of the article as a real occupation result;
updating an article identification list in the inventory information table on a fifth node according to the real occupation result; wherein the item identification detail sheet characterizes a sales status of the item.
In an optional example, locking the item corresponding to the identification information on the second node, and obtaining an item preemption result table includes:
generating a preemption record table on the second node according to the identification information, the data information of the terminal equipment corresponding to the article preemption call request, the quantity of the articles and the state of the articles;
and determining the item preemption result table on the second node according to the preemption record table and the inventory information table.
In an optional example, determining the item preemption result table at the second node based on the preemption record table and the inventory information table includes:
according to the pre-occupation record table, modifying the state of the article in the inventory information table from an unoccupied state to a temporary occupied state on the second node, and obtaining an updated inventory information table;
and in the second node, determining the pre-occupation record table and the updated inventory information table as the item pre-occupation result table.
In an optional example, the identification information comprises one or more of: the method comprises the following steps of user name, channel code of the article, channel type of the article, warehouse code of the article, activity code of the article, resource inventory unit of the article, resource unique identification of the article and order number of the article.
In one optional example, the method further comprises:
and if the article real occupation calling request is not received within the preset time, deleting the article pre-occupation result table on the second node.
In an optional example, after invoking the occupation mode information on the third node according to the state of the item, the method further includes:
generating an instruction message on the third node according to the occupation result, verifying the instruction message and obtaining a verification result;
and according to the checking result, the state of the article in the inventory information table is changed from the temporary occupation state to the sold state on the third node.
In an optional example, the checking the instruction message and obtaining a checking result includes:
detecting the content of the instruction message at the third node;
and if the missing item exists, supplementing the missing item, and taking the supplemented instruction message as a verification result.
In an optional example, the checking the instruction message and obtaining a checking result includes:
detecting a format of the instruction message at the third node;
if the format of the instruction message is a non-standard format, modifying the format of the instruction message into a standard format, and taking the instruction message modified into the standard format as a verification result.
In an optional example, after the modifying the status of the item in the inventory information table from the temporary occupied status to the sold status at the third node, the method further includes:
and deleting the article with the sold state in the pre-occupation record table on the second node.
In an optional example, further comprising:
detecting the node state of the first node, and if the node state of the first node indicates that the first node is abnormal or the residual space amount representing the first node is smaller than a preset threshold value, migrating the pre-occupation mode information in the first node to the third node;
and detecting the node state of the fourth node, and if the node state of the fourth node indicates that the fourth node is abnormal or the residual space amount representing the fourth node is less than a preset threshold value, migrating the sales table of the articles in the fourth node to the fifth node.
In an optional example, migrating the preemption information in the first node to the third node includes:
encrypting the preemption mode information in the first node based on the first public key in the first node to obtain the encrypted preemption mode information; sending the encrypted camping mode information to the third node;
the encrypted preemption-method information is used for the third node to decrypt and store the encrypted preemption-method information based on a first private key in the third node;
the first public key and the first private key are issued by a third-party device.
In an optional example, migrating the sales table for the item in the fourth node to the fifth node comprises:
encrypting a sales table of the article in the fourth node based on the second public key in the fourth node to obtain an encrypted sales table; sending the encrypted sales table to the fifth node;
the encrypted sales table is used for the fifth node to decrypt and store the encrypted sales table based on a second private key in the fifth node;
and the second public key and the second private key are issued by third-party equipment.
In a second aspect, the present application provides an item occupancy-based form processing apparatus, the apparatus comprising:
the system comprises a receiving unit, a first node and a second node, wherein the receiving unit is used for receiving an article pre-occupation calling request sent by at least one terminal device and calling pre-occupation mode information on the first node according to identification information of an article in the article pre-occupation calling request; the pre-occupation mode information represents the occupation mode of the articles allowed to be pre-occupied;
the locking unit is used for locking an article corresponding to the identification information on a second node if the identification information meets the pre-occupation mode information in the first node, and obtaining an article pre-occupation result table;
the calling unit is used for acquiring the state of the article in the article pre-occupation result table after receiving the article real occupation calling request, and calling real occupation mode information on a third node according to the state of the article; wherein the occupation mode information represents an occupation mode allowing the article to be actually occupied;
the generating unit is used for generating a sales table of the article on a fourth node if the state of the article accords with the occupation mode information, and determining the sales table of the article as an occupation result;
the updating unit is used for updating the item identification list in the inventory information table on the fifth node according to the real occupation result; wherein the item identification detail sheet characterizes a sales status of the item.
In an optional example, the locking unit comprises:
a generating module, configured to generate a preemption record table on the second node for the identification information, the data information of the terminal device corresponding to the article preemption call request, the number of the articles, and the state of the articles;
and the determining module is used for determining the item preemption result table on the second node according to the preemption record table and the inventory information table.
In one optional example, the determining module comprises:
a modification submodule, configured to modify, on the second node, the state of the item in the inventory information table from an unoccupied state to a temporary occupied state according to the preemption record table, and obtain an updated inventory information table;
and the determining submodule is used for determining the pre-occupation record table and the updated inventory information table as the item pre-occupation result table in the second node.
In one optional example, the identification information comprises one or more of: the method comprises the following steps of user name, channel code of the article, channel type of the article, warehouse code of the article, activity code of the article, resource inventory unit of the article, resource unique identification of the article and order number of the article.
In one optional example, the apparatus further comprises:
and the first deleting unit is used for deleting the item pre-occupation result table on the second node if an item real occupation calling request is not received within a preset time.
In one optional example, the apparatus further comprises:
the verification unit is used for generating an instruction message on the third node according to the real occupation result, verifying the instruction message and obtaining a verification result;
and the modifying unit is used for modifying the state of the article in the inventory information table from a temporary occupied state to a sold state on the third node according to the checking result.
In an optional example, the verification unit comprises:
a first detection module, configured to detect, at the third node, a content of the instruction message;
and the supplement module is used for supplementing the missing item if the missing item exists and taking the supplemented instruction message as a verification result.
In an optional example, the verification unit comprises:
a second detection module, configured to detect, at the third node, a format of the instruction message;
and the modification module is used for modifying the format of the instruction message into a standard format if the format of the instruction message is a non-standard format, and taking the instruction message modified into the standard format as a verification result.
In one optional example, the apparatus further comprises:
and the second deleting unit is used for deleting the article with the sold state in the pre-occupation record table on the second node.
In an optional example, the apparatus further comprises:
the first migration unit is configured to detect a node state of the first node, and migrate the preemption mode information in the first node to the third node if it is determined that the node state of the first node represents that the first node is abnormal or that the remaining space amount representing the first node is smaller than a preset threshold;
and the second migration unit is used for detecting the node state of the fourth node, and migrating the sales table of the articles in the fourth node to the fifth node if the node state of the fourth node is determined to represent that the fourth node is abnormal or the residual space amount representing the fourth node is smaller than a preset threshold value.
In one optional example, the first migration unit includes:
the first encryption module is used for encrypting the preemption mode information in the first node based on a first public key in the first node to obtain the encrypted preemption mode information; sending the encrypted camping mode information to the third node;
the encrypted preemption-method information is used for the third node to decrypt and store the encrypted preemption-method information based on a first private key in the third node;
the first public key and the first private key are issued by third-party equipment.
In an optional example, the second migration unit includes:
the second encryption module is used for encrypting the sales table of the article in the fourth node based on the second public key in the fourth node to obtain an encrypted sales table; sending the encrypted sales table to the fifth node;
the encrypted sales table is used for the fifth node to decrypt and store the encrypted sales table based on a second private key in the fifth node;
and the second public key and the second private key are issued by third-party equipment.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing the method of the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method according to the first aspect.
According to the table processing method, device, equipment and storage medium based on article occupation, the article occupation calling request sent by at least one terminal device is received, and the occupation mode information on a first node is called according to the identification information of the article in the article occupation calling request; the pre-occupation mode information represents the occupation mode of the articles allowed to be pre-occupied; if the identification information meets the pre-occupation mode information in the first node, locking an article corresponding to the identification information on a second node, and obtaining an article pre-occupation result table; after receiving an article real occupation calling request, acquiring the state of an article in the article pre-occupation result table, and calling real occupation mode information on a third node according to the state of the article; wherein the occupation mode information represents an occupation mode allowing the article to be actually occupied; if the state of the article accords with the real occupation mode information, generating a sales table of the article on a fourth node, and determining the sales table of the article as a real occupation result; updating an article identification list in the inventory information table on a fifth node according to the real occupation result; wherein the item identification detail list represents the sales status of the item. By adopting the technical scheme, the problem of low performance when network sales are frequent can be solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart of a method for processing a table based on item occupancy according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for processing a table based on item occupancy according to a second embodiment of the present application;
FIG. 3 is a schematic diagram of a table processing apparatus based on item occupancy according to a third embodiment of the present application;
FIG. 4 is a schematic diagram of an item occupancy-based table processing apparatus according to a fourth embodiment of the present application;
FIG. 5 is a block diagram of an electronic device shown in accordance with an example embodiment.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
The application provides a table processing method based on article occupation, which aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a method for processing a table based on item occupancy according to an embodiment of the present application. The first embodiment comprises the following steps:
s101, receiving an article pre-occupation calling request sent by at least one terminal device, and calling pre-occupation mode information on a first node according to identification information of an article in the article pre-occupation calling request; wherein the pre-occupancy pattern information characterizes an occupancy pattern that allows the item to be pre-occupied.
In one example, the item pre-emption invocation request is a request message sent by the terminal, which is triggered by the user of the terminal. Each item pre-occupation calling request carries identification information of the item to be pre-occupied, so that the pre-occupied item can be ensured to be the item requested by the user.
In this embodiment, the distributed relational database is used to implement the process of the article pre-occupation calling request, so that it is possible to avoid migrating the function of the node to other nodes when a performance bottleneck occurs. Among them, the Distributed Relational Database (DRDS) is mainly an online distributed Database Service with horizontal splitting, smooth capacity expansion, and read-write separation.
The pre-emption mode information may be configured micro-services, wherein the micro-services may be preset code programs.
And S102, if the identification information meets the pre-occupation mode information in the first node, locking an article corresponding to the identification information in the second node, and obtaining an article pre-occupation result table.
In this embodiment, by determining the identification information, if the commodity corresponding to the identification information is pre-occupied, the pre-occupation mode information in the first node is called, the article is locked on the second node according to the pre-occupation mode information, and an article pre-occupation result table is generated on the second node.
S103, after receiving the article real occupation calling request, acquiring the state of the article in the article pre-occupation result table, and calling real occupation mode information on a third node according to the state of the article; wherein the occupation manner information represents an occupation manner that allows the article to be actually occupied.
In one example, after receiving the item real occupation calling request, the state of the item in the item pre-occupation result table is obtained, and if the state of the item is already pre-occupied, the real occupation mode information is called on the third node to actually occupy the item.
And S104, if the state of the article accords with the occupation mode information, generating a sales table of the article on the fourth node, and determining the sales table of the article as an occupation result.
In this embodiment, if the item is occupied, a sales table of the item is generated at the fourth node, and the sales information of the item is recorded in the item sales order.
S105, updating an article identification list in the inventory information list on a fifth node according to the real occupation result; wherein the item identification detail list represents the sales state of the item.
In this embodiment, after the occupation result is obtained, the item identifier list in the inventory information table is updated at the fifth node, and the identifier information and the sales status of the occupied item are modified in the item identifier list.
According to the table processing method, device, equipment and storage medium based on article occupation, the article occupation calling request sent by at least one terminal device is received, and the occupation mode information on a first node is called according to the identification information of the article in the article occupation calling request; the pre-occupation mode information represents an occupation mode allowing the article to be pre-occupied; if the identification information meets the pre-occupation mode information in the first node, locking an article corresponding to the identification information on the second node, and obtaining an article pre-occupation result table; after receiving the article real occupation calling request, acquiring the state of the article in the article pre-occupation result table, and calling real occupation mode information on a third node according to the state of the article; wherein the occupation mode information represents an occupation mode allowing the article to be actually occupied; if the state of the article accords with the real occupation mode information, generating a sales table of the article on the fourth node, and determining the sales table of the article as a real occupation result; updating an article identification list in the inventory information table on the fifth node according to the occupation result; wherein the item identification detail list represents the sales state of the item. By adopting the technical scheme, the problem of low performance when network sales are frequent can be solved.
Fig. 2 is a schematic flowchart of a table processing method based on item occupancy according to a second embodiment of the present application. The second embodiment comprises the following steps:
s201, receiving an article pre-occupation calling request sent by at least one terminal device, and calling pre-occupation mode information on a first node according to identification information of an article in the article pre-occupation calling request; wherein the occupation mode information represents an occupation mode allowing the article to be occupied in advance.
In this embodiment, the identification information includes one or more of the following: user name, channel code of the item, channel type of the item, warehouse code of the item, activity code of the item, resource inventory unit of the item, resource unique identification of the item, order number of the item, preemption release time, time format yyyyymmddhh 24MISS, order ID not-necessary fill, preemption amount (no string code resource usage)), operator ID, province, and city.
In this embodiment, the terminal device may include the following cases: the first is a terminal device in an offline store, the second is an online terminal device, and for the terminal device in the offline store, for example, a string code resource of a mobile phone in the offline store, it is first determined whether the string code resource belongs to the channel code, whether the string code resource belongs to the warehouse code, whether the string code resource belongs to the activity code, after the above tests are passed, the status of the string code resource is inquired, and if the string code resource is in an idle status, the pre-occupation can be performed. For commodities without serial code resources in an offline store, such as a mobile phone shell, judging whether a resource stock unit code belongs to the channel code, whether the resource stock unit code belongs to the warehouse code, and whether the resource stock unit code belongs to the activity code, comparing the pre-occupied quantity and the pre-occupied quantity under the resource stock unit code after the rules are passed, and if the pre-occupied quantity is less than the pre-occupied quantity, pre-occupying can be carried out.
In this embodiment, for the online terminal device, it is first determined whether the resource stock unit code belongs to the channel code, whether the resource stock unit code belongs to the province code and the city code, and whether the serial code resource belongs to the active code, after the rules pass, the pre-occupied number under the resource stock unit code is compared with the pre-occupied number under the logistics warehouse code, and if the pre-occupied number is smaller than the pre-occupied number, pre-occupation can be performed.
In the embodiment, some behaviors of the user are recorded, for example, behaviors of an online business hall, for example, behaviors of browsing commodities are recorded, the incidence relation of the commodities added in the shopping cart, the reason of canceling the order of the user, the behaviors of canceling the commodities in the shopping cart, the behaviors of searching the commodities, the portrait of the user, the real-time processing by combining a big data Storm technology, the real-time recommendation of the user is given, and the user can conveniently initiate an article pre-occupation calling request.
In the embodiment, the processing of the forms is mainly offline, some forms are manually filled by users, for example, the forms are filled in by adopting a marketing mode, and the forms are automatically identified by adopting character recognition to read user information to complete user data filling of an order page, so that a large amount of manual entry operations of business staff are reduced.
In the embodiment, a large data technology is used for clustering analysis on database logs, message logs and file reading logs, so that common problems in the logs are found, and reference is provided for system debugging and improvement of a subsequent system.
And S202, if the identification information meets the pre-occupation mode information in the first node, generating a pre-occupation record table on the second node according to the identification information, the data information of the terminal equipment corresponding to the article pre-occupation calling request, the quantity of the articles and the states of the articles.
In this embodiment, the data information of the terminal device includes identification information of the device, the number of the articles may be one or several, and the above information is used to generate the preemption record table on the second node. The pre-occupation recording table is convenient to call, and the data information stored in the pre-occupation recording table is less than the data information stored in the inventory information table, so that the speed of traversing the pre-occupation recording table after calling is much higher than that of traversing the inventory information table. Thus, the processing efficiency can be improved, and the time for pre-occupying the whole process can be saved.
Specifically, the article pre-occupation calling request is frequent, the quantity of the inventory information tables is huge (tens of millions of data), and the technology of MONGODB and the pre-occupation recording table is used for effectively improving the real-time performance of user pre-occupation. And recording the article preemption calling request of the user in a preemption record table, periodically scanning the preemption record table, and deleting the preemption record table more than half an hour. Therefore, in general, there are about a thousand pieces of data in the table. Therefore, data can be quickly inquired or deleted, and the pressure of data operation on a database in a large table of the inventory list (tens of millions of data) is avoided.
And S203, determining an article pre-occupation result table on the second node according to the pre-occupation record table and the inventory information table.
In this embodiment, the item preemption result table is determined at the second node according to the information such as the number of items in the preemption record table and the information in the inventory information table.
Specifically, determining an article preemption result table at the second node according to the preemption record table and the inventory information table, comprising:
according to the pre-occupation record table, the state of the articles in the inventory information table is changed from an unoccupied state to a temporary occupied state on the second node, and an updated inventory information table is obtained;
and in the second node, determining a pre-occupation record table and an updated inventory information table as an article pre-occupation result table.
In this embodiment, the preemption record table and the updated inventory information table are used as the item preemption result table for the subsequent real preemption call request to call.
S204, after receiving the article real occupation calling request, acquiring the state of the article in the article pre-occupation result table, and calling real occupation mode information on a third node according to the state of the article; wherein the occupation manner information represents an occupation manner that allows the article to be actually occupied.
In this embodiment, the article pre-occupation calling request and the article real-occupation calling request are performed asynchronously, that is, after the article pre-occupation calling request is completed, when the article real-occupation calling request is performed, a message is sent to the article real-occupation calling request. Thus, the conditions of system downtime and the like are avoided. For example, 10000 article occupation calling requests are provided, because the use of a database, the calling of a third party payment interface and the like are involved, if 10000 pieces of data are processed at the same time, the pressure is relatively high, so that the article occupation calling requests are processed by only taking out 100 pieces from the message queue in a polling mode at each time, and thus, no matter how many messages are at the front end, the messages can be effectively processed and the high concurrency of the system can be met.
In this embodiment, the terminal device may include the following cases: the first type is terminal equipment in an offline store, the second type is terminal equipment on the line, and for the terminal equipment in the offline store, if a code string resource exists, the terminal equipment is a mobile phone; and judging whether the serial code resource is in a pre-occupation state, and if so, realizing the real occupation calling request of the article. If the resource is in an idle state, the pre-occupation process is automatically triggered, and real occupation can be carried out.
For terminal equipment in an offline store, if offline sales of a resource without serial codes, such as a mobile phone shell, are performed, the real occupation number of the resource SKU code is compared with the real occupation number, for example, 5 represents that 5 mobile phone shells are purchased at a time, and if the real occupation number is smaller than the real occupation number, real occupation can be performed.
For the on-line terminal equipment, the real occupation quantity (no serial code resource use) under the resource stock unit code and the real occupation quantity under the logistics bin (logistics bin code) are compared, and if the real occupation quantity is less than the real occupation quantity, the real occupation can be carried out. If the residual inventory of the logistics warehouse is insufficient, the residual inventory of the logistics warehouse is compared with the residual quantity of the inventory of other logistics warehouses under the provincial warehouse channel, if the residual inventory exists, real occupation can be carried out, and an provincial allocation flow is triggered. If the province warehouse quantity is not enough, inquiring other province allocation adjustable quantity, if the residual inventory exists, actually occupying, and triggering the remote (cross-province) allocation flow. If no real occupied resource exists and the resource stock unit can be over-sold, the over-selling process is triggered, and meanwhile, an order request is sent to the supplier of the resource stock unit to place an order.
In an optional example, after invoking the occupation mode information on the third node according to the state of the item, the method further includes:
generating an instruction message on the third node according to the real occupation result, verifying the instruction message and obtaining a verification result;
and according to the checking result, the state of the article in the inventory information table is changed from the temporary occupation state to the sold state on the third node.
In this embodiment, the instruction message is used to characterize the occupation result, and since an exception may occur in the occupation process, the instruction message needs to be checked, and a final check result is determined, if the check result is a pass, it indicates that the article is successfully occupied, and the state of the article in the inventory information table is modified from the temporary occupation state to the sold state at the third node.
In one example, after the status of the item in the inventory information table is modified from the temporary occupied status to the sold status at the third node, the method further comprises the following steps:
and deleting the article with the sold state in the pre-occupation record table on the second node.
In one example, after the status of the item is a sold status, then the record in the pre-emption record table may be deleted.
In one example, checking the instruction message and obtaining a check result includes:
detecting the content of the instruction message at the third node;
and if the missing item exists, supplementing the missing item, and taking the supplemented instruction message as a verification result.
In this embodiment, the instruction messages of various contacts are different, and if some contact instruction messages have less necessary information, the missing items need to be supplemented.
In this embodiment, verifying the instruction message and obtaining a verification result includes:
detecting the format of the instruction message at the third node;
if the format of the instruction message is a non-standard format, the format of the instruction message is modified into a standard format, and the instruction message modified into the standard format is used as a checking result.
In this embodiment, the non-standard format may be an xml format, and the standard format may be a json format. If the command message is in a non-standard format, the non-standard format needs to be converted into a standard format.
In this embodiment, if the instruction message is not correctly processed due to the network or other reasons in the processing process of the instruction message, for example, a sales table of the article is generated, the state of the article is a sold state, but the inventory information table is not updated, that is, the processing of the instruction message fails. At this time, the abnormal instruction message is automatically retransmitted at regular time, the instruction message is added into the real occupation message queue again, and the article real occupation calling request is triggered again. If the real occupation process can not be completed, after the accumulation of the three times, the instruction message is marked as needing manual processing and is not automatically triggered any more. If manual processing is needed, the command message is reissued according to the resending button reminded by the interface.
And S205, if the item real occupation calling request is not received within the preset time, deleting the item pre-occupation result table on the second node.
In this embodiment, the preset time may be 30 minutes, and if the article real occupation call request is not received within the preset time, it indicates that the article may not be needed by the user, and then the article pre-occupation result table on the second node is deleted, which has the advantage of avoiding the occupation of the memory.
And S206, if the state of the article accords with the occupation mode information, generating a sales table of the article on the fourth node, and determining the sales table of the article as an occupation result.
For example, this step may refer to step S104 described above, and is not described again.
S207, updating an article identification detail table in the inventory information table on a fifth node according to the real occupation result; wherein the item identification detail sheet represents the sale state of the item.
In this embodiment, the method further includes:
detecting the node state of the first node, and if the node state of the first node indicates that the first node is abnormal or the residual space amount representing the first node is smaller than a preset threshold value, migrating the pre-occupation mode information in the first node to a third node;
and detecting the node state of the fourth node, and if the node state of the fourth node indicates that the fourth node is abnormal or the residual space amount indicating the fourth node is less than a preset threshold value, migrating the sales table of the articles in the fourth node to a fifth node.
In this embodiment, after the first node cannot process the preemption mode information, the first node is migrated to the third node for processing, and when a failure of the server hosted by the first node is found, the third node may join the service group to replace the failed server and take the failed server off-line, so that the user has no perception during the whole period. The services are called in a capacity mode, such as logic verification and inventory quantity locking services involved in a pre-occupation process, and each service is independently developed and issued, is registered in a capacity center and complies with: publish-subscribe process. After the developer finishes development, the developer registers in the capability center and releases the capability center. The user subscribes the services required by the user according to the needs of the user, such as a pre-occupation process, and the services required to be subscribed comprise: 1. logic checking service, 2 inventory quantity locking service, 3 temporary pre-occupation table generation service updating, and 4 serial inventory detail updating service. After subscribing to the relevant service, the programmer adds the call to the service in the code logic of the programmer and finishes the service arrangement: 1-2-3-4-in turn completing service subscription. And assembled into a pre-emptive service. Because the service is deployed by clusters, when a certain capability (such as a logic check service) does not meet the performance requirement, dynamic level expansion can be performed to increase the number of servers to meet the requirement. For example, 2 stations are increased to 4 stations, and the user does not feel the information in the whole period.
In this embodiment, migrating the preemption information in the first node to the third node includes:
encrypting the preemption mode information in the first node based on a first public key in the first node to obtain the encrypted preemption mode information; sending the encrypted preemption mode information to a third node;
the encrypted preemption mode information is used for the third node to decrypt and store the encrypted preemption mode information based on a first private key in the third node;
the first public key and the first private key are issued by the third-party equipment.
In this embodiment, the process of migrating from the first node to the third node is encrypted, so that the security during the migration process can be ensured. In the embodiment, the elastic expansion of the used server can be realized, for example, the information of the pre-occupation mode is originally deployed on 4 machines, and during the peak period of network use, the information can be expanded to 20 machines to provide high concurrency capability; when the network is in a valley period, the network can be contracted back to the original 4 machines, and the user is not aware in the whole period.
In this embodiment, migrating the sales table of the item in the fourth node to the fifth node includes:
encrypting the sales table of the article in the fourth node based on the second public key in the fourth node to obtain an encrypted sales table; sending the encrypted sales table to a fifth node;
the encrypted sales table is used for the fifth node to decrypt and store the encrypted sales table based on the second private key in the fifth node;
and the second public key and the second private key are issued by the third-party equipment.
In this embodiment, the process of migrating from the fourth node to the fifth node is encrypted, so that the reliability of data in the migration process can be ensured, and the problem of single-node backup is avoided due to the adoption of the distributed database of the DRDS.
When a server is found to be failed, an available service is copied, added to the service group, the failed server is replaced, and the failed server is taken off line. The user is not aware of the whole period.
The service and the database of the system are deployed in Guangzhou district, and meanwhile, remote disaster recovery is carried out in the Western-style security computer room. Under the condition that the machine room in the Guangzhou area is completely hung, the machine room can be switched to a Xian machine room, and the reliability and the robustness of the system are ensured.
The application provides a table processing method, a table processing device and a table processing equipment based on article occupation and a storage medium. The horizontal expansion can be supported through the migration between the nodes, and when a performance bottleneck occurs in a certain node, the service can be issued to more physical machines or virtual machines, so that the horizontal expansion is conveniently carried out; meanwhile, high concurrency is supported, and the system downtime during the service peak is effectively solved by using the distributed asynchronous message queue, so that better user experience is provided for users; the problem of high reliability is solved, because a distributed database system is used, the problem that the use of a user is influenced due to the fault of a single data node can be avoided, and when the single node has a problem, the user side does not sense the problem; by using the distributed database system, data loss can not be caused when a single node has a fault, and the data safety is effectively ensured. The requirement of high real-time performance is met.
Fig. 3 is a schematic diagram of a table processing apparatus based on item occupancy according to a third embodiment of the present application. The apparatus 30 according to the third embodiment includes:
a receiving unit 301, configured to receive an article preemption call request sent by at least one terminal device, and call preemption mode information on a first node according to identification information of an article in the article preemption call request; the pre-occupation mode information represents an occupation mode allowing the article to be pre-occupied;
a locking unit 302, configured to lock, in the second node, an item corresponding to the identification information if the identification information meets the preemption mode information in the first node, and obtain an item preemption result table;
the calling unit 303 is configured to, after receiving the article occupation calling request, acquire the state of the article in the article occupation result table, and call the occupation mode information on the third node according to the state of the article; wherein the occupation mode information represents an occupation mode allowing the article to be actually occupied;
a generating unit 304, configured to generate a sales table of the item on the fourth node if the state of the item conforms to the occupation manner information, and determine that the sales table of the item is an occupation result;
an updating unit 305, configured to update the item identification list in the inventory information table at the fifth node according to the occupation result; wherein the item identification detail list represents the sales state of the item.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process of the above-described device may refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
Fig. 4 is a schematic diagram of a table processing apparatus based on article occupancy according to a fourth embodiment of the present application. The apparatus 40 according to the fourth embodiment includes:
a receiving unit 401, configured to receive an article preemption call request sent by at least one terminal device, and call preemption mode information on a first node according to identification information of an article in the article preemption call request; the pre-occupation mode information represents the occupation mode of the articles allowed to be pre-occupied;
a locking unit 402, configured to lock, in the second node, an item corresponding to the identification information if the identification information meets the preemption mode information in the first node, and obtain an item preemption result table;
the calling unit 403 is configured to, after receiving the article occupation calling request, obtain the state of the article in the article occupation result table, and call the occupation mode information on the third node according to the state of the article; the real occupation mode information represents an occupation mode allowing the article to be actually occupied;
a generating unit 404, configured to generate a sales table of the article at the fourth node if the state of the article matches the occupation mode information, and determine that the sales table of the article is an occupation result;
an updating unit 405, configured to update the item identifier list in the inventory information table on the fifth node according to the occupation result; wherein the item identification detail list represents the sales state of the item.
In an optional example, the locking unit 402 includes:
a generating module 4021, configured to generate a preemption record table on the second node for the identification information, the data information of the terminal device corresponding to the article preemption call request, the number of the articles, and the states of the articles;
the determining module 4022 is configured to determine an item preemption result table at the second node according to the preemption record table and the inventory information table.
In an alternative example, the determining module 4022 includes:
a modification submodule 40221, configured to modify, on the second node, the state of the article in the inventory information table from an unoccupied state to a temporary occupied state according to the preemption record table, and obtain an updated inventory information table;
the determining sub-module 40222 is configured to determine, in the second node, the preemption record table and the updated inventory information table as the item preemption result table.
In one optional example, the identification information comprises one or more of: the method comprises the following steps of user name, channel code of the article, channel type of the article, warehouse code of the article, activity code of the article, resource inventory unit of the article, resource unique identification of the article and order number of the article.
In one optional example, the apparatus further comprises:
the first deleting unit 406 is configured to delete the item preemption result table on the second node if the item real-time invocation request is not received within the preset time.
In one optional example, the apparatus further comprises:
a verification unit 407, configured to generate an instruction message according to the occupation result at the third node, verify the instruction message, and obtain a verification result;
and a modification unit 408, configured to modify, according to the verification result, the state of the item in the inventory information table from the temporary occupied state to a sold state at the third node.
In an optional example, the verification unit 407 includes:
a first detecting module 4071, configured to detect the content of the instruction message at the third node;
a supplement module 4072, configured to, if there is a missing item, supplement the missing item, and use the supplemented instruction message as a check result.
In an optional example, the verification unit 407 includes:
a second detecting module 4073, configured to detect a format of the instruction message at the third node;
the modifying module 4074 is configured to modify the format of the instruction message into a standard format if the format of the instruction message is a non-standard format, and use the instruction message modified into the standard format as a check result.
In one optional example, the apparatus further comprises:
the second deleting unit 409 is configured to delete the item whose status in the preemption record table at the second node is the sold status.
In one optional example, the apparatus further comprises:
the first migration unit 410 is configured to detect a node state of the first node, and migrate the preemption mode information in the first node to the third node if it is determined that the node state of the first node indicates that the first node is abnormal or the remaining space amount indicating the first node is smaller than a preset threshold;
and the second migration unit 411 is configured to detect a node state of the fourth node, and migrate the sales table of the items in the fourth node to the fifth node if it is determined that the node state of the fourth node represents that the fourth node is abnormal or that the remaining space amount representing the fourth node is smaller than a preset threshold.
In an optional example, the first migration unit 410 includes:
a first encryption module 4101, configured to encrypt the preemption mode information in the first node based on a first public key in the first node, so as to obtain encrypted preemption mode information; sending the encrypted preemption mode information to a third node;
the encrypted pre-occupation mode information is used for the third node to decrypt and store the encrypted pre-occupation mode information based on a first private key in the third node;
the first public key and the first private key are issued by the third-party equipment.
In an optional example, the second migration unit 411 includes:
a second encryption module 4111, configured to encrypt a sales table of an item in a fourth node based on a second public key in the fourth node, so as to obtain an encrypted sales table; sending the encrypted sales table to a fifth node;
the encrypted sales table is used for the fifth node to decrypt and store the encrypted sales table based on the second private key in the fifth node;
and the second public key and the second private key are issued by the third-party equipment.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described apparatus may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
FIG. 5 is a block diagram illustrating an electronic device, which may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like, in accordance with one exemplary embodiment.
The apparatus 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the apparatus 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile and non-volatile storage devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in operating modes, such as call mode, record mode, and voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 514 includes one or more sensors for providing various aspects of state assessment for the apparatus 500. For example, the sensor assembly 514 may detect an open/closed state of the apparatus 500, the relative positioning of the components, such as a display and keypad of the apparatus 500, the sensor assembly 514 may also detect a change in the position of the apparatus 500 or a component of the apparatus 500, the presence or absence of user contact with the apparatus 500, orientation or acceleration/deceleration of the apparatus 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the apparatus 500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform an item occupancy-based table processing method of the electronic device.
The application also discloses a computer program product comprising a computer program which, when executed by a processor, implements the method as described in the embodiments.
Various implementations of the systems and techniques described here above may be realized in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or electronic device.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as data electronics), or that includes a middleware component (e.g., application electronics), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include a client and an electronic device. The client and the electronic device are generally remote from each other and typically interact through a communication network. The relationship of client and electronic devices arises by virtue of computer programs running on the respective computers and having a client-electronic device relationship to each other. The electronic device may be a cloud electronic device, which is also called a cloud computing electronic device or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a traditional physical host and a VPS service ("Virtual Private Server", or "VPS" for short). The electronic device may also be a distributed system of electronic devices, or an electronic device incorporating a blockchain. It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present application can be achieved.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (16)

1. A method for processing a table based on an item occupancy, the method comprising:
receiving an article pre-occupation calling request sent by at least one terminal device, and calling pre-occupation mode information on a first node according to identification information of an article in the article pre-occupation calling request; the pre-occupation mode information represents the occupation mode of the articles allowed to be pre-occupied;
if the identification information meets the pre-occupation mode information in the first node, locking an article corresponding to the identification information on a second node, and obtaining an article pre-occupation result table;
after receiving an article real occupation calling request, acquiring the state of an article in the article pre-occupation result table, and calling real occupation mode information on a third node according to the state of the article; wherein the occupation mode information represents an occupation mode allowing the article to be actually occupied;
if the state of the article accords with the real occupation mode information, generating a sales table of the article on a fourth node, and determining the sales table of the article as a real occupation result;
updating an article identification list in the inventory information table on a fifth node according to the real occupation result; wherein the item identification detail sheet characterizes a sales status of the item.
2. The method of claim 1, wherein locking the item corresponding to the identification information on the second node and obtaining an item preemption result table comprises:
generating a preemption record table on the second node by using the identification information, the data information of the terminal equipment corresponding to the item preemption call request, the quantity of the items and the states of the items;
and determining the item pre-occupation result table on the second node according to the pre-occupation record table and the inventory information table.
3. The method of claim 2, wherein determining the item preemption results table at the second node based on the preemption record table and an inventory information table comprises:
according to the pre-occupation record table, the state of the article in the inventory information table is changed from an unoccupied state to a temporary occupied state on the second node, and an updated inventory information table is obtained;
and in the second node, determining the pre-occupation record table and the updated inventory information table as the item pre-occupation result table.
4. The method of claim 2, wherein the identification information comprises one or more of: the method comprises the following steps of user name, channel code of the article, channel type of the article, warehouse code of the article, activity code of the article, resource inventory unit of the article, resource unique identification of the article and order number of the article.
5. The method of claim 3, further comprising:
and if the article real occupation calling request is not received within the preset time, deleting the article pre-occupation result table on the second node.
6. The method according to any of claims 1-5, further comprising, after invoking the occupation pattern information on a third node according to the state of the item:
generating an instruction message on the third node according to the real occupation result, verifying the instruction message and obtaining a verification result;
and according to the checking result, the state of the article in the inventory information table is changed from the temporary occupied state to the sold state on the third node.
7. The method of claim 6, wherein verifying the instruction message and obtaining a verification result comprises:
detecting the content of the instruction message at the third node;
and if the missing item exists, supplementing the missing item, and taking the supplemented instruction message as a verification result.
8. The method of claim 6, wherein verifying the instruction message and obtaining a verification result comprises:
detecting a format of the instruction message at the third node;
if the format of the instruction message is a non-standard format, the format of the instruction message is modified into a standard format, and the instruction message modified into the standard format is used as a verification result.
9. The method of claim 6, wherein after the modification of the status of the item in the inventory information table from the temporary occupancy status to the sold status at the third node, further comprising:
and deleting the article with the sold state in the pre-occupation record table on the second node.
10. The method according to any one of claims 1-5, further comprising:
detecting the node state of the first node, and if the node state of the first node indicates that the first node is abnormal or the residual space amount representing the first node is smaller than a preset threshold value, migrating the pre-occupation mode information in the first node to the third node;
and detecting the node state of the fourth node, and if the node state of the fourth node indicates that the fourth node is abnormal or the residual space amount representing the fourth node is less than a preset threshold value, migrating the sales table of the articles in the fourth node to the fifth node.
11. The method of claim 10, wherein migrating the preemption-by-preemption information in the first node to the third node comprises:
encrypting the preemption mode information in the first node based on the first public key in the first node to obtain the encrypted preemption mode information; sending the encrypted preemption mode information to the third node;
the encrypted preemption-method information is used for the third node to decrypt and store the encrypted preemption-method information based on a first private key in the third node;
the first public key and the first private key are issued by third-party equipment.
12. The method of claim 10, wherein migrating the sales table for the item in the fourth node to the fifth node comprises:
encrypting a sales table of the article in the fourth node based on the second public key in the fourth node to obtain an encrypted sales table; sending the encrypted sales table to the fifth node;
the encrypted sales table is used for the fifth node to decrypt and store the encrypted sales table based on a second private key in the fifth node;
the second public key and the second private key are issued by a third-party device.
13. An item occupancy-based table processing apparatus, the apparatus comprising:
the system comprises a receiving unit, a first node and a second node, wherein the receiving unit is used for receiving an article pre-occupation calling request sent by at least one terminal device and calling pre-occupation mode information on the first node according to identification information of an article in the article pre-occupation calling request; the pre-occupation mode information represents an occupation mode allowing the article to be pre-occupied;
the locking unit is used for locking an article corresponding to the identification information on a second node if the identification information meets the pre-occupation mode information in the first node, and obtaining an article pre-occupation result table;
the calling unit is used for acquiring the state of the article in the article pre-occupation result table after receiving the article real occupation calling request, and calling real occupation mode information on a third node according to the state of the article; wherein the occupation mode information represents an occupation mode allowing the article to be actually occupied;
the generating unit is used for generating a sales table of the article on a fourth node if the state of the article accords with the occupation mode information, and determining the sales table of the article as an occupation result;
the updating unit is used for updating the item identification list in the inventory information table on the fifth node according to the real occupation result; wherein the item identification detail list represents the sales status of the item.
14. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer execution instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of any of claims 1-12.
15. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the method of any one of claims 1-12.
16. A computer program product comprising a computer program which, when executed by a processor, carries out the method of any one of claims 1-12.
CN202210861827.6A 2022-07-22 2022-07-22 Table processing method, device and equipment based on article occupation and storage medium Pending CN115204981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210861827.6A CN115204981A (en) 2022-07-22 2022-07-22 Table processing method, device and equipment based on article occupation and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210861827.6A CN115204981A (en) 2022-07-22 2022-07-22 Table processing method, device and equipment based on article occupation and storage medium

Publications (1)

Publication Number Publication Date
CN115204981A true CN115204981A (en) 2022-10-18

Family

ID=83584237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210861827.6A Pending CN115204981A (en) 2022-07-22 2022-07-22 Table processing method, device and equipment based on article occupation and storage medium

Country Status (1)

Country Link
CN (1) CN115204981A (en)

Similar Documents

Publication Publication Date Title
CN108334436B (en) Application software optimization method, device, equipment and computer readable storage medium
EP3575948B1 (en) Shared data recovery method, device, computer equipment and storage medium
US9559992B2 (en) System and method for updating information in an instant messaging application
CN107450903B (en) Information processing method and device
CN108595919B (en) Software activation method, device, system and storage medium
US10110549B2 (en) Method, server and electronic devices of synchronizing notification messages for electronic devices
US10455542B2 (en) Method of synchronizing notification messages for electronic devices and electronic devices
KR20140120673A (en) Mobile terminal and method for processing notification information
CN103809967A (en) Application and data removal system
CN110022260B (en) Cross-environment receipt message processing method and system
CN111158597A (en) Metadata reading method and device, electronic equipment and storage medium
US11954396B2 (en) Screen projection status determining method and apparatus
CN108550033B (en) Method and device for displaying unique identifier of digital object
US20160217360A1 (en) Methods and devices for processing information card
CN114328029A (en) Backup method and device of application resources, electronic equipment and storage medium
CN110674153B (en) Data consistency detection method and device and electronic equipment
CN110417601B (en) Information prompting method, device and system in client and readable storage medium
CN111723353A (en) Identity authentication method, device, terminal and storage medium based on face recognition
CN110807537A (en) Conference room reservation processing method and device, electronic equipment and storage medium
CN115204981A (en) Table processing method, device and equipment based on article occupation and storage medium
CN115563156A (en) Method, device and equipment for checking stream data information and storage medium
CN114066370A (en) Inventory service calling method, device, equipment, storage medium and program product
CN112804098B (en) Domain name fault line switching method and device, terminal equipment and storage medium
CN111917633B (en) Message sending method, sending device, electronic equipment and storage medium
CN110471714B (en) Method, device, terminal and storage medium for controlling application starting

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