Payment order restoration method, device, order restoration system and electronic device
By using single population extreme value optimization algorithm and appropriate value function in the cross-border e-commerce order restoration system, the problem of large calculation workload and low efficiency is solved, and an efficient order restoration process is achieved.
Patent Information
- Application Number
- CN202410956068.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-07-17
AI Technical Summary
The computer system for the restoration of cross-border e-commerce orders in the existing technology has a large computing workload and low computing efficiency, which has failed to effectively solve this problem.
The extreme value optimization algorithm of a single population is used to construct an objective function that is the difference between the sum of the order amounts of the solution set and the target restore amount, and the appropriate value function is used to loop updating the solution set until the preset loop termination condition is met, and order restore is realized.
The computing workload of computer systems is reduced, the evolution direction of single populations is clarified, the computing efficiency is improved, and the accuracy and efficiency of order restoration is achieved.
Smart Images

Figure CN118505361B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cross-border payment order processing, and in particular to a payment order restoration method, device, order restoration system and electronic device. Background Art
[0002] In order to promote the healthy and rapid development of cross-border e-commerce and ensure the authenticity and compliance of transactions, the foreign exchange administration department requires payment companies to strictly verify the authenticity of each transaction before handling foreign exchange collection and payment business. Therefore, companies need to make a restoration declaration of cross-border e-commerce orders. Among them, restoration declaration mainly refers to the process of splitting and declaring multiple orders that may have been processed by centralized payment or settlement according to the detailed information of the original single transaction in order to accurately reflect the actual situation of each transaction during the process of international balance of payments statistics and customs declaration.
[0003] At present, in order to achieve order restoration, the relevant technologies often use genetic algorithms and multi-objective optimization algorithms to form an optimal solution set, and then generate order restoration declaration documents. Among them, the solution space based on multiple populations in the relevant technologies increases the computing workload of the computer system, and also does not provide a clear evolutionary direction, resulting in low computing efficiency.
[0004] With regard to the problems in related technologies of large computational workload and low computational efficiency of computer systems implementing order restoration, no effective solution has been proposed so far. Summary of the invention
[0005] In this embodiment, a payment order restoration method, device, order restoration system and electronic device are provided to solve the problem of large computing workload and low computing efficiency of the computer system implementing order restoration in the related art.
[0006] In a first aspect, a payment order restoration method is provided in this embodiment, including:
[0007] Get the set of orders to be restored;
[0008] The difference between the sum of the order amounts of the solution set and the target restoration amount is taken as the target difference, and the objective function for updating the solution set is determined with the goal of minimizing the target difference, and a fitness function of the extreme value optimization algorithm is constructed according to the objective function; wherein the solution set is a partial order set selected from the order set to be restored for order restoration;
[0009] Determining an initial current solution set from the set of orders to be restored, and updating the set of orders to be restored according to the initial current solution set;
[0010] The fitness function is used to cyclically select an adapted order from the latest set of orders to be restored, and the orders in the current solution set are updated according to the adapted order, until the total amount of the updated order of the current solution set meets a preset loop termination condition;
[0011] The current solution set obtained after the loop terminates is used as the target solution set for order restoration.
[0012] In some embodiments, determining an initial current solution set from the set of orders to be restored, and updating the set of orders to be restored according to the initial current solution set, includes:
[0013] Selecting a number of orders from the set of orders to be restored as an initial current solution set, so that the total order amount of the current solution set is greater than the target restoration amount;
[0014] The current solution set is removed from the set of orders to be restored to obtain a new set of orders to be restored.
[0015] In some embodiments, the fitness function is used to cyclically select an adapted order from the latest set of orders to be restored, and the orders in the current solution set are updated according to the adapted order until the total order amount of the updated current solution set meets a preset loop termination condition, including:
[0016] In the current cycle, an order is randomly selected from the current solution set as the current mutation factor, and the fitness function is calculated according to the current mutation factor and the current latest order set to be restored;
[0017] According to the fitness function, selecting an adapted order from the set of orders to be restored;
[0018] The adapted order is exchanged with the current mutation factor to obtain the updated current solution set and the to-be-restored order set;
[0019] Determine whether the updated total order amount of the current solution set meets the preset loop termination condition; if so, end the loop; otherwise, continue to the next round of loop.
[0020] In some of the embodiments, selecting an adapted order from the set of orders to be restored according to the fitness function includes:
[0021] Calculate the value of the fitness function corresponding to each order in the to-be-restored order according to the fitness function;
[0022] Determining a target value from a plurality of fitness function values using the fastest gradient method;
[0023] The order corresponding to the target value in the to-be-restored order set is used as the adapted order.
[0024] In some of the embodiments, after obtaining the target solution set, the method further includes:
[0025] An order restoration declaration document is generated using the target solution set.
[0026] In some of the embodiments, the loop termination condition is that the difference between the total amount of the order of the current solution set and the target restoration amount is 0.
[0027] In a second aspect, a payment order restoration device is provided in this embodiment, including: an acquisition module, a target construction module, an initialization module, an update module and a determination module; wherein:
[0028] The acquisition module is used to acquire the order set to be restored;
[0029] The target construction module is used to take the difference between the sum of the order amounts of the solution set and the target restoration amount as the target difference, determine the objective function for updating the solution set with the goal of minimizing the target difference, and construct the fitness function of the extreme value optimization algorithm according to the objective function; wherein the solution set is a partial order set selected from the order set to be restored for order restoration;
[0030] The initialization module is used to determine an initial current solution set from the set of orders to be restored, and update the set of orders to be restored according to the initial current solution set;
[0031] The updating module is used to cyclically select adapted orders from the latest set of orders to be restored using the fitness function, and update the orders in the current solution set according to the adapted orders until the total order amount of the current solution set obtained by the update satisfies a preset loop termination condition;
[0032] The determination module is used to use the current solution set obtained after the loop is terminated as the target solution set for order restoration.
[0033] In a third aspect, an order restoration system is provided in this embodiment, comprising: an order restoration processor and an order storage; wherein the order restoration processor is connected to the order storage;
[0034] The order storage is used to store the order set to be restored;
[0035] The order restoration processor is used to read the order set to be restored from the order storage and execute the payment order restoration method described in the first aspect above.
[0036] In a fourth aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the payment order restoration method described in the first aspect when executing the computer program.
[0037] In a fifth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the payment order restoration method described in the first aspect above is implemented.
[0038] Compared with the related art, the present embodiment provides a payment order restoration method, device, order restoration system and electronic device. The payment order restoration method includes: firstly obtaining a set of orders to be restored; then taking the difference between the sum of the order amounts of the solution set and the target restoration amount as the target difference, and determining the objective function and fitness function of updating the solution set with the goal of minimizing the target difference; wherein the solution set is a partial set of orders selected from the set of orders to be restored for order restoration; next, determining the initial current solution set from the set of orders to be restored, and updating the set of orders to be restored according to the initial current solution set; cyclically selecting the adaptation order from the latest set of orders to be restored by the fitness function, and updating the order in the current solution set according to the adaptation order, until the sum of the order amounts of the updated current solution set meets the preset loop termination condition; and taking the current solution set obtained after the loop termination as the target solution set for order restoration. It can use the extreme value optimization algorithm of a single population to realize the solution of the optimal solution set, thereby reducing the computational workload of the computer system, and through the algorithm design of the fitness function, it can clarify the evolutionary direction of the single population, thereby improving the computational efficiency of the computer system.
[0039] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0041] Figure 1 is a hardware structure block diagram of a terminal of the payment order restoration method of this embodiment;
[0042] Figure 2 is a flow chart of the payment order restoration method of this embodiment;
[0043] Figure 3 is a flow chart of a payment order restoration method of some of the embodiments;
[0044] Figure 4 is a structural block diagram of the payment order restoration device of this embodiment;
[0045] Figure 5 It is a structural diagram of the order restoration system of this embodiment. DETAILED DESCRIPTION
[0046] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0047] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0048] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 : is a hardware structure diagram of a terminal of the payment order restoration method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0049] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the payment order restoration method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0050] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0051] In this embodiment, a payment order restoration method is provided. Figure 2 is a flow chart of the payment order restoration method of this embodiment. Figure 2 As shown, the process includes the following steps:
[0052] Step S210, obtaining a set of orders to be restored.
[0053] In the process of international balance of payments statistics and customs declaration, it is necessary to restore the real transaction orders of multiple orders that have been processed by centralized payment or settlement according to the detailed information of the original single transaction. The order set to be restored is a set of multiple orders that have been processed by centralized payment or settlement. It is necessary to determine the transaction order corresponding to the target restoration amount from the order set to be restored for the target restoration amount currently declared for order restoration. Specifically, the order set to be restored can be stored in the form of a table through a database, wherein a row of records in the table corresponds to an order, and a column corresponds to the order information of a field in the order. Among them, the order information contained in the order set to be restored can specifically be: order number, order date, order beneficiary, beneficiary identity information, order beneficiary subject, order beneficiary subject tax number, order currency, order quantity, order amount, order sales area, order sales platform, trade type, commodity sales website, commodity purchaser name, commodity purchaser email, commodity purchaser address, etc. Among them, order restoration can be performed for US dollar currency.
[0054] Step S220, taking the difference between the total order amount of the solution set and the target restoration amount as the target difference, minimizing the target difference as the goal, determining the objective function of updating the solution set, and constructing the fitness function of the extreme value optimization algorithm based on the objective function; wherein the solution set is a partial order set selected from the order set to be restored for order restoration.
[0055] The target restoration amount is the current foreign exchange settlement amount that needs to be restored for the order. The matching between the data of the cross-border e-commerce platform and the transaction orders corresponding to each target restoration amount in the order restoration declaration is regarded as a problem of solving an order solution set. The objective function indicates the optimization direction and constraints corresponding to the above-mentioned solution problem. In order to find transaction orders that match the target restoration amount from the set of orders to be restored, it is necessary to continuously select part of the order set from the set of orders to be restored, and this part of the order set is the above-mentioned solution set. It can be understood that before the final transaction order that matches the target restoration amount is determined, the solution set is a constantly updated order set.
[0056] In this step, the goal is to minimize the difference between the total order amount of the solution set and the target restoration amount, and the solution set is continuously updated so that the total order amount of the target solution set is as close as possible to the target restoration amount, thereby determining the transaction orders that match the target restoration amount from the order set to be restored. Specifically, the expression of the objective function can be:
[0057] min|Sum-TA| (1)
[0058] in:
[0059] Sum≥TA (2)
[0060] Among them, Sum represents the total order amount of the solution set, and TA represents the target restoration amount.
[0061] The objective function expression can be transformed as follows:
[0062] Let X = Sum-TA, then the objective function is:
[0063] min|X| (3)
[0064] Based on the above objective function, in order to solve the final target solution set, a single population extreme optimization algorithm (EO) is used to solve and update the solution set. Among them, the characteristic of the EO algorithm is that only one population is involved in each round of the solution process, and it continuously iterates, mutates, and selects during the solution process, replacing one gene in the solution set each time, and continuously evolves towards the optimal solution. Based on this, using the EO algorithm to solve the solution set can reduce the amount of calculation for a single iteration.
[0065] According to the adopted EO algorithm, during the solution process, the kth order in the order set OC to be restored can be replaced with the Ith order in the solution set S. Then the sum of the order amounts of the replaced solution set Sum is expressed as:
[0066] Sum=Sum+OC(k,j)-S(I,j) (4)
[0067] Among them, j is the number of columns corresponding to the order amount field in the to-be-restored order set OC and the current solution set S. Since the solution set S is selected from the to-be-restored order set OC, the number of columns of the order amount in the to-be-restored order set is consistent with the number of columns in the current solution set. Therefore, the expression of the fitness function alpah(I,k) obtained after replacement is:
[0068] alpha(I,k)=sum-TA+OC(k,j)-S(I,j) (5)
[0069] Thus, the fitness function in the iterative update process is constructed.
[0070] Step S230, determining an initial current solution set from the set of orders to be restored, and updating the set of orders to be restored according to the initial current solution set.
[0071] Before solving, the solution set can be initialized in advance. According to the preset rules, a number of orders are selected from the set of orders to be restored to form the initial current solution set, and then the orders selected to form the initial current solution set are removed from the set of orders to be restored.
[0072] Step S240, cyclically select the adaptive orders from the latest order set to be restored using the fitness function, and update the orders in the current solution set according to the adaptive orders until the total order amount of the updated current solution set meets the preset loop termination condition.
[0073] Among them, according to the above fitness function, the adapted orders are continuously selected from the order set to be restored, and exchanged with a mutation factor in the current solution set, and after each replacement, it is determined whether the total order amount of the current updated solution set meets the preset loop termination condition; if so, the update of the current solution set is stopped, and the final solution set is used as the target solution set; otherwise, the next round of updating of the current solution set is continued. The loop termination condition can be specifically set based on the accuracy requirements of the final result. In particular, the loop termination condition can be set to the difference between the total order amount and the target restoration amount is 0.
[0074] Step S250, taking the current solution set obtained after the loop terminates as the target solution set for order restoration.
[0075] The current solution set obtained at the end of the above cycle is used as the target solution set. Then, a declaration file for order restoration is generated based on the target solution set. In addition, the current latest order set to be restored is stored back in the order storage for subsequent order restoration declaration.
[0076] In the related art, genetic algorithms and multi-objective optimization algorithms are used to find the optimal solution for the candidate orders selected from the order library. Among them, since the genetic algorithm is based on the solution space of multiple populations, the computational workload of the solution process is relatively large. In addition, the related art does not clarify the direction of population evolution in the solution process, but only performs gene exchange between multiple populations, and then evaluates the quality of the iterated population to screen out the next generation of multiple populations, so the computational efficiency is also low.
[0077] Different from the related art, in the above steps S210 to S250, the EO algorithm is designed and applied to the order restoration scenario. Among them, the objective function is constructed by minimizing the difference between the sum of the order amounts of the solution set and the target restoration amount, and then the fitness function is constructed based on the characteristics of the objective function and the EO algorithm. Through the fitness function, in each loop, the adaptive orders are pointwise selected from the order set to be restored to replace and update the orders in the solution set until the sum of the order amounts of the solution set obtained by the final update meets the preset loop termination condition. Therefore, compared with the related art, the above steps can use the EO algorithm of a single population, which can reduce the computational workload of the computer system. Based on the fitness function, the evolutionary direction of the single population can be clarified, thereby improving the computational efficiency of the computer system.
[0078] In the above steps S210 to S250, the order set to be restored is obtained; the difference between the total amount of the order of the solution set and the target restoration amount is taken as the target difference, and the target function and fitness function of the updated solution set are determined with the goal of minimizing the target difference; wherein the solution set is a partial order set selected from the order set to be restored for order restoration; the initial current solution set is determined from the order set to be restored, and the order set to be restored is updated according to the current solution set; the fitness function is used to cyclically select the adaptation order from the current latest order set to be restored, and the order in the current solution set is updated according to the adaptation order, until the total amount of the order of the updated current solution set meets the preset loop termination condition; the current solution set obtained after the loop is terminated is used as the target solution set for order restoration. It can use the extreme value optimization algorithm of a single population to realize the solution of the optimal solution set, thereby reducing the computational workload of the computer system, and through the algorithm design of the fitness function, the evolutionary direction of the single population can be clarified, thereby improving the computational efficiency of the computer system.
[0079] In one embodiment, based on the above step S230, determining the initial current solution set from the set of orders to be restored, and updating the set of orders to be restored according to the initial current solution set may specifically include:
[0080] From the set of orders to be restored, select several orders as the initial current solution set so that the total order amount of the current solution set is greater than the target restoration amount; remove the current solution set from the set of orders to be restored to obtain a new set of orders to be restored.
[0081] Among them, the sum of the order amounts of the solution set greater than the target restoration amount can be used as a condition to obtain the initial current solution set from the order set to be restored by rough processing of orders. Specifically, the order set to be restored can be traversed with the condition that "the sum of the order amounts of the solution set is greater than or equal to the target restoration amount" to determine the initial current solution set. For example, first, let the solution set S be an empty set and the sum of the order amounts of the solution set Sum be 0. Traverse the m number of orders in the order set to be restored. During the traversal process, let Sum be the cumulative result of the traversed order amounts, that is, during the traversal process, let Sum=Sum+OC(i,j). Among them, i is the i-th order traversed in the order set to be restored, j is the number of columns corresponding to the order amount OA of the i-th order in the order set to be restored, and the data storage form of the order set to be restored can be a data table. Continue to traverse the order set to be restored until Sum is greater than or equal to the target restoration amount TA. At this time, all currently traversed orders are used as the initial current solution set, and the traversed orders are removed from the set of orders to be restored.
[0082] In this way, the initialization of the solution set and the updated order set to be restored are completed. Afterwards, the current solution set will be continuously updated using the EO algorithm based on the initialized current solution set until the target solution set is obtained. In this embodiment, the solution set is initialized based on the condition that the total order amount of the current solution set is greater than the target restoration amount, which can improve the accuracy of subsequent solution set solutions.
[0083] In addition, in one embodiment, based on the above step S240, the adaptive function is used to cyclically select the adaptive order from the current latest set of orders to be restored, and the orders in the current solution set are updated according to the adaptive order, until the total order amount of the current solution set obtained by the update satisfies the preset loop termination condition, which may specifically include:
[0084] During the current loop, an order is randomly selected from the current solution set as the current mutation factor, and the fitness function is calculated based on the current mutation factor and the latest set of orders to be restored. According to the fitness function, an adaptive order is selected from the set of orders to be restored. The adaptive order is swapped with the current mutation factor to obtain the updated current solution set and the set of orders to be restored. It is determined whether the total order amount of the updated current solution set meets the preset loop termination condition. If so, the loop ends; otherwise, the next loop continues.
[0085] Specifically, in the current cycle, a mutation factor S(p) is randomly selected from the current solution set S. The fitness function Alpha(p)=[alpha(p,1),alpha(p,2),…,alpha(p,n)] of S(p) and each order in the order set OC to be restored is calculated. According to formula (2), the value of a fitness function is determined from Alpha(p), and the order OC(I) corresponding to the value in the order set to be restored is determined. Replace OC(I) with S(p) in the current solution set S to obtain the updated current solution set S and the updated order set OC to be restored. Among them, the smallest positive fitness value alpha(p,I) can be determined from Alpha(p) through optimization algorithms such as the fastest gradient method, conjugate gradient method, or natural gradient method.
[0086] In this embodiment, based on the set fitness function, the current solution set is updated, and one gene in the current solution set S is replaced in each cycle. Therefore, this embodiment can reduce the amount of calculation for a single iteration.
[0087] In particular, in one embodiment, selecting an adapted order from the set of orders to be restored according to the fitness function may specifically include:
[0088] The value of the fitness function corresponding to each order in the to-be-restored order set is calculated according to the fitness function; the target value is determined from the values of multiple fitness functions using the fastest gradient method; and the order corresponding to the target value in the to-be-restored order set is used as the adaptation order.
[0089] Among them, the fastest gradient method is used to determine the minimum positive fitness value from the values of each fitness function, and then the order corresponding to the minimum positive fitness value in the order set to be restored is used as the adaptation order. Therefore, this embodiment can improve the accuracy of selecting replacement orders during the update process, thereby further improving the accuracy of solving the final solution set.
[0090] Additionally, in one embodiment, after obtaining the target solution set, the method may further include:
[0091] Generate order restoration declaration file using target solution set. After solving the target solution set, generate order restoration declaration file based on various order information contained in the solved target solution set.
[0092] In addition, in one embodiment, the loop termination condition is that the difference between the total amount of the orders of the current solution set and the target restoration amount is 0. That is, only when the difference between the total amount of the orders of the updated current solution set and the target restoration amount is 0, the update of the current solution set is stopped, and the current solution set obtained by the latest update is used as the target solution set to generate the restoration declaration file. In this embodiment, based on the setting of the loop termination condition, it is possible to achieve no deviation between the total amount of the solution set orders and the target restoration amount, that is, the settlement amount, thereby improving the accuracy of the solution set.
[0093] Figure 3 FIG. 1 is a flow chart of a payment order restoration method in some embodiments. Figure 3 As shown, the payment order restoration method includes the following steps:
[0094] Step S301, taking out the order set to be restored OC from the order storage; wherein, the order set to be restored OC contains the following order information of each order: order number, order date, order beneficiary, beneficiary identity information, order beneficiary entity, order beneficiary entity tax number, order currency, order quantity, order amount account opening (Open Account, referred to as OA), order sales area, order sales platform, trade type, product sales website, product purchaser's name, product purchaser's email address, product purchaser's address, etc.
[0095] Step S302, for solving the solution set, defines the objective function and the fitness function; wherein, the objective function expression is constructed to minimize the difference between the sum Sum of the order amounts of the solution set S and the target restoration amount TA, and based on the objective function, the fitness function is constructed in combination with the extreme value optimization algorithm.
[0096] Step S303, roughly process the order and solve the initial current solution set S; wherein, an initial current solution set S is generated from the order set to be restored, so that Sum>=TA.
[0097] Step S304, based on the fitness function, cyclically select adaptive orders from the current latest set of orders to be restored, and update the orders in the current solution set S according to the adaptive orders, until the difference between the total amount of orders in the updated current solution set S and the target restoration amount is 0; specifically, in the current loop process, randomly select an order from the current solution set S as the current variation factor, and calculate the fitness function according to the current variation factor and the current latest set of orders to be restored OC; select the smallest positive fitness value from the values of the fitness functions corresponding to different orders in the set of orders to be restored OC, and use the order OC (I) corresponding to the smallest positive fitness value in the set of orders to be restored as the adaptive order.
[0098] Step S305, taking the current solution set S finally obtained as the target solution set for order restoration.
[0099] Step S306, generating a declaration file for order restoration according to the target solution set, and storing the latest order set to be restored OC back into the order storage.
[0100] In the above steps S301 to S306, the extreme value optimization algorithm of a single population is used to solve the optimal solution set, thereby reducing the amount of calculation of the computer system. The algorithm design of the fitness function can clarify the evolution direction of the single population and improve the calculation efficiency of the computer system. There is no deviation between the final total amount of the solution set orders and the target restoration amount, and the accuracy of the solution set can be improved.
[0101] In this embodiment, a payment order restoration device is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0102] Figure 4 is a structural block diagram of the payment order restoration device 40 of this embodiment, such as Figure 4 As shown, the payment order restoration device 40 includes: an acquisition module 41, a target construction module 42, an initialization module 43, an update module 44 and a determination module 45; wherein:
[0103] An acquisition module 41 is used to acquire an order set to be restored; a target construction module 42 is used to take the difference between the total order amount of the solution set and the target restoration amount as the target difference, and to minimize the target difference, determine the objective function for updating the solution set, and construct a fitness function of the extreme value optimization algorithm based on the objective function; wherein the solution set is a partial order set selected from the order set to be restored for order restoration; an initialization module 43 is used to determine an initial current solution set from the order set to be restored, and update the order set to be restored based on the initial current solution set; an update module 44 is used to cyclically select adaptive orders from the current latest order set to be restored using a fitness function, and update the orders in the current solution set based on the adaptive orders, until the total order amount of the updated current solution set meets the preset loop termination condition; a determination module 45 is used to use the current solution set obtained after the loop termination as the target solution set for order restoration.
[0104] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0105] In this embodiment, an order restoration system 50 is also provided. Figure 5 is a schematic diagram of the structure of the order restoration system 50 of this embodiment. Figure 5 As shown, the order restoration system 50 includes an order restoration processor 52 and an order storage 54; wherein the order restoration processor 52 is connected to the order storage 54;
[0106] The order storage 54 is used to store the order set to be restored;
[0107] The order restoration processor 52 is used to read the order set to be restored from the order storage 54 and execute the payment order restoration method provided in any of the above embodiments.
[0108] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0109] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0110] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0111] S1, obtain the order set to be restored;
[0112] S2, taking the difference between the sum of the order amounts of the solution set and the target restoration amount as the target difference, with the goal of minimizing the target difference, determining the objective function for updating the solution set, and constructing the fitness function of the extreme value optimization algorithm based on the objective function; wherein the solution set is a partial order set selected from the order set to be restored for order restoration;
[0113] S3, determining an initial current solution set from the order set to be restored, and updating the order set to be restored according to the initial current solution set;
[0114] S4, cyclically selecting adapted orders from the latest set of orders to be restored using a fitness function, and updating the orders in the current solution set according to the adapted orders, until the total amount of the updated order in the current solution set meets the preset loop termination condition;
[0115] S5, taking the current solution set obtained after the loop terminates as the target solution set for order restoration.
[0116] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0117] In addition, in combination with the payment order restoration method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the payment order restoration methods in the above embodiments is implemented.
[0118] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0119] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0120] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0121] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0122] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A payment order restoration method, characterized in that: include: Get the set of orders to be restored; The difference between the sum of the order amounts of the solution set and the target restoration amount is taken as the target difference, and the objective function for updating the solution set is determined with the goal of minimizing the target difference, and a fitness function of the extreme value optimization algorithm is constructed according to the objective function; wherein the solution set is a partial order set selected from the order set to be restored for order restoration; wherein the fitness function is constructed based on the characteristics of the objective function and the EO algorithm of a single population; Determining an initial current solution set from the set of orders to be restored, and updating the set of orders to be restored according to the initial current solution set; The adaptive function is used to cyclically select an adaptive order from the latest set of orders to be restored, and the orders in the current solution set are updated according to the adaptive order, until the total amount of the updated order of the current solution set meets the preset loop termination condition; The current solution set obtained after the loop terminates is used as the target solution set for order restoration; wherein: The adaptive function is used to cyclically select an adaptive order from the latest set of orders to be restored, and the orders in the current solution set are updated according to the adaptive order, until the total order amount of the current solution set obtained by the update satisfies a preset loop termination condition, including: In the current cycle, an order is randomly selected from the current solution set as the current mutation factor, and the fitness function is calculated according to the current mutation factor and the latest order set to be restored; According to the fitness function, selecting an adapted order from the set of orders to be restored; The adapted order is exchanged with the current mutation factor to obtain the updated current solution set and the to-be-restored order set; Determine whether the updated total order amount of the current solution set meets the preset loop termination condition; if so, end the loop; otherwise, continue to the next round of loop.
2. The payment order restoration method according to claim 1, characterized in that: The determining an initial current solution set from the to-be-restored order set, and updating the to-be-restored order set according to the initial current solution set, comprises: Selecting a number of orders from the set of orders to be restored as an initial current solution set, so that the total order amount of the current solution set is greater than the target restoration amount; The current solution set is removed from the set of orders to be restored to obtain a new set of orders to be restored.
3. The payment order restoration method according to claim 1, characterized in that: According to the fitness function, selecting an adapted order from the set of orders to be restored includes: Calculate the value of the fitness function corresponding to each order in the to-be-restored order according to the fitness function; Determining a target value from a plurality of fitness function values using the fastest gradient method; The order corresponding to the target value in the to-be-restored order set is used as the adapted order.
4. The payment order restoration method according to claim 1, characterized in that: After obtaining the target solution set, the method further includes: An order restoration declaration document is generated using the target solution set.
5. The payment order restoration method according to any one of claims 1 to 4, characterized in that: The loop termination condition is that the difference between the total order amount of the current solution set and the target restoration amount is 0.
6. A payment order restoration device, characterized in that: include: Acquisition module, target construction module, initialization module, update module and determination module; wherein: The acquisition module is used to acquire the order set to be restored; The target construction module is used to take the difference between the sum of the order amounts of the solution set and the target restoration amount as the target difference, to minimize the target difference as the target, to determine the objective function for updating the solution set, and to construct the fitness function of the extreme value optimization algorithm according to the objective function; wherein the solution set is a partial order set selected from the order set to be restored for order restoration; wherein the fitness function is constructed based on the characteristics of the objective function and the EO algorithm of a single population; The initialization module is used to determine an initial current solution set from the set of orders to be restored, and update the set of orders to be restored according to the initial current solution set; The updating module is used to cyclically select adapted orders from the latest set of orders to be restored using the fitness function, and update the orders in the current solution set according to the adapted orders until the total order amount of the current solution set obtained by the update satisfies a preset loop termination condition; The determination module is used to use the current solution set obtained after the loop is terminated as the target solution set for order restoration; Wherein: using the fitness function to cyclically select an adapted order from the latest set of orders to be restored, and updating the orders in the current solution set according to the adapted order, until the total order amount of the current solution set obtained by the update satisfies a preset loop termination condition, including: In the current cycle, an order is randomly selected from the current solution set as the current mutation factor, and the fitness function is calculated according to the current mutation factor and the latest order set to be restored; According to the fitness function, selecting an adapted order from the set of orders to be restored; The adapted order is exchanged with the current mutation factor to obtain the updated current solution set and the to-be-restored order set; Determine whether the updated total order amount of the current solution set meets the preset loop termination condition; if so, end the loop; otherwise, continue to the next round of loop.
7. An order restoration system, characterized in that: include: An order restoration processor and an order storage; wherein the order restoration processor is connected to the order storage; The order storage is used to store the order set to be restored; The order restoration processor is used to read the order set to be restored from the order storage and execute the payment order restoration method described in any one of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the payment order restoration method described in any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the payment order restoration method described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Cross-border e-commerce transaction order restoration method and system, device and storage medium
CN108681957A
Order batch optimization method suitable for RMFS warehousing system
CN114897244A
Method, server, and storage medium for processing order
US20180114240A1
