[go: up one dir, main page]

CN118690933A - A dynamic route scheduling method based on data-driven and intelligent optimization - Google Patents

A dynamic route scheduling method based on data-driven and intelligent optimization Download PDF

Info

Publication number
CN118690933A
CN118690933A CN202410559304.5A CN202410559304A CN118690933A CN 118690933 A CN118690933 A CN 118690933A CN 202410559304 A CN202410559304 A CN 202410559304A CN 118690933 A CN118690933 A CN 118690933A
Authority
CN
China
Prior art keywords
route
stores
data
employee
visit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410559304.5A
Other languages
Chinese (zh)
Inventor
姚志安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Winchannel Software Technology Co ltd
Original Assignee
Beijing Winchannel Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Winchannel Software Technology Co ltd filed Critical Beijing Winchannel Software Technology Co ltd
Priority to CN202410559304.5A priority Critical patent/CN118690933A/en
Publication of CN118690933A publication Critical patent/CN118690933A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • G06Q10/063114Status monitoring or status determination for a person or group
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • G06Q10/063116Schedule adjustment for a person or group
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • G06Q10/063118Staff planning in a project environment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06312Adjustment or analysis of established resource schedule, e.g. resource or task levelling, or dynamic rescheduling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06316Sequencing of tasks or work

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Educational Administration (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明涉及一种基于数据驱动和智能优化的动态路线排程方法,属于数据处理技术领域,包括:获取门店和门店拜访员工的信息,进行数据整合和处理,生成结构化的门店信息列表和员工信息列表;评估出门店之间的路程以及在规定交通工具下门店之间的在途时长;将员工、门店及员工初始位置设定为决策变量,构建符合路线规划需求的NP‑hard问题模型,使用OptaPlanner计算引擎,得到在设定时间段内,为每个员工分配的所有路线门店分布和单条路线上门店的访问次序,形成员工的拜访路线;员工获得分配的拜访路线后生成拜访计划;员工执行拜访计划时,进行实时监控和路况预测处理,对拜访计划进行调整。本发明实现了动态、灵活的路线排程。

The present invention relates to a dynamic route scheduling method based on data-driven and intelligent optimization, belonging to the field of data processing technology, including: obtaining information of stores and store visiting employees, performing data integration and processing, generating structured store information lists and employee information lists; evaluating the distance between stores and the length of time on the way between stores under specified transportation; setting employees, stores and employee initial positions as decision variables, constructing an NP-hard problem model that meets the route planning requirements, using the OptaPlanner calculation engine, obtaining the distribution of all route stores assigned to each employee within a set time period and the order of visiting stores on a single route, forming the employee's visit route; generating a visit plan after the employee obtains the assigned visit route; performing real-time monitoring and road condition prediction processing when the employee executes the visit plan, and adjusting the visit plan. The present invention realizes dynamic and flexible route scheduling.

Description

一种基于数据驱动和智能优化的动态路线排程方法A dynamic route scheduling method based on data-driven and intelligent optimization

技术领域Technical Field

本发明涉及数据处理技术领域,尤其涉及一种基于数据驱动和智能优化的动态路线排程方法。The present invention relates to the field of data processing technology, and in particular to a dynamic route scheduling method based on data drive and intelligent optimization.

背景技术Background Art

随着信息化技术的快速发展,路线排程技术在众多业务场景中展现出巨大的价值,特别是在物流配送、销售拜访、服务调度等领域。然而,现有技术在面对实时路况变化、资源优化配置等问题时仍存在一定的局限性。在传统模式下,对于需要对多家门店进行实地考察或维护的业务流程,工作人员往往先被指定一系列门店,然后手动将这些门店逐一整合至不同的访问路线中。这种操作方式下,每条路线应包含的门店数量及其具体组合并不预先设定,导致资源配置效率低下,特别是在拥有庞大员工团队与广泛分布门店的跨国企业中,路线分配任务不仅耗时巨大,且难以确保分配方案的有效性和合理性。With the rapid development of information technology, route scheduling technology has shown great value in many business scenarios, especially in the fields of logistics distribution, sales visits, service scheduling, etc. However, existing technologies still have certain limitations when facing real-time traffic changes, resource optimization and allocation, and other issues. In the traditional model, for business processes that require field visits or maintenance of multiple stores, staff are often first assigned a series of stores, and then manually integrate these stores into different visit routes one by one. Under this mode of operation, the number of stores that each route should include and their specific combinations are not pre-set, resulting in inefficient resource allocation. Especially in multinational companies with a large staff team and widely distributed stores, the route allocation task is not only time-consuming, but also difficult to ensure the effectiveness and rationality of the allocation plan.

若缺乏科学的路线规划,依赖员工自行决定访问顺序,则可能导致一系列新问题的出现,例如员工难以判断所选路线是否高效,是否能在规定时间内顺利完成全部门店的拜访任务。与此同时,企业管理层也无法实现对员工拜访活动的精细化管理,难以精准评估每位员工承担多少家门店的拜访最为适宜,从而限制了整体工作效率和效果的提升。If there is no scientific route planning and employees are left to decide the order of visits, a series of new problems may arise. For example, it is difficult for employees to judge whether the selected route is efficient and whether they can successfully complete the task of visiting all stores within the specified time. At the same time, the company's management cannot achieve refined management of employee visits and it is difficult to accurately assess how many stores each employee is most suitable to visit, thus limiting the improvement of overall work efficiency and effectiveness.

发明内容Summary of the invention

鉴于上述的分析,本发明旨在公开了一种基于数据驱动和智能优化的动态路线排程方法;克服传统手工排程方法的低效性和不均衡性问题,致力于解决为员工设计多条整体最优路线的挑战,同时也能够深入探究并优化分配给员工的门店数量,以确保其工作饱和度处于合理水平。In view of the above analysis, the present invention aims to disclose a dynamic route scheduling method based on data-driven and intelligent optimization; to overcome the inefficiency and imbalance of traditional manual scheduling methods, and to solve the challenge of designing multiple overall optimal routes for employees. At the same time, it can also deeply explore and optimize the number of stores allocated to employees to ensure that their work saturation is at a reasonable level.

本发明公开了一种基于数据驱动和智能优化的动态路线排程方法,包括:The present invention discloses a dynamic route scheduling method based on data drive and intelligent optimization, comprising:

步骤S1、获取门店和门店拜访员工的信息,进行数据整合和处理,生成结构化的门店信息列表和员工信息列表;Step S1, obtaining information of stores and store visiting employees, integrating and processing the data, and generating a structured store information list and employee information list;

步骤S2、基于门店信息列表和员工信息列表信息,评估出门店之间的路程以及在规定交通工具下门店之间的在途时长;将员工、门店及员工初始位置设定为决策变量,构建符合路线规划需求的NP-hard问题模型,使用OptaPlanner计算引擎,得到在设定时间段内,为每个员工分配的所有路线门店分布和单条路线上门店的访问次序,形成员工的拜访路线;Step S2: Based on the store information list and employee information list, the distance between stores and the travel time between stores under the specified transportation are evaluated; employees, stores and employee initial positions are set as decision variables, an NP-hard problem model that meets the route planning requirements is constructed, and the OptaPlanner calculation engine is used to obtain the distribution of all route stores assigned to each employee within the set time period and the order of visiting stores on a single route, so as to form the employee's visiting route;

步骤S3、员工获得分配的拜访路线后,根据拜访路线中涉及到的门店的权重、拜访频次以及工作时间在内的因素生成拜访计划;Step S3: After the employee obtains the assigned visiting route, he/she generates a visiting plan based on factors including the weights of the stores involved in the visiting route, the visiting frequency, and the working hours;

步骤S4、员工执行拜访计划时,进行包括位置追踪、路况监控在内的实时监控和路况预测处理,对拜访计划进行调整。Step S4: When the employee executes the visiting plan, real-time monitoring and traffic condition prediction processing including location tracking and traffic condition monitoring are performed to adjust the visiting plan.

进一步地,步骤S1中,包括:Furthermore, step S1 includes:

步骤S101、从多个不同的数据源抽取门店和门店拜访员工的信息形成数据仓库;Step S101, extracting information of stores and store visiting employees from multiple different data sources to form a data warehouse;

步骤S102、对数据仓库中的数据进行校验、清洗和标准化处理得到标准化数据;Step S102: verify, clean and standardize the data in the data warehouse to obtain standardized data;

步骤S103、根据表格的格式化内容将标准化数据填入门店信息列表及员工信息列表中。Step S103: Fill the standardized data into the store information list and the employee information list according to the formatted content of the table.

进一步地,门店表结构中包括:门店ID、用户/组织ID、用户/组织编码、用户/组织名称、门店编码、门店名称、门店地址、所属城市、门店级别、计算次数/月拜访次数、在店时长、门店经纬度、创建时间和租户ID项;Furthermore, the store table structure includes: store ID, user/organization ID, user/organization code, user/organization name, store code, store name, store address, city, store level, calculation times/monthly visit times, store time, store latitude and longitude, creation time and tenant ID items;

员工表结构中包括:员工ID、用户/组织ID、用户/组织编码、用户/组织名称、月工作天数、日工作时长、平均在途时长、是否启用虚拟出发点、至少一个出发点的经纬度和租户ID项。The employee table structure includes: employee ID, user/organization ID, user/organization code, user/organization name, monthly working days, daily working hours, average travel time, whether to enable virtual departure point, latitude and longitude of at least one departure point, and tenant ID items.

进一步地,在步骤S2中,采用OSRM+OptaPlanner的方式进行拜访路线的规划;Furthermore, in step S2, the OSRM+OptaPlanner method is used to plan the visit route;

其中,采用地图路线规划服务OSRM计算出所有门店两两之间的路程或评估出规定交通工具下门店两两之间的在途时长;Among them, the map route planning service OSRM is used to calculate the distance between all stores or to evaluate the travel time between stores under specified transportation tools;

将员工、门店及员工初始位置设定为决策变量,采用OptaPlanner引擎,计算符合路线规划需求的NP-hard问题模型;规划出拜访路线。Employees, stores, and their initial locations are set as decision variables, and the OptaPlanner engine is used to calculate the NP-hard problem model that meets the route planning requirements; the visit route is planned.

进一步地,对OptaPlanner引擎设置的硬约束包括:Furthermore, the hard constraints set on the OptaPlanner engine include:

a)门店的固定拜访频率标准;a) Fixed visit frequency standards for stores;

b)每日工作时长限制;b) Daily working hours limit;

c)在店停留时间设定;c) Setting the time of staying in the store;

对OptaPlanner引擎设置的软约束包括:The soft constraints set on the OptaPlanner engine include:

a)员工每月所执行的路线不应少于设定条数;a) The number of routes that employees should perform each month should not be less than the set number;

b)每条规划路线至少应当覆盖设定数量以上的门店;b) Each planned route should cover at least the set number of stores;

c)最小化总行程里程或累计行程时间。c) Minimize the total travel distance or accumulated travel time.

进一步地,使用OptaPlanner计算引擎的VRP模型,将员工、门店及员工初始位置,分别对应VRP模型中的车辆、门店和仓库;员工日工作时长对应车辆的运输能力,员工在门店的在店时长对应门店货物需求量。Furthermore, using the VRP model of the OptaPlanner calculation engine, employees, stores, and employee initial positions are respectively mapped to vehicles, stores, and warehouses in the VRP model; employees’ daily working hours correspond to the transportation capacity of the vehicles, and employees’ time in stores corresponds to the store’s demand for goods.

根据设置的软硬约束,使用VRP模型的求解算法计算出一个员工分配的所有路线门店分布和单条路线上门店的访问次序;再通过递归算法完成所有员工的门店路线排程的计算。According to the set soft and hard constraints, the VRP model's solution algorithm is used to calculate the distribution of all route stores assigned to an employee and the order of store visits on a single route; then the store route scheduling of all employees is calculated through a recursive algorithm.

进一步地,员工可通过员工任务平台获得分配的拜访路线;在员工任务平台的显示屏幕上设置门店区域地图和员工拜访路线显示区域,拜访计划编辑区域;Furthermore, employees can obtain assigned visit routes through the employee task platform; set up store area maps and employee visit route display areas and visit plan editing areas on the display screen of the employee task platform;

通过拜访计划编辑区域,对拜访路线的日期时间和对路线门店进行调整,进行拜访时间的重新安排、路线之间门店的挪移替换、路线内门店访问顺序的修改;并在门店区域地图和员工拜访路线显示区域中显示正在计划的员工路线。Through the visit plan editing area, the date and time of the visit route and the stores on the route can be adjusted, the visit time can be rearranged, stores between routes can be moved and replaced, and the order of store visits within the route can be modified; and the planned employee route can be displayed in the store area map and the employee visit route display area.

进一步地,所述步骤S4,包括:Furthermore, the step S4 comprises:

步骤S401、进行员工位置追踪、路况监控、任务进度反馈、门店访问验证、工作效率评估和紧急事件响应的实时监控;Step S401: Real-time monitoring of employee location tracking, road condition monitoring, task progress feedback, store visit verification, work efficiency evaluation, and emergency response;

步骤S402、结合实时监控的突发状况进行路况预测评估出最优行驶路线;Step S402: predicting the road conditions based on the real-time monitored emergencies to determine the optimal driving route;

步骤S403、依据设定的调整策略调整并优化拜访计划。Step S403: Adjust and optimize the visit plan according to the set adjustment strategy.

进一步地,路况预测采用机器学习预测模型;所述模型根据实时抓取海量的交通数据流,基于历史数据、实时监控数据以及其他相关环境因素,运用深度学习和时间序列分析,模拟并预测未来一定时间段内的道路交通状况。Furthermore, the road condition prediction adopts a machine learning prediction model; the model captures massive traffic data streams in real time, based on historical data, real-time monitoring data and other relevant environmental factors, uses deep learning and time series analysis to simulate and predict road traffic conditions within a certain period of time in the future.

进一步地,所述步骤S403,包括:Furthermore, the step S403 includes:

1)进行数据收集与分析:实时收集包括员工反馈的现场情况、交通路况数据、客户预约变动和门店营业时间调整在内的内外部关键变量,分析这些变化对原有拜访计划在预计到达时间以及任务优先级的影响程度;1) Data collection and analysis: Real-time collection of key internal and external variables, including on-site conditions reported by employees, traffic data, changes in customer appointments, and adjustments to store business hours, to analyze the impact of these changes on the estimated arrival time and task priority of the original visit plan;

2)设置触发调整拜访计划机制:当监测到的关键变量的变化触发调整拜访计划机制时,则重新规划路线制定新的拜访计划;2) Set up a triggering mechanism to adjust the visit plan: When changes in key variables monitored trigger the visit plan adjustment mechanism, the route is replanned to formulate a new visit plan;

3)根据实时路况重新规划路线:使用OSRM重新规划最优的拜访路线;3) Re-plan the route based on real-time traffic conditions: Use OSRM to re-plan the optimal visit route;

4)对拜访任务优先级重排:根据紧急程度、客户重要性、业务需求等多重标准,重新排列拜访任务的优先级;4) Re-prioritize visit tasks: Re-prioritize visit tasks based on multiple criteria such as urgency, customer importance, business needs, etc.

5)进行调整后的拜访计划的沟通与通知:自动将调整后的拜访计划推送给受影响的员工或发送到第三方服务;同时向客户发出通知;5) Communicate and notify the adjusted visit plan: automatically push the adjusted visit plan to the affected employees or send it to a third-party service; and notify the customer at the same time;

6)持续监控与优化:在新的计划执行过程中,仍持续监控各类动态信息,确保计划始终与实际情况相符。如果再次出现变故,系统立即启动新一轮的调整与优化循环。6) Continuous monitoring and optimization: During the execution of the new plan, various dynamic information is continuously monitored to ensure that the plan is always consistent with the actual situation. If there is another unexpected situation, the system will immediately start a new round of adjustment and optimization cycle.

本发明可实现以下有益效果之一:The present invention can achieve one of the following beneficial effects:

1.实现了动态的、灵活的路线排程,充分考虑实时因素,有效降低由于道路拥堵、突发事件等因素对规划路线的影响。1. It realizes dynamic and flexible route scheduling, fully considers real-time factors, and effectively reduces the impact of factors such as road congestion and emergencies on the planned route.

2.引入机器学习预测,提升了路线规划的预见性和鲁棒性,使规划方案更为贴合实际环境变化。2. The introduction of machine learning prediction improves the predictability and robustness of route planning, making the planning scheme more in line with actual environmental changes.

3.对员工工作饱和度进行量化评估和合理分配,保障人力资源的高效利用,同时避免过度工作压力。3. Quantitatively evaluate and reasonably allocate employees’ work saturation to ensure efficient use of human resources while avoiding excessive work pressure.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

附图仅用于示出具体实施例的目的,而并不认为是对本发明的限制,在整个附图中,相同的参考符号表示相同的部件。The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.

图1为本发明实施例中的基于数据驱动和智能优化的动态路线排程方法流程图;FIG1 is a flow chart of a dynamic route scheduling method based on data-driven and intelligent optimization in an embodiment of the present invention;

图2为本发明实施例中的路线结果汇总图;FIG2 is a summary diagram of route results in an embodiment of the present invention;

图3为本发明实施例中的员工路线列表示意图;FIG3 is a schematic diagram of an employee route list in an embodiment of the present invention;

图4为本发明实施例中的员工某一条路线上的门店列表示意图;FIG4 is a schematic diagram of a list of stores on a certain route of an employee in an embodiment of the present invention;

图5为本发明实施例中的员工某一条路线上的门店地图分布示意图;FIG5 is a schematic diagram of a store map distribution on a certain route of an employee in an embodiment of the present invention;

图6为本发明实施例中的员工某一条路线上的门店列表示意图;FIG6 is a schematic diagram of a list of stores on a certain route of an employee in an embodiment of the present invention;

图7为本发明实施例中的员工任务平台的显示屏幕图。FIG. 7 is a display screen diagram of the employee task platform in an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面结合附图来具体描述本发明的优选实施例,其中,附图构成本申请一部分,并与本发明的实施例一起用于阐释本发明的原理。The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used to illustrate the principles of the present invention together with the embodiments of the present invention.

本发明的一个实施例公开了一种基于数据驱动和智能优化的动态路线排程方法,如图1所示,包括以下步骤:An embodiment of the present invention discloses a dynamic route scheduling method based on data-driven and intelligent optimization, as shown in FIG1 , comprising the following steps:

步骤S1、获取门店和门店拜访员工的信息,进行数据整合和处理,生成结构化的门店信息列表和员工信息列表;Step S1, obtaining information of stores and store visiting employees, integrating and processing the data, and generating a structured store information list and employee information list;

步骤S2、基于门店信息列表和员工信息列表信息,评估出门店之间的路程以及在规定交通工具下门店之间的在途时长;将员工、门店及员工初始位置设定为决策变量,构建符合路线规划需求的NP-hard问题模型,使用OptaPlanner计算引擎,得到在设定时间段内,为每个员工分配的所有路线门店分布和单条路线上门店的访问次序,形成员工的拜访路线;Step S2: Based on the store information list and employee information list, the distance between stores and the travel time between stores under the specified transportation are evaluated; employees, stores and employee initial positions are set as decision variables, an NP-hard problem model that meets the route planning requirements is constructed, and the OptaPlanner calculation engine is used to obtain the distribution of all route stores assigned to each employee within the set time period and the order of visiting stores on a single route, so as to form the employee's visiting route;

步骤S3、员工获得分配的拜访路线后,根据拜访路线中涉及到的门店的权重、拜访频次以及工作时间在内的因素生成拜访计划;Step S3: After the employee obtains the assigned visiting route, he/she generates a visiting plan based on factors including the weights of the stores involved in the visiting route, the visiting frequency, and the working hours;

步骤S4、员工执行拜访计划时,进行包括位置追踪、路况监控在内的实时监控和路况预测处理,对拜访计划进行调整。Step S4: When the employee executes the visiting plan, real-time monitoring and traffic condition prediction processing including location tracking and traffic condition monitoring are performed to adjust the visiting plan.

具体的,步骤S1中,包括:Specifically, step S1 includes:

步骤S101、从多个不同的数据源抽取门店和门店拜访员工的信息形成数据仓库;Step S101, extracting information of stores and store visiting employees from multiple different data sources to form a data warehouse;

具体的,通过直接对接的上游系统开放的数据接口、数据库或数据仓库,或者是针对路线排程提供的满足路线排程协议的数据接口,以及第三方提供的实时交通数据或接口进行数据抽取,并计算出路线排程所需要包括门店访问频次、员工日工作时长、员工月工作天数在内的业务相关参数,构成数据仓库。Specifically, data is extracted through the data interface, database or data warehouse opened by the upstream system that is directly connected, or the data interface that meets the route scheduling protocol provided for route scheduling, as well as the real-time traffic data or interface provided by a third party, and the business-related parameters required for route scheduling, including store visit frequency, employee daily working hours, and employee monthly working days, are calculated to form a data warehouse.

例如,从SFA(销售业务自动化)、CRM(客户关系管理)系统抓取包括门店位置、重要性级别、历史销售数据在内的门店基本信息;For example, basic store information including store location, importance level, and historical sales data can be captured from SFA (sales automation) and CRM (customer relationship management) systems;

通过API连接实时交通数据提供商获取实时路况信息;Connect to real-time traffic data providers through API to obtain real-time traffic information;

在更有选的方案中,还接入天气预报等其他相关数据源。In more selective solutions, other relevant data sources such as weather forecasts are also connected.

为了保证多个不同的数据源的一致性和完整性,在抽取数据时进行以下处理:In order to ensure the consistency and integrity of multiple different data sources, the following processing is performed when extracting data:

1)事务处理:当从不同数据源抽取数据时,将数据抽取过程封装在事务中,确保数据源在抽取前后的一致性。如果抽取失败或出现问题,事务能回滚到原始状态,避免留下不一致的数据痕迹。1) Transaction processing: When extracting data from different data sources, encapsulate the data extraction process in a transaction to ensure the consistency of the data source before and after the extraction. If the extraction fails or a problem occurs, the transaction can be rolled back to the original state to avoid leaving inconsistent data traces.

2)三阶段提交(3PC):对于跨系统或跨数据库的数据抽取,采用分布式事务处理方式,其中分布式事务处理采用三阶段提交协议,确保在多个数据源之间的数据变更操作能够要么全部成功,要么全部失败,以达到数据一致性。2) Three-Phase Commit (3PC): For cross-system or cross-database data extraction, a distributed transaction processing method is adopted, in which the distributed transaction processing adopts a three-phase commit protocol to ensure that data change operations between multiple data sources can either succeed or fail completely to achieve data consistency.

3)消息队列中间件:路线排程的微服务版本利用消息队列中间件Kafka作为缓冲区和中介,数据源先将变更信息发布至消息队列,通过数据中心订阅并消费消息,顺序处理消息,确保数据按序到达且不会遗漏。3) Message queue middleware: The microservice version of route scheduling uses the message queue middleware Kafka as a buffer and intermediary. The data source first publishes the change information to the message queue, and the data center subscribes and consumes the message, and processes the message sequentially to ensure that the data arrives in order and is not missed.

4)变更数据捕获(Change Data Capture,CDC):支持使用CDC技术捕获数据源的更改记录(如MySQL数据库的binlog、redo log等),然后将这些更改增量式地同步到数据中心,以此确保抽取的数据始终是最新的且完整的。4) Change Data Capture (CDC): Supports the use of CDC technology to capture change records of data sources (such as binlog and redo log of MySQL database), and then synchronizes these changes to the data center incrementally to ensure that the extracted data is always up-to-date and complete.

5)主键/唯一约束及索引:在数据存储层面上,建立主键约束、唯一约束以及合适索引,防止数据的重复插入或更新导致的不一致问题。5) Primary key/unique constraints and indexes: At the data storage level, establish primary key constraints, unique constraints, and appropriate indexes to prevent inconsistencies caused by repeated insertion or update of data.

6)幂等性设计:数据抽取服务设计为幂等操作,即无论执行多少次,只要输入相同,结果都一样,这样即便在网络波动等情况下出现重复抽取,也不会影响最终数据的一致性。6) Idempotent design: The data extraction service is designed as an idempotent operation, that is, no matter how many times it is executed, as long as the input is the same, the result is the same. In this way, even if repeated extraction occurs due to network fluctuations, it will not affect the consistency of the final data.

通过以上处理,将路线排程所需要的数据抽取到自己的数据仓库中;Through the above processing, the data required for route scheduling is extracted into its own data warehouse;

步骤S102、对数据仓库中的数据进行校验、清洗和标准化处理得到标准化数据;Step S102: verify, clean and standardize the data in the data warehouse to obtain standardized data;

在抽取后的数据加载阶段,设置严格的数据校验规则,对抽取的数据进行完整性校验和一致性校验,对于不符合规则的数据不予加载,并反馈异常,通过数据清洗流程保证入库数据的质量,通过进行标准化处理,解决数据不规范问题。During the data loading phase after extraction, strict data verification rules are set to perform integrity and consistency checks on the extracted data. Data that does not comply with the rules will not be loaded, and abnormalities will be reported. The quality of incoming data is ensured through the data cleaning process, and data non-standardization issues are resolved through standardized processing.

具体的校验、清洗和标准化处理包括:Specific calibration, cleaning and standardization processes include:

1)进行包括格式校验、完整性校验、一致性校验、参照完整性校验和合理性校验在内的数据校验:1) Perform data verification including format verification, integrity verification, consistency verification, reference integrity verification and rationality verification:

其中,in,

格式校验:检查数据是否符合预期的格式,如日期月份、经纬度数值、访问次数等是否符合标准格式。对数值型数据检查其数字格式是否正确,是否有非数字字符混入。Format verification: Check whether the data conforms to the expected format, such as whether the date and month, latitude and longitude values, number of visits, etc. conform to the standard format. For numeric data, check whether its digital format is correct and whether there are any non-numeric characters mixed in.

完整性校验:检查数据集中的字段是否存在缺失值,通过计算缺失值比例判断缺失程度,制定合理的处理策略。验证关键字段是否齐全,如“门店经纬度”、“员工出发地点”等必要信息是否填写。Completeness check: Check whether there are missing values in the fields of the data set, determine the degree of missing values by calculating the missing value ratio, and formulate a reasonable processing strategy. Verify whether key fields are complete, such as whether necessary information such as "store latitude and longitude" and "employee departure point" is filled in.

一致性校验:检测数据中的逻辑矛盾,如“日工作时长”不应该超过24小时,“月工作天数”不应该超过当月自然日天数等。对比关联数据表,确保外键约束得到满足,不存在引用无效的数据,如门店必需分配员工,门店表对应的员工表信息不能缺失。Consistency check: Check logical contradictions in data, such as "daily working hours" should not exceed 24 hours, "monthly working days" should not exceed the number of natural days in the month, etc. Compare related data tables to ensure that foreign key constraints are met and there is no invalid data referenced. For example, employees must be assigned to stores, and the employee table information corresponding to the store table cannot be missing.

参照完整性校验:检查数据是否违反参照完整性,如“门店类型”枚举值是否存在于预定义的枚举列表内。Referential integrity check: Check whether the data violates referential integrity, such as whether the "store type" enumeration value exists in the predefined enumeration list.

合理性校验:根据业务规则或领域知识验证数据的合理性,如经纬度数值的经度值应该在0-180范围内,纬度数值在0-90范围内。Reasonableness check: Verify the rationality of data based on business rules or domain knowledge, such as the longitude value of the longitude and latitude values should be in the range of 0-180, and the latitude value should be in the range of 0-90.

2)进行包括对缺失值、异常值和重复值进行处理的数据清洗;2) Perform data cleaning including processing of missing values, outliers and duplicate values;

其中,in,

处理缺失值:删除含有过多缺失值的记录并记录删除数据以便后期人工校对。有时也需要填充缺失值,如部分员工的出发点经纬度缺失,会在预处理时参考其分配的门店经纬度计算一个中间位置来作为虚拟出发点。Handling missing values: Delete records with too many missing values and record the deleted data for later manual proofreading. Sometimes it is also necessary to fill in missing values. For example, if the latitude and longitude of the departure point of some employees are missing, an intermediate location will be calculated as a virtual departure point based on the latitude and longitude of the store they are assigned during preprocessing.

处理异常值:定义阈值剔除明显异常的数据点,通过箱线图识别离群值剔除跨城市分配的门店。Handling outliers: Define thresholds to remove obviously abnormal data points, and use box plots to identify outliers and remove stores distributed across cities.

处理重复值:通过唯一键查找重复记录,并决定保留一份还是合并记录。如门店数据以门店编码作为唯一键。Handling duplicate values: Find duplicate records by unique key and decide whether to keep one copy or merge the records. For example, store data uses store code as the unique key.

3)进行数据转换与标准化;3) Perform data conversion and standardization;

转换数据类型,如将字符串转换为日期或数值。对数值型特征进行标准化或归一化,使数据在同一尺度上便于比较和分析,如经纬度如果使用的是不同地图公司的坐标系需要统一成同一坐标系数值。Convert data types, such as converting strings to dates or numbers. Standardize or normalize numerical features so that data can be easily compared and analyzed at the same scale. For example, if the longitude and latitude are using coordinate systems from different map companies, they need to be unified into the same coordinate coefficient value.

4)清除无关或错误的记录;4) Clear irrelevant or erroneous records;

还需将包括误录入的测试数据以及非法字符在内的无关或错误的记录进行清除。It is also necessary to clear irrelevant or erroneous records, including incorrectly entered test data and illegal characters.

步骤S103、根据表格的格式化内容将标准化数据填入门店信息列表及员工信息列表中。Step S103: Fill the standardized data into the store information list and the employee information list according to the formatted content of the table.

其中,门店表结构中包括:门店ID、用户/组织ID、用户/组织编码、用户/组织名称、门店编码、门店名称、门店地址、所属城市、门店级别、计算次数/月拜访次数、在店时长、门店经纬度、创建时间和租户ID项,具体如下表:The store table structure includes: store ID, user/organization ID, user/organization code, user/organization name, store code, store name, store address, city, store level, calculation times/monthly visits, store time, store latitude and longitude, creation time, and tenant ID items, as shown in the following table:

列名Column Name 类型type 描述describe idid bigintbigint IDID org_idorg_id bigintbigint 用户/组织IDUser/Organization ID org_codeorg_code varchar(50)varchar(50) 用户/组织编码User/Organization Code org_nameorg_name varchat(200)varchat(200) 用户/组织名称User/Organization Name cust_codecust_code varchar(50)varchar(50) 门店编码Store code cust_namecust_name varchar(50)varchar(50) 门店名称Store Name addraddr varchar(200)varchar(200) 门店地址Store Address citycity varchar(50)varchar(50) 所属城市City cust_levelcust_level varchar(5)varchar(5) 门店级别Store level calc_countcalc_count intint 计算次数/月拜访次数Calculation times/monthly visits dwell_timedwell_time intint 在店时长Length of time in store lonlon varchar(50)varchar(50) 门店经度Store longitude latlat varchar(50)varchar(50) 门店纬度Store Latitude createdcreated datetimedatetime 创建时间Creation time tenant_idtenant_id bigintbigint 租户IDTenant ID

员工表结构中包括:员工ID、用户/组织ID、用户/组织编码、用户/组织名称、月工作天数、日工作时长(单位:分钟)、平均在途时长、是否启用虚拟出发点、至少一个出发点的经纬度和租户ID项;具体如下表The employee table structure includes: employee ID, user/organization ID, user/organization code, user/organization name, monthly working days, daily working hours (unit: minutes), average travel time, whether to enable virtual departure point, latitude and longitude of at least one departure point, and tenant ID items; the details are as follows

具体的,在步骤S2中,采用地图路线规划服务OSRM(Open Source RoutingMachine)+OptaPlanner计算引擎的方式进行拜访路线的规划;Specifically, in step S2, the visit route is planned by using the map route planning service OSRM (Open Source Routing Machine) + OptaPlanner computing engine;

其中,采用地图路线规划服务OSRM计算出所有门店两两之间的路程或评估出规定交通工具下门店两两之间的在途时长;并将员工、门店及员工初始位置设定为决策变量,构建符合路线规划需求的NP-hard(Non-deterministic Polynomial hard)问题模型;使用OptaPlanner计算引擎的方式进行拜访路线的规划;The map route planning service OSRM is used to calculate the distance between all stores or to estimate the travel time between stores under specified means of transportation. Employees, stores and their initial positions are set as decision variables to build an NP-hard (Non-deterministic Polynomial hard) problem model that meets the route planning requirements. The OptaPlanner computing engine is used to plan the visit route.

具体的,在OptaPlanner计算引擎中运用改进型遗传算法、模拟退火算法、爬山计步算法、大洪水算法、禁忌搜索算法、延迟接收算法、可变邻域下降算法等启发式优化算法,结合Dijkstra算法、A*算法等路径搜索算法,构建一个多目标优化模型,以解决路线规划问题。Specifically, the OptaPlanner computing engine uses heuristic optimization algorithms such as improved genetic algorithm, simulated annealing algorithm, hill climbing pedometer algorithm, flood algorithm, taboo search algorithm, delayed reception algorithm, variable neighborhood descent algorithm, etc., combined with path search algorithms such as Dijkstra algorithm and A* algorithm to build a multi-objective optimization model to solve the route planning problem.

更具体的,在模型中充分考虑在途时长、工作饱和度、路线总长度等因素,确保规划结果符合实际业务需求。More specifically, factors such as travel time, work saturation, and total route length are fully considered in the model to ensure that the planning results meet actual business needs.

把门店信息(包括门店两两之间的在途时长、门店的在店时长、坐标经纬度、门店月重复拜访次数等)、员工信息,员工出发点信息以及想要计算的路线条数、日工作时长等计算需要的基本信息全部给到OptaPlanner引擎并启动计算服务;一次性为员工规划出一整月每日不同的多条拜访路线,例如,在一个包含20个工作日的月份内,为每位员工精算出总计20条合理的出行路线。Provide all the basic information needed for calculation, such as store information (including travel time between stores, store in-store time, coordinate longitude and latitude, number of monthly repeat visits to stores, etc.), employee information, employee departure point information, number of routes to be calculated, daily working hours, etc., to the OptaPlanner engine and start the calculation service; plan multiple different visit routes for employees every day for a whole month at one time. For example, in a month with 20 working days, calculate a total of 20 reasonable travel routes for each employee.

为了针对性地制定契合业务需求的规划规则,进而生成既满足客户需求又符合实际操作的最优路线方案,本实施例对OptaPlanner引擎设置了软硬约束;In order to formulate planning rules that meet business needs in a targeted manner and generate the optimal route plan that not only meets customer needs but also conforms to actual operations, this embodiment sets soft and hard constraints on the OptaPlanner engine;

其中,硬约束为路线排程计算中不可或缺且必须严格遵守的基础规则,软约束为在充分满足所有硬性约束的前提下,尽可能达到的理想目标的规则;Among them, hard constraints are the basic rules that are indispensable and must be strictly followed in route scheduling calculations, and soft constraints are the rules for achieving ideal goals as much as possible under the premise of fully satisfying all hard constraints;

具体的硬约束包括:Specific hard constraints include:

a)门店的固定拜访频率标准;a) Fixed visit frequency standards for stores;

例如A类门店每月需拜访4次,B类门店则为2次。For example, a Class A store needs to be visited four times a month, while a Class B store needs to be visited twice.

b)每日工作时长限制;b) Daily working hours limit;

确保员工日工作时长不超过法定规定的8小时上限。Ensure that employees' daily working hours do not exceed the legal limit of 8 hours.

c)在店停留时间设定;c) Setting the time of staying in the store;

比如要求A类门店每次访问停留时间为28分钟,B类门店则为22分钟。For example, the requirement for each visit to a Class A store is 28 minutes, while for a Class B store it is 22 minutes.

具体的软约束包括:Specific soft constraints include:

a)某类员工每月所执行的路线不应少于设定条数;例如15条。a) A certain type of employee should not perform less than a set number of routes per month; for example, 15.

b)每条规划路线至少应当覆盖设定数量以上的门店;例如8家。b) Each planned route should cover at least a set number of stores; for example, 8 stores.

c)最小化总行程里程或累计行程时间,以力求总体路线长度最短。c) Minimize the total travel mileage or accumulated travel time to minimize the overall route length.

值得注意的是:软约束条件会随着员工负责门店的数量变化而灵活调整。若某员工仅负责一家门店,则上述部分软约束可能在特定情况下适度放宽,以确保整体解决方案的合理性与可行性。It is worth noting that the soft constraints will be adjusted flexibly as the number of stores an employee is responsible for changes. If an employee is only responsible for one store, some of the above soft constraints may be moderately relaxed in certain circumstances to ensure the rationality and feasibility of the overall solution.

优选的,使用OptaPlanner计算引擎的VRP模型,将员工、门店及员工初始位置,分别对应VRP模型中的车辆、门店和仓库;员工日工作时长对应车辆的运输能力,员工在门店的在店时长对应门店货物需求量。Preferably, the VRP model of the OptaPlanner calculation engine is used to correspond employees, stores, and employee initial positions to vehicles, stores, and warehouses in the VRP model, respectively; the employee's daily working hours correspond to the vehicle's transportation capacity, and the employee's in-store time corresponds to the store's demand for goods.

根据设置的软硬约束,使用VRP模型的求解算法计算出一个员工分配的所有路线门店分布和单条路线上门店的访问次序;再通过递归算法完成所有员工的门店路线排程的计算。According to the set soft and hard constraints, the VRP model's solution algorithm is used to calculate the distribution of all route stores assigned to an employee and the order of store visits on a single route; then the store route scheduling of all employees is calculated through a recursive algorithm.

在一个具体的仿真环境下,采用VRP模型计算的路线结果汇总如图2所示;员工路线列表如图3所示;员工某一条路线上的门店列表如图4所示;员工某一条路线上的门店地图分布如图5所示,员工某一条路线上的门店列表如图6所示。In a specific simulation environment, the route results calculated using the VRP model are summarized in Figure 2; the employee route list is shown in Figure 3; the store list on a certain employee route is shown in Figure 4; the store map distribution on a certain employee route is shown in Figure 5, and the store list on a certain employee route is shown in Figure 6.

具体的,在步骤S3中,员工可通过员工任务平台获得分配的拜访路线;Specifically, in step S3, the employee can obtain the assigned visit route through the employee task platform;

在员工任务平台上,根据拜访路线中涉及到的门店的权重、拜访频次以及工作时间在内的因素生成拜访计划;On the employee task platform, a visit plan is generated based on factors including the weight of the stores involved in the visit route, visit frequency, and working hours;

拜访计划主要是安排员工使用拜访路线的日期时间和对路线门店的手动微调。Visit planning mainly involves arranging the date and time for employees to use visit routes and manually fine-tuning the route stores.

优选的,在员工任务平台的显示屏幕上设置门店区域地图和员工拜访路线显示区域,拜访计划编辑区域;Preferably, a store area map and an employee visit route display area and a visit plan editing area are set on the display screen of the employee task platform;

通过拜访计划编辑区域,对拜访路线的日期时间和对路线门店进行调整,进行拜访时间的重新安排、路线之间门店的挪移替换、路线内门店访问顺序的修改。在门店区域地图和员工拜访路线显示区域中显示正在计划的员工路线。Through the visit plan editing area, you can adjust the date and time of the visit route and the route stores, reschedule the visit time, move and replace stores between routes, and modify the order of store visits within the route. The planned employee route is displayed in the store area map and employee visit route display area.

如图7所示为员工任务平台的显示屏幕图,图中,左侧位置为门店区域地图和员工拜访路线显示区域;显示区域地图并在地图上叠加员工拜访路线;右侧为拜访计划编辑区域,在编辑区域中包括输入控件,下拉选择控件等,通过对控件内容的修改或选择,进行拜访时间的重新安排、路线之间门店的挪移替换、路线内门店访问顺序的修改,实现拜访计划的调整。As shown in Figure 7, this is the display screen of the employee task platform. In the figure, the left side is the store area map and the employee visit route display area; the area map is displayed and the employee visit route is superimposed on the map; the right side is the visit plan editing area, which includes input controls, drop-down selection controls, etc. By modifying or selecting the control content, the visit time can be rearranged, stores between routes can be moved and replaced, and the order of store visits within the route can be modified to adjust the visit plan.

具体的,在步骤S4,包括:Specifically, in step S4, it includes:

步骤S401、进行员工位置追踪、路况监控、任务进度反馈、门店访问验证、工作效率评估和紧急事件响应的实时监控;Step S401: Real-time monitoring of employee location tracking, road condition monitoring, task progress feedback, store visit verification, work efficiency evaluation, and emergency response;

其中,in,

1)员工位置追踪:利用移动通讯设备定位技术和移动应用程序,实时获取员工当前位置信息,与规划的拜访路线进行比对,监控员工是否按照既定路线行驶。1) Employee location tracking: Using mobile communication device positioning technology and mobile applications, employees’ current location information is obtained in real time, compared with the planned visit route, and monitored to see whether the employees follow the established route.

2)路况监控:集成地图服务提供商的实时路况信息,监测道路上的交通拥堵、事故、施工等影响行程的情况,当遇到突发事件时,可以及时提醒员工调整路线或重新规划。2) Traffic condition monitoring: Integrate real-time traffic information from map service providers to monitor traffic congestion, accidents, construction and other situations that affect travel on the road. When encountering emergencies, employees can be reminded to adjust routes or re-plan in a timely manner.

3)任务进度反馈:员工在门店完成拜访任务后,可以通过移动应用程序提交拜访结果,包括完成的任务项、花费的时间、达成的业绩等信息,系统实时接收并更新任务完成状态。3) Task progress feedback: After completing a store visit, employees can submit visit results through the mobile application, including completed task items, time spent, performance achieved and other information. The system receives and updates the task completion status in real time.

4)门店访问验证:通过门店的签到签退打卡,验证员工是否按时抵达并完成了门店拜访任务。4) Store visit verification: Through the store’s sign-in and sign-out, verify whether the employee has arrived on time and completed the store visit task.

5)工作效率评估:监控员工每天实际完成的拜访次数、平均停留时间、客户满意度等绩效指标,以评估员工工作效率和效果。5) Work efficiency evaluation: Monitor performance indicators such as the number of visits actually completed by employees each day, average stay time, customer satisfaction, etc. to evaluate employee work efficiency and effectiveness.

6)紧急事件响应:当出现突发情况如员工无法按时完成任务、客户门店要求紧急拜访等,系统能够迅速接收到相关反馈并协助重新规划任务优先级和路线。6) Emergency response: When emergencies occur, such as employees being unable to complete tasks on time or customer stores requiring emergency visits, the system can quickly receive relevant feedback and assist in re-planning task priorities and routes.

通过以上实时监控功能,不仅能帮助管理者全面掌握团队执行情况,还能依据实际情况动态调整计划,提高团队的整体运营效率和服务质量。同时,也保障了员工能够在面对不可预见的路况和工作变化时,得到有效的支持和指引。The above real-time monitoring function can not only help managers fully understand the team's execution status, but also dynamically adjust plans according to actual conditions to improve the team's overall operational efficiency and service quality. At the same time, it also ensures that employees can get effective support and guidance when facing unforeseen road conditions and work changes.

步骤S402、结合实时监控的突发状况进行路况预测评估出最优行驶路线;Step S402: predicting the road conditions based on the real-time monitored emergencies to determine the optimal driving route;

具体的,路况预测采用机器学习预测模型;所述模型根据实时抓取海量的交通数据流,基于历史数据、实时监控数据以及其他相关环境因素,运用深度学习和时间序列分析,模拟并预测未来一定时间段内的道路交通状况。Specifically, the road condition prediction adopts a machine learning prediction model; the model captures massive traffic data streams in real time, based on historical data, real-time monitoring data and other relevant environmental factors, uses deep learning and time series analysis to simulate and predict road traffic conditions within a certain period of time in the future.

一旦预测到可能影响既有路线效率的拥堵、事故等情况,系统便能迅速做出反应,依据预测结果重新评估并自动调整最优行驶路线,确保整个配送或服务流程的流畅性和高效性。Once congestion, accidents, etc. that may affect the efficiency of existing routes are predicted, the system can respond quickly, re-evaluate and automatically adjust the optimal driving route based on the prediction results, ensuring the smoothness and efficiency of the entire delivery or service process.

步骤S403、依据设定的调整策略调整并优化拜访计划。Step S403: Adjust and optimize the visit plan according to the set adjustment strategy.

具体的,包括:Specifically, they include:

1)进行数据收集与分析:实时收集包括员工反馈的现场情况、交通路况数据、客户预约变动和门店营业时间调整在内的内外部关键变量,分析这些变化对原有拜访计划在预计到达时间以及任务优先级的影响程度;1) Data collection and analysis: Real-time collection of key internal and external variables, including on-site conditions reported by employees, traffic data, changes in customer appointments, and adjustments to store business hours, to analyze the impact of these changes on the estimated arrival time and task priority of the original visit plan;

2)设置触发调整拜访计划机制:当监测到的关键变量的变化触发调整拜访计划机制时,则重新规划路线制定新的拜访计划;2) Set up a triggering mechanism to adjust the visit plan: When changes in key variables monitored trigger the visit plan adjustment mechanism, the route is replanned to formulate a new visit plan;

如某路段发生严重拥堵导致无法按时到达下一个门店,系统会自动触发调整机制。根据预设的规则和权重,判断是否需要立刻重新优化拜访计划,还是可以等到某个阈值达到后再进行调整。If a certain road section is severely congested and it is impossible to reach the next store on time, the system will automatically trigger the adjustment mechanism. According to the preset rules and weights, it is determined whether the visit plan needs to be re-optimized immediately or whether it can be adjusted after a certain threshold is reached.

3)根据实时路况重新规划路线:使用OSRM重新规划最优的拜访路线;3) Re-plan the route based on real-time traffic conditions: Use OSRM to re-plan the optimal visit route;

使用OSRM路径规划方案,根据实时路况重新规划最优的拜访路线,尽量避免受阻路段,缩短总行驶时间。对于因故无法访问的门店,系统会寻找替代方案,如替换到其它拜访计划路线里,推迟到下一个可用时间段访问。Use OSRM route planning to re-plan the optimal visit route based on real-time traffic conditions, try to avoid blocked sections, and shorten the total driving time. For stores that cannot be visited for some reason, the system will find alternatives, such as replacing them with other visit plan routes and postponing the visit to the next available time period.

4)对拜访任务优先级重排:根据紧急程度、客户重要性、业务需求等多重标准,重新排列拜访任务的优先级;4) Re-prioritize visit tasks: Re-prioritize visit tasks based on multiple criteria such as urgency, customer importance, business needs, etc.

如果有新增的紧急任务门店,则插入到现有计划中适当的位置,保证高优先级任务优先完成。If there are new stores with urgent tasks, they will be inserted into the appropriate positions in the existing plan to ensure that high-priority tasks are completed first.

5)进行调整后的拜访计划的沟通与通知:自动将调整后的拜访计划推送给受影响的员工或发送到第三方服务;同时向客户发出通知;5) Communicate and notify the adjusted visit plan: automatically push the adjusted visit plan to the affected employees or send it to a third-party service; and notify the customer at the same time;

第三方服务包括SFA或CRM,确保他们了解新的路线和时间安排。同时,系统也可以向客户发出通知,告知拜访时间的更改,保持良好的客户服务体验。Third-party services include SFA or CRM to ensure they are aware of new routes and schedules. At the same time, the system can also send notifications to customers to inform them of changes in visiting times to maintain a good customer service experience.

6)持续监控与优化:在新的计划执行过程中,系统仍将持续监控各类动态信息,确保计划始终与实际情况相符。如果再次出现变故,系统将立即启动新一轮的调整与优化循环。6) Continuous monitoring and optimization: During the execution of the new plan, the system will continue to monitor various dynamic information to ensure that the plan is always consistent with the actual situation. If there is another change, the system will immediately start a new round of adjustment and optimization cycle.

在更优选的方案中,设置员工移动应用;In a more preferred solution, an employee mobile app is set up;

所述员工移动应用用于显示最新的拜访任务列表及具体路线;允许员工记录拜访情况、上传现场照片、填写拜访报告;反馈实时地理位置和拜访进度,以便实时进行调整调度。The employee mobile application is used to display the latest visit task list and specific routes; allow employees to record visits, upload on-site photos, and fill out visit reports; and provide feedback on real-time geographic location and visit progress to facilitate real-time adjustment and scheduling.

综上所述,本实施例的基于数据驱动和智能优化的动态路线排程方法,实现了动态的、灵活的路线排程,充分考虑实时因素,有效降低由于道路拥堵、突发事件等因素对规划路线的影响。引入机器学习预测,提升了路线规划的预见性和鲁棒性,使规划方案更为贴合实际环境变化。对员工工作饱和度进行量化评估和合理分配,保障人力资源的高效利用,同时避免过度工作压力。In summary, the data-driven and intelligently optimized dynamic route scheduling method of this embodiment realizes dynamic and flexible route scheduling, fully considers real-time factors, and effectively reduces the impact of factors such as road congestion and emergencies on the planned route. The introduction of machine learning prediction improves the predictability and robustness of route planning, making the planning scheme more in line with actual environmental changes. Quantitative evaluation and reasonable allocation of employee work saturation ensures efficient use of human resources while avoiding excessive work pressure.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims (10)

1.一种基于数据驱动和智能优化的动态路线排程方法,其特征在于,包括:1. A dynamic route scheduling method based on data-driven and intelligent optimization, characterized by comprising: 步骤S1、获取门店和门店拜访员工的信息,进行数据整合和处理,生成结构化的门店信息列表和员工信息列表;Step S1, obtaining information of stores and store visiting employees, integrating and processing the data, and generating a structured store information list and employee information list; 步骤S2、基于门店信息列表和员工信息列表信息,评估出门店之间的路程以及在规定交通工具下门店之间的在途时长;将员工、门店及员工初始位置设定为决策变量,构建符合路线规划需求的NP-hard问题模型,使用OptaPlanner计算引擎,得到在设定时间段内,为每个员工分配的所有路线门店分布和单条路线上门店的访问次序,形成员工的拜访路线;Step S2: Based on the store information list and employee information list, the distance between stores and the travel time between stores under the specified transportation are evaluated; employees, stores and employee initial positions are set as decision variables, an NP-hard problem model that meets the route planning requirements is constructed, and the OptaPlanner calculation engine is used to obtain the distribution of all route stores assigned to each employee within the set time period and the order of visiting stores on a single route, so as to form the employee's visiting route; 步骤S3、员工获得分配的拜访路线后,根据拜访路线中涉及到的门店的权重、拜访频次以及工作时间在内的因素生成拜访计划;Step S3: After the employee obtains the assigned visiting route, he/she generates a visiting plan based on factors including the weights of the stores involved in the visiting route, the visiting frequency, and the working hours; 步骤S4、员工执行拜访计划时,进行包括位置追踪、路况监控在内的实时监控和路况预测处理,对拜访计划进行调整。Step S4: When the employee executes the visiting plan, real-time monitoring and traffic condition prediction processing including location tracking and traffic condition monitoring are performed to adjust the visiting plan. 2.根据权利要求1所述的基于数据驱动和智能优化的动态路线排程方法,其特征在于,2. The dynamic route scheduling method based on data-driven and intelligent optimization according to claim 1, characterized in that: 步骤S1中,包括:Step S1 includes: 步骤S101、从多个不同的数据源抽取门店和门店拜访员工的信息形成数据仓库;Step S101, extracting information of stores and store visiting employees from multiple different data sources to form a data warehouse; 步骤S102、对数据仓库中的数据进行校验、清洗和标准化处理得到标准化数据;Step S102: verify, clean and standardize the data in the data warehouse to obtain standardized data; 步骤S103、根据表格的格式化内容将标准化数据填入门店信息列表及员工信息列表中。Step S103: Fill the standardized data into the store information list and the employee information list according to the formatted content of the table. 3.根据权利要求2所述的基于数据驱动和智能优化的动态路线排程方法,其特征在于,3. The dynamic route scheduling method based on data-driven and intelligent optimization according to claim 2 is characterized in that: 门店表结构中包括:门店ID、用户/组织ID、用户/组织编码、用户/组织名称、门店编码、门店名称、门店地址、所属城市、门店级别、计算次数/月拜访次数、在店时长、门店经纬度、创建时间和租户ID项;The store table structure includes: store ID, user/organization ID, user/organization code, user/organization name, store code, store name, store address, city, store level, calculation times/monthly visits, store time, store latitude and longitude, creation time, and tenant ID items; 员工表结构中包括:员工ID、用户/组织ID、用户/组织编码、用户/组织名称、月工作天数、日工作时长、平均在途时长、是否启用虚拟出发点、至少一个出发点的经纬度和租户ID项。The employee table structure includes: employee ID, user/organization ID, user/organization code, user/organization name, monthly working days, daily working hours, average travel time, whether to enable virtual departure point, latitude and longitude of at least one departure point, and tenant ID items. 4.根据权利要求2所述的基于数据驱动和智能优化的动态路线排程方法,其特征在于,4. The dynamic route scheduling method based on data-driven and intelligent optimization according to claim 2, characterized in that: 在步骤S2中,采用OSRM+OptaPlanner的方式进行拜访路线的规划;In step S2, the OSRM+OptaPlanner method is used to plan the visit route; 其中,采用地图路线规划服务OSRM计算出所有门店两两之间的路程或评估出规定交通工具下门店两两之间的在途时长;Among them, the map route planning service OSRM is used to calculate the distance between all stores or to evaluate the travel time between stores under specified transportation tools; 将员工、门店及员工初始位置设定为决策变量,采用OptaPlanner引擎,计算符合路线规划需求的NP-hard问题模型;规划出拜访路线。Employees, stores, and their initial locations are set as decision variables, and the OptaPlanner engine is used to calculate the NP-hard problem model that meets the route planning requirements; the visit route is planned. 5.根据权利要求4所述的基于数据驱动和智能优化的动态路线排程方法,其特征在于,5. The dynamic route scheduling method based on data-driven and intelligent optimization according to claim 4 is characterized in that: 对OptaPlanner引擎设置的硬约束包括:The hard constraints set on the OptaPlanner engine include: a)门店的固定拜访频率标准;a) Fixed visit frequency standards for stores; b)每日工作时长限制;b) Daily working hours limit; c)在店停留时间设定;c) Setting the time of staying in the store; 对OptaPlanner引擎设置的软约束包括:The soft constraints set on the OptaPlanner engine include: a)员工每月所执行的路线不应少于设定条数;a) The number of routes that employees should perform each month should not be less than the set number; b)每条规划路线至少应当覆盖设定数量以上的门店;b) Each planned route should cover at least the set number of stores; c)最小化总行程里程或累计行程时间。c) Minimize the total travel distance or accumulated travel time. 6.根据权利要求5所述的基于数据驱动和智能优化的动态路线排程方法,其特征在于,6. The dynamic route scheduling method based on data-driven and intelligent optimization according to claim 5, characterized in that: 使用OptaPlanner计算引擎的VRP模型,将员工、门店及员工初始位置,分别对应VRP模型中的车辆、门店和仓库;员工日工作时长对应车辆的运输能力,员工在门店的在店时长对应门店货物需求量;Using the VRP model of the OptaPlanner calculation engine, employees, stores, and their initial positions correspond to vehicles, stores, and warehouses in the VRP model respectively; employees’ daily working hours correspond to the transportation capacity of vehicles, and employees’ time in stores corresponds to the demand for goods in stores; 根据设置的软硬约束,使用VRP模型的求解算法计算出一个员工分配的所有路线门店分布和单条路线上门店的访问次序;再通过递归算法完成所有员工的门店路线排程的计算。According to the set soft and hard constraints, the VRP model's solution algorithm is used to calculate the distribution of all route stores assigned to an employee and the order of store visits on a single route; then the store route scheduling of all employees is calculated through a recursive algorithm. 7.根据权利要求5所述的基于数据驱动和智能优化的动态路线排程方法,其特征在于,7. The dynamic route scheduling method based on data-driven and intelligent optimization according to claim 5, characterized in that: 员工可通过员工任务平台获得分配的拜访路线;在员工任务平台的显示屏幕上设置门店区域地图和员工拜访路线显示区域,拜访计划编辑区域;Employees can obtain assigned visit routes through the employee task platform; set up store area maps and employee visit route display areas and visit plan editing areas on the display screen of the employee task platform; 通过拜访计划编辑区域,对拜访路线的日期时间和对路线门店进行调整,进行拜访时间的重新安排、路线之间门店的挪移替换、路线内门店访问顺序的修改;并在门店区域地图和员工拜访路线显示区域中显示正在计划的员工路线。Through the visit plan editing area, the date and time of the visit route and the stores on the route can be adjusted, the visit time can be rearranged, stores between routes can be moved and replaced, and the order of store visits within the route can be modified; and the planned employee route can be displayed in the store area map and the employee visit route display area. 8.根据权利要求5所述的基于数据驱动和智能优化的动态路线排程方法,其特征在于,8. The dynamic route scheduling method based on data-driven and intelligent optimization according to claim 5, characterized in that: 所述步骤S4,包括:The step S4 comprises: 步骤S401、进行员工位置追踪、路况监控、任务进度反馈、门店访问验证、工作效率评估和紧急事件响应的实时监控;Step S401: Real-time monitoring of employee location tracking, road condition monitoring, task progress feedback, store visit verification, work efficiency evaluation, and emergency response; 步骤S402、结合实时监控的突发状况进行路况预测评估出最优行驶路线;Step S402: predicting the road conditions based on the real-time monitored emergencies to determine the optimal driving route; 步骤S403、依据设定的调整策略调整并优化拜访计划。Step S403: Adjust and optimize the visit plan according to the set adjustment strategy. 9.根据权利要求5所述的基于数据驱动和智能优化的动态路线排程方法,其特征在于,9. The dynamic route scheduling method based on data-driven and intelligent optimization according to claim 5, characterized in that: 路况预测采用机器学习预测模型;所述模型根据实时抓取海量的交通数据流,基于历史数据、实时监控数据以及其他相关环境因素,运用深度学习和时间序列分析,模拟并预测未来一定时间段内的道路交通状况。Traffic condition prediction uses a machine learning prediction model; the model captures massive amounts of traffic data streams in real time, based on historical data, real-time monitoring data and other relevant environmental factors, uses deep learning and time series analysis to simulate and predict road traffic conditions within a certain period of time in the future. 10.根据权利要求9所述的基于数据驱动和智能优化的动态路线排程方法,其特征在于,10. The dynamic route scheduling method based on data-driven and intelligent optimization according to claim 9, characterized in that: 所述步骤S403,包括:The step S403 includes: 1)进行数据收集与分析:实时收集包括员工反馈的现场情况、交通路况数据、客户预约变动和门店营业时间调整在内的内外部关键变量,分析这些变化对原有拜访计划在预计到达时间以及任务优先级的影响程度;1) Data collection and analysis: Real-time collection of key internal and external variables, including on-site conditions reported by employees, traffic data, changes in customer appointments, and adjustments to store business hours, to analyze the impact of these changes on the estimated arrival time and task priority of the original visit plan; 2)设置触发调整拜访计划机制:当监测到的关键变量的变化触发调整拜访计划机制时,则重新规划路线制定新的拜访计划;2) Set up a triggering mechanism to adjust the visit plan: When the changes in the monitored key variables trigger the adjustment mechanism of the visit plan, the route is replanned to formulate a new visit plan; 3)根据实时路况重新规划路线:使用OSRM重新规划最优的拜访路线;3) Re-plan the route based on real-time traffic conditions: Use OSRM to re-plan the optimal visit route; 4)对拜访任务优先级重排:根据紧急程度、客户重要性、业务需求等多重标准,重新排列拜访任务的优先级;4) Re-prioritize visit tasks: Re-prioritize visit tasks based on multiple criteria such as urgency, customer importance, business needs, etc. 5)进行调整后的拜访计划的沟通与通知:自动将调整后的拜访计划推送给受影响的员工或发送到第三方服务;同时向客户发出通知;5) Communicate and notify the adjusted visit plan: automatically push the adjusted visit plan to the affected employees or send it to a third-party service; and notify the customer at the same time; 6)持续监控与优化:在新的计划执行过程中,仍持续监控各类动态信息,确保计划始终与实际情况相符;如果再次出现变故,启动新一轮的调整与优化循环。6) Continuous monitoring and optimization: During the implementation of the new plan, various dynamic information will continue to be monitored to ensure that the plan is always consistent with the actual situation; if any unexpected events occur again, a new round of adjustment and optimization cycle will be initiated.
CN202410559304.5A 2024-05-08 2024-05-08 A dynamic route scheduling method based on data-driven and intelligent optimization Pending CN118690933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410559304.5A CN118690933A (en) 2024-05-08 2024-05-08 A dynamic route scheduling method based on data-driven and intelligent optimization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410559304.5A CN118690933A (en) 2024-05-08 2024-05-08 A dynamic route scheduling method based on data-driven and intelligent optimization

Publications (1)

Publication Number Publication Date
CN118690933A true CN118690933A (en) 2024-09-24

Family

ID=92763731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410559304.5A Pending CN118690933A (en) 2024-05-08 2024-05-08 A dynamic route scheduling method based on data-driven and intelligent optimization

Country Status (1)

Country Link
CN (1) CN118690933A (en)

Similar Documents

Publication Publication Date Title
US8612276B1 (en) Methods, apparatus, and systems for dispatching service technicians
CN111768030B (en) Bank transportation distribution line planning method, device, equipment and medium
Fu A simulation model for evaluating advanced dial-a-ride paratransit systems
US9726502B2 (en) Route planner for transportation systems
CN110599767A (en) Long-term and short-term prediction method based on network taxi appointment travel demands
US20050090951A1 (en) Vehicle service status tracking system and method
CN113205227B (en) Vehicle line optimization method and device
CN113723659A (en) Urban rail transit full-scene passenger flow prediction method and system
CN111353625B (en) Method, device, computer equipment and storage medium for predicting net point quantity
US10789558B2 (en) Non-linear systems and methods for destination selection
CN116703093A (en) A distribution network material reserve management and distribution system
CN107025504A (en) A kind of service type storehouse site selecting method for considering region transportation situation
CN119477142A (en) Real-time monitoring optimization method and device for solid waste collection, transportation and sorting ERP system
Nguyen Quantitative analysis of ambulance location-allocation and ambulance state prediction
CN118690933A (en) A dynamic route scheduling method based on data-driven and intelligent optimization
CN119067543A (en) Order trajectory prediction method, device, equipment and storage medium based on SVM
Chen et al. An optimization-and-simulation framework for redesigning university campus bus system with social distancing
Doumeingts et al. A proposal for an integrated model of a manufacturing system: Application to the re-engineering of an assembly shop
Chen et al. The University of Michigan implements a hub-and-spoke design to accommodate social distancing in the campus bus system under COVID-19 restrictions
CN118569461A (en) Route scheduling system based on combination of deep learning and optimization algorithm
Tang et al. Short-term work team scheduling models for effective road repair and management
Rahayu et al. Enhancing operational efficiency: implementing business process improvement by integrating the command center in the Indonesian toll road operator company
CN112950058A (en) Vehicle scheduling method and device, storage medium and electronic equipment
LU508069B1 (en) A Metro Logistics and Transportation Management Method Based on Efficient Intelligent Algorithm
Vodopivec et al. Taxis as a recourse option for ridesharing services

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination