Replenishment configuration method and device, electronic equipment, storage medium and computer program product
By using the Spark computing engine's automated workflow definition and dynamic resource allocation, the problem of low efficiency in ElasticJob's large-scale replenishment computing was solved, achieving efficient and automated replenishment information processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING JINGDONG YUANSHENG TECH CO LTD
- Filing Date
- 2024-11-05
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, ElasticJob is slow in replenishment calculations for large amounts of data, requiring 12 hours to complete tens of millions of replenishment suggestions, and it relies on manual control of the task process, resulting in low efficiency in replenishment calculations.
The Spark computing engine is used to orchestrate multiple workflows according to a preset workflow, automatically execute multiple workflow definitions, read and process configuration data through the Spark computing engine, dynamically allocate executor resources, reduce manual intervention, and improve computing efficiency.
By leveraging the efficient data processing capabilities and automated workflows of the Spark engine, computation time is significantly reduced, replenishment calculation speed is increased, manual intervention is reduced, and overall efficiency is improved.
Smart Images

Figure CN121998559A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of supply chain technology, and in particular to a replenishment configuration method, apparatus, electronic device, storage medium, and computer program product. Background Technology
[0002] In supply chain replenishment calculations, ElasticJob is used to distribute the master data associated with each StockKeeping Unit (SKU) across different Docker containers for distributed computing via sharding. However, ElasticJob is slow for replenishment calculations with large datasets; processing tens of millions of replenishment recommendations can take up to 12 hours, resulting in low efficiency. Furthermore, the upstream data upon which replenishment calculations rely requires human control. Humans execute forecasting tasks, determine task completion, and generate forecast data. After generating forecast data, the next task is executed manually to generate safety stock. If a replenishment task chain is long, a significant amount of manpower is needed to complete the replenishment plan, which is time-consuming and labor-intensive, further reducing the overall efficiency of replenishment calculations. Summary of the Invention
[0003] The present application provides a replenishment configuration method, apparatus, electronic device, storage medium, and computer program product that can improve the efficiency of replenishment calculation.
[0004] The technical solution of this application is implemented as follows:
[0005] This application provides a replenishment configuration method, including:
[0006] According to the execution order of multiple workflow definitions in the preset workflow orchestration, the configuration data corresponding to each workflow definition is read and processed sequentially based on the Spark computing engine to determine the replenishment information corresponding to the preset workflow orchestration; wherein, the execution of each workflow definition requires the processing result corresponding to the preceding workflow definition.
[0007] In the above scheme, the step of sequentially reading and processing the configuration data corresponding to each workflow definition based on the Spark computing engine to determine the replenishment information corresponding to the preset workflow orchestration includes:
[0008] Based on the Spark computing engine, the configuration data corresponding to each workflow definition is read, and data association and grouping calculations are performed to determine the dataset of each item code corresponding to each workflow definition; wherein, the configuration data is used to represent at least one of the item logistics data, supply and demand data and logistics time series data corresponding to each item code;
[0009] The datasets corresponding to each item code are distributed to the corresponding executors for processing, and the processing result corresponding to each workflow definition is determined until the processing of the last workflow definition is completed and the replenishment information is determined; wherein, the number of executors is dynamically determined by the Spark computing engine based on the current load.
[0010] In the above scheme, the step of reading the configuration data corresponding to each workflow definition based on the Spark computing engine, and performing data association and grouping calculations to determine the dataset of each item code corresponding to each workflow definition includes:
[0011] Based on the Spark computing engine, at least one of the following is read from the preset configuration file: the item logistics data, the supply demand data, and the logistics time series data corresponding to each workflow. Data association calculation is performed to form two-dimensional array data corresponding to the item logistics data, the supply demand data, and the logistics time series data respectively.
[0012] The datasets for each item code are determined by grouping the multiple two-dimensional array data according to the item codes they contain.
[0013] In the above scheme, distributing the datasets corresponding to each item code to the corresponding executors for processing and determining the processing result corresponding to each workflow definition includes:
[0014] When the number of executors is less than the number of datasets, each dataset is distributed to the idle executors one by one to call the corresponding replenishment algorithm model to calculate the processing result corresponding to each workflow definition.
[0015] In the above scheme, before determining the replenishment information corresponding to the preset workflow orchestration by sequentially reading and processing the configuration data corresponding to each workflow definition based on the Spark computing engine according to the execution order of multiple workflow definitions in the preset workflow orchestration, the method further includes:
[0016] The configuration data is determined in response to the user's configuration operation on the replenishment configuration interface, and the configuration data is saved in a preset configuration file.
[0017] In the above scheme, the configuration data is used to characterize at least one of the following corresponding to each workflow definition: the data source and time range of supply and demand data, logistics time sequence data, item logistics data, data to be deleted, result output format, and configuration strategy.
[0018] In the above scheme, before determining the replenishment information corresponding to the preset workflow orchestration by sequentially reading and processing the configuration data corresponding to each workflow definition based on the Spark computing engine according to the execution order of multiple workflow definitions in the preset workflow orchestration, the method further includes:
[0019] In response to the user's arrangement operation on the controls corresponding to the multiple workflow definitions displayed in the workflow arrangement interface, the initial workflow arrangement is formed, and the initial task process code is stored in the dataset;
[0020] After activating the initial workflow orchestration, the orchestration numbers of the multiple workflow definitions in the initial workflow orchestration are synchronized to the corresponding workflow definitions to form the preset workflow orchestration.
[0021] The method in the above scheme further includes:
[0022] The workflow definition that meets the modification conditions will be taken offline;
[0023] In response to the user's modification operation on the offline workflow definition, the modified workflow definition is brought back online, and the preset workflow arrangement is determined.
[0024] This application embodiment also provides a replenishment configuration device, including:
[0025] The data processing unit is used to process the configuration data corresponding to each workflow definition sequentially based on the Spark computing engine, according to the execution order of multiple workflow definitions in the preset workflow orchestration, to determine the replenishment information corresponding to the preset workflow orchestration; wherein, the execution of each workflow definition requires the processing result corresponding to the preceding workflow definition.
[0026] This application also provides an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the steps in the above-described method.
[0027] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the above-described method.
[0028] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the above-described method.
[0029] In this embodiment, following the execution order of multiple workflow definitions in a preset workflow orchestration, the configuration data corresponding to each workflow definition is sequentially read and processed using the Spark computing engine to determine the replenishment information corresponding to the preset workflow orchestration. Each workflow definition requires the processing results of the preceding workflow definition to be executed. Because the Spark computing engine has a strong ability to process large amounts of data and complex data logic, it can improve the speed of replenishment calculation, reduce calculation time, and improve calculation efficiency. Furthermore, the solution in this application automatically executes the calculations according to the execution order of multiple workflow definitions in the preset workflow orchestration, eliminating the need for manual intervention and reducing inefficiencies caused by manual processes, thereby improving the efficiency of replenishment calculations. Attached Figure Description
[0030] Figure 1 An optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application;
[0031] Figure 2 An optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application;
[0032] Figure 3 An optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application;
[0033] Figure 4 An optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application;
[0034] Figure 5 An optional effect diagram of the replenishment configuration method provided in the embodiments of this application;
[0035] Figure 6 An optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application;
[0036] Figure 7 An optional effect diagram of the replenishment configuration method provided in the embodiments of this application;
[0037] Figure 8 An optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application;
[0038] Figure 9 An optional effect diagram of the replenishment configuration method provided in the embodiments of this application;
[0039] Figure 10 An optional effect diagram of the replenishment configuration method provided in the embodiments of this application;
[0040] Figure 11An optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application;
[0041] Figure 12 This is a schematic diagram of the structure of the replenishment configuration device provided in the embodiments of this application;
[0042] Figure 13 This is a schematic diagram of a hardware entity of an electronic device provided in an embodiment of this application. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application are further described in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0044] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0045] If the application documents contain similar descriptions such as "first / second", the following explanation shall be added: In the following description, the terms "first / second / third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0047] In the replenishment calculation process of related technologies, ElasticJob is slow for large-scale replenishment calculations, requiring up to 12 hours to process replenishment suggestions of tens of millions. Furthermore, when using ElasticJob, scaling up Docker machines is necessary when the data volume increases, and scaling down Docker machines is necessary when the data volume decreases, resulting in low efficiency for replenishment calculations. Additionally, hundreds of configuration items related to replenishment calculations are fixed in the system's application.properties configuration file, which is difficult to manage. Different merchants maintain different configurations, and when a merchant needs to change the configuration strategy, the code needs to be redeployed, which is time-consuming and labor-intensive. Replenishment-related tasks cannot be managed by the system; they can only be managed manually to determine when to run which task and whether the task is completed before continuing to run the next task, consuming a significant amount of manpower. In summary, the replenishment calculation process in related technologies is inefficient due to the performance issues of ElasticJob and manual intervention.
[0048] This application provides a replenishment configuration method. Please refer to [link / reference]. Figure 1 This is an optional flowchart illustrating the replenishment configuration method provided in the embodiments of this application, which will be combined with... Figure 1 The steps shown are explained below:
[0049] S101. According to the execution order of multiple workflow definitions in the preset workflow orchestration, the configuration data corresponding to each workflow definition is read sequentially and processed based on the Spark computing engine to determine the replenishment information corresponding to the preset workflow orchestration; wherein, the execution of each workflow definition requires the processing result corresponding to the preceding workflow definition.
[0050] In this embodiment, before executing S101, the configuration device first needs to arrange multiple workflow definitions in order of execution to form a preset workflow arrangement. The multiple workflow definitions in the preset workflow arrangement are executed automatically, and the execution of each workflow definition requires the processing result of the preceding workflow definition. The configuration device then needs to configure the configuration data corresponding to each workflow definition locally through user configuration. When executing the preset workflow arrangement, the configuration data corresponding to each workflow definition is read sequentially based on the Spark computing engine according to the execution order for calculation and processing. The calculation process of each workflow definition requires the processing result of the preceding workflow definition until the calculation and processing of the last workflow definition is completed, at which point the replenishment information is determined.
[0051] The workflow definition is a Spark replenishment computation task for a user. The Spark replenishment computation task performs logical processing and initiates computation through the HTTP interface of the executor. After it completes, it invokes the time-series promote and the document promote in parallel for the next workflow definition to retrieve.
[0052] The configuration data can be manually configured by the user in the corresponding configuration interface. The configuration data is used to characterize at least one of the following for each workflow definition: data source and time range for reading data, logistics time sequence data, item logistics data, data to be deleted, result output format, supply and demand related rules and strategy configuration.
[0053] In this embodiment, following the execution order of multiple workflow definitions in a preset workflow orchestration, the configuration data corresponding to each workflow definition is sequentially read and processed using the Spark computing engine to determine the replenishment information corresponding to the preset workflow orchestration. Each workflow definition requires the processing results of the preceding workflow definition to be executed. Because the Spark computing engine has a strong ability to process large amounts of data and complex data logic, it can improve the speed of replenishment calculation, reduce calculation time, and improve calculation efficiency. Furthermore, the solution in this application automatically executes the calculations according to the execution order of multiple workflow definitions in the preset workflow orchestration, eliminating the need for manual intervention and reducing inefficiencies caused by manual processes, thereby improving the efficiency of replenishment calculations.
[0054] This application provides a replenishment configuration method. Please refer to [link / reference]. Figure 2 This is an optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application. Figure 1 The shown S101 can also be implemented through S201 to S202, which will be explained in conjunction with the steps:
[0055] S201. Based on the Spark computing engine, read the configuration data corresponding to each workflow definition, perform data association and grouping calculations, and determine the dataset of each item code corresponding to each workflow definition.
[0056] In this embodiment, the configuration device can read the configuration data corresponding to each workflow definition using the spark-doris-connector tool of the Spark computing engine. It then performs data association and grouping calculations on the read configuration data to determine the dataset for each item code corresponding to each workflow definition. The dataset for each item code is used to represent at least one of the following: item logistics data, supply and demand data, and logistics time-series data corresponding to that item code.
[0057] S202. Distribute the datasets corresponding to each item code to the corresponding executors for processing, determine the processing result corresponding to each workflow definition, until the last workflow definition is processed and the replenishment information is determined.
[0058] In this embodiment, the configuration device distributes the datasets corresponding to each item code to the corresponding executors for computation and processing, and calls the corresponding computational model to calculate the processing result corresponding to each workflow definition. This process continues until the processing of the last workflow definition is completed, at which point replenishment information is determined.
[0059] In this embodiment, if the number of executors is greater than the number of datasets, each dataset can be distributed to its corresponding executor for processing. If the number of executors is less than the number of datasets, each dataset can be distributed to its corresponding executor for processing, and when any executor finishes processing and becomes idle, the undistributed datasets are distributed to idle executors for processing.
[0060] The executors are dynamically determined by the Spark computing engine based on the current load. The Spark computing engine can automatically identify the system load; when the system load increases due to large data volumes, the Spark computing engine automatically adds executors to improve the computing speed.
[0061] Exemplary reference Figure 3 , Figure 2 The steps S201 to S202 shown can also be implemented via S11 to S13, which will be explained in conjunction with the steps:
[0062] S11. Create a preset workflow arrangement.
[0063] In this embodiment of the application, the configuration device configures the corresponding workflow definition in the workflow arrangement interface and creates a preset workflow arrangement.
[0064] S12, orchestrating multiple Spark tasks.
[0065] In this embodiment of the application, the configured workflow Spark tasks are orchestrated in the preset workflow orchestration to achieve the purpose of automatic task execution.
[0066] S13, Spark task computation.
[0067] In this embodiment, users can configure replenishment strategy configurations, prediction strategy configurations, and other configuration files for each user in the replenishment configuration interface corresponding to the configuration file management system on the configuration device. When the Spark task is started for computation, the corresponding merchant's configuration file is read, and different data and algorithm strategies are read according to different configurations in the configuration file to output prediction data, replenishment suggestions, and other related data.
[0068] In this embodiment, the Spark computing engine's ability to handle large amounts of data and complex data logic is leveraged to perform replenishment calculations on configuration data, improving computational efficiency and reducing computation time. Furthermore, the Spark computing engine's dynamic executor allocation capability allows it to dynamically allocate resources to executors based on load changes—automatically increasing resources when data volume increases and automatically decreasing resources when data volume decreases. This enables more efficient use of cluster resources, and on-demand resource allocation reduces computational costs and improves computational efficiency for configuration data.
[0069] This application provides a replenishment configuration method. Please refer to [link / reference]. Figure 4 This is an optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application. Figure 3 The steps S201 to S202 shown can also be implemented via S301 to S303, which will be explained in conjunction with the steps:
[0070] S301. Based on the Spark computing engine, at least one of the item logistics data, supply demand data, and logistics time series data corresponding to each workflow is read from the preset configuration file, and data association calculation is performed to form two-dimensional data corresponding to the item logistics data, supply demand data, and logistics time series data respectively.
[0071] In this embodiment of the application, the configuration device reads at least one of the item logistics data, supply demand data and logistics time series data corresponding to each workflow from the preset configuration file based on the spark-doris-connector tool of the Spark computing engine, and performs correlation calculations on the item logistics data, supply demand data and logistics time series data to form two-dimensional data corresponding to the item logistics data, supply demand data and logistics time series data respectively.
[0072] For example, in combination Figure 5The configuration device uses the Spark-Doris-Connector tool of the Spark computing engine to read the logistics data of the items (products, networks, nodes, arcs, arc products, node products) to generate corresponding dataframes (two-dimensional data), and performs aggregation through parallel computation using Spark join (Spark's parallel computation is much more efficient than joining multiple Doris tables); it also uses the Spark-Doris-Connector tool of the Spark computing engine to read the supply and demand data (supply documents, demand documents) to generate corresponding dataframes, and performs aggregation through parallel computation using Spark join; and it also uses the Spark-Doris-Connector tool of the Spark computing engine to read the logistics time series data (prediction time series, safety stock time series) to generate corresponding dataframes, and performs aggregation through parallel computation using Spark join.
[0073] S302. Group the multiple two-dimensional data according to the included item codes to determine the dataset for each item code.
[0074] In this embodiment, since the item logistics data, the supply and demand data, and the logistics time-series data all contain data corresponding to item codes, the two-dimensional data formed from the item logistics data, the supply and demand data, and the logistics time-series data will also include data corresponding to item codes. The configuration device groups each two-dimensional data according to the included item codes to obtain a subset of item codes corresponding to each two-dimensional data. Data containing the same item code is grouped into multiple subsets to determine the dataset for each item code.
[0075] For example, in combination Figure 5 The configuration device can generate RDDs by grouping the dataframes corresponding to the item logistics data, supply and demand data, and logistics time-series data read using the spark-doris-connector tool of the Spark computing engine, according to SKUs. Then, the RDDs of the item logistics data, the RDDs of the supply and demand data, and the RDDs of the logistics time-series data are joined according to the SKUs of the groupBy method to generate a joinRDD (dataset).
[0076] `groupby` is an important feature of the Python Pandas library. It allows users to divide a dataset into multiple groups based on the values of one or more columns and apply specific aggregation functions, such as summation and average, to each group. RDD (Resilient Distributed Dataset) is a core concept in the Spark framework, used for efficient data processing in a distributed environment. RDDs have several key characteristics: Resilience: RDDs can dynamically switch storage locations between memory and disk. When memory resources are insufficient, data can be automatically moved to disk. Distributed: RDD data is distributed across different nodes in the cluster, with each node processing a portion of the data. This facilitates parallel processing of large datasets. Fault Tolerance: RDDs are designed with high fault tolerance. If data is lost or a calculation error occurs on a node, the lost portion can be recalculated using data from other nodes. Immutability: Once created, the content of an RDD cannot be changed; all transformation operations generate new RDDs. Partitioning: RDDs can be divided into multiple partitions, each of which can be processed in parallel on different nodes in the cluster, significantly improving processing speed. In addition, RDDs provide a rich set of transformation operations, such as map, filter, and reduce, which can be executed efficiently in a distributed environment, enabling Spark to handle large-scale datasets.
[0077] S303. When the number of executors is less than the number of datasets, the datasets are distributed to the executors one by one for calculation. Then, the undistributed datasets are distributed to the executors that have completed calculation for calculation, so as to call the corresponding replenishment algorithm model to calculate the processing result corresponding to each workflow definition.
[0078] In this embodiment of the application, when the number of executors is less than the number of datasets, the configuration device can distribute the datasets to the executors one by one for calculation. After any executor has completed its calculation, the undistributed datasets can be distributed to the idle executors that have completed their calculations for calculation. Finally, the corresponding replenishment algorithm model is called to process the data calculated by the executors and determine the processing result corresponding to each workflow definition.
[0079] For example, in combination Figure 5Spark allows the use of the `mapPartitionwithIndex` operation on defined join RDDs, distributing the join RDDs for each SKU to different executors. When the number of SKUs exceeds the number of executors, some SKU join RDDs wait, and once an executor finishes executing the join RDD for a particular SKU, it immediately executes the join RDDs for the other SKUs. Furthermore, Spark tasks run on a Directed Acyclic Graph (DAG) plan; data processing only occurs when the algorithm is called and actions are executed on the executor, saving memory by eliminating the need to store intermediate data.
[0080] In this embodiment, the Spark computing engine reads at least one of the following from a preset configuration file: item logistics data, supply and demand data, and logistics time-series data, for each workflow. Data association calculations are then performed to form two-dimensional data corresponding to each of these data sets. Multiple two-dimensional data sets are grouped according to the included item codes to determine the dataset for each item code. When the number of executors is less than the number of datasets, the datasets are distributed to the executors for computation. Undistributed datasets are then distributed to the executors that have completed computation for further computation, invoking the corresponding replenishment algorithm model to calculate the processing result defined for each workflow. This approach, leveraging the Spark computing engine's ability to handle large amounts of data and complex data logic for replenishment calculations on item logistics data, supply and demand data, and logistics time-series data, improves computational efficiency and reduces computation time.
[0081] This application provides a replenishment configuration method. Please refer to [link / reference]. Figure 6 The following is an optional flowchart illustrating the replenishment configuration method provided in the embodiments of this application, which will be described in conjunction with the steps:
[0082] S401. In response to the user's configuration operation on the replenishment configuration interface, the configuration data is determined and the configuration data is saved in a preset configuration file.
[0083] In this embodiment, the configuration device can display a replenishment configuration interface, which includes multiple configuration items. Users can perform operations on the desired configuration items to determine the configuration data. After configuration, the configuration device can save the user-operated configuration data in a preset configuration file, which can be read when the corresponding workflow definition is executed.
[0084] For example, in combination Figure 7This is a screenshot of a replenishment configuration interface provided in an embodiment of this application. This interface allows each user to create their own different replenishment configuration strategies. Spark is started based on the replenishment configurations that the workflow orchestrates, and the relevant parameters and data in the configuration are read to complete the replenishment calculations. 1) Configure basic information: data source and time range for Spark task query documents; configure the time sequence of dependencies; configure the network and product filtering conditions of dependencies; configure the documents to be deleted and follow; configure the output format of the results. 2) Strategy configuration: supply source strategy, supply network sourcing strategy; production source sourcing strategy; demand deferral fulfillment strategy; demand average distribution strategy; balancing strategy; safety stock strategy; batch strategy; document merging strategy; 3) Demand type and deferral rules: demand type configuration; demand priority configuration; 4) Supply type and deferral rules: supply type configuration; supply priority configuration.
[0085] In this embodiment, a replenishment configuration interface is developed to configure different configuration data for different users. When executing a Spark replenishment task, replenishment information is generated by reading the corresponding configuration data for each user. Compared to related technologies that fix the configuration in the system's application.properties configuration file, when a user needs to change the configuration strategy, they only need to redeploy the configuration in the corresponding interface without rewriting the configuration file. This is simple and quick, and can improve the reset efficiency when dealing with large amounts of configuration data.
[0086] This application provides a replenishment configuration method. Please refer to [link / reference]. Figure 8 The following is an optional flowchart illustrating the replenishment configuration method provided in the embodiments of this application, which will be described in conjunction with the steps:
[0087] S501. In response to the user's arrangement operation on the control corresponding to the workflow definition displayed in the workflow arrangement interface, an initial workflow arrangement corresponding to multiple workflow definitions with execution order is formed.
[0088] In this embodiment, the configuration device can display a workflow orchestration interface, and the workflow orchestration interface displays controls corresponding to the multiple workflow definitions. Users can perform orchestration operations on the controls of the required workflow definitions, connecting the required controls according to their execution order to form an initial workflow orchestration corresponding to the multiple workflow definitions with an execution order.
[0089] For example, in combination Figure 9 Users can initialize controls for the required data source and determine the first workflow definition to be executed, and then determine subsequent workflow definitions to form an initial workflow arrangement corresponding to multiple workflow definitions with execution order. Figure 9 Each workflow definition in the document can be accessed via... Figure 10Configure specific Spark tasks using the interface within the program.
[0090] S502. After activating the initial workflow arrangement, the arrangement data of multiple workflow definitions in the initial workflow arrangement are synchronized to the corresponding workflow definitions to form the preset workflow arrangement.
[0091] In this embodiment of the application, after the user manually activates the initial workflow orchestration, the orchestration data of the multiple workflow definitions of the initial workflow orchestration are synchronized to the corresponding workflow definitions to form the preset workflow orchestration.
[0092] In this embodiment, after activating the initial workflow orchestration, the workflow definitions that meet the modification conditions are taken offline; in response to the user's modification operation on the offline workflow definitions, the modified workflow definitions are brought online, and the preset workflow orchestration is determined. The workflow definitions that meet the modification conditions can be workflow definitions that are duplicates of preset workflow definitions in the configuration device during the initial workflow orchestration.
[0093] This application provides a replenishment configuration method. Please refer to [link / reference]. Figure 11 This is an optional flowchart illustrating the replenishment configuration method provided in an embodiment of this application. Figure 8 The steps S501 to S502 shown can also be implemented via S11 to S20, which will be explained in conjunction with the steps:
[0094] S11. Add workflow definition.
[0095] In this embodiment, the user can arrange multiple workflow definitions on the workflow arrangement interface of the configuration device to form an initial workflow arrangement. That is, when creating a new workflow arrangement, the user can select from... Figure 9 On the left side of the business application, select a workflow definition corresponding to Dolphin and drag it to the canvas on the right. Multiple definitions can be dragged. When saving, the workflow arrangement is recorded in the tables t_jh_task_definitin and t_jh_process_definition.
[0096] S12, Task Definition.
[0097] In this embodiment of the application, the user can configure the task definition interface of the device.
[0098] S13. Add a new initial workflow arrangement and change its status to inactive.
[0099] S14. Activate the initial workflow orchestration.
[0100] In this embodiment, the user can click the corresponding activation button for the initial workflow arrangement to activate the initial workflow arrangement and form a preset workflow arrangement.
[0101] S15. Synchronize the data required by Dolphin.
[0102] S16. If the original process exists, it needs to be taken offline before it can be modified.
[0103] S17. Synchronization requires process definition tables and task definition tables.
[0104] S18. Go live with the process and tasks.
[0105] S19. Change the status to activated and add activity version data.
[0106] In this embodiment, when activation is clicked, the data in tables t_jh_task_definitin and t_jh_process_definition can be synchronized to the workflow definition table in Dolphin. If this workflow exists in Dolphin, it will be taken offline and then modified before being brought back online in Dolphin, thus creating a new workflow definition. Multiple workflow definitions are then orchestrated together to form a preset workflow orchestration. Execution within the preset workflow orchestration allows the tasks defined in the workflow definition to be executed in the orchestrated order, and key information during the operation of the preset workflow orchestration can be viewed, providing insight into the workflow orchestration's progress and significantly freeing up human resources.
[0107] In this embodiment, multiple workflow definition tasks can be orchestrated, and custom parameters can be passed between multiple tasks. Furthermore, the user-oriented workflow orchestration mechanism in this application allows users to orchestrate the required workflow definition tasks through an interface, run them with a single click, and wait for the results. The system also allows real-time monitoring of the workflow orchestration's execution status and key information during the process, significantly freeing up human resources and eliminating the problem of computational efficiency for replenishment information affected by human factors.
[0108] Please see Figure 12 This is a schematic diagram of the supply chain replenishment device provided in the embodiments of this application.
[0109] This application embodiment also provides a replenishment configuration device 800, including: a data processing unit 801.
[0110] The data processing unit 801 is used to process the configuration data corresponding to each workflow definition sequentially based on the Spark computing engine according to the execution order of multiple workflow definitions in the preset workflow orchestration, and determine the replenishment information corresponding to the preset workflow orchestration; wherein, the execution of each workflow definition requires the processing result corresponding to the preceding workflow definition.
[0111] In this embodiment of the application, the data processing unit 801 in the replenishment configuration device 800 is used to read the configuration data corresponding to each workflow definition based on the Spark computing engine, and perform data association and grouping calculations to determine the dataset of each item code corresponding to each workflow definition; wherein, the dataset of the item code is used to represent at least one of the item logistics data, supply demand data and logistics time series data corresponding to the item code;
[0112] The datasets corresponding to each item code are distributed to the corresponding executors for processing, and the processing result corresponding to each workflow definition is determined until the processing of the last workflow definition is completed and the replenishment information is determined; wherein, the resources of the executors are dynamically determined by the Spark computing engine based on the current load.
[0113] In this embodiment of the application, the data processing unit 801 in the replenishment configuration device 800 is used to read at least one of the item logistics data, supply demand data and logistics time series data corresponding to each workflow definition in the preset configuration file based on the Spark computing engine, and to perform data association calculation to form two-dimensional data corresponding to the item logistics data, supply demand data and logistics time series data respectively;
[0114] The datasets for each item code are grouped according to the included item codes.
[0115] In this embodiment of the application, the data processing unit 801 in the replenishment configuration device 800 is used to distribute the datasets to the executors one by one for calculation when the number of executors is less than the number of datasets, and then distribute the undistributed datasets to the executors that have completed calculation for calculation, so as to call the corresponding replenishment algorithm model to calculate the processing result corresponding to each workflow definition.
[0116] In this embodiment of the application, the replenishment configuration device 800 is used to determine the configuration data in response to the user's configuration operation on the replenishment configuration interface, and save the configuration data in a preset configuration file.
[0117] In this embodiment of the application, the configuration data is used to characterize at least one of the following corresponding to each workflow definition: data source and time range for reading data, logistics time sequence data, item logistics data, data to be deleted, result output format, supply and demand related rules and strategy configuration.
[0118] In this embodiment of the application, the replenishment configuration device 800 is used to respond to the user's arrangement operation on the control corresponding to the workflow definition displayed in the workflow arrangement interface, and form an initial workflow arrangement corresponding to multiple workflow definitions with an execution order.
[0119] After activating the initial workflow orchestration, the orchestration data of multiple workflow definitions in the initial workflow orchestration are synchronized to the corresponding workflow definitions to form the preset workflow orchestration.
[0120] In this embodiment of the application, the replenishment configuration device 800 is used to take the workflow definition that meets the modification conditions offline;
[0121] In response to the user's modification operation on the offline workflow definition, the modified workflow definition is brought back online, and the preset workflow arrangement is determined.
[0122] It should be noted that, in the embodiments of this application, if the above-described replenishment configuration method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a replenishment configuration device (which may be a personal computer, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0123] Correspondingly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the replenishment configuration device 800 side method.
[0124] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0125] It should be noted that, Figure 13 A schematic diagram of a hardware entity of an electronic device provided in an embodiment of this application, such as... Figure 13 As shown, this application embodiment provides an electronic device 900, including a memory 902 and a processor 901. The memory 902 stores a computer program that can run on the processor 901. When the processor 901 executes the program, it implements the steps in the above-described method, wherein;
[0126] Processor 901 typically controls the overall operation of electronic device 900.
[0127] The memory 902 is configured to store instructions and applications executable by the processor 901, and can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data and video communication data) in the processor 901 and various modules in the electronic device 900. It can be implemented by flash memory or random access memory (RAM).
[0128] Correspondingly, this application also provides a computer program product, including a computer program that can be executed by the processor 901 of the electronic device 900 to complete the steps in the method of the replenishment configuration device 800.
[0129] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0130] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0131] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the apparatus or units can be electrical, mechanical, or other forms.
[0132] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0133] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0134] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0135] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0136] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A replenishment configuration method, characterized in that, include: According to the execution order of multiple workflow definitions in the preset workflow orchestration, the configuration data corresponding to each workflow definition is read and processed sequentially based on the Spark computing engine to determine the replenishment information corresponding to the preset workflow orchestration; wherein, the execution of each workflow definition requires the processing result corresponding to the preceding workflow definition.
2. The replenishment configuration method according to claim 1, characterized in that, The Spark computing engine sequentially reads and processes the configuration data corresponding to each workflow definition to determine the replenishment information corresponding to the preset workflow orchestration, including: Based on the Spark computing engine, the configuration data corresponding to each workflow definition is read, and data association and grouping calculations are performed to determine the dataset of each item code corresponding to each workflow definition; wherein, the dataset of the item code is used to represent at least one of the item logistics data, supply and demand data and logistics time series data corresponding to the item code; The datasets corresponding to each item code are distributed to the corresponding executors for processing, and the processing result corresponding to each workflow definition is determined until the processing of the last workflow definition is completed and the replenishment information is determined; wherein, the resources of the executors are dynamically determined by the Spark computing engine based on the current load.
3. The replenishment configuration method according to claim 2, characterized in that, The process involves reading the configuration data corresponding to each workflow definition based on the Spark computing engine, performing data association and grouping calculations, and determining the dataset of each item code corresponding to each workflow definition, including: Based on the Spark computing engine, at least one of the following is read from the preset configuration file: the item logistics data, the supply demand data, and the logistics time series data corresponding to each workflow. Data association calculation is performed to form two-dimensional data corresponding to the item logistics data, the supply demand data, and the logistics time series data respectively. The datasets for each item code are grouped according to the included item codes.
4. The replenishment configuration method according to claim 2, characterized in that, The step of distributing the datasets corresponding to each item code to the corresponding executors for processing, and determining the processing result corresponding to each workflow definition, includes: When the number of executors is less than the number of datasets, the datasets are distributed to the executors one by one for calculation. Then, the undistributed datasets are distributed to the executors that have completed their calculations for calculation, so as to call the corresponding replenishment algorithm model to calculate the processing result corresponding to each workflow definition.
5. The replenishment configuration method according to any one of claims 1 to 4, characterized in that, Before determining the replenishment information corresponding to the preset workflow orchestration by sequentially reading and processing the configuration data corresponding to each workflow definition based on the Spark computing engine according to the execution order of multiple workflow definitions in the preset workflow orchestration, the method further includes: The configuration data is determined in response to the user's configuration operation on the replenishment configuration interface, and the configuration data is saved in a preset configuration file.
6. The replenishment configuration method according to claim 5, characterized in that, The configuration data is used to characterize at least one of the following for each workflow definition: data source and time range for reading data, logistics time sequence data, item logistics data, data to be deleted, result output format, supply and demand related rules and strategy configuration.
7. The replenishment configuration method according to any one of claims 1 to 4, characterized in that, Before determining the replenishment information corresponding to the preset workflow orchestration by sequentially reading and processing the configuration data corresponding to each workflow definition based on the Spark computing engine according to the execution order of multiple workflow definitions in the preset workflow orchestration, the method further includes: In response to the user's arrangement operation on the control corresponding to the workflow definition displayed in the workflow arrangement interface, an initial workflow arrangement corresponding to multiple workflow definitions with execution order is formed; After activating the initial workflow orchestration, the orchestration data of multiple workflow definitions in the initial workflow orchestration are synchronized to the corresponding workflow definitions to form the preset workflow orchestration.
8. The replenishment configuration method according to claim 7, characterized in that, The method further includes: The workflow definition that meets the modification conditions will be taken offline; In response to the user's modification operation on the offline workflow definition, the modified workflow definition is brought back online, and the preset workflow arrangement is determined.
9. A replenishment configuration device, characterized in that, include: The data processing unit is used to process the configuration data corresponding to each workflow definition sequentially based on the Spark computing engine, according to the execution order of multiple workflow definitions in the preset workflow orchestration, to determine the replenishment information corresponding to the preset workflow orchestration; wherein, the execution of each workflow definition requires the processing result corresponding to the preceding workflow definition.
10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program that can run on the processor, the processor executing the computer program to implement the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.