CN111507577A - Crowdsourcing task allocation method based on K-means clustering algorithm - Google Patents
Crowdsourcing task allocation method based on K-means clustering algorithm Download PDFInfo
- Publication number
- CN111507577A CN111507577A CN202010218967.2A CN202010218967A CN111507577A CN 111507577 A CN111507577 A CN 111507577A CN 202010218967 A CN202010218967 A CN 202010218967A CN 111507577 A CN111507577 A CN 111507577A
- Authority
- CN
- China
- Prior art keywords
- cluster
- clustering
- analysis
- points
- method based
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
- G06Q10/06311—Scheduling, planning or task assignment for a person or group
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/906—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- Economics (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Development Economics (AREA)
- Quality & Reliability (AREA)
- General Business, Economics & Management (AREA)
- Operations Research (AREA)
- Marketing (AREA)
- Tourism & Hospitality (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Remote Sensing (AREA)
- Educational Administration (AREA)
- Game Theory and Decision Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明属于物流技术领域,涉及一种基于K-means聚类算法的众包任务分配方法。The invention belongs to the technical field of logistics, and relates to a crowdsourcing task assignment method based on a K-means clustering algorithm.
背景技术Background technique
随着互联网行业的快速发展,电子商务也由此进入了高速发展模式。近年,以天猫、京东为代表的电子商务平台,创造了巨大的交易额,2018年快递业务量突破500亿件。物流配送作为电子商务的基础属性也受到了前所未有的挑战,是各企业为提升平台水准,服务质量,必须攻克的领域。末端物流作为与用户体验最贴近的一环,配送的便利性,时效性,安全性都将成为用户评价一个电子商务平台的直接因素。传统的配送模式仍存在着时效性难以保证,交通压力大,配送人力物力短缺,处理突发事件能力弱等一系列问题。基于众包的概念,整合利用社会闲置配送资源是本文解决人力物力资源短缺的核心思想及途径。智能匹配模块采用K-means聚类算法对货物与骑手所在位置进行聚类分析,再通过遗传算法获得以全局路径最短为目标的近似最优解,其中路径信息通过调用百度地图的路径规划业务获取。顺风车配送模块充分利用了社会的闲置资源及顺路优势,如上下班的途中顺路进行配送,减轻了调度压力及交通压力。With the rapid development of the Internet industry, e-commerce has also entered a high-speed development mode. In recent years, e-commerce platforms represented by Tmall and JD.com have created huge transaction volume. In 2018, the express delivery business volume exceeded 50 billion pieces. As the basic attribute of e-commerce, logistics distribution has also been challenged unprecedentedly. It is an area that enterprises must overcome in order to improve the platform level and service quality. Terminal logistics is the closest part to the user experience. The convenience, timeliness and safety of distribution will become the direct factors for users to evaluate an e-commerce platform. The traditional distribution mode still has a series of problems such as difficulty in ensuring timeliness, heavy traffic pressure, shortage of distribution manpower and material resources, and weak ability to deal with emergencies. Based on the concept of crowdsourcing, the integration and utilization of idle social distribution resources is the core idea and approach to solve the shortage of human and material resources in this paper. The intelligent matching module uses the K-means clustering algorithm to perform cluster analysis on the location of the cargo and the rider, and then uses the genetic algorithm to obtain the approximate optimal solution with the goal of the shortest global path. The path information is obtained by calling the path planning business of Baidu Maps. . The hitchhiker distribution module makes full use of the idle resources of the society and the advantages of the road, such as delivery on the way to and from get off work, which reduces the scheduling pressure and traffic pressure.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种基于K-means聚类算法的众包任务分配方法,本发明的有益效果是能够快速高效的获得以全局路径最短为目标的近似最优解。The purpose of the present invention is to provide a crowdsourcing task assignment method based on the K-means clustering algorithm, and the beneficial effect of the present invention is to quickly and efficiently obtain an approximate optimal solution aiming at the shortest global path.
本发明所采用的技术方案是包括订单任务聚类分析和配送人员当前位置聚类分析。The technical scheme adopted by the present invention includes cluster analysis of order tasks and cluster analysis of the current position of delivery personnel.
进一步,1)订单任务聚类分析:服务器端为所有待匹配的订单任务进行聚类分析,首先查询数据库获得所有待匹配订单任务的接收地址,调用百度地图 API地址编码获得对应的经纬坐标,随机选取K个点作为初始聚类中心,遍历所有点得出与其欧几米德距离最小的积累中心,并加入该聚类,重新计算聚类中心,再次遍历点集判断所属聚类,直到各聚类中心坐标不改变,得到聚类结果;Further, 1) cluster analysis of order tasks: the server performs cluster analysis for all order tasks to be matched, first query the database to obtain the receiving addresses of all order tasks to be matched, call Baidu Map API address code to obtain the corresponding latitude and longitude coordinates, randomly Select K points as the initial cluster center, traverse all points to obtain the accumulation center with the smallest Euclidean distance, and join the cluster, recalculate the cluster center, and traverse the point set again to determine the cluster to which it belongs, until each cluster is The center coordinates do not change, and the clustering result is obtained;
2)配送人员当前定位聚类分析:服务器端获得配送人员当前定位,并调用百度地图API地址编码获得对应的经纬坐标,获得订单任务聚类分析结果,遍历聚类中心点集,计算欧几米德距离判断配送人员所属聚类,将该聚类信息写入匹配池数据表中;2) Cluster analysis of the current location of the delivery personnel: The server obtains the current location of the delivery personnel, and calls the Baidu map API address code to obtain the corresponding latitude and longitude coordinates, obtains the cluster analysis result of the order task, traverses the cluster center point set, and calculates the Euclidean The distance judges the cluster to which the delivery person belongs, and writes the cluster information into the matching pool data table;
3)服务器端后台打印输出该用户所在位置的经纬坐标,及与各聚类中心的距离最小值,最终得出所属聚类结果。3) The server-side background prints out the latitude and longitude coordinates of the user's location, and the minimum distance from each cluster center, and finally obtains the clustering result.
具体实施方式Detailed ways
下面结合具体实施方式对本发明进行详细说明。The present invention will be described in detail below with reference to specific embodiments.
K-means聚类算法的实现过程分以下四个步骤:The realization process of K-means clustering algorithm is divided into the following four steps:
①初始化样本,从样本中随机选出K个点作为初始质心。①Initialize the sample, and randomly select K points from the sample as the initial centroid.
②计算各样本点到各质心的距离,选择离该样本点最近的质心并加入该质心所属的划分簇。② Calculate the distance from each sample point to each centroid, select the centroid closest to the sample point and add the cluster to which the centroid belongs.
③重新计算各簇的质心点。③ Recalculate the centroid points of each cluster.
④判断各簇的质心点是否发生改变,改变则重复②③,若无改变则得到结果。④ Determine whether the centroid point of each cluster has changed, repeat ②③ if it changes, and get the result if there is no change.
本发明将算法集成到服务器端,只需将原有的随机坐标点数据集替换为货物总包待接收地址的经纬坐标值。当目标用户发起新增货物总包请求时,调用一次 K-means算法,确定该新增订单包的所属聚类。配送人员发起任务匹配请求时,根据用户当前定位信息,调用百度地图地址编码API获得其所在位置的经纬坐标。基于经纬坐标和已有的订单聚类分析结果,为配送人员确定其所在聚类,配送人员将在该聚类下进行任务分配。The invention integrates the algorithm into the server side, and only needs to replace the original random coordinate point data set with the latitude and longitude coordinate values of the address to be received in the general cargo package. When the target user initiates a request for a new general package of goods, the K-means algorithm is called once to determine the cluster to which the new order package belongs. When a delivery person initiates a task matching request, according to the user's current positioning information, the Baidu map address coding API is called to obtain the latitude and longitude coordinates of their location. Based on the latitude and longitude coordinates and the cluster analysis results of existing orders, determine the cluster where the delivery personnel are located, and the delivery personnel will assign tasks under the cluster.
本发明基于K-means聚类算法的众包任务分配方法包括订单任务聚类分析和配送人员当前位置聚类分析;The crowdsourcing task assignment method based on the K-means clustering algorithm of the present invention includes the cluster analysis of order tasks and the cluster analysis of the current position of delivery personnel;
1)订单任务聚类分析1) Cluster analysis of order tasks
服务器端为所有待匹配的订单任务进行聚类分析。首先查询数据库获得所有待匹配订单任务的接收地址,调用百度地图API地址编码获得对应的经纬坐标。随机选取K个点作为初始聚类中心,遍历所有点得出与其欧几米德距离最小的积累中心,并加入该聚类。重新计算聚类中心,再次遍历点集判断所属聚类,直到各聚类中心坐标不改变,得到聚类结果。The server side performs cluster analysis for all order tasks to be matched. First, query the database to obtain the receiving addresses of all the order tasks to be matched, and call the Baidu Map API address code to obtain the corresponding latitude and longitude coordinates. Randomly select K points as the initial cluster center, traverse all points to obtain the accumulation center with the smallest Euclidean distance, and join the cluster. Recalculate the cluster center, traverse the point set again to determine the cluster to which it belongs, until the coordinates of each cluster center do not change, and obtain the clustering result.
2)配送人员当前定位聚类分析2) Cluster analysis of the current positioning of delivery personnel
服务器端获得配送人员当前定位,并调用百度地图API地址编码获得对应的经纬坐标。获得订单任务聚类分析结果,遍历聚类中心点集,计算欧几米德距离判断配送人员所属聚类,将该聚类信息写入匹配池数据表中。The server obtains the current location of the delivery personnel, and calls the Baidu Map API address code to obtain the corresponding latitude and longitude coordinates. Obtain the cluster analysis result of the order task, traverse the cluster center point set, calculate the Euclidean distance to determine the cluster to which the delivery person belongs, and write the cluster information into the matching pool data table.
3)服务器端后台打印输出该用户所在位置的经纬坐标,及与各聚类中心的距离最小值,最终得出所属聚类结果。3) The server-side background prints out the latitude and longitude coordinates of the user's location, and the minimum distance from each cluster center, and finally obtains the clustering result.
以上所述仅是对本发明的较佳实施方式而已,并非对本发明作任何形式上的限制,凡是依据本发明的技术实质对以上实施方式所做的任何简单修改,等同变化与修饰,均属于本发明技术方案的范围内。The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Any simple modifications, equivalent changes and modifications made to the above embodiments according to the technical essence of the present invention belong to the present invention. within the scope of the technical solution of the invention.
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010218967.2A CN111507577A (en) | 2020-03-25 | 2020-03-25 | Crowdsourcing task allocation method based on K-means clustering algorithm |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010218967.2A CN111507577A (en) | 2020-03-25 | 2020-03-25 | Crowdsourcing task allocation method based on K-means clustering algorithm |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111507577A true CN111507577A (en) | 2020-08-07 |
Family
ID=71875852
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010218967.2A Pending CN111507577A (en) | 2020-03-25 | 2020-03-25 | Crowdsourcing task allocation method based on K-means clustering algorithm |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111507577A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112884319A (en) * | 2021-02-10 | 2021-06-01 | 腾讯大地通途(北京)科技有限公司 | Task allocation method and device, computer equipment and storage medium |
| CN113469611A (en) * | 2021-06-10 | 2021-10-01 | 哈尔滨工业大学 | Express crowdsourcing distribution task scheduling method, system and equipment |
| CN113723673A (en) * | 2021-08-18 | 2021-11-30 | 郑州时空隧道信息技术有限公司 | Method and system for assigning orders |
| CN115496476A (en) * | 2022-10-08 | 2022-12-20 | 中国农业银行股份有限公司 | A clustering algorithm-based workflow task assignment method, device and equipment |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109002960A (en) * | 2018-06-12 | 2018-12-14 | 广东工业大学 | It is a kind of based on the online order of scoring and path planning distribution and allocator |
| CN109685295A (en) * | 2017-10-18 | 2019-04-26 | 北京京东尚科信息技术有限公司 | Cargo, which is pulled, receives dispatching method and device, storage medium, electronic equipment |
| CN109816132A (en) * | 2017-11-20 | 2019-05-28 | 北京京东尚科信息技术有限公司 | Information generating method and device |
| CN110348678A (en) * | 2019-05-31 | 2019-10-18 | 口碑(上海)信息技术有限公司 | Dispense the scheduling of resource and resource regulating method and device for vegetable dispatching |
-
2020
- 2020-03-25 CN CN202010218967.2A patent/CN111507577A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109685295A (en) * | 2017-10-18 | 2019-04-26 | 北京京东尚科信息技术有限公司 | Cargo, which is pulled, receives dispatching method and device, storage medium, electronic equipment |
| CN109816132A (en) * | 2017-11-20 | 2019-05-28 | 北京京东尚科信息技术有限公司 | Information generating method and device |
| CN109002960A (en) * | 2018-06-12 | 2018-12-14 | 广东工业大学 | It is a kind of based on the online order of scoring and path planning distribution and allocator |
| CN110348678A (en) * | 2019-05-31 | 2019-10-18 | 口碑(上海)信息技术有限公司 | Dispense the scheduling of resource and resource regulating method and device for vegetable dispatching |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112884319A (en) * | 2021-02-10 | 2021-06-01 | 腾讯大地通途(北京)科技有限公司 | Task allocation method and device, computer equipment and storage medium |
| CN112884319B (en) * | 2021-02-10 | 2023-11-03 | 腾讯大地通途(北京)科技有限公司 | A task allocation method, device, computer equipment and storage medium |
| CN113469611A (en) * | 2021-06-10 | 2021-10-01 | 哈尔滨工业大学 | Express crowdsourcing distribution task scheduling method, system and equipment |
| CN113723673A (en) * | 2021-08-18 | 2021-11-30 | 郑州时空隧道信息技术有限公司 | Method and system for assigning orders |
| CN115496476A (en) * | 2022-10-08 | 2022-12-20 | 中国农业银行股份有限公司 | A clustering algorithm-based workflow task assignment method, device and equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111507577A (en) | Crowdsourcing task allocation method based on K-means clustering algorithm | |
| CN110222893B (en) | Method and device for recommending delivery places of shared traffic resources and electronic equipment | |
| CN104462263A (en) | Method for searching for stores by means of database indexes | |
| CN106779910B (en) | Distribution order distribution method and device | |
| CN110782064A (en) | Visualization method and system integrating vehicle scheduling optimization and task allocation | |
| CN102175252B (en) | Method for planning dynamic merging and united path of distributed multi-stage road network | |
| KR101586815B1 (en) | Method and system for providing carpool service by using communication-type navigation service | |
| CN101739617A (en) | PDA-based intelligent travel navigation system | |
| CN103856532A (en) | Intelligent car sharing cloud service method and system | |
| CN110737665B (en) | Data processing method and device | |
| CN110400107B (en) | An intelligent and agile discovery system for idle transportation services | |
| CN106447547A (en) | Intelligent tourism platform and running method | |
| CN111652676A (en) | Method, device, equipment and storage medium recommended for pick-up point | |
| CN111881368A (en) | Method and system for determining recommended boarding point | |
| CN112989194A (en) | Recommendation method and system integrating user request and service preference of Internet of vehicles | |
| CN105897887A (en) | Clouding computing-based remote sensing satellite big data processing system and method | |
| CN114286284B (en) | Method and device for grading business districts | |
| CN115796629A (en) | Traditional village vitality quantitative evaluation method and system, electronic equipment and storage medium | |
| CN111626554B (en) | Order assignment method, device, computer equipment and computer-readable storage medium | |
| CN112001646A (en) | Material scheduling method and device, storage medium and electronic equipment | |
| CN111625604B (en) | Credible evaluation system and method for travel service quality based on block chain | |
| CN113971190A (en) | Rendering method and device of electronic map, terminal and computer storage medium | |
| CN118626735A (en) | A method, device, storage medium and electronic device for determining spatial range based on keywords | |
| CN117273592A (en) | A store delivery method in a logistics scenario | |
| CN117195010A (en) | A method for logistics center location selection based on hybrid clustering algorithm |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200807 |
|
| RJ01 | Rejection of invention patent application after publication |