Sampling method and related device

By calculating the average order quantity and standard deviation of the procurement cycle, determining the threshold, and adjusting the sampling interval according to the order quantity, the problem of fraud in small-scale procurement projects is solved, the ability to identify malicious order dismantling is improved, and the risk of fraud is reduced.

CN119599606APending Publication Date: 2025-03-11AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411743768.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In procurement management, procurement projects involving small amounts are prone to lack of multi-level supervision, resulting in an increase in the chances of fraud, especially malicious order-breaking fraud, which is difficult to identify.

Method used

By obtaining the total purchase order quantity and the order quantity for the procurement cycle, calculate the average order quantity and standard deviation for the procurement cycle, determine the first threshold, and adjust the sampling interval to increase the number of purchase orders drawn based on the order quantity and threshold.

Benefits of technology

It improves the ability to identify malicious order dismantling, reduces the risk of order dismantling fraud, and ensures the transparency and fairness of the procurement process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599606A_ABST
    Figure CN119599606A_ABST
Patent Text Reader

Abstract

The invention discloses a sampling method and a related device, and relates to the technical field of computers, and the method comprises the steps: obtaining the total purchase order quantity and the order quantity of a purchase cycle; based on the total quantity of purchase orders and the number of purchase cycles, calculating the average number of purchase orders of the purchase cycles; based on the order number of the purchase cycle, the purchase cycle number and the average purchase order number, calculating a standard deviation of the purchase cycle; determining a first threshold value based on the average purchase order number and the standard deviation of the purchase cycle; when the number of orders in the purchasing period does not exceed a first threshold value, purchasing orders are extracted according to a preset sampling interval; and when the order number of the purchase cycle exceeds a first threshold value, the purchase orders are extracted according to an interval smaller than a preset sampling interval. According to the invention, the malicious order splitting phenomenon can be found conveniently, and the fraud risk of order splitting can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a sampling method and related devices. Background Art

[0002] Procurement is an important activity in modern enterprise management. Whether it is the procurement of raw materials by industrial manufacturing enterprises or the procurement of daily operating consumables by other industries, they all rely on a set of effective internal control procurement management systems. Enterprises usually use hierarchical approval, bidding and other systems to manage procurement activities. The cost-effectiveness principle needs to be considered in the implementation of hierarchical approval and bidding management systems. This system is often used only when it involves procurement projects with large amounts of money. Procurement projects involving small amounts often consider cost-effectiveness and choose to delegate approval authority and give up fair market competition methods such as bidding. Since small procurement projects lack multi-level supervision, there is an opportunity for fraud. Reasonable purchase order splitting is an operation allowed by an enterprise. Therefore, purchase order splitting has become a common means for purchasers to circumvent bidding and review by superior departments in order to seek personal gain. Based on this, how to effectively identify malicious order splitting fraud is an urgent problem to be solved. Summary of the invention

[0003] In view of the above problems, this application provides a sampling method and related devices to achieve the purpose of reducing the risk of fraud in splitting orders. The specific scheme is as follows:

[0004] The first aspect of the present application provides a sampling method, comprising:

[0005] Obtaining the total amount of purchase orders and the order quantity of a purchase cycle; wherein the total amount of purchase orders is the sum of the order quantities of multiple purchase cycles;

[0006] Based on the total purchase order volume and the number of purchase cycles, calculate the average purchase order volume for the purchase cycle;

[0007] Calculating a standard deviation of the procurement cycle based on the order quantity of the procurement cycle, the number of procurement cycles, and the average procurement order quantity;

[0008] Determining a first threshold based on the average purchase order quantity and the standard deviation of the purchase cycle;

[0009] When the number of orders in the procurement cycle does not exceed the first threshold, selecting procurement orders according to a preset sampling interval;

[0010] When the order quantity in the procurement cycle exceeds the first threshold, the procurement orders are sampled at an interval that is smaller than the preset sampling interval.

[0011] In a possible implementation, determining the first threshold based on the average purchase order quantity and the standard deviation of the purchase cycle includes:

[0012] The first threshold is obtained by calculating the sum of the average purchase order quantity and the standard deviation of the purchase cycle.

[0013] In a possible implementation, when the number of orders in the procurement cycle exceeds the first threshold, extracting the procurement orders at an interval less than the preset sampling interval includes:

[0014] Calculate the sum of the average purchase order quantity and twice the standard deviation of the purchase cycle to obtain a second threshold;

[0015] When the order quantity in the purchase cycle exceeds the first threshold but does not exceed the second threshold, sampling the purchase order according to a first sampling interval;

[0016] When the order quantity in the procurement cycle exceeds the second threshold, the procurement orders are selected according to a second sampling interval; wherein the second sampling interval is smaller than the first sampling interval, and both the first sampling interval and the second sampling interval are smaller than the preset sampling interval.

[0017] In a possible implementation, when the number of orders in the procurement cycle exceeds the first threshold but does not exceed the second threshold, extracting the procurement order according to a first sampling interval includes:

[0018] The first sampling interval is obtained by dividing the sum of the total purchase order quantity and twice the order quantity of the purchase cycle by twice the average purchase order quantity;

[0019] When the order quantity in the purchase cycle exceeds the first threshold but does not exceed the second threshold, sampling the purchase order according to the first sampling interval;

[0020] When the number of orders in the procurement cycle exceeds the second threshold, extracting the procurement order according to a second sampling interval includes:

[0021] Calculate the ratio of the order quantity of the procurement cycle to the average purchase order quantity to obtain the second sampling interval;

[0022] When the order quantity in the purchase cycle exceeds the second threshold, the purchase orders are sampled according to the second sampling interval.

[0023] In a possible implementation, when the number of orders in the procurement cycle does not exceed the first threshold, selecting the procurement order according to a preset sampling interval includes:

[0024] Calculate the ratio of the total purchase order quantity to the average purchase order quantity to obtain the preset sampling interval;

[0025] When the order quantity in the procurement cycle does not exceed the first threshold, procurement orders are sampled according to the preset sampling interval.

[0026] In a possible implementation, the calculating the standard deviation of the procurement cycle based on the order quantity of the procurement cycle, the number of procurement cycles, and the average number of procurement orders includes:

[0027] Cumulatively summing the squares of the differences between the order quantity of each purchasing cycle and the average purchase order quantity to obtain a cumulative sum result;

[0028] The square root of the ratio of the cumulative summation result to the number of procurement cycles is calculated to obtain the standard deviation of the procurement cycle.

[0029] A second aspect of the present application provides a sampling system, comprising:

[0030] A data acquisition module, used to acquire the total purchase order quantity and the order quantity of a purchase cycle; wherein the total purchase order quantity is the sum of the order quantities of multiple purchase cycles;

[0031] A first calculation module, configured to calculate an average purchase order quantity of the purchase cycle based on the total purchase order quantity and the number of purchase cycles;

[0032] A second calculation module, configured to calculate a standard deviation of the purchase cycle based on the order quantity of the purchase cycle, the number of purchase cycles and the average purchase order quantity;

[0033] A first threshold determination module, configured to determine a first threshold based on the average purchase order quantity and the standard deviation of the purchase cycle;

[0034] A first sampling module, configured to extract purchase orders according to a preset sampling interval when the number of orders in the purchase cycle does not exceed the first threshold;

[0035] The second sampling module is used to select the purchase orders at an interval less than the preset sampling interval when the order quantity in the purchase cycle exceeds the first threshold.

[0036] The third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the sampling method of the first aspect or any implementation of the first aspect.

[0037] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0038] The memory is used to store computer programs;

[0039] The processor is used to execute the computer program so that the electronic device can implement the sampling method of the above-mentioned first aspect or any implementation manner of the first aspect.

[0040] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can use the sampling method of the above-mentioned first aspect or any implementation of the first aspect.

[0041] By means of the above technical scheme, the sampling method and related devices provided by the present application obtain the total amount of purchase orders and the number of orders in the purchase cycle; based on the total amount of purchase orders and the number of purchase cycles, calculate the average number of purchase orders in the purchase cycle; based on the number of orders in the purchase cycle, the number of purchase cycles and the average number of purchase orders, calculate the standard deviation of the purchase cycle; determine the first threshold value based on the average number of purchase orders and the standard deviation of the purchase cycle; when the number of orders in the purchase cycle does not exceed the first threshold value, extract purchase orders according to the preset sampling interval; when the number of orders in the purchase cycle exceeds the first threshold value, extract purchase orders according to an interval less than the preset sampling interval. The present application compares the number of orders in the purchase cycle with the first threshold value. When the number of orders in the purchase cycle is small, purchase orders can be extracted according to the preset sampling interval. When the number of orders in the purchase cycle is large, purchase orders can be extracted according to an interval less than the preset sampling interval. In this way, a large number of purchase orders are extracted, which is convenient for discovering malicious order splitting and helps reduce the risk of order splitting fraud. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0043] Figure 1 A flow chart of a sampling method provided for this application;

[0044] Figure 2 A sampling system structure diagram provided for this application;

[0045] Figure 3 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0046] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0047] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0048] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0049] The present application embodiment provides a sampling method. The sampling method of the present application embodiment is described in detail below with reference to the accompanying drawings.

[0050] Reference Figure 1 , Figure 1 A flow chart of a sampling method provided in an embodiment of the present application is as follows: Figure 1 As shown, a sampling method provided in an embodiment of the present application may include steps 101 to 106, and these steps are described in detail below.

[0051] Step 101: Obtain the total purchase order quantity and the order quantity of a purchase cycle; wherein the total purchase order quantity is the sum of the order quantities of multiple purchase cycles.

[0052] The purchasing cycle can be obtained by the ratio of the total purchase order volume to the number of sample samples. That is, the total purchase order volume y divided by the number of sample samples l can be used to obtain the purchasing cycle n, and the entire accounting cycle can be divided into n time periods on average. The number of sample samples can be obtained based on the confidence level and sampling error. The confidence level refers to the probability that the value of the population parameter falls within a certain range of the sample statistical value. The sampling error refers to the deviation between the sample statistical value and the inferred population parameter. In practical applications, the confidence level can be determined based on the soundness and application of the enterprise's internal control and the environmental conditions in which the enterprise is located. Usually, when the completeness and application of the enterprise's internal control are good, the confidence level of 80% is selected as the benchmark. When the completeness and application of the internal control are not sufficient, the confidence level of 95% to 99% is selected, and the confidence level is appropriately increased in combination with the enterprise's economic conditions, legal conditions, financial structure and other factors. When determining the sampling error based on the confidence level, the higher the confidence level, the smaller the permissible sampling error. For example, the sampling error for 100 samples is ±10%, the sampling error for 500 samples is ±5%, and the sampling error for 1,200 samples is ±3%. The sum of the confidence level and the sampling error is 1.

[0053] Step 102: Based on the total purchase order quantity and the number of purchase cycles, the average purchase order quantity of the purchase cycle is calculated.

[0054] When calculating the average purchase order quantity of a purchase cycle based on the total purchase order quantity and the number of purchase cycles, the total purchase order quantity y can be divided by the number of purchase cycles n to obtain the average purchase order quantity u of the purchase cycle. The average purchase order quantity u of the purchase cycle is the same as the sampling sample quantity l.

[0055] Step 103: Calculate the standard deviation of the procurement cycle based on the order quantity of the procurement cycle, the number of procurement cycles, and the average procurement order quantity.

[0056] In a possible implementation, the standard deviation of the procurement cycle is calculated based on the order quantity of the procurement cycle, the number of procurement cycles, and the average number of procurement orders, including:

[0057] The squares of the differences between the order quantity of each purchasing cycle and the average purchase order quantity are accumulated and summed to obtain the accumulated sum result;

[0058] Calculate the square root of the ratio of the cumulative sum to the number of procurement cycles to obtain the standard deviation of the procurement cycle.

[0059] There are multiple procurement cycles. The order quantity x in each procurement cycle is subtracted from the average procurement order quantity u, and then multiplied by the difference between the order quantity x in the procurement cycle and the average procurement order quantity u. The squares of the differences between the order quantities of multiple procurement cycles and the average procurement order quantity are added together and divided by the number of procurement cycles n. The square root is then taken to obtain the standard deviation σ of the procurement cycle.

[0060] Step 104: Determine a first threshold based on the average purchase order quantity and the standard deviation of the purchase cycle.

[0061] In a possible implementation, determining the first threshold based on the average purchase order quantity and the standard deviation of the purchase cycle includes:

[0062] The sum of the average purchase order quantity and the standard deviation of the purchase cycle is calculated to obtain the first threshold.

[0063] The first threshold u+σ is obtained by summing the average purchase order quantity u and the standard deviation σ of the purchase cycle.

[0064] Step 105: When the order quantity in the purchase cycle does not exceed the first threshold, purchase orders are sampled according to a preset sampling interval.

[0065] In a possible implementation, when the number of orders in the procurement cycle does not exceed the first threshold, sampling the procurement orders according to a preset sampling interval includes:

[0066] Calculate the ratio of the total purchase order quantity to the average purchase order quantity to obtain the preset sampling interval;

[0067] When the order quantity in the procurement cycle does not exceed the first threshold, procurement orders are sampled according to a preset sampling interval.

[0068] Divide the total purchase order quantity by the average purchase order quantity to get the preset sampling interval k. Since the average purchase order quantity is the same as the sampling sample quantity l, k=y / l.

[0069] Step 106: When the order quantity in the purchase cycle exceeds a first threshold, purchase orders are sampled at an interval that is smaller than a preset sampling interval.

[0070] In a possible implementation, when the number of orders in a procurement cycle exceeds a first threshold, sampling procurement orders at intervals less than a preset sampling interval includes:

[0071] Calculate the sum of the average purchase order quantity and twice the standard deviation of the purchase cycle to obtain the second threshold;

[0072] When the number of orders in the purchase cycle exceeds the first threshold and does not exceed the second threshold, the purchase orders are sampled according to the first sampling interval;

[0073] When the number of orders in a procurement cycle exceeds a second threshold, procurement orders are selected according to a second sampling interval; wherein the second sampling interval is smaller than the first sampling interval, and both the first sampling interval and the second sampling interval are smaller than a preset sampling interval.

[0074] Add the average purchase order quantity u and twice the standard deviation σ of the purchase cycle to obtain the second threshold u+2σ.

[0075] When the order quantity x in the procurement cycle is in [u+σ,u+2σ], the procurement orders are selected according to the first sampling interval; when the order quantity x in the procurement cycle> u+2σ, the procurement orders are selected according to the second sampling interval.

[0076] Optionally, when the number of orders in the procurement cycle exceeds the first threshold but does not exceed the second threshold, sampling the procurement orders according to the first sampling interval includes:

[0077] The sum of the total number of purchase orders and the number of orders in twice the purchase cycle is divided by twice the average number of purchase orders to obtain the first sampling interval;

[0078] When the order quantity in the procurement cycle exceeds the first threshold but does not exceed the second threshold, procurement orders are sampled according to the first sampling interval.

[0079] The sum of the total purchase order quantity y and the order quantity x of twice the purchase cycle is divided by twice the average purchase order quantity to obtain the first sampling interval k1. Since the average purchase order quantity is the same as the sampling sample quantity l, k1=(y+2x) / 2l. When the order quantity of the purchase cycle exceeds the first threshold and does not exceed the second threshold, purchase orders are sampled according to the first sampling interval.

[0080] Optionally, when the number of orders in the procurement cycle exceeds a second threshold, sampling procurement orders according to a second sampling interval includes:

[0081] Calculate the ratio of the order quantity in the purchase cycle to the average purchase order quantity to obtain the second sampling interval;

[0082] When the order quantity in the purchase cycle exceeds a second threshold, purchase orders are sampled according to a second sampling interval.

[0083] The number of orders x in the purchase cycle is divided by the average number of purchase orders to obtain the second sampling interval k2. Since the average number of purchase orders is the same as the number of sampled samples l, k2=x / l. When the number of orders in the purchase cycle exceeds the second threshold, purchase orders are sampled according to the second sampling interval.

[0084] Under normal circumstances, the number of corporate purchase orders is a gentle curve that will not increase exponentially in a short period of time. When there is fraudulent order splitting, the order volume curve will show abnormal growth. According to the normal distribution characteristics, the total probability in the interval [u-σ, u+σ] is 68%, and the total probability in the interval [u-2σ, u+2σ] is 95%. In the absence of human interference, most of them are in [u-2σ, u+2σ]. Therefore, when the number of orders in a certain procurement cycle is greater than u+2σ, the samples in these cycles are labeled as suspicious order splitting. At this time, the number of labeled orders is greater than the number of sampled samples. The number of orders x in the procurement cycle is divided by the number of sampled samples l to obtain the second sampling interval k2. The required samples are sampled using the systematic sampling method and entered into the substantive test sample library to review the authenticity of suppliers, the rationality of procurement prices and other indicators. When there is no sample of order quantity in a certain procurement cycle that is greater than or equal to u+2σ and there is a sample of order quantity in a certain procurement cycle that is greater than u+σ, the samples in these cycles are labeled suspicious and given a weight twice the average number of procurement orders in these procurement cycles, that is, twice the average number of procurement orders plus the total number of procurement orders y divided by twice the number of sampling samples 2l to obtain the first sampling interval k1. Sampling is carried out using the systematic sampling method, and the samples obtained enter the substantive testing sample library to review indicators such as the authenticity of suppliers and the rationality of procurement prices.

[0085] The present application compares the number of orders in a procurement cycle with a first threshold value. When the number of orders in the procurement cycle is small, the procurement orders can be extracted according to a preset sampling interval. When the number of orders in the procurement cycle is large, the procurement orders can be extracted according to an interval smaller than the preset sampling interval, such as the first sampling interval and the second sampling interval. In this way, a larger number of procurement orders are extracted, and samples that deviate significantly from the mean are effectively identified, which makes it easier to discover malicious order splitting and helps reduce the risk of order splitting fraud.

[0086] A sampling method provided in an embodiment of the present application is introduced above, and a system for executing the above sampling method will be introduced below.

[0087] See also Figure 2 , Figure 2 A schematic diagram of the structure of a sampling system provided in an embodiment of the present application. Figure 2 As shown, the sampling system comprises:

[0088] The data acquisition module 201 is used to acquire the total purchase order quantity and the order quantity of a purchase cycle; wherein the total purchase order quantity is the sum of the order quantities of multiple purchase cycles.

[0089] The first calculation module 202 is used to calculate the average purchase order quantity of a purchase cycle based on the total purchase order quantity and the number of purchase cycles.

[0090] The second calculation module 203 is used to calculate the standard deviation of the purchase cycle based on the order quantity of the purchase cycle, the number of purchase cycles and the average purchase order quantity.

[0091] The first threshold determination module 204 is used to determine a first threshold based on the average purchase order quantity and the standard deviation of the purchase cycle.

[0092] The first sampling module 205 is used to extract purchase orders according to a preset sampling interval when the order quantity in the purchase cycle does not exceed the first threshold.

[0093] The second sampling module 206 is used to select purchase orders at an interval less than a preset sampling interval when the order quantity in the purchase cycle exceeds a first threshold.

[0094] In a possible implementation, the first threshold determination module 204 is specifically configured to:

[0095] The sum of the average purchase order quantity and the standard deviation of the purchase cycle is calculated to obtain the first threshold.

[0096] In a possible implementation, the second sampling module 206 specifically includes:

[0097] A second threshold determination unit, used to calculate the sum of the average purchase order quantity and twice the standard deviation of the purchase cycle to obtain a second threshold;

[0098] A first sampling unit, configured to extract purchase orders according to a first sampling interval when the number of orders in a purchase cycle exceeds a first threshold value and does not exceed a second threshold value;

[0099] The second sampling unit is used to extract purchase orders according to a second sampling interval when the order quantity in a purchase cycle exceeds a second threshold; wherein the second sampling interval is smaller than the first sampling interval, and both the first sampling interval and the second sampling interval are smaller than a preset sampling interval.

[0100] In a possible implementation, the first sampling unit is specifically configured to:

[0101] The sum of the total number of purchase orders and the number of orders in twice the purchase cycle is divided by twice the average number of purchase orders to obtain the first sampling interval;

[0102] When the number of orders in the purchase cycle exceeds the first threshold and does not exceed the second threshold, the purchase orders are sampled according to the first sampling interval;

[0103] In a possible implementation, the second sampling unit is specifically configured to:

[0104] Calculate the ratio of the order quantity in the purchase cycle to the average purchase order quantity to obtain the second sampling interval;

[0105] When the order quantity in the purchase cycle exceeds a second threshold, purchase orders are sampled according to a second sampling interval.

[0106] In a possible implementation, the first sampling module 205 is specifically configured to:

[0107] Calculate the ratio of the total purchase order quantity to the average purchase order quantity to obtain the preset sampling interval;

[0108] When the order quantity in the procurement cycle does not exceed the first threshold, procurement orders are sampled according to a preset sampling interval.

[0109] In a possible implementation, the second calculation module 203 is specifically configured to:

[0110] The squares of the differences between the order quantity of each purchasing cycle and the average purchase order quantity are cumulatively summed to obtain a cumulative sum result;

[0111] Calculate the square root of the ratio of the cumulative sum to the number of procurement cycles to obtain the standard deviation of the procurement cycle.

[0112] The present application also provides an electronic device in an embodiment. Figure 3 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 3 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0113] like Figure 3 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 to a random access memory (RAM) 303. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 303. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0114] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a memory card, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0115] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any sampling method provided in the embodiment of the present application.

[0116] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any sampling method provided in the embodiment of the present application.

[0117] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0118] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0119] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0120] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A sampling method, characterized in that: include: Obtaining the total amount of purchase orders and the order quantity of a purchase cycle; wherein the total amount of purchase orders is the sum of the order quantities of multiple purchase cycles; Based on the total purchase order volume and the number of purchase cycles, calculate the average purchase order volume for the purchase cycle; Calculating a standard deviation of the procurement cycle based on the order quantity of the procurement cycle, the number of procurement cycles, and the average procurement order quantity; Determining a first threshold based on the average purchase order quantity and the standard deviation of the purchase cycle; When the number of orders in the procurement cycle does not exceed the first threshold, selecting procurement orders according to a preset sampling interval; When the order quantity in the procurement cycle exceeds the first threshold, the procurement orders are sampled at an interval that is smaller than the preset sampling interval.

2. The sampling method according to claim 1, characterized in that: The determining of the first threshold based on the average purchase order quantity and the standard deviation of the purchase cycle includes: The first threshold is obtained by calculating the sum of the average purchase order quantity and the standard deviation of the purchase cycle.

3. The sampling method according to claim 1, characterized in that: When the number of orders in the procurement cycle exceeds the first threshold, extracting the procurement orders at an interval that is less than the preset sampling interval includes: Calculate the sum of the average purchase order quantity and twice the standard deviation of the purchase cycle to obtain a second threshold; When the order quantity in the purchase cycle exceeds the first threshold but does not exceed the second threshold, sampling the purchase order according to a first sampling interval; When the order quantity in the procurement cycle exceeds the second threshold, the procurement orders are selected according to a second sampling interval; wherein the second sampling interval is smaller than the first sampling interval, and both the first sampling interval and the second sampling interval are smaller than the preset sampling interval.

4. The sampling method according to claim 3, characterized in that: When the number of orders in the procurement cycle exceeds the first threshold but does not exceed the second threshold, sampling the procurement order according to a first sampling interval includes: The first sampling interval is obtained by dividing the sum of the total purchase order quantity and twice the order quantity of the purchase cycle by twice the average purchase order quantity; When the order quantity in the purchase cycle exceeds the first threshold but does not exceed the second threshold, sampling the purchase order according to the first sampling interval; When the number of orders in the procurement cycle exceeds the second threshold, extracting the procurement order according to a second sampling interval includes: Calculate the ratio of the order quantity of the procurement cycle to the average purchase order quantity to obtain the second sampling interval; When the order quantity in the purchase cycle exceeds the second threshold, the purchase orders are sampled according to the second sampling interval.

5. The sampling method according to any one of claims 1 to 4, characterized in that: When the number of orders in the procurement cycle does not exceed the first threshold, sampling procurement orders according to a preset sampling interval includes: Calculate the ratio of the total purchase order quantity to the average purchase order quantity to obtain the preset sampling interval; When the order quantity in the procurement cycle does not exceed the first threshold, procurement orders are sampled according to the preset sampling interval.

6. The sampling method according to any one of claims 1 to 4, characterized in that: The calculating the standard deviation of the procurement cycle based on the order quantity of the procurement cycle, the number of procurement cycles and the average procurement order quantity includes: Cumulatively summing the squares of the differences between the order quantity of each purchasing cycle and the average purchase order quantity to obtain a cumulative sum result; The square root of the ratio of the cumulative summation result to the number of procurement cycles is calculated to obtain the standard deviation of the procurement cycle.

7. A sampling system, characterized in that: include: A data acquisition module, used to acquire the total purchase order quantity and the order quantity of a purchase cycle; wherein the total purchase order quantity is the sum of the order quantities of multiple purchase cycles; A first calculation module, configured to calculate an average purchase order quantity of the purchase cycle based on the total purchase order quantity and the number of purchase cycles; A second calculation module, configured to calculate a standard deviation of the purchase cycle based on the order quantity of the purchase cycle, the number of purchase cycles and the average purchase order quantity; A first threshold determination module, configured to determine a first threshold based on the average purchase order quantity and the standard deviation of the purchase cycle; A first sampling module, configured to extract purchase orders according to a preset sampling interval when the number of orders in the purchase cycle does not exceed the first threshold; The second sampling module is used to select the purchase orders at an interval less than the preset sampling interval when the order quantity in the purchase cycle exceeds the first threshold.

8. A computer program product, characterized in that The method comprises computer-readable instructions, which, when executed on an electronic device, enable the electronic device to implement the sampling method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the sampling method according to any one of claims 1 to 6.

10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the sampling method as described in any one of claims 1 to 6.