CN113127592B - Distributed storage system - Google Patents

Distributed storage system Download PDF

Info

Publication number
CN113127592B
CN113127592B CN202110424501.2A CN202110424501A CN113127592B CN 113127592 B CN113127592 B CN 113127592B CN 202110424501 A CN202110424501 A CN 202110424501A CN 113127592 B CN113127592 B CN 113127592B
Authority
CN
China
Prior art keywords
vehicle
data server
server
data
memory
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.)
Active
Application number
CN202110424501.2A
Other languages
Chinese (zh)
Other versions
CN113127592A (en
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.)
Nanjing Leading Technology Co Ltd
Original Assignee
Nanjing Leading 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 Nanjing Leading Technology Co Ltd filed Critical Nanjing Leading Technology Co Ltd
Priority to CN202110424501.2A priority Critical patent/CN113127592B/en
Publication of CN113127592A publication Critical patent/CN113127592A/en
Application granted granted Critical
Publication of CN113127592B publication Critical patent/CN113127592B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Remote Sensing (AREA)
  • Computing Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a distributed storage system. The problems that the updating pressure of the vehicle in the database is large and the query pressure in the database is large are solved. The distributed storage system provided by the embodiment of the application comprises at least one management server and a plurality of data servers; the management server is used for distributing a data server for the vehicle based on the geographic range of the vehicle; the data server is used for acquiring vehicle information sent by the vehicle and storing the vehicle information in the memory; when the data in the memory is emptied, the received vehicle information of the vehicle is stored in the memory; the system is also used for responding to the taxi calling request and acquiring the starting position of the travel from the taxi calling request; based on the travel starting point position and the vehicle information of each vehicle stored in the memory, candidate vehicles for responding to the vehicle-calling request are screened out.

Description

Distributed storage system
Technical Field
The application relates to the technical field of big data processing, in particular to a distributed storage system.
Background
With the increasing number of vehicles, the performance requirements of the database when a user takes a car are higher and higher, and the requirements are mainly embodied in two aspects: firstly, in order to update the position of the vehicle in real time, the updating pressure is very large; secondly, in order to obtain vehicles in a certain range and provide the demand of dispatching orders, the pressure of inquiring the database in the peak period is also huge. This problem becomes more apparent as the number of operating vehicles increases.
Disclosure of Invention
The application aims to provide a distributed storage system for solving the problems that a vehicle is under high updating pressure in a database and under high query pressure in the database.
In a first aspect, an embodiment of the present application provides a distributed storage system, where the system includes: at least one management server and a plurality of data servers, wherein:
the management server is used for distributing a data server for the vehicle based on the geographic range of the vehicle;
the data server is used for acquiring vehicle information sent by the vehicle and storing the vehicle information in a memory; when the server is restarted or the memory is full, and the data in the memory is emptied, storing the received vehicle information of the vehicle in the memory;
the data server is also used for responding to a taxi calling request and acquiring a travel starting point position from the taxi calling request; and screening out candidate vehicles for responding to the taxi calling request based on the travel starting point position and the vehicle information of each vehicle stored in the memory.
In one embodiment, a disk of the management server stores a registry, and the registry records update time of a heartbeat packet of the data server;
the management server is further configured to:
receiving a heartbeat packet of the data server, and recording the updating time of the heartbeat packet in the registry;
and if the heartbeat packet of the data server is not updated after the preset time, deleting the information of the data server from the registry.
In one embodiment, the registry further records metadata of the data server;
the management server is further configured to send the metadata of the data server to the vehicle, so that the vehicle establishes a long connection with the data server based on the metadata.
In one embodiment, the allocating a data server to the vehicle based on the geographic area of the vehicle is performed, and the management server is specifically configured to:
distributing a data server for the vehicle based on the corresponding relation between the geographic range and the data server stored in the routing table;
the registry also comprises the memory use condition of the data server;
the management server is further configured to: if a newly increased geographic range is obtained, searching the data server with the most residual memory from the registry and allocating the data server to the newly increased geographic range; and the number of the first and second electrodes,
and adding the corresponding relation between the newly added geographic range and the corresponding data server in the routing table.
In one embodiment, the management server is further configured to:
and if a data server is newly added, adding the updating time of the heartbeat packet corresponding to the newly added data server and the metadata corresponding to the newly added data server in the registry.
In one embodiment, the system further includes a backup management server, where the backup management server is configured to synchronize data in the management server and take over a service of the management server when the management server is offline.
In one embodiment, the system further includes a backup data server of the data server, and the backup data server is configured to synchronize data in the data server and take over a service of the data server when the data server is offline.
In one embodiment, the vehicle information includes any one or a combination of the following information: the system comprises a unique identification of the vehicle, license plate numbers, real-time positions, order states, cities, running speeds and vehicle grades, wherein the unique identification of the vehicle corresponds to vehicle index values one to one.
In one embodiment, the taxi calling request includes any one or a combination of the following information: the travel starting point position, the travel end point position, the city and the vehicle grade.
In one embodiment, when screening out the candidate vehicle for responding to the taxi calling request based on the starting position of the journey and the vehicle information of each vehicle stored in the memory is executed, the data server is specifically configured to:
determining the number of vehicles in the preset range of the travel starting point and the unique identification of each vehicle;
establishing a red-black tree by taking the travel starting point position as a current node and taking vehicles within a preset range of the travel starting point position as child nodes; the red and black tree stores the corresponding relation between the unique vehicle identification and the vehicle index value;
and screening out the vehicles matched with the vehicle calling request from the red and black trees as the candidate vehicles.
The application provides a distributed storage system, which comprises at least one management server and a plurality of data servers, wherein the management server is used for distributing the data servers for vehicles based on the geographic range of the vehicles; with the increase of cities, data servers are distributed according to the cities, so that the management is convenient; the cost is greatly reduced by using less machines; the data server is used for acquiring vehicle information sent by the vehicle and storing the vehicle information in the memory; when the data in the memory is emptied, the received vehicle information of the vehicle is stored in the memory, no requirement is made on a magnetic disk, and high-performance read-write operation is realized; the data server provided by the application is also used for responding to the car-calling request and acquiring the starting position of the travel from the car-calling request; based on the travel starting point position and the vehicle information of each vehicle stored in the memory, candidate vehicles for responding to the vehicle-calling request are screened out. According to the timeliness characteristic of the vehicle position, the vehicle position is stored in real time, namely, the vehicle calling request in the peak period is met, and meanwhile, the cost is effectively reduced.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic application scenario diagram of a distributed storage system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a distributed storage system according to an embodiment of the present application;
FIG. 3 is a block diagram of an overall framework of a distributed storage system according to an embodiment of the present disclosure;
fig. 4 is a schematic view of an electronic device corresponding to the distributed storage system according to the embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
It is noted that the terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
For ease of understanding, some terms in this application are explained for the first time below:
grabbing: when a passenger gets off a taxi, the system needs to acquire empty taxi information in a certain range near the passenger according to the current position of the passenger, and a taxi dispatching process is provided.
The inventor researches and discovers that as vehicles increase day by day, the performance requirement of a database is higher and higher when a user takes a taxi, and the performance requirement is mainly represented in two aspects: firstly, in order to update the position of the vehicle in real time, the updating pressure is very large; secondly, in order to obtain vehicles in a certain range and provide the demand of dispatching orders, the pressure of inquiring the database in the peak period is also huge. This problem becomes more apparent as the number of operating vehicles increases.
Currently, in the related art, the solutions to the above problems are mainly a disk-based storage medium, such as geospatial index (H3) algorithm plus associated database management system (MySQL), distributed file storage database (MongoDB), and a memory-based storage medium, which is obtained by geospatial index (GeoHash) algorithm plus Remote Dictionary service (Remote Dictionary Server, Redis).
The inventor researches and discovers that the following problems mainly exist by adopting the method:
1. disk-based storage performance is very low
The position information reported by the vehicle can be stored in the disk, the refreshing speed of the data in the disk is very slow, and the main operation reported by the vehicle is to modify the position and correspond to the disk, namely, to write randomly, so that the efficiency is very low, and the vehicle cannot cope with high-concurrency and high-throughput scenes.
2. Complicated customized vehicle grabbing requirement cannot be met based on GeoHash
The memory-based Redis self-contained GeoHash algorithm can meet the requirement of inquiring vehicles within a certain range, but the vehicle grabbing service is complex, the requirement on range precision is high, and the Redis self-contained GeoHash algorithm cannot meet the complex service requirement.
3. High cost
The problem of high concurrency can be partially relieved by dispersing pressure based on MongoDB sub-base sub-tables, however, MongoDB is expensive and high in implementation cost, the cost is higher and higher along with the continuous increase of vehicles, and a scheme for stably expanding the capacity is complex.
In view of the above, the present application provides a distributed storage system to solve the above problems. The inventive concept of the present application can be summarized as follows: providing a distributed storage system comprising at least one management server, and a plurality of data servers; the management server is used for distributing a data server for the vehicle based on the city where the vehicle is located; the data server is used for acquiring vehicle information sent by the vehicle and storing the vehicle information in the memory; after the data server is restarted, continuously storing the received vehicle information of the vehicle into the memory; and the data server responds to the vehicle calling request according to the vehicle information stored in the memory, and screens out a proper vehicle for the vehicle calling request so as to facilitate subsequent order dispatching operation.
Fig. 1 is a diagram illustrating an application scenario of the distributed storage system in the embodiment of the present application. The figure includes: a data server 10, a management server 20, a terminal device 30_1 … … 30_ N, a network 40;
wherein, the servers are divided into a data server 10 and a management server 20 according to different functions of the servers; a user initiates a taxi calling request on the terminal device 30_1, the taxi calling request is acquired by the data server 10 through the network 40, and the data server 10 acquires a starting position of a travel from the taxi calling request; based on the trip start position and the vehicle information of each vehicle, candidate vehicles for responding to the vehicle-calling request are screened out.
The management server and the data server are only detailed in the description of the present application with respect to a single server or terminal device, respectively, but it will be understood by those skilled in the art that the terminal device 30, the data server 10 and the management server 20 are shown to be intended to represent the operations of the terminal device, the data server and the management server related to the technical aspects of the present disclosure. The detailed description of a single server is at least for convenience of description and does not imply a limitation on the number, type, or location of terminal devices and servers. It should be noted that the underlying concepts of the example embodiments of the present application may not be altered if additional modules are added or removed from the illustrated environments. In addition, although fig. 1 shows a bidirectional arrow from the data server 10 to the management server 20 for convenience of explanation, those skilled in the art will understand that the above-described data transmission and reception also need to be implemented through the network 40.
It should be noted that, in the embodiment of the present application, the storage manner for the management server may be a cache system, or may also be hard disk storage, memory storage, or the like; for the data server, the storage mode is memory storage. In addition, the distributed storage system provided by the application is not only suitable for the application scenario shown in fig. 1, but also suitable for any device with distributed storage requirements.
For the sake of understanding, the distributed storage system provided in the present application is described in detail below with reference to the accompanying drawings.
As shown in fig. 2, a structure diagram of a distributed storage system provided in the embodiment of the present application is illustrated in the drawing by 1 management server, where the drawing includes: management server 201, data server 202, wherein:
the management server 201 is used for distributing a data server for the vehicle based on the geographic range of the vehicle;
the data server 202 is used for acquiring vehicle information sent by a vehicle and storing the vehicle information in a memory; when the data in the memory is emptied, the received vehicle information of the vehicle is stored in the memory;
the data server 202 is further used for responding to the car calling request and acquiring the travel starting point position from the car calling request; based on the travel starting point position and the vehicle information of each vehicle stored in the memory, candidate vehicles for responding to the vehicle-calling request are screened out.
Therefore, the distributed storage system provided by the embodiment of the application has the characteristic of real-time property, so that the vehicle information can be updated and inquired in the memory, even if memory data is lost due to some reasons, data recovery is not needed, only the newly acquired vehicle information needs to be updated to the memory, and the updating and inquiring business of the vehicle information is not influenced, so that the updating and inquiring speed of the vehicle information can be effectively improved based on the memory operation.
In view of the fact that two types of servers are provided in the embodiment of the present application, one type is a management server, the management server is used for managing related services of a data server, and the data server is used for storing vehicle information and providing query services. In the embodiment of the application, the vehicle and the corresponding data server have a corresponding relationship, and the vehicle needs to report the vehicle information to the corresponding data server in real time for storage. The following description is made for the management server and the data server, respectively.
Management server
The management server is used for managing each data server and distributing the data servers for the vehicles. In the embodiment of the application, in order to facilitate management of a plurality of data servers, the data server reports the state of the data server to the management server, so that the management server can know the survival condition, the memory condition and the like of the data server in time. In order to facilitate the implementation of management on a data server, in the embodiment of the present application, a registry and a routing table are maintained in a disk of a management server, where:
1. registration form
As shown in table 1, for the example of the registry provided in the embodiments of the present application,
Figure BDA0003028778010000071
TABLE 1
The registry information provided in the embodiments of the present application is described below with reference to table 1,
the data server can send the heartbeat packet to the management server so that the management server can know the survival condition of the data server. According to the method and the system, the updating time of the heartbeat packet of the data server is recorded in the registry, so that the management server can record the updating time of the heartbeat packet in the registry after receiving the heartbeat packet of the data server; and if the heartbeat packet of the data server is not updated after the preset time, which indicates that the corresponding data server fails, deleting the information of the data server from the registry.
For example, the data server may send its heartbeat packet to the management server every 30 seconds; the management server checks the latest updating time of the data server in the registry every 90 seconds; the data server A and the data server B send own heartbeat packets to the management server within 1 minute and 30 seconds; at the moment, the registration information records that the data server A is updated within 1 minute and 30 seconds, and the data server B is updated within 1 minute and 30 seconds; after 30 seconds, the data server A sends a heartbeat packet to the management server in 2 minutes and 0 second; the data server B does not send a heartbeat packet of the data server B, and at the moment, the data server A is recorded in the registry to be updated within 2 minutes and 0 seconds, and the data server B is recorded to be updated within 1 minute and 30 seconds; at this time, the management server checks that the latest updating time of the data server B in the registry is 1 minute and 30 seconds, and if the heartbeat packet of the data server B is not updated for more than 30 seconds, the management server determines that the data server B is offline or down, and deletes the data server B from the registration information at this time. It should be noted that the above examples are merely for illustration, and the specific time can be configured according to actual requirements.
In the embodiment of the application, in order to save cost and reduce waste of resources, metadata of the data server is also recorded in the registry; the metadata includes Internet Protocol (IP) and port of the data server, that is, the present application directly adopts long connection based on synchronous non-blocking (NIO) in the related art; thus, the management server is also configured to send metadata of the data server to the vehicle to enable the vehicle to establish a long connection with the data server based on the metadata.
With the increase of vehicles and cities, the situation that the memory is insufficient may exist in the current data server, and in the embodiment of the application, the memory can be increased by adopting a method of transverse capacity expansion and space time change; namely, adding a data server; therefore, the management server is further configured to, if a new data server is added, add the update time of the heartbeat packet corresponding to the new data server and the metadata corresponding to the new data server in the registry, so as to manage the new data server.
In the embodiment of the application, the registry further includes the memory use condition of the data server; in order to ensure the utilization rate of each data server and prevent the server from being overloaded and causing downtime, the management server is further used for: if the new geographic range is added, searching the data server with the largest memory surplus from the registry and distributing the data server to the new geographic range; and adding the corresponding relation between the newly-added geographic range and the corresponding data server in the routing table.
2. Routing table
As shown in table 2, for the example of the routing table provided in the embodiment of the present application,
Figure BDA0003028778010000091
TABLE 2
The routing table stores the corresponding relationship between the geographical range and the data server, and the management server allocates the data server to the vehicle based on the corresponding relationship.
In one embodiment, the data servers can be distributed in units of cities, namely one city is distributed with one data server, so that management of the management server is facilitated, and the scope of car grabbing is also reduced.
In the embodiment of the present application, in order to prevent the distributed storage system provided by the present application from being unable to execute the above operations when the management server is offline and down, the distributed storage system provided by the embodiment of the present application further includes a backup management server, where the backup management server is used to synchronize data in the management server, and take over a service of the management server when the management server is offline.
After the management server is introduced, the data server provided in the present application is described in detail below.
Second, data server
1) Disaster recovery processing
In order to prevent the data server from being emptied from the memory when the data server is offline, down or full, and further prevent the distributed storage system provided by the present application from working, the distributed storage system provided by the present application further includes a backup data server of the data server, where the backup data server is used to synchronize the data in the data server and take over the service of the data server when the data server is offline.
2) Related business processing
In the embodiment of the present application, the memory of the data server stores vehicle information, wherein the vehicle information includes, but is not limited to, any one or combination of the following information: the unique identification of the vehicle, the license plate number, the real-time position, the order state, the city, the running speed and the vehicle grade are in one-to-one correspondence with the vehicle index value.
In the embodiment of the present application, the type of the vehicle information may be set according to specific business requirements, and for easy understanding, the following describes the vehicle information:
vehicle unique identification: may specifically represent the identity of a vehicle;
real-time location: the current position of the vehicle is positioned in real time according to the movement of the vehicle;
order status: the current order receiving state of the vehicle can be idle, order receiving and the like;
the city is as follows: the city in which the vehicle is currently located;
vehicle class: the order receiving grade of the vehicle can be divided into priority, special car, carpooling and the like.
The two most important points for meeting the taxi calling request of the user are to update the position of the vehicle in real time and determine the vehicle in a certain range of the position of the user, and after the vehicle position is updated in real time, the vehicle in the certain range of the position of the user is determined to be described in detail below.
Firstly, the user's request for calling the car includes any one or a combination of the following information: the travel starting point position, the travel end point position, the city and the vehicle grade.
When the candidate vehicles for responding to the taxi calling request are screened out based on the starting position of the journey and the vehicle information of each vehicle stored in the memory, the data server is specifically used for:
determining a travel starting point position and vehicle information of a vehicle; determining the number of vehicles in a preset range of a trip starting point and unique identification of the vehicles; establishing a red-black tree in real time by taking the position of the starting point of the journey as a current node and taking the vehicles within a preset range of the starting point of the journey as child nodes; the red and black tree stores the unique vehicle identification and the vehicle index value; determining a vehicle index value corresponding to the unique identifier of the vehicle according to the unique identifier of the vehicle; screening out vehicles which are the same as the information in the vehicle calling request from the red and black trees according to the vehicle index values; the information includes any one or combination of the following: the travel starting point position, the travel end point position, the city where the vehicle is located and the vehicle grade; and taking the vehicle which is the same as the information in the taxi calling request as a candidate vehicle.
In one embodiment, in order to quickly screen out candidate vehicles for responding to the vehicle calling request, a method based on an H3 index and a red-black tree is adopted, namely the red-black tree is established by taking a trip starting point as a current node, and vehicles with the same information as the information in the vehicle calling request are screened out from the red-black tree according to a vehicle index value, namely an H3 index; for example: the travel starting point is a point A, 100 vehicles exist in the preset range of the point A, and a red-black tree is built according to the H3 index of the point A and the H3 index of the 100 vehicles; if there are 10 vehicles among the 100 vehicles which have the same information as the information in the request for calling, the 10 vehicles are screened out from the red and black tree as candidate vehicles.
Third, terminal equipment side
The distributed storage system provided by the embodiment of the application further includes a terminal device, wherein:
the terminal equipment is used for responding to the taxi calling request operation of the user and sending the taxi calling request to the data node server;
the terminal equipment is also used for sending the vehicle information to the data node server;
the vehicle information acquisition module is also used for determining a geographic range according to the vehicle information; determining a data server allocated to the geographical range according to the geographical range; sending a long connection to the data server according to the address and the port of the data server; communicating with the data server according to the long connection.
In the embodiment of the application, after the terminal device establishes the long connection with the data server, when the terminal device communicates with the data server, the terminal device only needs to communicate with the data server connected with the terminal device, and then the backup data server directly backs up information in the data server.
Fourth, example
In order to facilitate a clearer understanding of the distributed storage system provided in the embodiments of the present application, an overall framework of the distributed storage system provided in the present application is described below:
as shown in fig. 3, a vehicle reports its own location information in real time through a terminal device, and a user sends a request for calling the vehicle through the terminal device; the vehicle reports the position information to the data server through long connection according to the corresponding relation between the geographical range in the routing table and the data server; the user sends the taxi calling request to the data server through long connection; the data server establishes a red-black tree with the travel starting point in the vehicle calling request as the current node according to the travel starting point and the stored vehicle information; screening vehicles meeting the vehicle calling request from the red and black trees as candidate vehicles; the data server synchronizes the information to the backup data server in real time; and the management server synchronizes the information to the backup management server in real time.
Having described the distributed storage system of the exemplary embodiments of the present application, those skilled in the art will appreciate that aspects of the present application may be implemented as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible embodiments, the management server and the data server and the terminal device may each be an electronic device according to the present application, and may include at least one processor and at least one memory; when the management server is an electronic device, the storage can be a hard disk storage, a cache system or a memory storage; when the data server is an electronic device, the memory is a memory storage. Wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps in the distributed storage system according to various exemplary embodiments of the present application described above in this specification.
The electronic device 130 according to this embodiment of the present application is described below with reference to fig. 4. The electronic device 130 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, the electronic device 130 is represented in the form of a general electronic device. The components of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131).
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur via input/output (I/O) interfaces 135. Also, the electronic device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAI D systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, the aspects of a distributed storage system provided by the present application may also be implemented in the form of a program product comprising program code for causing a computer device to perform the steps of a distributed storage system according to various exemplary embodiments of the present application described above in this specification, when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for distributed storage of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A distributed storage system, the system comprising: at least one management server and a plurality of data servers, wherein:
the management server is used for distributing a data server for the vehicle based on the geographic range of the vehicle;
the data server is used for acquiring vehicle information sent by the vehicle and storing the vehicle information in a memory; if the data in the memory are emptied, storing the received vehicle information of the vehicle in the memory;
the data server is also used for responding to a taxi calling request and acquiring a travel starting point position from the taxi calling request; and screening out candidate vehicles for responding to the taxi calling request based on the travel starting point position and the vehicle information of each vehicle stored in the memory.
2. The system according to claim 1, wherein a registry is stored in the disk of the management server, and the registry records the update time of the heartbeat packet of the data server;
the management server is further configured to:
receiving a heartbeat packet of the data server, and recording the updating time of the heartbeat packet in the registry;
and if the heartbeat packet of the data server is not updated after the preset time, deleting the information of the data server from the registry.
3. The system according to claim 2, wherein the registry further records metadata of the data server;
the management server is further configured to send the metadata of the data server to the vehicle, so that the vehicle establishes a long connection with the data server based on the metadata.
4. The system according to claim 2, wherein said assigning a data server to the vehicle based on the geographic area in which the vehicle is located is performed, said management server being specifically configured to:
distributing a data server for the vehicle based on the corresponding relation between the geographical range and the data server stored in the routing table;
the registry also comprises the memory use condition of the data server;
the management server is further configured to: if a newly increased geographic range is obtained, searching the data server with the most residual memory from the registry and allocating the data server to the newly increased geographic range; and the number of the first and second electrodes,
and adding the corresponding relation between the newly added geographic range and the corresponding data server in the routing table.
5. The system of any of claims 2-4, wherein the management server is further configured to:
and if a data server is newly added, adding the updating time of the heartbeat packet corresponding to the newly added data server and the metadata corresponding to the newly added data server in the registry.
6. The system of claim 4, further comprising a backup management server for synchronizing data in the management server and taking over traffic of the management server when the management server is offline.
7. The system of claim 1, further comprising a backup data server of the data server, the backup data server being configured to synchronize data in the data server and take over traffic of the data server when the data server is offline.
8. The system of claim 1, wherein the vehicle information comprises any one or a combination of the following: the system comprises a unique identification of the vehicle, license plate numbers, real-time positions, order states, cities, running speeds and vehicle grades, wherein the unique identification of the vehicle corresponds to vehicle index values one to one.
9. The system according to any one of claims 1 to 4 or 6 to 8, wherein the taxi-calling request includes any one or a combination of the following information: the travel starting point position, the travel end point position, the city and the vehicle grade.
10. The system of claim 7, wherein the data server is specifically configured to, when performing the screening out of candidate vehicles for responding to the taxi-calling request based on the travel starting point location and vehicle information of each vehicle stored in the memory:
determining the number of vehicles in the preset range of the travel starting point and the unique identification of each vehicle;
establishing a red-black tree by taking the travel starting point position as a current node and taking vehicles within a preset range of the travel starting point position as child nodes; the red and black tree stores the corresponding relation between the unique vehicle identification and the vehicle index value;
and screening out the vehicles matched with the vehicle calling request from the red and black trees as the candidate vehicles.
CN202110424501.2A 2021-04-20 2021-04-20 Distributed storage system Active CN113127592B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110424501.2A CN113127592B (en) 2021-04-20 2021-04-20 Distributed storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110424501.2A CN113127592B (en) 2021-04-20 2021-04-20 Distributed storage system

Publications (2)

Publication Number Publication Date
CN113127592A CN113127592A (en) 2021-07-16
CN113127592B true CN113127592B (en) 2022-06-21

Family

ID=76777950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110424501.2A Active CN113127592B (en) 2021-04-20 2021-04-20 Distributed storage system

Country Status (1)

Country Link
CN (1) CN113127592B (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107295071A (en) * 2017-06-12 2017-10-24 广东欧珀移动通信有限公司 Shared information of vehicles processing method, device, server, terminal and storage medium
CN110245764A (en) * 2019-05-13 2019-09-17 特斯联(北京)科技有限公司 A kind of about vehicle traveling method based on distributed storage database

Also Published As

Publication number Publication date
CN113127592A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
US10944628B2 (en) Network operation support system and network device management method
CN105897946B (en) A kind of acquisition methods and system of access address
EP3418877A1 (en) Data writing and reading method and apparatus, and cloud storage system
CN111258978B (en) Data storage method
CN105338078B (en) Date storage method and device for storage system
CN106709003A (en) Hadoop-based mass log data processing method
EP2429120A1 (en) Distributed network management system, network element management server, and data configuration management method
CN104486445A (en) Distributed extendable resource monitoring system and method based on cloud platform
CN109677465B (en) Distributed real-time system architecture for rail transit integrated monitoring system
US10956501B2 (en) Network-wide, location-independent object identifiers for high-performance distributed graph databases
CN111885439B (en) Optical network integrated management and duty management system
CN111966289A (en) Partition optimization method and system based on Kafka cluster
CN111694791A (en) Data access method and device in distributed basic framework
US20180052858A1 (en) Methods and procedures for timestamp-based indexing of items in real-time storage
US6804710B1 (en) Configuration information management system, method, program, and program storage device
CN113722276A (en) Log data processing method, system, storage medium and electronic equipment
CN112073212A (en) Parameter configuration method, device, terminal equipment and storage medium
CN111835843A (en) Cloud system based on SDN (software defined network) Internet of vehicles
CN114374701B (en) Transparent sharing device for sample model of multistage linkage artificial intelligent platform
CN113127592B (en) Distributed storage system
CN105307130A (en) Resource allocation method and resource allocation system
CN116846729A (en) Method for managing monitoring alarm notification based on multi-tenant mode under cloud container
CN113247057B (en) Data system based on global present vehicle management system and data processing method thereof
CN109412940A (en) Router administration method and router management system
CN115225645A (en) Service updating method, device, system and storage medium

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
GR01 Patent grant
GR01 Patent grant