Order restoration method, device, system, electronic device and storage medium

By using the extreme value optimization algorithm of a single population in the cross-border payment order restoration system, the problem of large computing workload and low efficiency is solved, and more efficient order restoration processing is achieved.

CN118505360BActive Publication Date: 2024-10-29HANGZHOU PINGPONG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410956049.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-29
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

In the existing technology, the computer system for restoring cross-border payment orders has a large computing workload and low computing efficiency, and cannot effectively solve this problem.

Method used

The extreme value optimization algorithm of a single population is used to achieve order restoration by obtaining the original order set, performing exchange rate conversion processing, constructing a fitness function, and updating the solution set cyclically until the preset termination conditions are met.

Benefits of technology

It reduces the computational workload of the computer system, improves the computational efficiency, clarifies the evolutionary direction of a single population, and improves the computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118505360B_ABST
    Figure CN118505360B_ABST
Patent Text Reader

Abstract

The present application relates to an order restoration method, device, system, electronic device and storage medium, wherein the order restoration method comprises: when the declared currency is inconsistent with the order currency in the original order set, the order amount of each order in the original order set is converted into an order set to be restored according to the declared currency; 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; according to the change information of the total order amount of the current solution set and the fitness function, the adaptation order is cyclically selected from the latest current order set to be restored, and the order in the current solution set is updated according to the adaptation order, until the total order amount of the updated current solution set meets the preset loop termination condition; the final current solution set is used as the target solution set for order restoration. It reduces the computing workload of the computer system and improves the computing efficiency of the computer system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cross-border payment order processing, and in particular to an order restoration method, device, system, electronic device and storage medium. Background Art

[0002] For cross-border payment business, in order to ensure the authenticity and compliance of transactions, the foreign exchange administration department requires payment companies to 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 international balance of payments statistics and customs declaration process.

[0003] At present, in the relevant technology, the optimal solution set is often formed based on genetic algorithms and multi-objective optimization algorithms to generate order restoration declaration documents. The solution space based on multiple populations increases the computational workload, and no clear evolutionary direction is provided in the solution process, resulting in low computational efficiency of the computer system.

[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, an order restoration method, device, system, electronic device and storage medium are provided to solve the problems of large computing workload and low computing efficiency of computer systems implementing order restoration in related technologies.

[0006] In a first aspect, an order restoration method is provided in this embodiment, including:

[0007] Get the original order set;

[0008] If the declaration currency in the restored declaration scenario is inconsistent with the order currency in the original order set, the order amount of each order in the original order set is converted into the order currency according to the declaration currency to obtain the order set to be restored;

[0009] 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;

[0010] 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;

[0011] According to the change information of the total order amount of the current solution set and the fitness function, adaptive orders are cyclically selected from the latest order set to be restored, and the orders in the current solution set are updated according to the adaptive orders until the total order amount of the current solution set obtained by the update satisfies the preset loop termination condition;

[0012] The current solution set obtained after the loop terminates is used as the target solution set for order restoration.

[0013] 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:

[0014] 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;

[0015] The current solution set is removed from the set of orders to be restored to obtain a new set of orders to be restored.

[0016] In some embodiments, according to the change information of the total order amount of the current solution set and the fitness function, adaptive orders are cyclically selected from the latest order set to be restored, and the orders in the current solution set are updated according to the adaptive orders until the total order amount of the current solution set obtained by the update satisfies the preset loop termination condition, including:

[0017] 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;

[0018] Determine change information of the total order amount of the current solution set according to the total order amount of the historical solution set corresponding to the previous cycle process and the total order amount of the current solution set;

[0019] Selecting an adapted order from the set of orders to be restored according to the change information and the fitness function;

[0020] The adapted order is exchanged with the current mutation factor to obtain the updated current solution set and the to-be-restored order set;

[0021] 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.

[0022] In some of the embodiments, selecting an adapted order from the set of orders to be restored according to the change information and the fitness function includes:

[0023] Sorting the values ​​of each fitness function in ascending order to obtain a value sequence, and determining a target number according to the change information;

[0024] Taking the value corresponding to the target number in the value sequence as the target value;

[0025] The order corresponding to the target value in the to-be-restored order set is determined as an adapted order.

[0026] In some embodiments, the order amount of each order in the original order set is converted into an exchange rate according to the declared currency to obtain the order set to be restored, including:

[0027] Adding an original currency field and an original order amount information field to the original order set respectively, allowing the original currency field to store the original currency type information of each order in the original order set, and allowing the original order amount information field to store the original order amount information of each order;

[0028] The currency type of each order in the original order set is updated to the declared currency, and the order amount of each order in the original order set is updated to the declared currency amount after the exchange rate conversion, so as to obtain the order set to be restored.

[0029] 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.

[0030] In a second aspect, an order restoration device is provided in this embodiment, including: an acquisition module, a preprocessing module, a target construction module, an initialization module, an update module and a determination module; wherein:

[0031] The acquisition module is used to acquire the original order set;

[0032] The preprocessing module is used to perform exchange rate conversion processing on the order amount of each order in the original order set according to the declared currency in the restored declaration scenario, when the declared currency is inconsistent with the order currency in the original order set, to obtain the order set to be restored;

[0033] 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;

[0034] 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;

[0035] The updating module is used to cyclically select adapted orders from the latest set of orders to be restored according to the change information of the total order amount of the current solution set and 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;

[0036] 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.

[0037] 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;

[0038] The order storage is used to store the order set to be restored;

[0039] The order restoration processor is used to read the order set to be restored from the order storage and execute the order restoration method described in the first aspect above.

[0040] 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 order restoration method described in the first aspect when executing the computer program.

[0041] 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 order restoration method described in the first aspect above is implemented.

[0042] Compared with the related art, the present embodiment provides an order restoration method, device, system, electronic device and storage medium. The order restoration method obtains the original order set; when the declaration currency in the restoration declaration scenario is inconsistent with the order currency in the original order set, the order amount of each order in the original order set is converted according to the declaration currency to obtain the order set to be restored; the difference between the total order amount of the solution set and the target restoration amount is used as the target difference, and the objective function of updating the solution set is determined with the goal of minimizing the target difference, and the 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; 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; according to the change information of the total order amount of the current solution set and the fitness function, the adaptation order is cyclically selected from the latest order set to be restored, and the orders in the current solution set are updated according to the adaptation order, until the total order amount of the updated current solution set meets the preset loop termination condition; the final current solution set is used as the target solution set for order restoration. It can utilize 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. Through the algorithm design of the fitness function, it can clarify the evolutionary direction of a single population, thereby improving the computational efficiency of the computer system.

[0043] 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

[0044] 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:

[0045] Figure 1 is a hardware structure block diagram of a terminal of the order restoration method of this embodiment;

[0046] Figure 2 is a flow chart of the order restoration method of this embodiment;

[0047] Figure 3 is a flow chart of an order restoration method of some of the embodiments;

[0048] Figure 4 is a structural block diagram of the order restoration device of this embodiment;

[0049] Figure 5 It is a structural diagram of the order restoration system of this embodiment. DETAILED DESCRIPTION

[0050] 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.

[0051] 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.

[0052] 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 the terminal of the 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 1 The 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.

[0053] 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 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.

[0054] 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.

[0055] In this embodiment, an order restoration method is provided. Figure 2 is a flow chart of the order restoration method of this embodiment. Figure 2 As shown, the process includes the following steps:

[0056] Step S210, obtaining the original order set.

[0057] The original order set is a set of multiple orders that have been processed by centralized payment or settlement in a cross-border payment transaction scenario. It is necessary to determine the transaction order corresponding to the target restoration amount from the original order set for the target restoration amount currently declared for order restoration. Among them, the total order amount contained in the original order set can be about 1.1 times the target restoration amount. The original order set can be stored in the form of a table through a database, where 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. The order information of each order includes but is not limited to: order number, order date, order beneficiary, beneficiary identity information, order beneficiary, order beneficiary tax number, order currency, order quantity, order amount, order sales area, order sales platform, trade type, product sales website, product purchaser name, product purchaser email, product purchaser address.

[0058] It is understandable that the order currency in the original order set may be the same as the declaration currency for the declaration restoration, or may be different from the declaration currency. For example, the order currency in the original order set is US dollars, while the declaration currency is RMB.

[0059] Step S220, when the declaration currency in the restored declaration scenario is inconsistent with the order currency in the original order set, the order amount of each order in the original order set is converted according to the declaration currency to obtain the order set to be restored.

[0060] First, you need to determine the reporting currency required in the current restoration reporting scenario. When the reporting currency is inconsistent with the order currency, in order to achieve accurate solution set solution, it is necessary to convert the order amount of each order in the original order set according to the reporting exchange rate between the reporting currency and the order currency. For example, if the order amount of an order in the original order set is a, it will be updated to a×reporting exchange rate. In addition, when the reporting currency is consistent with the order currency, the original order set can be directly used as the order set to be restored for subsequent order restoration processing.

[0061] Step S230, 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 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.

[0062] The target restoration amount is the current foreign exchange settlement amount that needs to be restored for the order. In the order restoration declaration scenario, the matching between the order data processed by the cross-border e-commerce platform after centralized payment or settlement and the target restoration amount that needs to be declared for each order can be 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 a transaction order that matches the target restoration amount from the set of orders to be restored, it is necessary to continuously select a 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.

[0063] Among them, the goal is to minimize the difference between the sum of the order amounts of the solution set and the target restoration amount, and the solution set is continuously updated so that the sum of the order amounts of the target solution set finally obtained is as close as possible to the target restoration amount, thereby achieving the determination of the transaction orders matching the target restoration amount from the order set to be restored. Specifically, the expression of the objective function can be:

[0064] min|Sum-TA| (1)

[0065] in:

[0066] Sum≥TA (2)

[0067] Among them, Sum represents the total order amount of the solution set, and TA represents the target restoration amount.

[0068] The objective function expression can be transformed as follows:

[0069] Let X = Sum-TA, then the objective function is:

[0070] min|X| (3)

[0071] Based on the above objective function, a single population extreme optimization algorithm (EO) is used to solve the final target solution set. Specifically, the EO algorithm involves only one population in each round of solution process, and continuously iterates, mutates, and selects during the solution process, replacing one gene in the solution set each time to evolve 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.

[0072] 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:

[0073] Sum=Sum+OC(k,j)-S(I,j) (4)

[0074] Among them, j represents the number of columns corresponding to the order amount field in the to-be-restored order set and the solution set in the data storage format. Since the solution set is selected from the to-be-restored order set, 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:

[0075] alpha(I,k)=sum-TA+OC(k,j)-S(I,j) (5)

[0076] Thus, a fitness function in the iterative update process is constructed, and the fitness function is used to select adaptive orders from the set of orders to be restored in a directionally manner during the update process of the solution set.

[0077] Step S240, 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.

[0078] Among them, by traversing the order set to be restored, according to preset rules, several orders can be selected from the order set to be restored to form an initial current solution set, and then the orders that have been selected to form the initial current solution set can be removed from the order set to be restored.

[0079] Step S250, based on the change information of the total order amount of the current solution set and the fitness function, cyclically select adaptive orders from the current latest order set to be restored, and update the orders in the current solution set according to the adaptive orders until the total order amount of the current solution set obtained by the update meets the preset loop termination condition.

[0080] Among them, when selecting the adaptive order, it is necessary to achieve the fastest gradient descent and to jump out of the local minimum as quickly as possible when the declared currency is inconsistent with the order currency. Based on this requirement, the adaptive order in the order set to be restored can be determined according to the change information of the total order amount of the solution set, combined with the above-mentioned fitness function. After the adaptive order is determined in each loop, the adaptive order is 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, stop updating the current solution set, and use the final solution set as the target solution set; otherwise, continue to update the current solution set in the next round. 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.

[0081] Step S260, using the current solution set obtained after the loop terminates as the target solution set for order restoration.

[0082] 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.

[0083] In the related art, the genetic algorithm used is based on the solution space of multiple populations, which leads to a large amount of computational workload in the solution process. 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 iterative population to select the next generation of multiple populations, so the computational efficiency is also low.

[0084] Thanks to the use of the EO algorithm, in the above steps S210 to S260, the EO algorithm is designed and applied to the order restoration scenario, and the objective function is constructed by minimizing the difference between the total order amount of the solution set and the target restoration amount, and then the fitness function is constructed based on the objective function and the characteristics of the EO algorithm. In each loop, according to the change in the total order amount of the solution set and the fitness function, 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 total order amount of the solution set obtained by the final update meets the preset loop termination condition. Therefore, compared with the related technology, the above steps can reduce the computational workload. Based on the fitness function, the evolutionary direction of a single population can be clearly defined, thereby improving the computational efficiency.

[0085] In the above steps S210 to S260, the original order set is obtained; when the declaration currency in the restoration declaration scenario is inconsistent with the order currency in the original order set, the order amount of each order in the original order set is converted into an exchange rate according to the declaration currency to obtain the order set to be restored; the difference between the total order amount 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 the 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; 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; according to the change information of the total order amount of the current solution set and the fitness function, the adaptation order is cyclically selected from the current latest order set to be restored, and the orders in the current solution set are updated according to the adaptation order, until the total order amount of the updated current solution set meets the preset loop termination condition; the final current solution set is taken as the target solution set for order restoration. It can utilize 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. Through the algorithm design of the fitness function, it can clarify the evolutionary direction of a single population, thereby improving the computational efficiency of the computer system.

[0086] In one embodiment, based on the above step S240, 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 include:

[0087] 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.

[0088] 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, and j is the column number corresponding to the order amount OA of the i-th order in the order set to be restored. 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 the currently traversed orders are used as the initial current solution set, and the above traversed orders are removed from the order set to be restored.

[0089] 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.

[0090] In addition, in one embodiment, based on the above step S250, according to the change information of the total order amount of the current solution set and the fitness function, the adaptive order is cyclically selected from the current latest order set 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:

[0091] During the current cycle, 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 order set to be restored; the change information of the total order amount of the current solution set is determined based on the total order amount of the historical solution set corresponding to the previous cycle and the total order amount of the current solution set; based on the change information and the fitness function, an adaptive order is selected from the order set to be restored; the adaptive order is exchanged with the current mutation factor to obtain the updated current solution set and the order set 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 is terminated; otherwise, the next cycle is continued.

[0092] Specifically, in one embodiment, selecting an adapted order from the set of orders to be restored according to the change information and the fitness function may specifically include:

[0093] The values ​​of each fitness function are sorted in ascending order to obtain a value sequence, and the target number is determined according to the change information; the value corresponding to the target number in the value sequence is used as the target value; and the order corresponding to the target value in the order set to be restored is determined as the adaptation order.

[0094] Among them, in one embodiment, when determining the adapted order, firstly, according to the above formula (5) and the current mutation factor S(p) randomly selected from the current solution set S, the value of the fitness function of the current mutation factor S(p) and each order in the order set to be restored is calculated, and then the values ​​of each fitness function are sorted from small to large to obtain the value sequence Alpha(p)=[alpha(p,1),alpha(p,2),……,alpha(p,n)]. Next, an intermediate variable Mem is set and Mem is initialized to 0. Determine whether the total order amount OA of the current solution set is consistent with that of the previous historical solution set;

[0095] If they agree, then:

[0096] Mem = Mem + log(n) (6)

[0097] otherwise,

[0098] Mem=0 (7)

[0099] Set a variable Beta that represents the target number, let Beta=e Mem ; If Beta ≥ n, then let Beta = n, where n is the number of orders in the order set to be restored. Finally, the order corresponding to alpha (p, Beta) in the order set to be restored is used as the adaptation order.

[0100] In addition, in one embodiment, when determining the adapted order, firstly, according to the above formula (5) and the current mutation factor S(p) randomly selected from the current solution set S, the value of the fitness function of the current mutation factor S(p) and each order in the order set to be restored is calculated, and then the values ​​of each fitness function are sorted from small to large to obtain the value sequence Alpha(p)=[alpha(p,1),alpha(p,2),…,alpha(p,n)]. Next, an intermediate variable Mem is set and Mem is initialized to 0. Determine whether the total order amount OA of the current solution set is consistent with that of the previous historical solution set;

[0101] If they agree, then:

[0102] Mem=1 (8)

[0103] otherwise,

[0104] Mem = 0 (9)

[0105] Set a variable Beta to represent the target number, let Beta = Mem × Rand + 1, Rand ∈ [n / 10, n / 3], Rand is a random integer. Finally, take the order corresponding to alpha (p, Beta) in the order set to be restored as the adaptation order.

[0106] It can be understood that the above embodiment shows a specific algorithm for jumping out of the local minimum. In addition to the methods provided in the above embodiment, those skilled in the art can also use other algorithms for jumping out of the local minimum, such as roulette and other algorithms to achieve the determination of the adapted order. All the algorithms for jumping out of the local minimum used in the automatic declaration scenario of cross-border foreign exchange business should be deemed to belong to the protection scope of this application.

[0107] In this embodiment, the fitness function is used to determine the value of the adaptation function corresponding to each order in the order set to be restored, and the change information of the total order amount of the solution set is used to select the target value from the value of each adaptation function, and then determine the adaptation order. In the process of selecting the adaptation order, it can ensure the fastest gradient descent and jump out of the local minimum as soon as possible, so as to further improve the accuracy of the final solution result.

[0108] Additionally, in one embodiment, based on the above step S220, the order amount of each order in the original order set is converted into an exchange rate according to the declared currency to obtain the order set to be restored, which may include:

[0109] Add the original currency field and the original order amount information field to the original order set respectively, let the original currency field store the original currency type information of each order in the original order set, and let the original order amount information field store the original order amount information of each order; update the currency type of each order in the original order set to the declared currency, and update the order amount of each order in the original order set to the declared currency amount after exchange rate conversion, to obtain the order set to be restored.

[0110] Specifically, two additional fields can be maintained in the database for the original order set, namely the original currency field and the original order amount information field. The original currency field is used to store the original currency type information of each order, and the original order amount information field is used to store the order amount information of each order before the exchange rate conversion. For example, in the database, two columns are added to the original order set OC, the original order currency OOCu and the original order amount information OOA. Afterwards, the order currency OCu in the original order set OC is changed to the declared currency, and the order amount OA is changed to the amount of the declared currency, that is, OA×declared exchange rate. Thus, the order set OC to be restored is formed.

[0111] After obtaining the target solution set, determine whether the declared currency is consistent with the original order currency. If not, delete the original order currency field and the original order amount information field in the target solution set and generate a declaration file. At the same time, the original order currency field and the original order amount information field in the current latest order set to be restored can be assigned to the order currency field and the order amount field respectively, and the original order currency field and the original order amount information field in the order set to be restored can be deleted. In this way, the declaration file information generated based on the target solution set is more streamlined and the interference of invalid information is reduced. In addition, it can also reduce the amount of information that needs to be stored in the order set to be restored, and reduce the consumption of storage space.

[0112] In addition, in one embodiment, the loop termination condition is that the difference between the sum of the order amounts of the current solution set and the target restoration amount is 0.

[0113] That is, only when the difference between the total amount of the updated order of the 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.

[0114] After obtaining the target solution set, you can continue to determine whether the currently declared batch order is the last batch that needs to be declared; if so, store the order set to be restored back into the preset order storage; otherwise, continue to read the order set to be restored and solve the target solution set for the next batch.

[0115] Figure 3 is a flowchart of an order restoration method in some embodiments, such as Figure 3 As shown, the order restoration method includes the following steps:

[0116] Step S301, read out the original order set OC from the order storage; wherein the original order set OC contains the following order information of each order: order number, order date, order beneficiary, beneficiary identity information, order beneficiary, order beneficiary tax number, order currency, order quantity, order amount, order sales region, order sales platform, trade type, product sales website, product purchaser's name, product purchaser's email address, product purchaser's address, etc.

[0117] Step S302, for solving the solution set, define the objective function and fitness function; wherein, the objective function expression is constructed by minimizing the difference between the sum of the order amounts Sum of the solution set S and the target reduction amount TA, and the fitness function is constructed based on the objective function in combination with the extreme value optimization algorithm. For specific objective function expressions and fitness function expressions, refer to the above formulas (1) to (5).

[0118] Step S303, read the information to be reported, and determine whether the reported currency is consistent with the order currency in the original order set based on the information to be reported; if so, execute step S305; otherwise, execute step S304; wherein the information to be reported may specifically be the relevant requirement information for generating a reporting document in an order restoration scenario, including the target restoration amount, the reported currency, and other contents.

[0119] Step S304, add two fields in the original order set OC, the original order currency field OOCu and the original order amount information field OOA, and change the value of the order currency OCu of each order in the original order set OC to the declared currency, and change the value of the order amount OA to the amount of the declared currency.

[0120] Step S305, 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.

[0121] Step S306, according to the change information of the total order amount of the current solution set S and the fitness function, cyclically select the adaptive order from the current latest order set to be restored OC, and update the orders in the current solution set according to the adaptive order, until the difference between the total order amount of the updated current solution set S and the target restoration amount is 0; specifically, according to the above formula (5), and the current mutation factor S(p) randomly selected from the current solution set S, calculate the value of the fitness function Alpha(p)=[alpha(p,1),alpha(p,2),……,alpha(p,n)] of the current mutation factor S(p) and each order in the order set to be restored, and then sort the values ​​of each fitness function from small to large to obtain the target value. Next, set an intermediate variable Mem and initialize Mem to 0. Determine whether the total order amount OA of the current solution set is consistent with that of the previous historical solution set; if consistent, set the value of Mem according to the above formula (6); otherwise, set the value of Mem according to formula (7). Next, set a variable Beta to represent the target number, let Beta=e Mem ; If Beta ≥ n, then let Beta = n, where n is the number of orders in the order set to be restored. Finally, the order corresponding to alpha (p, Beta) in the order set to be restored is used as the adaptation order.

[0122] Step S307, using the current solution set S finally obtained as the target solution set for order restoration.

[0123] Step S308, determine whether the declared currency is consistent with the order currency; if so, execute step S310; otherwise, execute step S309;

[0124] Step S309, delete the original order currency field OOCu and the original order amount information field OOA in the target solution set S, and assign the original order currency field OOCu and the original order amount information field OOA in the order set to be restored to the order currency field OCu and the order amount field OA respectively, and then delete the original order currency field OOCu and the original order amount information field OOA in the order set to be restored.

[0125] Step S310, generating a declaration document for order restoration according to the target solution set.

[0126] Step S311, determine whether the current declared batch order is the last batch, if so, execute step S312; otherwise, return to execute step S303.

[0127] Step S312, storing the latest order set OC to be restored back into the order storage.

[0128] In the above steps S301 to S312, the extreme value optimization algorithm of a single population is used to solve the optimal solution set, which reduces the amount of calculation; through the algorithm design of the fitness function, the evolution direction of the single population can be clarified, and the calculation efficiency is improved; 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. In the process of selecting the adaptive order, the fastest gradient descent is guaranteed, and the local minimum can be jumped out as soon as possible, thereby further improving the accuracy of the final solution result.

[0129] In this embodiment, an order restoration device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware of predetermined functions. 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.

[0130] Figure 4 is a structural block diagram of the order restoration device 40 of this embodiment, such as Figure 4 As shown, the order restoration device 40 includes: an acquisition module 41, a preprocessing module 42, a target construction module 43, an initialization module 44, an update module 45 and a determination module 46; wherein:

[0131] The acquisition module 41 is used to acquire the original order set; the preprocessing module 42 is used to convert the order amount of each order in the original order set according to the declared currency when the declared currency in the restored declaration scenario is inconsistent with the order currency in the original order set, so as to obtain the order set to be restored; the target construction module 43 is used to take the difference between the sum of the order amount of the solution set and the target restoration amount as the target difference, and determine the objective function of 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 the user selected from the order set to be restored A partial order set for order restoration; an initialization module 44, used to determine an initial current solution set from the order set to be restored, and update the order set to be restored according to the initial current solution set; an update module 45, used to cyclically select adaptive orders from the latest order set to be restored according to the change information of the total order amount of the current solution set and 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; a determination module 46, used to use the current solution set obtained after the loop termination as the target solution set for order restoration.

[0132] 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.

[0133] 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;

[0134] The order storage 54 is used to store the order set to be restored; the order restoration processor 52 is used to read the order set to be restored from the order storage and execute the order restoration method provided in any of the above embodiments.

[0135] 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.

[0136] 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.

[0137] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0138] S1, obtain the original order set;

[0139] S2, when the declared currency in the restored declaration scenario is inconsistent with the order currency in the original order set, the order amount of each order in the original order set is converted into the exchange rate according to the declared currency to obtain the order set to be restored;

[0140] S3, taking the difference between the total order amount 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 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;

[0141] S4, 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;

[0142] S5, according to the change information of the total order amount of the current solution set and the fitness function, cyclically select the adaptation order from the current latest order set to be restored, and update the orders in the current solution set according to the adaptation order, until the total order amount of the current solution set obtained by the update meets the preset loop termination condition;

[0143] S6, taking the current solution set obtained after the loop terminates as the target solution set for order restoration.

[0144] 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.

[0145] In addition, in combination with the 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 order restoration methods in the above embodiments is implemented.

[0146] 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.

[0147] 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.

[0148] 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.

[0149] 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.

[0150] 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. An order restoration method, It is characterized in that include: Get the original order set; If the declaration currency in the restored declaration scenario is inconsistent with the order currency in the original order set, the order amount of each order in the original order set is converted into the order currency according to the declaration currency to obtain the order set 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, according to the extreme value optimization algorithm, an expression for the sum of the order amounts of the corresponding solution set after replacing one of the orders in the order set to be restored with one of the orders in the solution set during the solution set solving process is determined; and the fitness function is constructed according to the expression; 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; According to the change information of the total order amount of the current solution set and the fitness function, adaptive orders are cyclically selected from the latest order set to be restored, and the orders in the current solution set are updated according to the adaptive orders until the total order amount of the current solution set obtained by the update satisfies the preset loop termination condition; The current solution set obtained after the loop terminates is used as the target solution set for order restoration; According to the change information of the total order amount of the current solution set and the fitness function, adaptive orders are cyclically selected from the latest order set to be restored, and the orders in the current solution set are updated according to the adaptive orders until the total order amount of the current solution set obtained by the update satisfies the preset loop termination condition, including: 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 order set to be restored; the change information of the total order amount of the current solution set is determined based on the total order amount of the historical solution set corresponding to the previous loop process and the total order amount of the current solution set; based on the change information and the fitness function, an adaptive order is selected from the order set to be restored; the adaptive order is exchanged with the current mutation factor to obtain the updated current solution set and the order set to be restored; it is determined whether the updated total order amount of the current solution set meets the preset loop termination condition; if so, the loop is terminated; otherwise, the next round of loop is continued.

2. The order restoration method according to claim 1, It is characterized in that 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, including: 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 order restoration method according to claim 1, It is characterized in that Selecting an adapted order from the set of orders to be restored according to the change information and the fitness function includes: Sorting the values ​​of each fitness function in ascending order to obtain a value sequence, and determining a target number according to the change information; Taking the value corresponding to the target number in the value sequence as the target value; The order corresponding to the target value in the to-be-restored order set is determined as an adapted order.

4. The order restoration method according to claim 1, It is characterized in that The order amount of each order in the original order set is converted into an exchange rate according to the declared currency to obtain the order set to be restored, including: Adding an original currency field and an original order amount information field to the original order set respectively, allowing the original currency field to store the original currency type information of each order in the original order set, and allowing the original order amount information field to store the original order amount information of each order; The currency type of each order in the original order set is updated to the declared currency, and the order amount of each order in the original order set is updated to the declared currency amount after the exchange rate conversion, so as to obtain the order set to be restored.

5. The order restoration method according to any one of claims 1 to 4, It is 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. An order restoration device, It is characterized in that include: An acquisition module, a preprocessing module, a target building module, an initialization module, an update module, and a determination module; wherein: The acquisition module is used to acquire the original order set; The preprocessing module is used to perform exchange rate conversion processing on the order amount of each order in the original order set according to the declared currency in the restored declaration scenario, when the declared currency is inconsistent with the order currency in the original order set, to obtain 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, with the goal of minimizing the target difference, determine the target function for updating the solution set, and construct the fitness function of the extreme value optimization algorithm according to the target function; wherein the solution set is a partial order set selected from the order set to be restored for order restoration; wherein, according to the extreme value optimization algorithm, determine the expression of the sum of the order amounts of the corresponding solution set after replacing one of the orders in the order set to be restored with one of the orders in the solution set during the solution set solving process; and construct the fitness function according to the expression; 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 according to the change information of the total order amount of the current solution set and 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; Among them, according to the change information of the total order amount of the current solution set and the fitness function, the adaptive order is cyclically selected from the current latest order set 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 updated current solution set meets the preset loop termination condition, including: in the current loop process, randomly selecting an order from the current solution set as the current mutation factor, and calculating the fitness function according to the current mutation factor and the current latest order set to be restored; according to the total order amount of the historical solution set corresponding to the previous loop process and the total order amount of the current solution set, determining the change information of the total order amount of the current solution set; according to the change information and the fitness function, selecting the adaptive order from the order set to be restored; exchanging the adaptive order with the current mutation factor to obtain the updated current solution set and the order set to be restored; judging whether the total order amount of the updated current solution set meets the preset loop termination condition; if so, ending the loop; otherwise, continuing to the next round of loop; 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.

7. An order restoration system, It is 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 order restoration method described in any one of claims 1 to 5.

8. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to execute the order restoration method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the order restoration method described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method and device for determining payment time

    CN108932667A

  • Transaction order restoration method and device, computer equipment and storage medium

    CN116976896A