Simulation method and device
By performing spatio-temporal constrained partition parallel simulation on business data, the problem of low simulation efficiency in the existing technology is solved, and the application effect of the business strategy can be quickly evaluated.
Patent Information
- Application Number
- CN202410831929.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-27
AI Technical Summary
Existing simulation methods based on business strategies are inefficient, resulting in long simulation times and difficulty in effectively verifying the application effect of business strategies.
By obtaining the target business data, the simulation engine is used to partition the data according to the spatio-temporal constraint relationship, and the simulation instances of each data partition are run in parallel to realize the simulation of the business strategy to be verified and obtain the simulation results.
The simulation efficiency is improved, the simulation time is shortened, and the application effect of business strategies can be evaluated more quickly.
Smart Images

Figure CN118710145A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a simulation method and device. Background Art
[0002] With the development of e-commerce technology, more and more business scenarios are involved in e-commerce. For each business scenario, a corresponding business strategy can be formulated. After formulating the business strategy, simulation can be performed based on the business strategy to verify the effect of the business strategy after application. When the simulation determines that the effect of the business strategy application meets expectations, the business strategy can be applied in the business scenario.
[0003] The current simulation solution based on business policies has the problem of low simulation efficiency.
[0004] Therefore, a solution is urgently needed to solve the above problems. Summary of the invention
[0005] In order to solve or at least partially solve the above technical problems, the present application provides a simulation method and device.
[0006] In a first aspect, the present application provides a simulation method, the method comprising:
[0007] Acquire a business policy to be verified for a target business scenario and target business data required for simulating the business policy to be verified;
[0008] Inputting the service policy to be verified and the target service data into a simulation engine to simulate the service policy to be verified based on the target service data;
[0009] Wherein, the simulation engine is used for:
[0010] Partitioning the target business data according to the spatiotemporal constraint relationship between the target business data so that data without spatiotemporal constraints are in different data partitions;
[0011] Running the simulation instance corresponding to each of the data partitions in parallel, wherein the simulation instance corresponding to each of the data partitions is used to simulate the service policy to be verified based on the data corresponding to the data partition;
[0012] Acquire the simulation result output by each simulation instance of the simulation engine.
[0013] Optionally, obtaining target business data required for simulating the business policy to be verified includes:
[0014] The general business data corresponding to the business policy to be verified is obtained from the pre-processed simulation general data, the simulation general data is applicable to multiple business scenarios, the multiple business scenarios include the target business scenario, the target business data includes the general business data, and the simulation general data is obtained by processing the historical business data corresponding to the multiple business scenarios.
[0015] Optionally, obtaining the business data required for simulating the business policy to be verified further includes:
[0016] The historical business data corresponding to the target business scenario is processed to obtain personalized business data corresponding to the business policy to be verified, and the target business data also includes the personalized business data.
[0017] Optionally, the simulation engine is further used for:
[0018] For each of the data partitions, when the simulation instance corresponding to the data partition runs abnormally, the simulation instance corresponding to the data partition is re-run based on the data corresponding to the data partition, so as to re-simulate the business policy to be verified based on the data corresponding to the data partition.
[0019] Optionally, the target business scenario includes: a merchant stocking scenario, the target business data includes: commodity sales data and commodity inventory data, and the business strategy to be verified includes: inventory turnover strategy, replenishment lead time strategy, or replenishment cycle strategy.
[0020] Optionally, the target business scenario includes:
[0021] In the inter-warehouse transfer and replenishment scenario, the target business data includes: inventory distribution in the warehouse, location details, and sales data of goods, and the business strategy to be verified includes: human resource allocation strategy or human resource allocation strategy.
[0022] Optionally, the target business scenario includes: a logistics order splitting scenario, the target business data includes: package data and logistics service provider data, and the strategy to be verified is a logistics order splitting strategy.
[0023] Optionally, the target business scenario includes:
[0024] In the package cost budget scenario, the target business data includes: order data, and the strategy to be verified includes: package splitting strategy.
[0025] In a second aspect, the present application provides a simulation device, the device comprising:
[0026] A first acquisition unit, configured to acquire a business policy to be verified for a target business scenario and target business data required for simulating the business policy to be verified;
[0027] A simulation unit, configured to input the service policy to be verified and the target service data into a simulation engine, so as to simulate the service policy to be verified based on the target service data;
[0028] Wherein, the simulation engine is used for:
[0029] Partitioning the target business data according to the spatiotemporal constraint relationship between the target business data so that data without spatiotemporal constraints are in different data partitions;
[0030] Running the simulation instance corresponding to each of the data partitions in parallel, wherein the simulation instance corresponding to each of the data partitions is used to simulate the service policy to be verified based on the data corresponding to the data partition;
[0031] The second acquisition unit is used to acquire the simulation result output by each simulation instance of the simulation engine.
[0032] Optionally, the first acquiring unit is used to:
[0033] The general business data corresponding to the business policy to be verified is obtained from the pre-processed simulation general data, the simulation general data is applicable to multiple business scenarios, the multiple business scenarios include the target business scenario, the target business data includes the general business data, and the simulation general data is obtained by processing the historical business data corresponding to the multiple business scenarios.
[0034] Optionally, the first acquiring unit is further used to:
[0035] The historical business data corresponding to the target business scenario is processed to obtain personalized business data corresponding to the business policy to be verified, and the target business data also includes the personalized business data.
[0036] Optionally, the simulation engine is further used for:
[0037] For each of the data partitions, when the simulation instance corresponding to the data partition runs abnormally, the simulation instance corresponding to the data partition is re-run based on the data corresponding to the data partition, so as to re-simulate the business policy to be verified based on the data corresponding to the data partition.
[0038] Optionally, the target business scenario includes: a merchant stocking scenario, the target business data includes: commodity sales data and commodity inventory data, and the business strategy to be verified includes: inventory turnover strategy, replenishment lead time strategy, or replenishment cycle strategy.
[0039] Optionally, the target business scenario includes:
[0040] In the inter-warehouse transfer and replenishment scenario, the target business data includes: inventory distribution in the warehouse, location details, and sales data of goods, and the business strategy to be verified includes: human resource allocation strategy or human resource allocation strategy.
[0041] Optionally, the target business scenario includes: a logistics order splitting scenario, the target business data includes: package data and logistics service provider data, and the strategy to be verified is a logistics order splitting strategy.
[0042] Optionally, the target business scenario includes:
[0043] In the package cost budget scenario, the target business data includes: order data, and the strategy to be verified includes: package splitting strategy.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising a processor and a memory;
[0045] The processor is configured to execute instructions stored in the memory so that the device performs the method as described in any one of the first aspects above.
[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, wherein the instructions instruct a device to execute a method as described in any one of the above first aspects.
[0047] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect above.
[0048] Compared with the prior art, the embodiments of the present application have the following advantages:
[0049] The present application provides a simulation method, which includes: obtaining a business strategy to be verified for a target business scenario, and target business data required for simulating the simulation strategy to be verified, and further, inputting the business strategy to be verified and the target business data into a simulation engine to simulate the business strategy to be verified based on the target business data. The simulation engine can partition the target business data according to the spatiotemporal constraint relationship between the target business data, so that the data without spatiotemporal constraints are in different data partitions. Further, the simulation instance corresponding to each data partition is run in parallel, and the simulation instance corresponding to each data partition is used to simulate the business strategy to be verified based on the data corresponding to the data partition. After the aforementioned business strategy to be verified and the target business data are input into the simulation engine, the simulation results output by each simulation instance of the simulation engine can be obtained, thereby obtaining the result of simulating the business strategy to be verified. It can be seen from the above description that in the present application, for data with no spatiotemporal constraints, simulation can be performed in parallel, thereby effectively improving the efficiency of simulating the business strategy to be verified. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 A schematic diagram of a process of simulation based on business strategy is shown;
[0052] Figure 2 A schematic diagram of a simulation method provided in an embodiment of the present application;
[0053] Figure 3 A flowchart of another simulation method provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of the structure of a simulation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0056] The inventor of the present application has found through research that in the conventional technology, the simulation solution based on business strategy can be roughly described as follows: Figure 1 As shown, Figure 1 A schematic diagram of a process of simulation based on business strategy is shown.
[0057] like Figure 1 As shown in the figure, the process of simulation based on business strategy can include four main steps: data preprocessing, data loading, simulation calculation and data recovery. Among them:
[0058] Data preprocessing can be understood as combining business strategies to process business data in the database to obtain the data required for simulating business strategies. For example, preprocessing operations such as deduplication and cleaning are performed on business data in the database to obtain the data required for simulating business strategies.
[0059] Data loading can be understood as loading the data required for simulating the business policy from the database to the local device that performs the simulation operation.
[0060] Simulation calculation can be understood as the calculation and processing of the loaded data locally based on the business strategy to evaluate the application effect of the business strategy. In the simulation calculation step, serial calculation and processing are used to calculate and process the large amount of data loaded locally.
[0061] Data recycling can be understood as further writing the calculation results obtained from the simulation calculation steps into an online or offline storage device or storage system, so as to further evaluate the application effect of the business strategy based on the stored calculation results.
[0062] In practical applications, if you want to better evaluate the application effect of business strategies, the amount of data required to simulate the business strategies is generally large. For data with a large amount of data, serial calculation and processing are used in the simulation calculation step, which makes the entire simulation time-consuming and leads to low simulation efficiency.
[0063] In order to solve the above problems, an embodiment of the present application provides a simulation method and device.
[0064] Various non-limiting implementations of the present application are described in detail below in conjunction with the accompanying drawings.
[0065] Exemplary Methods
[0066] See also Figure 2 , which is a schematic diagram of a flow chart of a simulation method provided in an embodiment of the present application. In this embodiment, the method can be executed by a server or a client, and the embodiment of the present application does not make any specific limitation.
[0067] Figure 2 The method shown may, for example, include the following steps: S101 - S103 .
[0068] S101: Acquire a business policy to be verified for a target business scenario and target business data required for simulating the business policy to be verified.
[0069] In an embodiment of the present application, the target business scenario may be a business scenario related to e-commerce.
[0070] In a specific example, the target business scenario may be a merchant stocking scenario, which refers to a merchant stocking goods. Merchants can stock goods according to certain strategies, and the business strategy to be verified mentioned here may be the strategy adopted by merchants to stock goods. In an example, the strategy adopted by merchants to stock goods may be an inventory turnover strategy, a replenishment lead time strategy, or a replenishment cycle strategy. Among them:
[0071] The inventory turnover strategy can correspond to the inventory turnover days. The inventory turnover days can be understood as the number of days the goods are stored in the warehouse, that is, the time it takes for the goods to be put into storage and sold out.
[0072] The replenishment lead time strategy can correspond to the replenishment lead time, which can be understood as the time from initiating replenishment purchase to the time the goods are put into storage.
[0073] The replenishment cycle strategy can correspond to the replenishment cycle. The replenishment cycle can be understood as the time between two adjacent replenishments, or the replenishment cycle can also be understood as the replenishment frequency.
[0074] In the merchant stocking scenario, the target business data may include sales data and inventory data of the goods. For example, it may include sales data and inventory data of the goods within a certain period of time.
[0075] In another specific example, the target business scenario may be an inter-warehouse transfer and replenishment scenario. The so-called inter-warehouse transfer and replenishment scenario refers to the transfer of goods from one of the warehouses (hereinafter referred to as the first warehouse) to another warehouse (hereinafter referred to as the second warehouse), for example, from the stocking warehouse to the shipping warehouse. In the inter-warehouse transfer and replenishment scenario, a certain amount of manpower may be configured to transfer goods from the first warehouse to the second warehouse (hereinafter referred to as the inter-warehouse transfer operation). The business policy to be verified mentioned here may be a policy related to manpower configuration. In one example, the policy related to manpower configuration may be a manpower configuration policy or a manpower allocation policy. Among them:
[0076] The manpower allocation strategy may be, for example, to separately allocate some users to perform inter-warehouse transfer operations. The manpower allocation strategy may be, for example, to allocate some users from other positions to perform inter-warehouse transfer operations.
[0077] In the inter-warehouse transfer replenishment scenario, the target business data may include the inventory distribution, location details, and sales data of the goods in the warehouse. The inventory distribution in the warehouse may include the inventory of the goods in the first warehouse and the inventory of the goods in the second warehouse, and the location details may include the location details of the first warehouse and the location details of the second warehouse.
[0078] In some scenarios, the aforementioned merchant stocking scenarios and inter-warehouse transfer and replenishment scenarios can also be referred to as supply chain scenarios.
[0079] In another specific example, the target business scenario may be a logistics order splitting scenario. The so-called logistics order splitting scenario refers to allocating goods to be shipped to at least one logistics service provider so that the logistics service provider can deliver the goods to the user who purchased the goods. In the logistics order splitting scenario, the goods to be shipped can be allocated to at least one logistics service provider according to a certain logistics order splitting strategy. The business strategy to be verified mentioned here may be a logistics order splitting strategy. The embodiment of the present application does not specifically limit the logistics sharing strategy, and the logistics sharing strategy can be determined according to actual conditions.
[0080] In the logistics order splitting scenario, the target business data may include: package data, logistics service provider data.
[0081] The package data may include the number of packages and detailed data of each package, wherein the detailed data of the package may include, for example, the type of goods in the package, the weight of the goods, etc.
[0082] Logistics service provider data includes but is not limited to: logistics service provider pricing, logistics service provider capacity, and logistics service provider timeliness data.
[0083] In another specific example, the target business scenario may be a package cost budget scenario. The so-called package cost budget scenario refers to the estimated transportation cost of the package to be shipped. The transportation cost mentioned here can be understood as the fee paid to the logistics service provider for transporting the package. In the package cost budget scenario, the merchant can split the goods in an order into multiple packages according to a certain package splitting strategy, so as to facilitate the transportation of the multiple packages through the logistics service provider. The business strategy to be verified mentioned here may be a package splitting strategy. The embodiment of the present application does not specifically limit the package splitting strategy, and the package splitting strategy can be determined according to actual conditions.
[0084] In the logistics order splitting scenario, the target business data may include: order data, wherein the order data may include at least the commodity data included in the order (one or more of the quantity of commodities, the type of commodities, and the weight of commodities).
[0085] In one example, when obtaining the business policy to be verified, for example, the business policy to be verified input by the user through the human-computer interaction interface can be obtained. In one example, the user can first select a target business scenario, for example, select the target business scenario in a page displayed by the client, and further input the business policy to be verified.
[0086] In one example, when obtaining the target business data, historical data in the database may be processed based on the business policy to be verified to obtain the target business data.
[0087] The historical data mentioned in the embodiments of the present application may include historical business data corresponding to multiple business scenarios involved in e-commerce.
[0088] In another example, in order to improve the efficiency of obtaining target business data, in an embodiment of the present application, the historical data in the database may be processed in advance to obtain simulation general data. The so-called simulation general data is data that can be applied to multiple business scenarios. In other words, the business strategies to be verified for the multiple business scenarios can all be simulated using the simulation general data. Among them, the simulation general data may include, for example, one or more of: order data, package data, sales data, and storage location details.
[0089] The target business scenario may be one of the multiple business scenarios. In this scenario:
[0090] When obtaining the target business data, the general business data corresponding to the business policy to be verified can be obtained from the pre-processed simulation general data. For example, the simulation general data required for simulating the business policy to be verified can be selected from the pre-processed simulation general data as the general business data.
[0091] In one example, the general business data may be part or all of the target business data. When the general business data is all of the target business data, the target business data is obtained by obtaining the general business data. In other words, the target business data and the general business data are the same. For example, in the above-mentioned package cost budget scenario, order data (i.e., general business data) can be obtained from the above-mentioned simulation general data as the target business data.
[0092] When the general business data is part of the target business data, the target business data includes personalized business data corresponding to the business policy to be verified in addition to the general business data. In this case, the historical business data corresponding to the target business scenario needs to be processed to obtain the personalized business data. Here, the processing of the historical business data corresponding to the target business scenario can be to perform deduplication, cleaning, and other processing on the historical business data corresponding to the target business scenario.
[0093] For example:
[0094] In the aforementioned merchant stocking scenario, the sales data of the goods can be obtained from the aforementioned simulated general data as general business data, and the inventory data of the goods can be processed in real time as personalized business data.
[0095] In the aforementioned inter-warehouse transfer and replenishment scenario, the sales data and warehouse location details of the goods can be obtained from the aforementioned simulation general data as general business data, and the inventory distribution in the warehouse can be obtained in real time as personalized business data.
[0096] In the aforementioned logistics order splitting scenario, the package data can be obtained from the aforementioned simulation general data as general business data, and the logistics service provider data can be processed in real time to obtain personalized business data.
[0097] It can be seen that in this application, if the target business data includes simulated general business data that can be processed in advance, the pre-processed general business data can be directly obtained as the target business data, thereby effectively improving the efficiency of obtaining the target business data.
[0098] S102: Input the business policy to be verified and the target business data into a simulation engine to simulate the business policy to be verified based on the target business data. The simulation engine is used to: partition the target business data according to the spatiotemporal constraint relationship between the target business data, so that data without spatiotemporal constraints are in different data partitions; and run the simulation instance corresponding to each data partition in parallel, wherein the simulation instance corresponding to each data partition is used to simulate the business policy to be verified based on the data corresponding to the data partition.
[0099] After obtaining the service policy to be verified and the target service data, the service policy to be verified and the target service data may be input into a simulation engine, and the simulation engine simulates the service policy to be verified based on the target service data.
[0100] In an embodiment of the present application, the simulation engine can support distributed parallel simulation calculations. Among them, the simulation engine can support distributed parallel simulation calculations by customizing user-defined functions (UDF). As an example, the simulation engine can partition the target business data according to the spatiotemporal constraint relationship between the target business data. Among them, the spatiotemporal constraint relationship between A data and B data refers to whether A data is associated with B data when participating in simulation calculations. For example, if A data needs to be combined with B data or other data obtained based on B data when participating in simulation calculations, there is a spatiotemporal constraint between A data and B data. If A data participates in simulation calculations that are irrelevant to B data, there is no spatiotemporal constraint between A data and B data.
[0101] The simulation engine can divide the target business data without time and space constraints into different data partitions. Furthermore, the simulation engine can run the corresponding simulation instances in each data partition, and the simulation instances corresponding to each partition can be executed in parallel. Moreover, for any data partition, the simulation instance corresponding to the data partition does not need to load the data corresponding to other data partitions, but can simulate the business policy to be verified based on its own corresponding data.
[0102] In one example, for any data partition, if the simulation instance corresponding to the data partition runs abnormally, the simulation engine can re-run the simulation instance corresponding to the data partition. In other words, the simulation engine can re-run the simulation instance corresponding to the data partition based on the data corresponding to the data partition, so as to re-simulate the business policy to be verified based on the data corresponding to the data partition. In other words, if the simulation instance corresponding to a data partition runs abnormally, you only need to re-run the simulation instance corresponding to the data partition. The abnormal operation of the simulation instance corresponding to the data partition will not affect the operation of other data partition instances, thereby effectively improving the overall simulation efficiency of the simulation of the business policy to be verified.
[0103] S103: Acquire simulation results output by each simulation instance of the simulation engine.
[0104] After the simulation engine runs the simulation instances corresponding to the various data partitions in parallel, the simulation results output by each simulation instance of the simulation engine can be further obtained, so as to further evaluate the application effect of the business policy to be verified based on the simulation results.
[0105] The embodiment of the present application does not specifically limit the simulation result, and the simulation result is related to the target business scenario.
[0106] In one example, in the above merchant stocking scenario, the simulation result may be, for example, the inventory status of the warehouse. Accordingly, the application effect of the inventory turnover strategy, replenishment lead time strategy, or replenishment cycle strategy may be evaluated based on the inventory status of the warehouse.
[0107] In another example, in the aforementioned inter-warehouse transfer and replenishment scenario, the simulation result may be, for example, one or more of the first fulfillment time of the product, the out-of-stock rate, and the labor cost of inter-warehouse transfer and replenishment. The first fulfillment time mentioned here may be, for example, the time from when the user places an order to when the warehouse ships the product. Accordingly, the application effect of the human resource allocation strategy or human resource allocation strategy may be evaluated based on one or more of the first fulfillment time of the product, the out-of-stock rate, and the labor cost of inter-warehouse transfer and replenishment.
[0108] In another example, in the aforementioned logistics order splitting scenario, the simulation result may include logistics cost and / or the second fulfillment time limit, where the second fulfillment time limit mentioned here may be the time spent on logistics transportation. Accordingly, the application effect of the logistics order splitting strategy may be evaluated based on the logistics cost and / or the second fulfillment time limit.
[0109] In another example, in the aforementioned package cost budget scenario, the simulation result may include, for example, the total cost of the package. Accordingly, the application effect of the package splitting strategy may be evaluated based on the total cost of the package.
[0110] It can be seen from the above description that in the present application, data without time and space constraints can participate in the simulation in parallel, thereby effectively improving the efficiency of simulating the business policy to be verified.
[0111] The above describes the simulation method provided in the embodiment of the present application. Figure 3 The flowchart shown introduces a possible implementation method of the present application. Figure 3 A flowchart of another simulation method provided in an embodiment of the present application.
[0112] like Figure 3 As shown, the historical data in the database can be processed in a general way by running routine scheduling tasks (for example, running the scheduling task at 0:00 every day) to obtain simulation general data. Figure 3 Three types of historical data are shown: inventory data, sales data, and product data.
[0113] Further, target business data is obtained from the general simulation data, and further, the target business data and the business policy to be verified are input into the simulation engine.
[0114] The simulation engine divides the target business data into three data partitions according to the spatiotemporal constraint relationship between the target business data, and runs the simulation instances corresponding to the three data partitions in parallel, and further obtains the simulation results output by the three simulation instances.
[0115] As before for Figure 1 From the simulation process shown in the figure, we can see that Figure 1 In the scheme shown, a single simulation task includes the entire process from data preprocessing to simulation based on business strategies, which has complex logic, calculation timestamps, and high development difficulty. In this application, the decoupling of data set (i.e., simulation common data), business strategy, and simulation engine is achieved, which is easy to manage and execute.
[0116] In addition, Figure 1 In the scenario shown, when loading data locally during data loading, the memory capacity of the local device needs to meet the demand, and when scheduling the system, it needs to wait for resources to meet the demand, which often causes delays. In this application, each simulation instance only needs to focus on the data of the data partition corresponding to itself, without loading all data (i.e., complete target business data), which reduces data transmission, reduces the demand for computing resources of the simulation instance, avoids waiting for resources, and correspondingly improves policy efficiency.
[0117] in addition, Figure 1 The method shown lacks fault tolerance. Once a failure occurs in an intermediate link of the simulation, it needs to be re-executed. Figure 1 The process shown in the figure leads to low efficiency of the entire simulation. In the present application, if the simulation instance corresponding to a data partition runs abnormally, it is only necessary to rerun the simulation instance corresponding to the data partition. The simulation instance corresponding to the data partition runs abnormally and will not affect the operation of other data partition instances, thereby effectively improving the overall simulation efficiency of the simulation of the business policy to be verified. Moreover, the aforementioned data set can be applied to multiple business scenarios and reused by different business scenarios, thereby avoiding repeated processing of historical data.
[0118] Exemplary Devices
[0119] Based on the method provided in the above embodiment, the embodiment of the present application further provides a device, which is described below in conjunction with the accompanying drawings.
[0120] See also Figure 4 , which is a structural schematic diagram of a simulation device provided in an embodiment of the present application. Figure 4 The device 400 shown includes: a first acquisition unit 401 , a simulation unit 402 , and a second acquisition unit 403 .
[0121] The first acquisition unit 401 is used to acquire a business policy to be verified for a target business scenario and target business data required for simulating the business policy to be verified;
[0122] The simulation unit 402 is used to input the service policy to be verified and the target service data into a simulation engine to simulate the service policy to be verified based on the target service data;
[0123] Wherein, the simulation engine is used for:
[0124] Partitioning the target business data according to the spatiotemporal constraint relationship between the target business data so that data without spatiotemporal constraints are in different data partitions;
[0125] Running the simulation instance corresponding to each of the data partitions in parallel, wherein the simulation instance corresponding to each of the data partitions is used to simulate the service policy to be verified based on the data corresponding to the data partition;
[0126] The second acquisition unit 403 is used to acquire the simulation result output by each simulation instance of the simulation engine.
[0127] Optionally, the first acquiring unit 401 is configured to:
[0128] The general business data corresponding to the business policy to be verified is obtained from the pre-processed simulation general data, the simulation general data is applicable to multiple business scenarios, the multiple business scenarios include the target business scenario, the target business data includes the general business data, and the simulation general data is obtained by processing the historical business data corresponding to the multiple business scenarios.
[0129] Optionally, the first acquiring unit 401 is further configured to:
[0130] The historical business data corresponding to the target business scenario is processed to obtain personalized business data corresponding to the business policy to be verified, and the target business data also includes the personalized business data.
[0131] Optionally, the simulation engine is further used for:
[0132] For each of the data partitions, when the simulation instance corresponding to the data partition runs abnormally, the simulation instance corresponding to the data partition is re-run based on the data corresponding to the data partition, so as to re-simulate the business policy to be verified based on the data corresponding to the data partition.
[0133] Optionally, the target business scenario includes: a merchant stocking scenario, the target business data includes: commodity sales data and commodity inventory data, and the business strategy to be verified includes: inventory turnover strategy, replenishment lead time strategy, or replenishment cycle strategy.
[0134] Optionally, the target business scenario includes:
[0135] In the inter-warehouse transfer and replenishment scenario, the target business data includes: inventory distribution in the warehouse, location details, and sales data of goods, and the business strategy to be verified includes: human resource allocation strategy or human resource allocation strategy.
[0136] Optionally, the target business scenario includes: a logistics order splitting scenario, the target business data includes: package data and logistics service provider data, and the strategy to be verified is a logistics order splitting strategy.
[0137] Optionally, the target business scenario includes:
[0138] In the package cost budget scenario, the target business data includes: order data, and the strategy to be verified includes: package splitting strategy.
[0139] Since the device 400 is a device corresponding to the simulation method provided by the above method embodiment, the specific implementation of each unit of the device 400 is based on the same concept as the above method embodiment. Therefore, regarding the specific implementation of each unit of the device 400, you can refer to the relevant description part of the above method embodiment, which will not be repeated here.
[0140] The embodiment of the present application also provides an electronic device, the electronic device comprising a processor and a memory;
[0141] The processor is used to execute the instructions stored in the memory, so that the device executes the simulation method provided by the above method embodiment.
[0142] An embodiment of the present application provides a computer-readable storage medium, including instructions, wherein the instructions instruct a device to execute the simulation method provided in the above method embodiment.
[0143] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer executes the simulation method provided by the above method embodiment.
[0144] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0145] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
[0146] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A simulation method, characterized in that: The method comprises: Acquire a business policy to be verified for a target business scenario and target business data required for simulating the business policy to be verified; Inputting the service policy to be verified and the target service data into a simulation engine to simulate the service policy to be verified based on the target service data; Wherein, the simulation engine is used for: Partitioning the target business data according to the spatiotemporal constraint relationship between the target business data so that data without spatiotemporal constraints are in different data partitions; Running the simulation instance corresponding to each of the data partitions in parallel, wherein the simulation instance corresponding to each of the data partitions is used to simulate the service policy to be verified based on the data corresponding to the data partition; The simulation result output by each simulation instance of the simulation engine is obtained.
2. The method according to claim 1, characterized in that Obtaining target business data required for simulating the business policy to be verified, including: The general business data corresponding to the business policy to be verified is obtained from the pre-processed simulation general data, the simulation general data is applicable to multiple business scenarios, the multiple business scenarios include the target business scenario, the target business data includes the general business data, and the simulation general data is obtained by processing the historical business data corresponding to the multiple business scenarios.
3. The method according to claim 2, characterized in that Acquiring the business data required for simulating the business policy to be verified also includes: The historical business data corresponding to the target business scenario is processed to obtain personalized business data corresponding to the business policy to be verified, and the target business data also includes the personalized business data.
4. The method according to claim 1, characterized in that: The simulation engine is also used to: For each of the data partitions, when the simulation instance corresponding to the data partition runs abnormally, the simulation instance corresponding to the data partition is re-run based on the data corresponding to the data partition, so as to re-simulate the business policy to be verified based on the data corresponding to the data partition.
5. The method according to any one of claims 1 to 4, characterized in that: The target business scenario includes: a merchant stocking scenario, the target business data includes: commodity sales data and commodity inventory data, and the business strategy to be verified includes: inventory turnover strategy, replenishment lead time strategy, or replenishment cycle strategy.
6. The method according to any one of claims 1 to 4, characterized in that: The target business scenarios include: In the inter-warehouse transfer and replenishment scenario, the target business data includes: inventory distribution in the warehouse, location details, and sales data of goods, and the business strategy to be verified includes: human resource allocation strategy or human resource allocation strategy.
7. The method according to any one of claims 1 to 4, characterized in that: The target business scenario includes: a logistics order splitting scenario, the target business data includes: package data and logistics service provider data, and the strategy to be verified is a logistics order splitting strategy.
8. The method according to any one of claims 1 to 4, characterized in that: The target business scenarios include: In the package cost budget scenario, the target business data includes: order data, and the strategy to be verified includes: package splitting strategy.
9. A simulation device, characterized in that: The device comprises: A first acquisition unit, configured to acquire a business policy to be verified for a target business scenario and target business data required for simulating the business policy to be verified; A simulation unit, configured to input the service policy to be verified and the target service data into a simulation engine, so as to simulate the service policy to be verified based on the target service data; The simulation engine is used to: partition the target business data according to the spatiotemporal constraint relationship between the target business data, so that data without spatiotemporal constraints are in different data partitions; run the simulation instance corresponding to each data partition in parallel, wherein the simulation instance corresponding to each data partition is used to simulate the business policy to be verified based on the data corresponding to the data partition; The second acquisition unit is used to acquire the simulation result output by each simulation instance of the simulation engine.
10. An electronic device, characterized in that: The device comprises a processor and a memory; The processor is configured to execute instructions stored in the memory so that the device executes the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The method comprises instructions, wherein the instructions instruct the device to execute the method according to any one of claims 1 to 8.
