Method for calculating supply-demand difference

By using cache in the server to quickly calculate the poor supply and demand, the problem of shortage and delay in capacity caused by low computing power in the existing technology is solved, and more accurate regional selection and faster order acceptance are achieved, which improves driver revenue and operational efficiency.

CN120146908APending Publication Date: 2025-06-13BEIJING BAIJU YIXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510216645.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing low computing power with poor supply and demand caused the capacity company's operators to view the areas with shortage of capacity in the background, which in turn caused the offline scheduling to be delayed.

Method used

By using cache (Cache) in the server, the orders are distributed to tenant X, tenant Y and tenant Z by channel A, channel B and channel C. After the order is cached, multi-dimensional calculation is performed through the calculation engine, and the results are finally stored in the database.

Benefits of technology

It realizes rapid calculation of supply and demand differences, helping drivers find areas with more orders more accurately, thereby receiving orders faster, increasing driver income, and providing accurate thermal data and supply and demand differences for drivers to refer to.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146908A_ABST
    Figure CN120146908A_ABST
Patent Text Reader

Abstract

The invention provides a method for calculating supply and demand difference, which comprises the following steps: S1, a passenger places an order through a channel A, a channel B and a channel C, and the channel A, the channel B and the channel C distribute the order to a tenant X, a tenant Y and a tenant Z; s2, the tenant X, the tenant Y and the tenant Z will cache the order into the Cache; s3, querying in the Cache according to orders which can be received by the driver, so that the driver can check the orders conveniently; s4, performing multi-dimensional calculation on the order in the Cache through a calculation engine; s5, storing a calculation result into the DB; according to the method and the system, the supply and demand difference is quickly calculated by using the server cache, so that a driver can more accurately go to an area with more orders to quickly receive orders, the income of the driver is provided, and accurate thermal data and supply and demand difference data are provided for reference of the driver.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and particularly relates to a method for calculating the supply-demand difference. Background Art

[0002] In the field of online car-hailing, in order to increase drivers' income and enable passengers to hail a car better and faster, for some areas where the order volume for dispatching is relatively high and the transportation capacity is relatively scarce, some willing drivers can go to areas with a higher supply-demand difference to take orders and increase their income. However, the existing computing power for calculating the supply-demand difference is low, resulting in a delay for the operation staff of the transportation capacity company to view the areas with a shortage of transportation capacity in the background, and thus causing a delay in offline dispatching. Therefore, a method for calculating the supply-demand difference is proposed. Summary of the Invention

[0003] In view of this, embodiments of the present invention hope to provide a method for calculating the supply-demand difference to solve or alleviate the technical problems existing in the prior art, and at least provide a beneficial option.

[0004] The technical solution of the embodiments of the present invention is implemented as follows: A method for calculating the supply-demand difference includes the following steps:

[0005] S1. Passengers place orders through channels A, B, and C, and channels A, B, and C distribute the orders to tenants X, Y, and Z respectively;

[0006] S2. Tenants X, Y, and Z cache the orders in the Cache;

[0007] S3. Query the Cache according to the orders that the driver can accept, which is convenient for the driver to view;

[0008] S4. Thereafter, the orders in the Cache are calculated in multiple dimensions through a computing engine;

[0009] S5. Store the calculation results in the DB.

[0010] In some embodiments, in S1, channels A, B, and C respectively correspond to the platforms used by passengers to place orders, and the platforms include Meituan, Amap, and Tongcheng Travel.

[0011] In some embodiments, in S3, the orders that can be accepted are distinguished according to different vehicle types, and the prices of different types of orders are different, and the services enjoyed are also different.

[0012] In some embodiments, in S2, the Cache stores a single tenant + city + order in a memory cache.

[0013] In some embodiments, in S2, the Cache format is channel + tenant + city.

[0014] In some embodiments, in step S4, the computing engine calculates the remaining unaccepted orders based on the input orders, the accepted orders, and the calculation rules. Finally, through filtering and aggregation based on the orders that the driver can accept and the regional grid of the map, the supply-demand difference is obtained and rendered on the map page of the app. Different colors are used for rendering according to the size of the supply-demand difference, and the areas with larger values are darker in color.

[0015] In some embodiments, the calculation rule of the computing engine is that the total quantity of a single order type, channel, tenant, and latitude order placement location within each grid - the number of accepted orders for a single order type, channel, tenant, and latitude = the number of unmatched orders.

[0016] In some embodiments, in step S5, DB is a database used to store the supply-demand differences calculated for different regions and different latitudes.

[0017] Due to the adoption of the above technical solutions in the embodiments of the present invention, it has the following advantages:

[0018] The present invention uses the server cache to quickly calculate the supply-demand difference, so as to enable the driver to more accurately go to the areas with more orders to receive orders faster, increase the driver's income, and provide accurate heat data and supply-demand difference data for the driver to refer to.

[0019] The above summary is only for the purpose of the specification and is not intended to be limiting in any way. In addition to the above-described illustrative aspects, embodiments, and features, further aspects, embodiments, and features of the present invention will be readily apparent by reference to the drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0021] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] In the following, only some exemplary embodiments are simply described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present invention. Therefore, the drawings and the description are considered to be exemplary in nature rather than restrictive.

[0023] It should be noted that terms such as "first", "second", "symmetric", "array", etc. are only used for the purpose of distinguishing descriptions and position descriptions, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, those limited by features such as "first", "symmetric", etc. may explicitly or implicitly include one or more such features; similarly, when there is no numerical limitation on certain features in the form of words such as "two", "three", etc., it should be noted that such features also explicitly or implicitly include one or more feature quantities;

[0024] In the present invention, unless otherwise clearly specified and limited, terms such as "installed", "connected", "fixed", etc. should be understood in a broad sense; for example, it may be a fixed connection, a detachable connection, or integrally formed; it may be a mechanical connection, a direct connection, a welding connection, or an indirect connection through an intermediate medium, and may be the communication inside two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the accompanying drawings in combination with specific circumstances.

[0025] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0026] As Figure 1 shown, the embodiments of the present invention provide a method for calculating the supply-demand difference, including the following steps:

[0027] S1. Passengers place orders through channels A, B, and C, and channels A, B, and C all distribute the orders to tenants X, Y, and Z;

[0028] S2. Tenants X, Y, and Z cache the orders in the Cache;

[0029] S3. Query according to the orders that the driver can receive in the Cache for the driver to view;

[0030] S4. Thereafter, the orders in the Cache are calculated in multiple dimensions through a computing engine;

[0031] S5. Store the calculation results in the DB.

[0032] In this embodiment, specifically, in S1, channels A, B, and C correspond to the platforms used by passengers to place orders, and the platforms include Meituan, Amap, and Tongcheng Travel.

[0033] In this embodiment, specifically, after these platforms are docked with the system, the tenant X, tenant Y, and tenant Z who have moved in are also docked with these platforms. Then, when the same passenger places orders with tenant X, tenant Z, or tenant Y on these platforms simultaneously, the orders will all be transferred to the system, and dispatching will be carried out for the drivers of tenant X, tenant Y, and tenant Z.

[0034] In this embodiment, specifically, in S3, the orders that can be received are differentiated according to different vehicle models, and the prices of different types of orders are different, and the services enjoyed are also different.

[0035] In this embodiment, specifically, different types of orders are divided into economy orders, premium orders, business orders, luxury orders, etc. Economy orders are mainly small sedans, with a price of around more than 100,000.

[0036] The vehicle models corresponding to premium orders have a certain level of comfort, such as mid-sized sedans, and so on. Moving up in sequence, there are also business orders and luxury orders.

[0037] In this embodiment, specifically, in S2, Cache stores a single tenant + city + order in a single in-memory cache.

[0038] In this embodiment, specifically, in S2, the Cache format is channel + tenant + city.

[0039] In this embodiment, specifically, in S4, the computing engine calculates the remaining unaccepted orders based on the input orders, the accepted orders, and the calculation rules. Finally, through filtering and aggregation based on the orders that the driver can accept and the regional grid of the map, the supply-demand difference is obtained, which is rendered on the map page of the app, and different colors are rendered according to the size of the supply-demand difference. The larger the value, the darker the color of the area.

[0040] In this embodiment, specifically, the calculation rule of the computing engine is the total quantity of a single order type, channel, tenant, and latitude of the order placement location within each grid - the number of accepted orders of a single order type, channel, tenant, and latitude = the number of unmatched orders.

[0041] In this embodiment, specifically, in S5, DB is a database, which is the place for storing the supply-demand differences calculated for different regions and different latitudes.

[0042] In this embodiment, specifically, the driver views the supply-demand difference based on the channels that the driver can accept, the tenants that the driver can accept, and the order type for in-memory statistical calculations. At the same time, the total number of drivers who can accept orders in this area can be displayed.

[0043] In this embodiment, specifically, order placement heat - the number of orders placed by passengers in a certain area within a certain period of time.

[0044] Supply-demand difference - The total number of passenger orders that have not been accepted in a certain area within a period of time.

[0045] Transport capacity - Online car-hailing drivers.

[0046] Regional grid - The earth is divided into regular hexagons, and one hexagon is a unit.

[0047] Multi-channel - Multiple order placement channels.

[0048] Tenant - The online car-hailing company that checks in.

[0049] In this embodiment, specifically, the concept of a channel is different aggregation platforms.

[0050] Passengers can place orders through different aggregation platforms (e.g., AutoNavi, Meituan, Tongcheng, etc.).

[0051] There will be multiple tenants under the aggregation platform. Similar to how you can see multiple transport capacity companies under AutoNavi's car-hailing service.

[0052] Tenants X, Y, and Z are connected to multiple channels A, B, and C.

[0053] If a driver's car is rated as only being able to accept economy-class orders, then the driver can see the total number of economy-class orders placed by tenants X, Y, and Z through channels A, B, and C, and this total is calculated by the calculation engine.

[0054] In this embodiment, specifically, in computer science and information technology, "Cache" is a fast-access data storage layer that stores copies of recently or frequently used data for quick retrieval. The main purpose of caching is to improve data access speed, reduce access to the original data source (such as a database or disk), and thus improve the overall performance of the system. The following are some key points of caching:

[0055] The working principle of caching

[0056] 1. Store commonly used data: The cache stores frequently accessed data or calculation results.

[0057] 2. Fast access: Since the cache is in memory, the access speed of data is much faster than retrieving from disk or network.

[0058] 3. Data synchronization: The data in the cache needs to be synchronized with the original data source regularly to maintain data consistency.

[0059] The types of caches

[0060] 1. CPU cache: A small but very fast storage located between the CPU and main memory, used to reduce the time for the processor to access the main memory.

[0061] 2. Disk cache: Between the hard disk and system memory, used to cache disk I / O operations.

[0062] 3. Network cache: In network requests, caches frequently used data to reduce network latency.

[0063] 4. Application cache: Inside the application, caches objects or data to reduce the number of database accesses.

[0064] Advantages of caching

[0065] 1. Improve performance: Reduce data retrieval time and improve the application response speed.

[0066] 2. Reduce load: Reduce access to the backend system (such as the database) and lower the system load.

[0067] 3. Save bandwidth: In network caches, reduce the transmission of duplicate data.

[0068] Challenges of caching

[0069] 1. Data consistency: Ensure that the data in the cache is consistent with the original data source.

[0070] 2. Cache invalidation: When the data is updated, the corresponding cache data needs to be invalidated or updated.

[0071] 3. Cache size limit: The cache capacity is limited, and a strategy is needed to decide which data should be cached.

[0072] Caching strategies

[0073] 1. Least Recently Used (LRU): Remove the least recently used data.

[0074] 2. First In First Out (FIFO): Remove the data that entered the cache earliest.

[0075] 3. Write-through / Write-back: Write the data directly to the backend storage and update the cache.

[0076] 4. Write-back: Write the data to the cache first and then asynchronously write it to the backend storage.

[0077] Application scenarios of caching

[0078] - Web caching: Browser caching and CDN (Content Delivery Network) caching.

[0079] - Database caching: Such as the query cache of MySQL.

[0080] - Application layer caching: Such as Redis, Memcached, etc.

[0081] Caching is an important component in the design of modern computer systems. It optimizes performance and resource utilization by storing frequently accessed data. Implementing and using caching correctly can significantly improve the efficiency of applications and the user experience.

[0082] In this embodiment, specifically, in the information technology and software industries, the term "tenant" usually refers to an independent user or organization using a service or application with a multi-tenant architecture. The following are some detailed explanations of the tenant concept:

[0083] Definition

[0084] - Tenant: In a multi-tenant environment, a tenant refers to a separate entity using a service or application. It can be a company, team, individual user, or other organization. The data and configurations of each tenant are isolated, meaning that the data and settings of one tenant do not affect other tenants.

[0085] Multi-tenant architecture

[0086] - Multi-Tenancy Architecture: This is a software architecture that allows multiple tenants to share the same instance of an application or database while keeping their data isolated. This architecture can improve resource utilization, reduce costs, and simplify management.

[0087] Features

[0088] - Data isolation: The data of each tenant is independent, ensuring data security and privacy.

[0089] - Customizable configuration: Tenants can usually customize the configuration and appearance of the application according to their own needs.

[0090] - Resource sharing: In a multi-tenant environment, the underlying infrastructure, applications, and databases are shared, but the usage experience of each tenant is independent.

[0091] - Scalability: Multi-tenant architectures are usually designed to be scalable to facilitate adding new tenants or expanding the resources of existing tenants.

[0092] Application scenarios

[0093] - Software as a Service (SaaS): SaaS providers usually use a multi-tenant architecture to provide software services to multiple customers.

[0094] - Platform as a Service (PaaS): PaaS providers may offer a multi-tenant environment where developers can build and deploy applications.

[0095] - Infrastructure as a Service (IaaS): Although IaaS focuses more on providing infrastructure resources, it can also enable a multi-tenant environment.

[0096] Management and Challenges

[0097] - Tenant management: Administrators need to be able to manage multiple tenants, including creating new tenants, configuring tenant settings, monitoring tenant usage, etc.

[0098] - Performance isolation: It is necessary to ensure that the activities of one tenant do not affect the performance of other tenants.

[0099] - Security: Protecting tenant data from unauthorized access is an important consideration.

[0100] In a multi-tenant environment, the concept of a tenant is core, which determines how to design, deploy, and manage software services to meet the needs of different users or organizations.

[0101] In this embodiment, specifically, DB usually refers to "Database", which is a system that organizes, stores, and manages data according to a data structure. The following are some basic concepts and characteristics of the database:

[0102] Definition of Database

[0103] - Database: A collection of data that is stored in a computer system for a long time, and this data can be organized, queried, updated, and managed.

[0104] Types of Databases

[0105] - Relational databases: Such as MySQL, PostgreSQL, Oracle, SQL Server, etc., which use SQL (Structured Query Language) for data operations.

[0106] - Non-relational databases (NoSQL): Such as MongoDB, Cassandra, Redis, Neo4j, etc., which provide data storage and retrieval mechanisms different from traditional relational databases.

[0107] - Object databases: Store objects and complex data types.

[0108] - Document databases: Store data in document form, such as JSON or XML format.

[0109] - Key-value stores: Simple key-value pair storage systems.

[0110] - Column-store databases: Such as HBase, Cassandra, suitable for distributed storage of large-scale data sets.

[0111] - Graph Database: Used to store data of network structures, such as social networks.

[0112] Features of the Database

[0113] - Data Persistence: The database can store data for a long time, and the data will not be lost even after the system is shut down.

[0114] - Data Sharing: Multiple users or applications can access the data in the database simultaneously.

[0115] - Data Integrity: The database management system (DBMS) provides mechanisms to ensure the accuracy and consistency of data.

[0116] - Data Security: Permissions and roles can be set to control access to the database.

[0117] - Data Backup and Recovery: The database usually supports regular data backup and recovery to prevent data loss.

[0118] Database Management System (DBMS)

[0119] - Database Management System: A software system used to manage the creation, maintenance, query, and update of databases.

[0120] - Functions: Provide functions such as data definition, data operation, data query, data security, data backup, and recovery.

[0121] Usage of the Database

[0122] - Personal Applications: Such as personal financial management, contact lists, etc.

[0123] - Enterprise Applications: Such as customer relationship management (CRM), enterprise resource planning (ERP), e-commerce, etc.

[0124] - Science and Engineering: Store experimental data, simulation results, etc.

[0125] - Internet Applications: Such as social media, online games, search engines, etc.

[0126] The database is one of the infrastructures of modern information technology and is crucial for storing, managing, and analyzing data.

[0127] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claimed rights.

Claims

1. A method for calculating the difference between supply and demand, characterized in that: The following steps are involved: S1. Passengers place orders through channels A, B and C, and channels A, B and C distribute the orders to tenants X, Y and Z; S2, Tenant X, Tenant Y, and Tenant Z will cache the orders in Cache; S3. Search the cache based on the orders that the driver can accept, so that the driver can check them easily. S4, then the orders in the cache are calculated in multiple dimensions through the calculation engine; S5. Store the calculated results in DB.

2. The method for calculating the supply-demand gap according to claim 1, characterized in that: In S1, channels A, B and C correspond to platforms used by passengers to place orders, including Meituan, Amap and Tongcheng Travel.

3. The method for calculating the supply-demand gap according to claim 1, characterized in that: In S3, the orders that can be accepted are divided according to different types of vehicles, and the prices of different types of orders are different, and the services enjoyed are different.

4. The method for calculating the supply-demand gap according to claim 1, characterized in that: In the S2, Cache stores a single tenant+city+order in one memory cache.

5. The method for calculating the supply-demand gap according to claim 1, characterized in that: In the S2, the cache format is channel+tenant+city.

6. The method for calculating the supply-demand gap according to claim 1, characterized in that: In S4, the calculation engine calculates the remaining amount of unaccepted orders based on the input orders, accepted orders and calculation rules, and finally obtains the supply-demand gap through filtering and aggregation based on the orders that the driver can accept and the regional grid of the map, and renders it on the map page of the app. Different colors are rendered according to the size of the supply-demand gap, and the larger the value, the darker the color of the area.

7. The method for calculating the supply-demand gap according to claim 6, characterized in that: The calculation rule of the calculation engine is the sum of the order locations of a single order type, channel, tenant and latitude in each grid - the number of orders that have been received under a single order type, channel, tenant and latitude = the number of unmatched orders.

8. The method for calculating the supply-demand gap according to claim 1, characterized in that: In the S5, DB is a database, which is used to store the supply and demand differences calculated at different regions and latitudes.