Commodity repeated ex-warehouse judgment method, electronic equipment and storage medium
Through the three-layer query mechanism of Blond filter, remote dictionary server and relational database, the efficiency and accuracy of repeated out-of-store judgments in the existing technology under high concurrency and large data volume conditions are solved, and a fast and accurate judgment of out-of-store goods is achieved.
Patent Information
- Application Number
- CN202411671216.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-07
AI Technical Summary
It is difficult for the prior art to effectively determine whether the goods are recurring out of the warehouse under high concurrency and large data volume conditions, and it is impossible to accurately consider the return situation, resulting in repeated investment in marketing expenses and waste of resources.
The three-layer query mechanism of Bloom filter, remote dictionary server and relational database is adopted. The preliminary query is performed by querying the Bloom filter with the shortest time and the least memory usage, and the remote dictionary server conducts secondary query (considering the return situation), and performs a three-level query through the relational database when the secondary query is missed to ensure the accuracy of repeated out-of-store judgments.
It improves the processing speed of product out-of-warehousing judgments, reduces the number of queries in relational databases, solves the problem that relational databases cannot meet high concurrent requests, and ensures the accuracy of repeated out-of-warehousing judgments.
Smart Images

Figure CN119579072A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of commodity delivery management, and more specifically, to a method for determining whether commodities are delivered repeatedly, an electronic device and a storage medium. Background Art
[0002] For traditional manufacturing, the layout of sales channels will directly affect product sales. In order to boost sales, manufacturers will use different promotional strategies to encourage channel dealers to continuously expand the quantity and scope of distribution. However, promotional strategies related to outbound records occupy a large amount of marketing expenses, which makes it particularly important to record and manage outbound and inbound records more efficiently and accurately.
[0003] When the database has a huge amount of historical outbound records and a high number of concurrent requests, if the database is queried for duplicate outbound requests each time, it will take a long time and cannot meet the high concurrency requirements. If a remote dictionary server is used to store historical outbound records in order to reduce query time, this method will consume a lot of memory when the amount of historical outbound records is large. If it exceeds the physical memory, the performance of the remote dictionary server will drop significantly. The large amount of data will also cause the remote dictionary server to have a performance drop during persistence and master-slave synchronization.
[0004] In the prior art, the patent document with application publication number CN114153887A discloses a method and device for determining duplication of call charge information, including: step S101, receiving a call bill information, and extracting the call bill primary key of the call bill information. Step S102, determining whether the call bill primary key exists in the Bloom filter. When it is determined that the call bill primary key does not exist in the Bloom filter, the call bill primary key is stored in the Bloom filter. Otherwise, query whether the call bill primary key is stored in a specified database. The specified database may be a non-relational database or a lightweight relational database based on the X86 architecture. If the call bill primary key is not stored in the specified database, the call bill primary key of the call bill information is stored in the specified database, and the call bill information is returned as non-duplicate call bill information. If the call bill primary key is stored in the specified database, the call bill information is recorded and returned as duplicate call bill information.
[0005] Although the existing methods can improve the query speed, the specified database is a non-relational database or a lightweight relational database based on the X86 architecture, which limits the amount of data that can be processed by this method, and cannot meet the query requirements under the condition of huge historical data. In addition, the existing technology queries the dialogue information, and there is no return, while the goods are returned. If the return of the goods is not tracked, in addition to the normal and reasonable return needs, the repeated shipment of goods will lead to repeated investment in marketing expenses and the withdrawal of manufacturers' marketing expenses. Therefore, it is necessary to determine whether each item is shipped out repeatedly when it is shipped out, and it is also necessary to consider whether there is a return in the judgment process.
[0006] Therefore, the present invention provides a method for determining whether goods have been repeatedly shipped out of the warehouse, an electronic device, and a storage medium. Summary of the invention
[0007] In view of this, the present invention provides a method for determining whether a commodity is repeatedly shipped out of the warehouse, an electronic device and a storage medium, so as to determine whether the commodity is repeatedly shipped out of the warehouse when the commodity is shipped out of the warehouse, and consider the issue of returns in the determination process.
[0008] In one aspect, the present invention provides a method for determining whether a product is repeatedly shipped out of a warehouse, comprising:
[0009] Receiving a request for a commodity to be shipped out, wherein the request for the commodity to be shipped out includes an identification code of the commodity to be shipped out;
[0010] Determine whether there is a shipment record corresponding to the identification code of the product to be shipped in the Bloom filter;
[0011] If there is a shipment record corresponding to the identification code of the commodity to be shipped in the Bloom filter, determining whether there is a return record corresponding to the identification code of the commodity to be shipped in the remote dictionary server;
[0012] If there is no return record corresponding to the identification code of the commodity to be shipped out in the remote dictionary server, determining whether there is a shipping record corresponding to the identification code of the commodity to be shipped out in the relational database;
[0013] If there is a shipment record corresponding to the identification code of the commodity to be shipped in the relational database, then the commodity to be shipped has been shipped repeatedly.
[0014] Optionally, the determining whether there is a shipment record corresponding to the identification code of the commodity to be shipped in the Bloom filter further includes:
[0015] If there is no outbound record corresponding to the identification code of the commodity to be shipped in the Bloom filter, determining whether there is an outbound record corresponding to the identification code of the commodity to be shipped in the remote dictionary server;
[0016] If there is a shipment record corresponding to the identification code of the commodity to be shipped in the remote dictionary server, the commodity to be shipped has been shipped repeatedly.
[0017] Optionally, the determining whether there is a shipment record corresponding to the identification code of the commodity to be shipped in the remote dictionary server further includes:
[0018] If there is no outbound record corresponding to the identification code of the commodity to be shipped out in the remote dictionary server, then the commodity does not have duplicate outbound shipment, the commodity to be shipped out is processed for outbound shipment and a corresponding outbound record is generated, and the outbound record corresponding to the commodity to be shipped out is matched with the identification code of the commodity to be shipped out and updated to the remote dictionary server and the relational database at the same time.
[0019] Optionally, the determining whether there is a return record corresponding to the identification code of the commodity to be shipped in the remote dictionary server further includes:
[0020] If there is a return record corresponding to the identification code of the goods to be shipped out in the remote dictionary server, the goods do not have duplicate shipments, the goods to be shipped out are processed for shipment and a corresponding shipment record is generated, the shipment record corresponding to the goods to be shipped out is matched with the identification code of the goods to be shipped out and updated to the remote dictionary server and the relational database at the same time.
[0021] Optionally, the determining whether there is a shipment record corresponding to the identification code of the commodity to be shipped in the relational database includes:
[0022] If there is no outbound record corresponding to the identification code of the commodity to be shipped out in the relational database, then the commodity does not have duplicate outbound shipment, the commodity to be shipped out is processed for outbound shipment and a corresponding outbound record is generated, and the outbound record corresponding to the commodity to be shipped out is matched with the identification code of the commodity to be shipped out and updated to the remote dictionary server and the relational database at the same time.
[0023] Optionally, after receiving the outbound request of the commodity to be outbound, the method further comprises:
[0024] A flow control process is performed on the user who sends the shipment request for the commodity to be shipped out.
[0025] Optionally, the relational database stores shipment data and return data;
[0026] The outbound data includes the identification code of the outbound commodity and the outbound record corresponding to the identification code of the outbound commodity; the return data includes the identification code of the returned commodity and the return record corresponding to the identification code of the returned commodity;
[0027] The outbound data and the return data are retrieved from the relational database at preset time intervals, the intersection of the identification codes of all the outbound commodities and the identification codes of all the returned commodities are calculated, the intersection and the outbound records corresponding to the intersection are deleted from the outbound data, and then loaded into the Bloom filter.
[0028] Optionally, the remote dictionary server stores the shipment data and the return data, and the shipment record corresponding to the identification code of the shipped commodity further includes the shipment date;
[0029] The time when the Bloom filter is loaded is taken as the completion time, the shipment records in the remote dictionary server whose shipment dates are before the completion time are deleted, and the identification codes of the shipped commodities corresponding to the deleted shipment records are also deleted.
[0030] On the other hand, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements any of the above-mentioned methods for determining duplicate shipment of goods.
[0031] In yet another aspect, the present invention further provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the above-mentioned methods for determining duplicate shipment of goods.
[0032] Compared with the prior art, the method for determining whether goods have been repeatedly shipped out of a warehouse, the electronic device, and the storage medium provided by the present invention achieve at least the following beneficial effects:
[0033] The method for determining whether goods are repeatedly shipped out, the electronic device and the storage medium provided by the present invention include: receiving a shipping request for goods to be shipped out, the shipping request for goods to be shipped out including an identification code of the goods to be shipped out; determining whether there is a shipping record corresponding to the identification code of the goods to be shipped out in a Bloom filter; if there is a shipping record corresponding to the identification code of the goods to be shipped out in the Bloom filter, determining whether there is a return record corresponding to the identification code of the goods to be shipped out in a remote dictionary server; if there is no return record corresponding to the identification code of the goods to be shipped out in the remote dictionary server, determining whether there is a shipping record corresponding to the identification code of the goods to be shipped out in a relational database; if there is a shipping record corresponding to the identification code of the goods to be shipped out in the relational database, the goods to be shipped out are shipped out repeatedly. Since the query time of Bloom filter, remote dictionary server and relational database is different, the memory usage of Bloom filter, remote dictionary server and relational database is also different. A preliminary query is performed by querying the Bloom filter with the shortest query time and the least memory usage, and then a secondary query is performed through the remote dictionary server. The return situation is considered in the secondary query to improve the judgment of the product's outbound delivery. When the return record of the product is not found in the secondary query, a tertiary query is performed by querying the relational database with the longest query time and the largest memory usage to ensure the accuracy of repeated outbound delivery judgment. There is no need to store a large number of quantities in the remote dictionary server, avoiding the problem of large resource consumption of the remote dictionary server and performance degradation caused by large data volume. Through three-level step-by-step query, the processing speed of product outbound delivery judgment can be improved, the number of queries of the relational database can be reduced, and the problem that the relational database cannot meet high concurrent requests can be solved.
[0034] Of course, any product implementing the present invention does not necessarily need to achieve all of the technical effects described above at the same time.
[0035] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0037] Figure 1 It is a flow chart of a method for determining repeated shipment of goods provided by the present invention.
[0038] Figure 2 It is another flow chart of the method for determining whether goods are repeatedly shipped out of the warehouse provided by the present invention. DETAILED DESCRIPTION
[0039] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0040] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0041] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0042] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0043] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0044] Example 1
[0045] Combination Figure 1 , Figure 1 1 is a flow chart of a method for determining whether a product is repeatedly shipped out of a warehouse provided by the present invention, to illustrate a specific embodiment of the method for determining whether a product is repeatedly shipped out of a warehouse provided by the present invention, including:
[0046] S1: receiving a request for a product to be shipped out, where the request for a product to be shipped out includes an identification code of the product to be shipped out;
[0047] S11: Determine whether there is a shipment record corresponding to the identification code of the product to be shipped in the Bloom filter;
[0048] S111: If there is a shipment record corresponding to the identification code of the commodity to be shipped in the Bloom filter, determine whether there is a return record corresponding to the identification code of the commodity to be shipped in the remote dictionary server;
[0049] S1111: If there is no return record corresponding to the identification code of the commodity to be shipped in the remote dictionary server, determine whether there is a shipping record corresponding to the identification code of the commodity to be shipped in the relational database;
[0050] S11111: If there is a shipment record corresponding to the identification code of the commodity to be shipped in the relational database, the commodity to be shipped has been shipped repeatedly.
[0051] It should be noted that each product has a unique identification code, so the Bloom filter and the remote dictionary server can be queried based on the product identification code to see whether the same identification code exists, so as to find the historical records related to the product.
[0052] Bloom filter, remote dictionary server (Redis) and relational database each have their own advantages and disadvantages. The query time of Bloom filter is nanoseconds, the memory usage is small, and about 2.34 megabytes of memory are required for one million data with 0.001% false positive. However, the cost of deleting data by Bloom filter is very high, and data inconsistency may occur in a distributed environment. The query time of remote dictionary server is about hundreds of microseconds, the memory usage is high, and about 1.2 gigabytes of memory are required for one million data. However, remote dictionary server supports data deletion, but the performance of remote dictionary server will degrade when the required memory exceeds the physical memory and the data volume is persisted. The query time of relational database is about tens of milliseconds, which can store a large amount of data, meet the query requirements under the condition of huge historical data, and support data deletion, but the query speed of relational database is slow and cannot support high concurrent request scenarios. Therefore, this embodiment stores the Bloom filter in the form of a file in the remote dictionary server, loads it into the memory for use when the remote dictionary server is started, performs a primary query through the Bloom filter, performs a secondary query such as return records through the remote dictionary server, and performs a tertiary query through the relational database, thereby giving full play to the respective advantages of the Bloom filter, the remote dictionary server and the relational database.
[0053] It is understandable that a preliminary query is performed by querying the Bloom filter with the shortest query time and the least memory usage, and then a secondary query is performed through the remote dictionary server. The return situation is taken into account in the secondary query to improve the judgment of the product's outbound delivery. When no return record of the product is found in the secondary query, a tertiary query is performed by querying the relational database with the longest query time and the largest memory usage to ensure the accuracy of repeated outbound delivery judgments. There is no need to store a large number of quantities in the remote dictionary server, avoiding the problem of large resource consumption and performance degradation caused by large data volume of the remote dictionary server. By querying at three levels, the processing speed of product outbound delivery judgment can be improved, the number of queries to the relational database can be reduced, and the problem that the relational database cannot meet high concurrent requests can be solved.
[0054] Example 2
[0055] Continue to refer to Figure 1 , to illustrate another specific embodiment of the method for determining repeated shipment of goods provided by the present invention, comprising:
[0056] The relational database stores outbound data and return data; the outbound data includes the identification code of the outbound goods and the outbound records corresponding to the identification code of the outbound goods; the return data includes the identification code of the returned goods and the return records corresponding to the identification code of the returned goods;
[0057] The outbound data and return data are retrieved from the relational database at preset time intervals, the intersection of the identification codes of all outbound goods and the identification codes of all returned goods is calculated, the intersection and the outbound records corresponding to the intersection are deleted from the outbound data and loaded into the Bloom filter.
[0058] The remote dictionary server stores the outbound data and the return data. The outbound record corresponding to the identification code of the outbound commodity also includes the outbound date.
[0059] The time when the Bloom filter is loaded is regarded as the completion time, and the outbound records in the remote dictionary server whose outbound dates are before the completion time are deleted, and the identification codes of the outbound commodities corresponding to the deleted outbound records are also deleted.
[0060] S1: receiving a request for a product to be shipped out, where the request for a product to be shipped out includes an identification code of the product to be shipped out;
[0061] S11: Determine whether there is a shipment record corresponding to the identification code of the product to be shipped in the Bloom filter;
[0062] S111: If there is a shipment record corresponding to the identification code of the commodity to be shipped in the Bloom filter, determine whether there is a return record corresponding to the identification code of the commodity to be shipped in the remote dictionary server;
[0063] S1111: If there is no return record corresponding to the identification code of the commodity to be shipped in the remote dictionary server, determine whether there is a shipping record corresponding to the identification code of the commodity to be shipped in the relational database;
[0064] S11111: If there is a shipment record corresponding to the identification code of the commodity to be shipped in the relational database, the commodity to be shipped has been shipped repeatedly.
[0065] S112: If there is no outbound record corresponding to the identification code of the commodity to be outbound in the Bloom filter, determine whether there is an outbound record corresponding to the identification code of the commodity to be outbound in the remote dictionary server;
[0066] S1121: If there is a shipment record corresponding to the identification code of the commodity to be shipped in the remote dictionary server, the commodity to be shipped has been shipped repeatedly.
[0067] S1122: If there is no outbound record corresponding to the identification code of the goods to be shipped in the remote dictionary server, the goods do not have duplicate outbound shipments. The goods to be shipped are processed for outbound shipment and corresponding outbound records are generated. The outbound records corresponding to the goods to be shipped are matched with the identification codes of the goods to be shipped and updated to the remote dictionary server and the relational database at the same time.
[0068] S1112: If there is a return record corresponding to the identification code of the goods to be shipped out in the remote dictionary server, the goods do not have duplicate shipments. The goods to be shipped out are processed for shipment and corresponding shipment records are generated. The shipment records corresponding to the goods to be shipped out are matched with the identification codes of the goods to be shipped out and updated to the remote dictionary server and the relational database at the same time.
[0069] S11112: If there is no outbound record corresponding to the identification code of the commodity to be shipped in the relational database, then there is no duplicate outbound shipment of the commodity. The commodity to be shipped is processed for outbound shipment and a corresponding outbound record is generated. The outbound record corresponding to the commodity to be shipped is matched with the identification code of the commodity to be shipped and updated to the remote dictionary server and the relational database at the same time.
[0070] It is understandable that when a product that has been shipped out is returned, the shipping record corresponding to the product in the Bloom filter should be deleted. Since the cost of deleting data in the Bloom filter is very high, the Bloom filter is set to obtain data from the relational database for update every preset time period to overcome the problem that the Bloom filter cannot meet the problem of deleting shipping records due to returns, and is loaded into the memory for use after the update. Since the remote dictionary server supports data deletion, the remote dictionary server only stores the return data and the newly added shipping data after the Bloom filter is updated to meet the requirements of the secondary query, and performs supplementary queries on the new data generated in the time period after the Bloom filter is updated to ensure the accuracy of the judgment. Through such a setting, not only the problem that the Bloom filter cannot meet the problem of deleting shipping records due to returns is overcome, but also the problem that the remote dictionary server consumes a lot of resources, the performance of large data volume is reduced, and the query of the relational database is slow and cannot meet high concurrency can be solved, and the advantages of the Bloom filter and the remote dictionary server, the fast data query, the remote dictionary server supports data deletion and modification, and the relational database stores data comprehensively, are brought into play.
[0071] It is understandable that due to the characteristics of the Bloom filter, false alarms may occur. If there is a shipment record corresponding to the identification code of the product to be shipped in the Bloom filter and there is no return record corresponding to the identification code of the product to be shipped in the remote dictionary server, it is also necessary to determine whether there is a shipment record corresponding to the identification code of the product to be shipped in the relational database to ensure the accuracy of the judgment of repeated shipment of the product. This implementation can improve the processing speed of the judgment of repeated shipment of the product through three-level step-by-step query, and set the data update rules in the Bloom filter and the remote dictionary server according to the different query content of each level, fully avoiding the shortcomings of the Bloom filter, the remote dictionary server and the relational database, and giving full play to the respective advantages of the Bloom filter, the remote dictionary server and the relational database.
[0072] Of course, if a small probability of false alarm is acceptable, it is not necessary to further determine whether there is a shipment record corresponding to the identification code of the product to be shipped in the relational database. The false alarm rate of the Bloom filter can be reduced by adding memory overhead. The relationship between the false alarm rate and the memory usage is calculated as follows:
[0073]
[0074] Among them, m is the memory occupied, n is the storage quantity, that is, the number of items expected to be inserted into the Bloom filter, and p is the false alarm rate.
[0075] According to the above formula, the memory consumed when storing 1 million elements with false alarm rates of 0.01, 0.001, and 0.0001 is 1.19M, 1.79M, and 2.34M respectively. To adjust the false alarm rate of the Bloom filter, you only need to adjust the parameters.
[0076] Example 3
[0077] Combination Figure 2 , Figure 2 1 is another flow chart of the method for determining whether a product is repeatedly shipped out of a warehouse provided by the present invention, to illustrate another specific embodiment of the method for determining whether a product is repeatedly shipped out of a warehouse provided by the present invention, including:
[0078] A request for a commodity to be shipped out is received, where the request for a commodity to be shipped out includes an identification code of the commodity to be shipped out.
[0079] After receiving the outbound request of the goods to be shipped, it includes: limiting the flow of users who send the outbound request of the goods to be shipped, including limiting the number of requests per second of users who send the product identification code, to prevent a small number of users from making a large number of requests that break through the first two layers of interception.
[0080] First, query the identification code of the product to be shipped in the Bloom filter. If it cannot be found, it proves that it must not have been shipped before the Bloom filter was loaded. Then, query the recent shipment records from the remote dictionary server based on the identification code of the product to be shipped, that is, query the new shipment records generated in the time period after the Bloom filter was loaded. If the remote dictionary server does not have the shipment record corresponding to the identification code of the product to be shipped, it can be determined that the product to be shipped does not have a duplicate shipment.
[0081] If the outbound information corresponding to the identification code of the product to be shipped is first queried in the Bloom filter, it is also necessary to query the remote dictionary server whether there is a return record corresponding to the identification code of the product to be shipped. If there is a return record corresponding to the identification code of the product to be shipped, it can be determined that the product to be shipped does not have a duplicate outbound shipment; if there is no return record corresponding to the identification code of the product to be shipped, there is a possibility of false alarm due to the implementation principle of the Bloom filter, and it is necessary to query the relational database to confirm whether there is an outbound record corresponding to the identification code of the product to be shipped, and then determine whether the product to be shipped is a duplicate outbound shipment. If the outbound record corresponding to the identification code of the product to be shipped is queried in the relational database, it proves that the product to be shipped may have been shipped before the Bloom filter is loaded.
[0082] The method for determining duplicate product shipments in this embodiment improves the processing speed of product shipment determination in scenarios with large amounts of data and high concurrency, and takes advantage of the fast query speed of Bloom filters and remote dictionary servers, the support for data deletion and modification by remote dictionary servers, and the comprehensive data storage of relational databases. It also takes returns into consideration to improve product shipment determination.
[0083] Example 4
[0084] Based on the same inventive concept, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements a method for determining duplicate shipment of goods as described in any one of the above embodiments.
[0085] Example 5
[0086] Based on the same inventive concept, the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for determining duplicate shipment of goods as described in any one of the above embodiments is implemented.
[0087] It can be seen from the above embodiments that the method for determining repeated shipment of goods, the electronic device and the storage medium provided by the present invention achieve at least the following beneficial effects:
[0088] The method for determining whether goods are repeatedly shipped out, the electronic device and the storage medium provided by the present invention include: receiving a shipping request for goods to be shipped out, the shipping request for goods to be shipped out including an identification code of the goods to be shipped out; determining whether there is a shipping record corresponding to the identification code of the goods to be shipped out in a Bloom filter; if there is a shipping record corresponding to the identification code of the goods to be shipped out in the Bloom filter, determining whether there is a return record corresponding to the identification code of the goods to be shipped out in a remote dictionary server; if there is no return record corresponding to the identification code of the goods to be shipped out in the remote dictionary server, determining whether there is a shipping record corresponding to the identification code of the goods to be shipped out in a relational database; if there is a shipping record corresponding to the identification code of the goods to be shipped out in the relational database, the goods to be shipped out are shipped out repeatedly. Since the query time of Bloom filter, remote dictionary server and relational database is different, the memory usage of Bloom filter, remote dictionary server and relational database is also different. A preliminary query is performed by querying the Bloom filter with the shortest query time and the least memory usage, and then a secondary query is performed through the remote dictionary server. The return situation is considered in the secondary query to improve the judgment of the product's outbound delivery. When the return record of the product is not found in the secondary query, a tertiary query is performed by querying the relational database with the longest query time and the largest memory usage to ensure the accuracy of repeated outbound delivery judgment. There is no need to store a large number of quantities in the remote dictionary server, avoiding the problem of large resource consumption of the remote dictionary server and performance degradation caused by large data volume. Through three-level step-by-step query, the processing speed of product outbound delivery judgment can be improved, the number of queries of the relational database can be reduced, and the problem that the relational database cannot meet high concurrent requests can be solved.
[0089] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A method for determining whether a product is repeatedly shipped out of a warehouse, characterized in that: include: Receiving a request for a commodity to be shipped out, wherein the request for the commodity to be shipped out includes an identification code of the commodity to be shipped out; Determine whether there is a shipment record corresponding to the identification code of the product to be shipped in the Bloom filter; If there is a shipment record corresponding to the identification code of the commodity to be shipped in the Bloom filter, determining whether there is a return record corresponding to the identification code of the commodity to be shipped in the remote dictionary server; If there is no return record corresponding to the identification code of the commodity to be shipped out in the remote dictionary server, determining whether there is a shipping record corresponding to the identification code of the commodity to be shipped out in the relational database; If there is a shipment record corresponding to the identification code of the commodity to be shipped in the relational database, then the commodity to be shipped has been shipped repeatedly.
2. The method for determining whether a product is repeatedly shipped out of a warehouse according to claim 1, characterized in that: The step of determining whether there is a shipment record corresponding to the identification code of the commodity to be shipped in the Bloom filter further includes: If there is no outbound record corresponding to the identification code of the commodity to be shipped in the Bloom filter, determining whether there is an outbound record corresponding to the identification code of the commodity to be shipped in the remote dictionary server; If there is a shipment record corresponding to the identification code of the commodity to be shipped in the remote dictionary server, the commodity to be shipped has been shipped repeatedly.
3. The method for determining repeated shipment of goods according to claim 2, characterized in that: The determining whether there is a shipment record corresponding to the identification code of the commodity to be shipped in the remote dictionary server also includes: If there is no outbound record corresponding to the identification code of the commodity to be shipped out in the remote dictionary server, then the commodity does not have duplicate outbound shipment, the commodity to be shipped out is processed for outbound shipment and a corresponding outbound record is generated, and the outbound record corresponding to the commodity to be shipped out is matched with the identification code of the commodity to be shipped out and updated to the remote dictionary server and the relational database at the same time.
4. The method for determining repeated shipment of goods according to claim 1, characterized in that: The step of determining whether there is a return record corresponding to the identification code of the commodity to be shipped out in the remote dictionary server further includes: If there is a return record corresponding to the identification code of the goods to be shipped out in the remote dictionary server, the goods do not have duplicate shipments, the goods to be shipped out are processed for shipment and a corresponding shipment record is generated, the shipment record corresponding to the goods to be shipped out is matched with the identification code of the goods to be shipped out and updated to the remote dictionary server and the relational database at the same time.
5. The method for determining repeated shipment of goods according to claim 1, characterized in that: The determining whether there is a shipment record corresponding to the identification code of the commodity to be shipped in the relational database includes: If there is no outbound record corresponding to the identification code of the commodity to be shipped out in the relational database, then the commodity does not have duplicate outbound shipment, the commodity to be shipped out is processed for outbound shipment and a corresponding outbound record is generated, and the outbound record corresponding to the commodity to be shipped out is matched with the identification code of the commodity to be shipped out and updated to the remote dictionary server and the relational database at the same time.
6. The method for determining repeated shipment of goods according to claim 1, characterized in that: After receiving the outbound request of the commodity to be outbound, the method includes: A flow control process is performed on the user who sends the shipment request for the commodity to be shipped out.
7. The method for determining repeated shipment of goods according to claim 1, characterized in that: The relational database stores outbound data and return data; The outbound data includes the identification code of the outbound commodity and the outbound record corresponding to the identification code of the outbound commodity; the return data includes the identification code of the returned commodity and the return record corresponding to the identification code of the returned commodity; The outbound data and the return data are retrieved from the relational database at preset time intervals, the intersection of the identification codes of all the outbound commodities and the identification codes of all the returned commodities are calculated, the intersection and the outbound records corresponding to the intersection are deleted from the outbound data, and then loaded into the Bloom filter.
8. The method for determining repeated shipment of goods according to claim 7, characterized in that: The remote dictionary server stores the outbound data and the return data, and the outbound record corresponding to the identification code of the outbound commodity also includes the outbound date; The time when the Bloom filter is loaded is taken as the completion time, the shipment records in the remote dictionary server whose shipment dates are before the completion time are deleted, and the identification codes of the shipped commodities corresponding to the deleted shipment records are also deleted.
9. An electronic device, characterized in that: The electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method for determining the repeated shipment of goods as described in any one of claims 1 to 8.
10. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method for determining duplicate shipment of goods as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Call ticket information repetition judgment method and device
CN114153887A