Method, system, device and storage medium for allocating order numbers for multiple business lines
By generating unique order numbers and random number sets, automatically supplementing and exchanging order numbers, the problem of duplicate order numbers and data leakage in line-of-business application software is solved, realizing the uniqueness of line-of-business order numbers and high-speed growth support, and preventing financial errors. and illegal competition.
Patent Information
- Application Number
- CN202111039555.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-06
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-09-06
AI Technical Summary
Existing business line application software can easily lead to duplication of order numbers when order volume suddenly increases, and obtaining order volume by subtracting order numbers may leak business data, leading to financial errors and potentially vicious competition.
Using the order number allocation method of multiple types of business lines, by generating a unique set of order numbers and random numbers to be used, presetting the order number inventory threshold, calculating the difference based on the product of the consumption quantity and the random number, automatically replenishing the order number, and Order numbers are randomly exchanged between the same business categories to ensure the uniqueness and non-repetition of order numbers and avoid obtaining order volume by subtracting order numbers.
It achieves unified allocation of order numbers for multiple business lines, supports rapid growth, ensures the uniqueness of all business line order IDs, prevents financial errors and data leaks, and eliminates illegal competition.
Smart Images

Figure CN113743786B_ABST
Abstract
Description
Background Art
[0002] Line-of-business (LOB) applications are one of a set of critical computer applications that are essential to the operation of a business. Line-of-business (LOB) applications are one of a set of critical computer applications that are essential to the operation of a business, such as accounting, supply chain management, and resource planning applications. Line-of-business applications are usually large programs that contain a certain number of integrated capabilities and are embedded in databases and database management systems. Line-of-business applications are increasingly connected to network applications using user interfaces on the network and personal applications such as email and address books.
[0003] When a business is launched, a simple auto-incrementing field such as 1, 2, 3, ... is often used to represent the order ID. When multiple businesses are launched, the order ID will be divided to meet the financial requirement of a unique order number, for example:
[0004] Business Line Number segment Business 1 (small volume) 500,000 order pool (10,000 to 500,000) Business 2 (center) 1.5 million order pool (500001~2000000) Business 3 (large volume) 30 million order pool (2000001~5000000) $…$ ……$
[0005] The existing allocation mechanism is simple and crude, and has the following problems.
[0006] (1) When the order volume of a business line increases suddenly, the order pool will soon be used up. If the business does not notify in advance and does not allow the use of order numbers from other number segments, the business will be interrupted until another number segment is opened. If not controlled, the business will use the order numbers of other business lines, resulting in duplicate order numbers.
[0007] (2) When a business line's order number is used up normally, if reuse is allowed, the order number three months ago and today will be the same. Since the collection and refund of finance are generally based on the order number, the finance department will collect or refund too much money.
[0008] (3) For each business line, it is easy to calculate the daily order volume by subtracting the order IDs of today and yesterday at the same time point. If this information is known by criminals, it will invade the business and lead to vicious competition.
[0009] Therefore, the present invention provides a method, system, device and storage medium for allocating order numbers for multiple types of business lines. Summary of the invention
[0010] In response to the problems in the prior art, the purpose of the present invention is to provide a method, system, device and storage medium for allocating order numbers for multiple types of business lines, which overcomes the difficulties of the prior art, can achieve unified allocation of order numbers for multiple business lines, support rapid growth of each business line, and ensure that order IDs of all business lines cannot be repeated. At the same time, it completely avoids obtaining order quantities and leaking business data by subtracting order numbers.
[0011] An embodiment of the present invention provides a method for allocating order numbers for multiple types of business lines, comprising the following steps:
[0012] Generate a number of unique order numbers to be used and a set of random numbers, and preset initial values of inventory thresholds C of different order numbers corresponding to different business categories;
[0013] Obtaining the number A of order numbers consumed by the business lines in the previous preset time period;
[0014] Randomly generate a random number B from the random number set;
[0015] At least the product of the number of consumed order numbers A corresponding to the business line and the random number B is used as parameter D. When the difference E between parameter D and the order number inventory threshold C is greater than 0, E order numbers to be used are added to the business line.
[0016] Preferably, the product of the number of order numbers A corresponding to the business line and the random number B is used as parameter D. When the difference E between the parameter D and the order number inventory threshold C is greater than 0, E order numbers to be used are added to the business line, including the following steps:
[0017] Obtain the product of the number A of order numbers corresponding to each of the business lines and the random number B as parameter D;
[0018] Obtain a difference E obtained by subtracting a value C of the inventory threshold of the order number corresponding to the business category of the business line from the parameter D; and
[0019] The business line with the difference E greater than 0 is regarded as a business line to be supplemented, and an order number set is added to the business line to be supplemented, and the total amount of order numbers to be used in the order number set is equal to the value of the difference E corresponding to the business line to be supplemented.
[0020] Preferably, the business line with the difference E greater than 0 is taken as a business line to be supplemented, and an order number set is supplemented to the business line to be supplemented, wherein the total amount of order numbers to be used in the order number set is equal to the value of the difference E corresponding to the business line to be supplemented, including:
[0021] The business lines with the difference E greater than 0 are taken as business lines to be supplemented. Between any two business lines to be supplemented in the same business category, N order numbers to be used are randomly selected from their respective corresponding order number sets for exchange, and then the corresponding order number sets are supplemented to the business lines to be supplemented, N≥1.
[0022] Preferably, the business line with the difference E greater than 0 is taken as a business line to be supplemented, and an order number set is supplemented to the business line to be supplemented, wherein the total amount of order numbers to be used in the order number set is equal to the value of the difference E corresponding to the business line to be supplemented, including:
[0023] The business lines whose difference E is greater than 0 are taken as business lines to be supplemented, and the order number sets of all the business lines to be supplemented in the same business category are merged into a total set of order numbers to be allocated, and each business line to be supplemented randomly proposes a total number of order numbers to be used from the total set of order numbers to be allocated, which is equal to the value of the difference E corresponding to the business line to be supplemented.
[0024] Preferably, the method at least based on the product of the number A of order numbers corresponding to the business line and the random number B as parameter D, when the difference E between the parameter D and the order number inventory threshold C is greater than 0, after supplementing E order numbers to be used to the business line and before returning to the method of obtaining the number A of order numbers consumed by the business line in the previous preset time period, further includes:
[0025] At least the product of the number of order numbers A corresponding to the business line and the minimum value F in the random number set is used as parameter G. When the difference H between parameter G and the order number inventory threshold C is greater than 0, the value of the current order number inventory threshold C is replaced by the value of the product G.
[0026] Preferably, the business line includes a first number pool for receiving the order numbers to be used and a second number pool for storing used order numbers. The order numbers to be used in the first number pool are moved to the second number pool and converted into the used order numbers.
[0027] Preferably, the second number pool deletes used order numbers whose length of time in the second number pool exceeds a preset threshold.
[0028] Preferably, the length of the preset time period is any one of 6 hours, 12 hours, 1 day, 1 week, 1 month, 1 quarter, and 1 year.
[0029] Preferably, the random number set includes a plurality of natural numbers greater than 10, the minimum value in the random number set ranges from 10 to 20, and the maximum value ranges from 25 to 50.
[0030] An embodiment of the present invention further provides an order number allocation system for multiple types of business lines, which is used to implement the above-mentioned order number allocation method for multiple types of business lines. The order number allocation system for multiple types of business lines includes:
[0031] An order number generation module generates a number of unique order numbers to be used and a set of random numbers, and presets the initial values of the order number inventory thresholds C corresponding to different business categories;
[0032] An order number consumption module, which obtains the number A of order numbers consumed by the business lines in a previous preset time period;
[0033] A random number generation module randomly generates a random number B from the random number set;
[0034] The order number replenishment module is based at least on the product of the number of order numbers A corresponding to the business line and the random number B as parameter D. When the difference E between parameter D and the order number inventory threshold C is greater than 0, E order numbers to be used are replenished to the business line and the order number consumption module is returned.
[0035] An embodiment of the present invention further provides a device for allocating order numbers for multiple types of business lines, including:
[0036] processor;
[0037] a memory storing executable instructions of the processor;
[0038] Wherein, the processor is configured to execute the steps of the above-mentioned method for allocating order numbers for multiple types of business lines by executing the executable instructions.
[0039] An embodiment of the present invention further provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of the above-mentioned method for allocating order numbers for multiple types of business lines.
[0040] The purpose of the present invention is to provide a method, system, device and storage medium for allocating order numbers for multiple types of business lines, which can realize unified allocation of order numbers for multiple business lines, support rapid growth of each business line, and ensure that order IDs of all business lines cannot be repeated. At the same time, it can completely avoid obtaining order quantities and leaking business data by subtracting order numbers. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.
[0042] Figure 1 It is a flow chart of the method for allocating order numbers for multiple types of business lines of the present invention.
[0043] Figure 2It is a module schematic diagram of the order number allocation system for multiple business lines of the present invention.
[0044] Figure 3 It is a structural schematic diagram of the order number allocation device for multiple types of business lines of the present invention.
[0045] Figure 4 It is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the present application. The present application can also be implemented or applied through other different specific implementation methods, and the details in the present application can also be modified or changed in various ways according to different viewpoints and application systems without departing from the spirit of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0047] The following is a detailed description of the embodiments of the present application with reference to the accompanying drawings so that those skilled in the art can easily implement the present application. The present application can be embodied in a variety of different forms and is not limited to the embodiments described herein.
[0048] In the representations of the present application, the representations with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics represented in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the represented specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples represented in the present application and the features of the different embodiments or examples, unless they contradict each other.
[0049] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the representation of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0050] In order to clearly describe the present application, components irrelevant to the description are omitted, and the same reference symbols are given to the same or similar components throughout the specification.
[0051] Throughout the specification, when a device is said to be "connected" to another device, this includes not only the case of "direct connection" but also the case of "indirect connection" by placing other elements therebetween. In addition, when a device is said to "include" a certain component, unless otherwise stated, it does not exclude other components, but means that other components may be included.
[0052] When a device is said to be "on" another device, it may be directly on the other device, but there may also be other devices between it. In contrast, when a device is said to be "directly" on another device, there are no other devices between it.
[0053] Although the terms first, second, etc. are used to represent various elements in some examples, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first interface and the second interface, etc. are represented. Moreover, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising" and "including" indicate the existence of features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Only when the combination of elements, functions, steps or operations is inherently mutually exclusive in some way, will there be an exception to this definition.
[0054] The technical terms used herein are only used to refer to specific embodiments and are not intended to limit the present application. The singular form used herein also includes the plural form unless the sentence clearly indicates the contrary meaning. The meaning of "including" used in the specification is to specify specific characteristics, regions, integers, steps, operations, elements and / or components, and does not exclude the existence or addition of other characteristics, regions, integers, steps, operations, elements and / or components.
[0055] Although not defined differently, all terms, including technical and scientific terms used herein, have the same meaning as those generally understood by those skilled in the art to which this application belongs. Terms defined in commonly used dictionaries are additionally interpreted as having meanings consistent with the relevant technical literature and the contents of the current disclosure, and unless defined, shall not be overly interpreted as ideal or very formal meanings.
[0056] Figure 1Flow chart of the method for allocating order numbers for multiple business lines of the present invention. Figure 1 As shown, an embodiment of the present invention provides a method for allocating order numbers for multiple types of business lines, comprising the following steps:
[0057] S100, generating a number of unique order numbers to be used and a set of random numbers, and presetting initial values of inventory thresholds C of different order numbers corresponding to a number of business categories.
[0058] S110. Obtain the number A of order numbers consumed by several business lines within a previous preset time period.
[0059] S120, randomly generate a random number B from the random number set.
[0060] S130. At least based on the product of the number of order numbers A corresponding to the business line and the random number B as parameter D, when the difference E between parameter D and the order number inventory threshold C is greater than 0 (that is, when DC = (A×B)-C = E, the difference E is greater than 0), E order numbers to be used are added to the business line, and return to step S110.
[0061] In a preferred embodiment, step S130 includes the following steps:
[0062] S131. Obtain the product of the number of consumed order numbers A corresponding to each business line and the random number B as parameter D.
[0063] S132, obtain the difference E obtained by subtracting the inventory threshold C of the order number corresponding to the business category of the business line from the parameter D. And
[0064] S133. The business line with a difference E greater than 0 is regarded as a business line to be supplemented, and an order number set is added to the business line to be supplemented. The total number of order numbers to be used in the order number set is equal to the value of the difference E corresponding to the business line to be supplemented, but not limited to this.
[0065] In a preferred embodiment, step S133 includes:
[0066] The business lines with a difference E greater than 0 are regarded as business lines to be supplemented. Between any two business lines to be supplemented in the same business category, N order numbers to be used are randomly selected from their respective corresponding order number sets for exchange, and then the business lines to be supplemented are supplemented with their respective corresponding order number sets, N ≥ 1, so as to further disrupt the order numbers of the business lines and ensure that each business line obtains an appropriate number of supplementary order numbers, but not limited to this.
[0067] In a preferred embodiment, step S133 includes:
[0068] Business lines with a difference E greater than 0 are regarded as business lines to be supplemented, and the order number sets of all business lines to be supplemented in the same business category are merged into a total set of order numbers to be allocated. Each business line to be supplemented randomly proposes a total amount of order numbers to be used from the total set of order numbers to be allocated, which is equal to the value of the difference E corresponding to the business line to be supplemented, so as to further disrupt the order numbers of the business lines and ensure that each business line obtains an appropriate number of supplementary order numbers, but is not limited to this.
[0069] In a preferred embodiment, after step S130 and before returning to step S110, the method further includes:
[0070] S140. At least the product of the number of consumed order numbers A corresponding to the business line and the minimum value F in the random number set is used as parameter G. When the difference H between parameter G and the order number inventory threshold C is greater than 0 (that is, when GC = (A×F)-C = H, the difference H is greater than 0), the value of the current order number inventory threshold C is replaced by the value of the product G, but not limited to this.
[0071] In a preferred embodiment, the business line includes a first number pool for receiving order numbers to be used and a second number pool for storing used order numbers. The used order numbers to be used in the first number pool are moved to the second number pool and converted into used order numbers, but this is not limited to this.
[0072] In a preferred embodiment, the used order numbers whose time in the second number pool exceeds a preset threshold are deleted from the second number pool, but the present invention is not limited thereto.
[0073] In a preferred embodiment, after step S100 and before step S110, the process also includes randomly selecting M order numbers to be used that are left over from a previous preset time period and exchanging them between any two business lines to be supplemented in the same business category, and keeping the total amount of order numbers to be used of each business line unchanged, so as to further disrupt the order numbers of the business lines, but not limited to this.
[0074] In a preferred embodiment, the length of the preset time period is any one of 6 hours, 12 hours, 1 day, 1 week, 1 month, 1 quarter, and 1 year, but is not limited thereto.
[0075] In a preferred embodiment, the random number set includes a plurality of natural numbers greater than 10, the minimum value in the random number set ranges from 10 to 20, and the maximum value ranges from 25 to 50, but is not limited thereto.
[0076] In a preferred embodiment, the minimum value in the random number set is 15 and the maximum value is 30, but not limited thereto.
[0077] The present invention is suitable for unified allocation of order numbers for multiple business lines, supports 10X growth for each business line, and the order IDs of all business lines cannot be repeated. At the same time, it completely avoids obtaining order quantities by subtracting order numbers, which is exploited by criminals.
[0078] To meet business needs, the present invention provides a complete order number generation and management mechanism to support the stable operation of the business. The implementation process is as follows:
[0079] (1) Order number allocation
[0080] ① Add new configuration when launching a new business line.
[0081] ②Core logic of order number allocation.
[0082] Preset the order number inventory threshold ReservedCount (i.e., order number inventory threshold C), obtain the order number consumption count_laster of each business the day before (i.e., the number of order numbers consumed by the business line A), and randomly obtain a value random_cnt from (ReservedMinDay, ReservedMaxDay) (a random number B is generated from the random number set), and calculate how much to replenish the order pool for each business? (count_laster*random_cnt-ReservedCount,)
[0083] ③Distribute once every day at 23:00 and distribute to each business line.
[0084] Business Line Number segment Business 1 (small volume) 1~10 Business 2 (center) 11~30 Business 3 (large volume) 31~100 Business 1 (small volume) 101~110 Business 2 (center) 111~130 Business 3 (large volume) 131~200 ……… ………
[0085] (2) Order number monitoring
[0086] Monitor order number configuration in real time and correct configuration errors in a timely manner. When business grows, order number configuration will automatically expand.
[0087] In this embodiment, the order number consumption count_laster of each business on the previous day (that is, the number of order numbers consumed A corresponding to the business line) is obtained in a round-robin manner, and the minimum value (ReservedMinDay, that is, the minimum value F in the random number set) is obtained from the range of (ReservedMinDay, ReservedMaxDay). If the minimum value (ReservedMinDay) is less than 10, the minimum value is forcibly assigned to 10.
[0088] Calculate the product of the number of consumed order numbers A (count_laster) corresponding to the business line and the minimum value F (ReservedMinDay) in the random number set as parameter G. When the difference H between parameter G and the preset order number inventory threshold ReservedCount (that is, order number inventory threshold C) is greater than 0 (that is, when GC = (A×F)-C = H, the difference H is greater than 0), it means
[0089] The current order number inventory threshold C cannot keep up with the rapid increase in the number of consumed order numbers A caused by business growth, and the current order number inventory threshold C needs to be expanded. In this embodiment, the value of the current order number inventory threshold C is replaced by the value of the product G, but this is not limited to this.
[0090] (3) Obtaining the order number
[0091] Provides an order generation interface to meet the needs of businesses to quickly obtain order numbers from their respective order number databases.
[0092] (4) Historical order number source query
[0093] Provide an order query interface, pass in OrderId, and determine the order ownership.
[0094] (5) Order number cleanup (used)
[0095] Each business line has used OrderId and automatically clears and deletes historical data from three months ago.
[0096] This order number generation mechanism can quickly and efficiently ensure the normal operation of multiple businesses. It has the following advantages:
[0097] (1) Multiple business lines have unique order numbers, and financial collection and refund will no longer be wrong.
[0098] (2) It is impossible to determine the order volume of a particular business based on the order numbers at the same time point today and yesterday, thus completely eliminating illegal business intrusion.
[0099] (3) The order pool automatically expands, forcibly supporting 10X+ growth.
[0100] (4) Unify the order number clearing mechanism for each business line to prevent order numbers from being cleared without being used.
[0101] Figure 2 Schematic diagram of the module of the order number distribution system for multiple business lines of the present invention. Figure 2 As shown, the order number allocation system 5 for multiple business lines of the present invention includes:
[0102] The order number generation module 50 generates a number of unique order numbers to be used and a set of random numbers, and presets initial values of order number inventory thresholds C corresponding to different business categories.
[0103] The order number consumption module 51 obtains the number A of order numbers consumed by several business lines within a previous preset time period.
[0104] The random number generation module 52 generates a random number B from the random number set.
[0105] The order number replenishment module 53 is based at least on the product of the number of order numbers A corresponding to the business line and the random number B as parameter D. When the difference E between parameter D and the order number inventory threshold C is greater than 0, E order numbers to be used are replenished to the business line and the order number consumption module is returned.
[0106] The order number threshold update module 54 uses at least the product of the number of order numbers A corresponding to the business line and the minimum value F in the random number set as parameter G. When the difference H between parameter G and the order number inventory threshold C is greater than 0, the value of the current order number inventory threshold C is replaced by the value of the product G.
[0107] The order number allocation system for multiple business lines of the present invention can realize unified allocation of order numbers for multiple business lines, support rapid growth of each business line, and ensure that order IDs of all business lines cannot be repeated. At the same time, it completely avoids obtaining order quantities and leaking business data by subtracting order numbers.
[0108] The above embodiments are only preferred examples of the present invention and are not intended to limit the present invention. Any equivalent substitutions, modifications and changes made within the principles of the present invention are within the protection scope of the present invention.
[0109] The embodiment of the present invention further provides an order number allocation device for multiple types of business lines, comprising a processor and a memory, wherein executable instructions of the processor are stored. The processor is configured to execute the steps of the order number allocation method for multiple types of business lines by executing the executable instructions.
[0110] As shown above, the order number allocation system for multiple business lines of this embodiment of the present invention can realize unified allocation of order numbers for multiple business lines, support rapid growth of each business line, and the order IDs of all business lines cannot be repeated. At the same time, it completely avoids obtaining order quantities and leaking business data by subtracting order numbers.
[0111] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".
[0112] Figure 3 This is a schematic diagram of the structure of the order number distribution device for multiple business lines of the present invention. Figure 3 The electronic device 600 according to this embodiment of the present invention is described. Figure 3 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0113] like Figure 3 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0114] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments of the present invention described in the electronic prescription circulation processing method section of this specification. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .
[0115] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0116] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0117] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0118] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, etc.
[0119] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, and the steps of the method for allocating order numbers for multiple types of business lines are implemented when the program is executed. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the above-mentioned electronic prescription circulation processing method section of this specification.
[0120] As shown above, the order number allocation system for multiple business lines of this embodiment of the present invention can realize unified allocation of order numbers for multiple business lines, support rapid growth of each business line, and the order IDs of all business lines cannot be repeated. At the same time, it completely avoids obtaining order quantities and leaking business data by subtracting order numbers.
[0121] Figure 4 Schematic diagram of the structure of the computer-readable storage medium of the present invention. Figure 4 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0122] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0123] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0124] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0125] In summary, the purpose of the present invention is to provide an order number allocation method, system, device and storage medium for multiple types of business lines, which can realize unified allocation of order numbers for multiple business lines, support rapid growth of each business line, and ensure that the order IDs of all business lines cannot be repeated. At the same time, it can completely avoid obtaining order quantities and leaking business data by subtracting order numbers.
[0126] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for allocating order numbers for multiple business lines, characterized in that: The following steps are involved: Generate a number of unique order numbers to be used and a set of random numbers, and preset initial values of inventory thresholds C of different order numbers corresponding to different business categories; Obtaining the number A of order numbers consumed by the business lines in the previous preset time period; Randomly generate a random number B from the random number set; Obtain the product of the number A of consumed order numbers corresponding to each of the business lines and the random number B as parameter D; Obtain the difference E obtained by subtracting the order number inventory threshold C corresponding to the business category of the business line from the parameter D; take the business line whose difference E is greater than 0 as the business line to be supplemented, merge the order number sets of all the business lines to be supplemented in the same business category into a total set of order numbers to be allocated, and each of the business lines to be supplemented randomly proposes a total amount of order numbers to be used from the total set of order numbers to be allocated in turn, which is equal to the value of the difference E corresponding to the business line to be supplemented; at least the product of the number of order numbers A corresponding to the business line and the minimum value F in the random number set is used as a parameter G, and when the difference H between the parameter G and the order number inventory threshold C is greater than 0, replace the value of the current order number inventory threshold C with the value of the product G, and return to the step of obtaining the number of order numbers A consumed by several business lines in a previous preset time period.
2. The method for allocating order numbers for multiple business lines according to claim 1, characterized in that: The business line includes a first number pool for receiving the order numbers to be used and a second number pool for storing used order numbers. The order numbers to be used in the first number pool are moved to the second number pool and converted into the used order numbers.
3. The method for allocating order numbers for multiple business lines according to claim 2, characterized in that: The second number pool deletes used order numbers whose time in the second number pool exceeds a preset threshold.
4. The method for allocating order numbers for multiple business lines according to claim 1, characterized in that: The length of the preset time period is any one of 6 hours, 12 hours, 1 day, 1 week, 1 month, 1 quarter, and 1 year.
5. The method for allocating order numbers for multiple business lines according to claim 1, characterized in that: The random number set includes multiple natural numbers greater than 10, the minimum value in the random number set ranges from 10 to 20, and the maximum value ranges from 25 to 50.
6. A system for allocating order numbers for multiple types of business lines, used to implement the method for allocating order numbers for multiple types of business lines as claimed in claim 1, characterized in that: include: An order number generation module generates a number of unique order numbers to be used and a set of random numbers, and presets the initial values of the order number inventory thresholds C corresponding to different business categories; An order number consumption module, which obtains the number A of order numbers consumed by the business lines in a previous preset time period; A random number generation module randomly generates a random number B from the random number set; An order number supplement module obtains the product of the number of consumed order numbers A corresponding to each of the business lines and the random number B as a parameter D; Obtain the difference E obtained by subtracting the order number inventory threshold C corresponding to the business category of the business line from the parameter D; take the business line whose difference E is greater than 0 as the business line to be supplemented, merge the order number sets of all the business lines to be supplemented in the same business category into a total set of order numbers to be allocated, and each of the business lines to be supplemented randomly proposes a total amount of order numbers to be used from the total set of order numbers to be allocated in turn, which is equal to the value of the difference E corresponding to the business line to be supplemented; at least the product of the number of order numbers A corresponding to the business line and the minimum value F in the random number set is used as a parameter G, and when the difference H between the parameter G and the order number inventory threshold C is greater than 0, replace the value of the current order number inventory threshold C with the value of the product G, and return to the step of obtaining the number of order numbers A consumed by several business lines in a previous preset time period.
7. A device for allocating order numbers for multiple business lines, characterized in that: include: processor; a memory storing executable instructions of the processor; Wherein, the processor is configured to execute the steps of the method for allocating order numbers for multiple business lines as described in any one of claims 1 to 5 by executing the executable instructions.
8. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the method for allocating order numbers to multiple business lines as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Number segment management method and system for logistics electronic express sheet, equipment and storage medium
CN111695847A
Order number management method and system and storage medium
CN112651794A
