Vehicle multi-supplier order dispatching method and system
By adopting an information platform and distributed locking mechanism in the multi-car supplier environment, the problems of inefficient order assignment and information asymmetry are solved, more efficient and reliable car use services are achieved, and consumers' information acquisition is improved Ability and choice.
Patent Information
- Application Number
- CN202411066965.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-12-06
AI Technical Summary
In the environment of multiple car suppliers, there are problems such as low order allocation efficiency and uncertain costs caused by information asymmetry, and lack of a transparent pricing mechanism, making it difficult for consumers to obtain real price information.
Through the information platform, the automation and intelligence of vehicle scheduling, order dispatching, tracking and other functions are realized, and the distributed locking mechanism is adopted to ensure thread safety, design exception handling and retry mechanisms, monitor system performance in real time, and optimize order dispatching rules and thread pool size. To improve order distribution efficiency and accuracy.
Improve the thread safety and efficiency of order assignments, ensure data consistency and reliability, enhance the stability and performance of the system, provide more transparent and reliable car use services, and improve consumers' information acquisition capabilities and choices. right.
Smart Images

Figure CN119090181A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of dispatching orders for vehicles to multiple suppliers, and in particular relates to a method and system for dispatching orders for vehicles to multiple suppliers. Background Art
[0002] The dispatch of orders from multiple suppliers for car use is a comprehensive consideration and development trend based on the demand for efficiency, the application of information and digital technology, the rise of multi-supplier cooperation models, and the requirements for customer experience and service quality. By establishing an efficient and intelligent dispatch system, we can achieve optimal allocation of resources, improve service efficiency and quality, and meet the rapid growth of market demand.
[0003] In some regions or specific service areas, there may be industry monopolies, resulting in a lack of price competition and difficulty for consumers to obtain true and reasonable price information. There is often information asymmetry between consumers and car service providers. Consumers may lack professional knowledge or have limited access to information, making it difficult to accurately assess the true value of car services, and service providers may use this information asymmetry to set unreasonable prices. Some car service providers may deliberately conceal or obscure price information, lack a transparent pricing mechanism and fee details, making it difficult for consumers to understand the true price structure and calculation method.
[0004] These problems may cause consumers to face high fees and uncertain costs in the process of using cars, and lack the right to choose and the right to know. In order to solve these problems, it is necessary to strengthen supervision and law enforcement, promote industry transparency, and improve consumers' ability to obtain information and bargaining power to promote the healthy development of the car market. The existing multi-supplier mechanism is prone to problems such as low efficiency and errors in dispatching orders. Summary of the invention
[0005] In view of the shortcomings of the existing technology, the present invention makes full use of the rapid development of information technology and digital technology and the rise of multi-supplier cooperation models, with the aim of realizing the automation and intelligence of vehicle scheduling, dispatching, tracking and other functions through an information platform, and being able to simultaneously manage the vehicles and driver resources of multiple suppliers, greatly improving the dispatching efficiency and accuracy, and specifically proposes a multi-supplier dispatching method and system for vehicles.
[0006] In order to achieve the aforementioned object of the invention, the present invention adopts the following scheme:
[0007] One aspect of the present invention provides a method for dispatching orders to multiple suppliers of vehicles, comprising the following steps:
[0008] Determine the specific requirements and rules for dispatching orders;
[0009] Plan supplier resources to ensure that each supplier can handle corresponding dispatch requests;
[0010] When there is a new dispatch request, the threads in the thread pool will try to acquire the distributed lock; the distributed lock is used to ensure that only one thread accesses the shared resource at the same time;
[0011] The thread that successfully acquires the lock is responsible for taking one or more dispatch tasks from the dispatch queue;
[0012] Select the most suitable supplier for dispatching orders based on dispatching rules and supplier capabilities;
[0013] Update the dispatch status and supplier's work status;
[0014] Release the distributed lock so that other threads can continue to process the dispatch task;
[0015] When an abnormal situation occurs during the order dispatching process, the exception handling and retry mechanism is triggered.
[0016] In one of the embodiments, a distributed lock fault tolerance mechanism is provided; the distributed lock fault tolerance mechanism includes a backup supplier and disaster recovery.
[0017] In one of the embodiments, the distributed lock is implemented through Redis and Zookeeper.
[0018] In one of the embodiments, the exception handling and retry mechanism includes a retry mechanism and a failover mechanism.
[0019] In one embodiment, the operation status and performance indicators of the dispatching system are monitored in real time; the performance indicators include dispatching success rate and response time; and
[0020] Perform system tuning according to the operating status and performance indicators; the system tuning includes adjusting the thread pool size and optimizing the dispatching rules.
[0021] Another aspect of the present invention provides a vehicle multi-supplier dispatching system, comprising:
[0022] The dispatch rule determination module is used to determine the specific requirements and rules for dispatching orders;
[0023] Resource planning module, used to plan supplier resources to ensure that each supplier can handle the corresponding dispatch request;
[0024] The dispatch module is used to: when there is a new dispatch request, the threads in the thread pool will try to obtain the distributed lock; the distributed lock is used to ensure that only one thread accesses the shared resource at the same time; the thread that successfully obtains the lock is responsible for taking one or more dispatch tasks from the dispatch queue; according to the dispatch rules and supplier capabilities, the most suitable supplier is selected for dispatch;
[0025] Status update module, used to update the order status and supplier's work status;
[0026] The release module is used to release the distributed lock so that other threads can continue to process the dispatch task;
[0027] The exception handling module is used to trigger the exception handling and retry mechanism when an abnormal situation occurs during the order dispatching process.
[0028] In one of the embodiments, the system further includes a fault-tolerant module for setting a distributed lock fault-tolerant mechanism; the distributed lock fault-tolerant mechanism includes a backup supplier and disaster recovery.
[0029] In one of the embodiments, the distributed lock is implemented through Redis and Zookeeper.
[0030] In one of the embodiments, the exception handling and retry mechanism includes a retry mechanism and a failover mechanism.
[0031] One of the embodiments further includes a monitoring module for real-time monitoring of the operation status and performance indicators of the dispatching system; the performance indicators include dispatching success rate and response time; and
[0032] The optimization module performs system tuning according to the operating status and performance indicators; the system tuning includes adjusting the thread pool size and optimizing the dispatching rules.
[0033] Compared with the prior art, the present invention has at least the following advantages:
[0034] (1) Thread safety: In a multi-threaded environment, thread safety of dispatching operations is ensured by using thread locks or other synchronization mechanisms to prevent data inconsistency caused by multiple threads operating on the same data at the same time.
[0035] (2) Implementation of distributed locks: Distributed locks are a key component for implementing multi-supplier dispatch solutions. They are used to ensure that in a distributed system, only one thread or process can access shared resources at a time.
[0036] (3) Order dispatch logic design: Order dispatch logic needs to be designed based on specific business requirements and rules. For example, order dispatch strategies can be formulated based on order priority, geographic location, supplier capabilities, and other factors. At the same time, it is also necessary to consider how to handle abnormal situations, such as suppliers being unable to accept orders and order cancellations.
[0037] (4) Integration of supplier resources: In a multi-supplier dispatching solution, it is necessary to integrate the resources of multiple suppliers, including vehicles, drivers, etc. This requires the management and evaluation of suppliers to ensure the quality and reliability of their services;
[0038] (5) Data consistency and reliability: In a distributed system, data consistency and reliability must be ensured. This can be achieved by using distributed transactions, data backup, and recovery mechanisms. At the same time, the system must be monitored and tuned to ensure system stability and performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is a flowchart of a method for dispatching orders to multiple suppliers of vehicles provided by a typical implementation case of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical scheme and advantages of the present invention clearer, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Examples of these preferred embodiments are illustrated in the accompanying drawings. The embodiments of the present invention shown in the accompanying drawings and described according to the accompanying drawings are merely exemplary, and the present invention is not limited to these embodiments.
[0042] One aspect of the present invention provides a method for dispatching orders to multiple suppliers of vehicles, comprising:
[0043] Determine the specific requirements and rules for dispatching orders;
[0044] Plan supplier resources to ensure that each supplier can handle corresponding dispatch requests;
[0045] When there is a new dispatch request, the threads in the thread pool will try to acquire the distributed lock; the distributed lock is used to ensure that only one thread accesses the shared resource at the same time;
[0046] The thread that successfully acquires the lock is responsible for taking one or more dispatch tasks from the dispatch queue;
[0047] Select the most suitable supplier for dispatching orders based on dispatching rules and supplier capabilities;
[0048] Update the dispatch status and supplier's work status;
[0049] Release the distributed lock so that other threads can continue to process the dispatch task;
[0050] When an abnormal situation occurs during the order dispatching process, the exception handling and retry mechanism is triggered.
[0051] In one of the embodiments, a distributed lock fault tolerance mechanism is provided; the distributed lock fault tolerance mechanism includes a backup supplier and disaster recovery.
[0052] In one of the embodiments, the distributed lock is implemented through Redis and Zookeeper.
[0053] In one of the embodiments, the exception handling and retry mechanism includes a retry mechanism and a failover mechanism.
[0054] In one embodiment, the operation status and performance indicators of the dispatching system are monitored in real time; the performance indicators include dispatching success rate and response time; and
[0055] Perform system tuning according to the operating status and performance indicators; the system tuning includes adjusting the thread pool size and optimizing the dispatching rules.
[0056] Another aspect of the present invention provides a vehicle multi-supplier dispatching system, comprising:
[0057] The dispatch rule determination module is used to determine the specific requirements and rules for dispatching orders;
[0058] Resource planning module, used to plan supplier resources to ensure that each supplier can handle the corresponding dispatch request;
[0059] The dispatch module is used to: when there is a new dispatch request, the threads in the thread pool will try to obtain the distributed lock; the distributed lock is used to ensure that only one thread accesses the shared resource at the same time; the thread that successfully obtains the lock is responsible for taking one or more dispatch tasks from the dispatch queue; according to the dispatch rules and supplier capabilities, the most suitable supplier is selected for dispatch;
[0060] Status update module, used to update the order status and supplier's work status;
[0061] The release module is used to release the distributed lock so that other threads can continue to process the dispatch task;
[0062] The exception handling module is used to trigger the exception handling and retry mechanism when an abnormal situation occurs during the order dispatching process.
[0063] In one of the embodiments, the system further includes a fault-tolerant module for setting a distributed lock fault-tolerant mechanism; the distributed lock fault-tolerant mechanism includes a backup supplier and disaster recovery.
[0064] In one of the embodiments, the distributed lock is implemented through Redis and Zookeeper.
[0065] In one of the embodiments, the exception handling and retry mechanism includes a retry mechanism and a failover mechanism.
[0066] One of the embodiments further includes a monitoring module for real-time monitoring of the operation status and performance indicators of the dispatching system; the performance indicators include dispatching success rate and response time; and
[0067] The optimization module performs system tuning according to the operating status and performance indicators; the system tuning includes adjusting the thread pool size and optimizing the dispatching rules.
[0068] like Figure 1 As shown, the user sends an order request to the server based on the car type selected by the user. The server verifies whether the departure and destination are correct based on the order request, and selects the best service provider from the car service providers to dispatch the order.
[0069] After the car service provider successfully accepts the order, it returns a success result to the user through the server, allowing the user to wait for the pick-up; the server puts the remaining service providers into the order dispatch queue, takes out one or more order dispatch tasks from the order dispatch queue, and selects the most suitable supplier for dispatch based on the order dispatch rules and supplier capabilities. The car service provider returns the order dispatch result to the server based on the order dispatch request, and the server returns to the user whether there is a car to pick up the user based on the order dispatch result.
[0070] Combined with Figure 1 The technical solution of the present application is further described. The core solution of the present invention is:
[0071] (1) Demand definition and resource planning: Determine the specific requirements and rules for dispatching orders. For example, dispatching orders based on at least one of order priority, geographic location, supplier capabilities, etc.
[0072] Order priority:
[0073] Urgency: Some orders may need to be prioritized due to their urgent nature, such as medical emergency, express delivery within a limited time, etc. The system can set different priorities according to the urgency of the order to ensure that these orders can be responded to quickly.
[0074] Profit contribution: For orders with higher profit contribution, their priority can be appropriately increased to encourage suppliers to accept orders more actively.
[0075] Customer level: For VIP customers or long-term cooperative customers, higher order priority can be set to provide better customer service.
[0076] Geographical location:
[0077] Order location: The system can select suppliers that are closer to the location of the order to dispatch the order, so as to reduce driving distance and time and improve dispatch efficiency.
[0078] Supplier location: At the same time, the system also needs to consider the location of the supplier to ensure that the order is sent to the supplier who can respond quickly and reach the destination.
[0079] Real-time traffic conditions: During the dispatch process, the system can also combine real-time traffic information to select routes with smoother traffic for dispatching, so as to further shorten the response time.
[0080] Supplier Capabilities:
[0081] Number of vehicles: The system can dispatch orders based on the number of vehicles of suppliers to ensure that orders can be processed in a timely manner. Suppliers with a large number of vehicles can be given priority to dispatch more orders.
[0082] Service quality: Service quality is one of the important indicators for evaluating supplier capabilities. The system can select suppliers with higher service quality for dispatching orders based on the supplier's historical service quality data.
[0083] Response speed: Response speed is also an important factor in evaluating supplier capabilities. The system can monitor the response speed of suppliers in real time and give more order dispatching opportunities to suppliers with faster response speed.
[0084] (2) Design a distributed lock mechanism: Use distributed locks to ensure that only one thread can access shared resources (such as the dispatch queue) at the same time. Middleware such as Redis and Zookeeper can be used to provide distributed lock services.
[0085] (3) Order dispatch process design: When there is a new order dispatch request, the threads in the thread pool will try to acquire the distributed lock. The thread that successfully acquires the lock is responsible for taking one or more order dispatch tasks from the order dispatch queue. Clarify the order dispatch rules:
[0086] Order Priority: Set priorities based on order urgency, profit contribution or customer rank.
[0087] Geographic location: Consider the geographical location relationship between the order and the supplier, such as distance, real-time traffic conditions, etc.
[0088] Other rules: such as first-come, first-served principle, priority for idle vehicles, etc., to ensure fairness and efficiency.
[0089] Assessing supplier capabilities:
[0090] Supplier element capabilities: evaluate the supplier's technical level, management operation level, resource integration capabilities, etc.
[0091] Supplier operational capabilities: Examine the supplier's technical knowledge, management ideas, software applications, information technology and other application capabilities.
[0092] Supplier core competitiveness: Comprehensively evaluate the supplier's overall control capabilities based on factor capabilities and operational capabilities.
[0093] Choose the right supplier:
[0094] Quality: Quality is an important factor in selecting suppliers. Make sure that the supplier can provide high-quality products or services3.
[0095] Price: Although price is a consideration, the supplier with the lowest price is not necessarily the most suitable. Factors such as price, quality, and delivery time need to be considered comprehensively4.
[0096] On-time delivery: Whether delivery can be made on time directly affects the company's production and supply activities, so on-time delivery is also an important indicator.
[0097] Variety flexibility: Product diversification to meet consumer demand needs to be based on supplier variety flexibility3.
[0098] Other factors: such as design capabilities, special process capabilities, overall service levels, project management capabilities, etc. also need to be taken into consideration.
[0099] Combine order dispatching rules and supplier capabilities to dispatch orders:
[0100] Filter out a list of qualified suppliers based on dispatching rules (such as order priority, geographic location, etc.).
[0101] In this list, the most suitable supplier is selected for order dispatch based on the supplier's capability assessment results.
[0102] If the preferred supplier is unable to complete the order, another selection can be made based on the capabilities and rules of the alternative supplier.
[0103] Continuous optimization and adjustment:
[0104] The dispatch system needs to continuously collect and analyze data to understand supplier performance and customer feedback.
[0105] Based on this data, dispatch rules and supplier selection strategies can be adjusted to optimize overall performance and customer satisfaction.
[0106] Update the dispatch status and supplier's work status. Release the distributed lock so that other threads can continue to process the dispatch task.
[0107] (4) Exception handling and retry mechanism: During the dispatch process, you may encounter abnormal situations such as network failure and supplier service unavailability. It is necessary to design exception handling logic, such as retry mechanism and failover, to ensure the reliability and stability of the dispatch task.
[0108] 1. Retry mechanism
[0109] Purpose: During the order dispatching process, if the dispatching fails due to some temporary network problems, system load, etc., the retry mechanism can automatically retry the dispatching to improve the dispatching success rate.
[0110] Implementation:
[0111] Set the number of retries: Set a reasonable number of retries for the dispatch task to avoid wasting resources caused by infinite retries.
[0112] Retry interval: Set an appropriate interval between each retry to reduce continuous impact on system resources and allow temporary problems to recover on their own.
[0113] Retry conditions: Specify what types of errors or exceptions need to trigger the retry mechanism, such as network timeout, system busy, etc.
[0114] Retry log: records detailed information of each retry, including time, reason, result, etc., to facilitate subsequent analysis and troubleshooting.
[0115] 2. Failover
[0116] Purpose: When a supplier or system component fails or cannot process an order request, the failover mechanism can transfer the order task to other available suppliers or system components to ensure that the order task can continue to be processed.
[0117] Implementation:
[0118] Load balancing: Use a load balancer to distribute order requests to multiple suppliers or system components. When a supplier or component fails, the load balancer can automatically transfer the request to other normal suppliers or components.
[0119] Backup suppliers: Prepare multiple backup suppliers for each dispatch task. When the preferred supplier cannot handle the request, it can automatically switch to the backup supplier.
[0120] Service degradation: During peak hours or when the system is under great pressure, the service quality of some non-critical functions is reduced to ensure the normal processing of dispatch tasks. For example, some minor data verification functions can be temporarily disabled or the frequency of data updates can be reduced.
[0121] Fault monitoring and alarm: Monitor the status of suppliers and system components in real time, issue alarms and trigger failover mechanisms when faults occur.
[0122] 3. Comprehensive application
[0123] In practical applications, the retry mechanism and the failover mechanism can be used together to improve the reliability and stability of dispatch tasks. For example:
[0124] When the dispatch task fails, the retry mechanism is triggered first to retry.
[0125] If the order cannot be dispatched successfully within the set number of retries, the failover mechanism is triggered to transfer the task to other suppliers or system components.
[0126] During the entire process, detailed information about each retry and failover is recorded in logs to facilitate subsequent analysis and troubleshooting.
[0127] (5) Monitoring and tuning: Real-time monitoring of the operation status and performance indicators of the dispatch system, such as dispatch success rate, response time, etc. Perform system tuning based on monitoring data, such as adjusting the thread pool size, optimizing dispatch rules, etc.
[0128] (6) Security and fault tolerance: Ensure that the implementation of distributed locks is sufficiently secure to prevent problems such as deadlock and lock contention. Design fault-tolerant mechanisms, such as backup suppliers and disaster recovery, to deal with abnormal situations such as supplier service failures.
[0129] (7) Scalability and maintainability: Consider the scalability of the system, such as supporting more suppliers, higher concurrency, etc. Design a system architecture that is easy to maintain and expand, such as adopting a microservice architecture and modular design.
[0130] It should be understood that although this specification is described according to implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions of each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A method for dispatching orders to multiple suppliers of vehicles, characterized in that: include: Determine the specific requirements and rules for dispatching orders; Plan supplier resources to ensure that each supplier can handle corresponding dispatch requests; When there is a new dispatch request, the threads in the thread pool will try to acquire the distributed lock; the distributed lock is used to ensure that only one thread accesses the shared resource at the same time; The thread that successfully acquires the lock is responsible for taking one or more dispatch tasks from the dispatch queue; Select the most suitable supplier for dispatching orders based on dispatching rules and supplier capabilities; Update the dispatch status and supplier's work status; Release the distributed lock so that other threads can continue to process the dispatch task; When an abnormal situation occurs during the order dispatching process, the exception handling and retry mechanism is triggered.
2. The method for dispatching orders to multiple suppliers of vehicles according to claim 1, characterized in that: The method further includes: A distributed lock fault tolerance mechanism is set up; the distributed lock fault tolerance mechanism includes backup suppliers and disaster recovery.
3. The method for dispatching orders to multiple suppliers of vehicles according to claim 2, characterized in that: The distributed lock is implemented through Redis and Zookeeper.
4. The method for dispatching orders to multiple suppliers of vehicles according to claim 1, characterized in that: The exception handling and retry mechanism includes a retry mechanism and a failover mechanism.
5. The method for dispatching orders to multiple suppliers of vehicles according to claim 1, characterized in that: The method further includes: Real-time monitoring of the operation status and performance indicators of the dispatch system; the performance indicators include dispatch success rate and response time; and Perform system tuning according to the operating status and performance indicators; the system tuning includes adjusting the thread pool size and optimizing the dispatching rules.
6. A vehicle dispatching system for multiple suppliers, characterized in that: include: The dispatch rule determination module is used to determine the specific requirements and rules for dispatching orders; Resource planning module, used to plan supplier resources to ensure that each supplier can handle the corresponding dispatch request; The dispatch module is used to: when there is a new dispatch request, the threads in the thread pool will try to obtain the distributed lock; the distributed lock is used to ensure that only one thread accesses the shared resource at the same time; the thread that successfully obtains the lock is responsible for taking one or more dispatch tasks from the dispatch queue; Select the most suitable supplier for dispatching orders based on dispatching rules and supplier capabilities; Status update module, used to update the order status and supplier's work status; The release module is used to release the distributed lock so that other threads can continue to process the dispatch task; The exception handling module is used to trigger the exception handling and retry mechanism when an abnormal situation occurs during the order dispatching process.
7. The vehicle multi-supplier dispatching system according to claim 6 is characterized in that: The system also includes: The fault-tolerant module is used to set a distributed lock fault-tolerant mechanism; the distributed lock fault-tolerant mechanism includes backup suppliers and disaster recovery.
8. The vehicle multi-supplier dispatching system according to claim 7 is characterized in that: The distributed lock is implemented through Redis and Zookeeper.
9. The method for dispatching orders to multiple suppliers of vehicles according to claim 6, characterized in that: The exception handling and retry mechanism includes a retry mechanism and a failover mechanism.
10. The method for dispatching orders to multiple suppliers of vehicles according to claim 6, characterized in that: The system also includes A monitoring module is used to monitor the operation status and performance indicators of the dispatching system in real time; the performance indicators include dispatching success rate and response time; as well as The optimization module performs system tuning according to the operating status and performance indicators; the system tuning includes adjusting the thread pool size and optimizing the dispatching rules.
