CN112286952A - Method, device and system for processing real-time traffic information - Google Patents

Method, device and system for processing real-time traffic information Download PDF

Info

Publication number
CN112286952A
CN112286952A CN202011539389.9A CN202011539389A CN112286952A CN 112286952 A CN112286952 A CN 112286952A CN 202011539389 A CN202011539389 A CN 202011539389A CN 112286952 A CN112286952 A CN 112286952A
Authority
CN
China
Prior art keywords
information
server
tmc
main server
user side
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.)
Granted
Application number
CN202011539389.9A
Other languages
Chinese (zh)
Other versions
CN112286952B (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.)
Zhidao Network Technology Beijing Co Ltd
Original Assignee
Zhidao Network Technology Beijing 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 Zhidao Network Technology Beijing Co Ltd filed Critical Zhidao Network Technology Beijing Co Ltd
Priority to CN202011539389.9A priority Critical patent/CN112286952B/en
Publication of CN112286952A publication Critical patent/CN112286952A/en
Application granted granted Critical
Publication of CN112286952B publication Critical patent/CN112286952B/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/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/242Query formulation
    • G06F16/2433Query languages
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Remote Sensing (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application relates to a method, a device and a system for processing real-time traffic information. The method comprises the following steps: the main server receives information of a user side; when the received information of the user side reaches the preset number, the main server converts the preset number of information into updated TMC information; and the main server sends the updated TMC information to the corresponding auxiliary server, so that the auxiliary server sends the updated TMC information to the user side. According to the method, the received information is converted into the updated TMC information in batch by the main server in a batch mode, so that the main server is prevented from being influenced by the information sent by the user side at any time to frequently start processing the information, the data processing of the main server is more centralized and efficient, and the resource of the main server is prevented from being occupied at any time. Meanwhile, the main server is only responsible for receiving the information of the user side and updating the TMC information, and the auxiliary server shares the task of being responsible for sending the TMC information, so that the workload of each server is reduced, and the system operation efficiency is improved.

Description

Method, device and system for processing real-time traffic information
Technical Field
The present application relates to the field of navigation technologies, and in particular, to a method, an apparatus, and a system for processing real-time traffic information.
Background
Tmc (traffic Message channel) is short for real-time traffic condition information, and can reflect the traffic state of the road in the electronic map area in real time. The TMC information is sent to the electronic map of the terminal to be displayed, so that a traveler can be prompted to avoid a crowded road section, and a driving route can be reasonably planned.
In the related art, a nationwide TMC system is generally handled by a large server. The server receives the corresponding position information and speed of each user side sent in real time, generates TMC data according to the latest position information and the corresponding speed, and finally sends the TMC information to the user side. Because the server needs to receive the information sent by the user end continuously in real time, and the server needs to start processing once when receiving a piece of information, the processing mode enables the server to be in the state of receiving and processing the information all the time, so that the memory system of the server runs continuously with high load, and the running efficiency of the server is influenced.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a method, a device and a system for processing real-time traffic information.
A first aspect of the present application provides a method for processing real-time traffic information, including:
the main server receives information of a user side;
when the received information of the user side reaches a preset number, the main server converts the information of the preset number into updated TMC information;
and the main server sends the updated TMC information to the corresponding auxiliary server, so that the auxiliary server sends the updated TMC information to the user side.
In one embodiment, the receiving, by the main server, information of the user side includes:
the main server receives the position information and the speed corresponding to each user side;
and storing the position information and the speed corresponding to the user side in a temporary cache area of the main server.
In one embodiment, the converting, by the master server, the information of the preset number into the updated TMC information each time the received information of the user side reaches the preset number includes:
converting the preset amount of information into SQL statements;
and updating the map road data prestored on the main server by adopting the SQL sentence to obtain updated TMC information.
In one embodiment, the updating the map road data pre-stored in the main server by using the SQL statement to obtain updated TMC information includes:
storing the map road data in a main Redis database;
and executing the SQL statement in the main Redis database, updating the map road data and obtaining updated TMC information.
In one embodiment, the map road data is stored according to preset elements; the preset elements comprise tile numbers, road numbers of all roads, corresponding TMC numbers, traveling directions of the roads, position information of the roads, corresponding TMC frame areas, road condition identifications and latest refreshing time of the road condition identifications.
In one embodiment, the sending, by the primary server, the updated TMC information to the corresponding secondary server includes:
according to the query request of the auxiliary server, the main server sends the updated TMC information to the corresponding auxiliary server; and the auxiliary server carries out a query request according to a preset period.
In one embodiment, the sending, by the primary server, the updated TMC information to the corresponding secondary server includes:
and the main server sends the updated TMC information to the corresponding auxiliary server through the log so as to synchronize the TMC information of the auxiliary server with the TMC information of the main server.
A second aspect of the present application provides a device for processing real-time traffic information, which includes:
the information receiving module is used for receiving the information of the user side by the main server;
the information conversion module is used for converting the information of the preset quantity into the updated TMC information by the main server when the information of the user side received by the information receiving module reaches the preset quantity;
and the information sending module is used for sending the TMC information updated by the information conversion module to the corresponding auxiliary server by the main server so as to enable the auxiliary server to send the updated TMC information to the user side.
A third aspect of the present application provides a system for processing real-time traffic information, which includes a primary server and at least one secondary server, wherein:
the main server is used for receiving information of the user side; when the received information of the user side reaches a preset number, the main server converts the information of the preset number into updated TMC information and sends the updated TMC information to the corresponding auxiliary server;
and the auxiliary server is used for receiving the updated TMC information sent by the main server and sending the updated TMC information to the user side.
A fourth aspect of the present application provides a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform a method as described above.
The technical scheme provided by the application can comprise the following beneficial effects:
according to the technical scheme, after the information of the user side is received by the user side, the main server processes the information in a batch mode to convert the received information into the updated TMC information in batch, so that the main server is prevented from being influenced by the information sent by the user side all the time and frequently starts to process the information, the data processing of the main server is more concentrated and efficient, and the resource of the main server is prevented from being occupied all the time. Meanwhile, the main server sends the updated TMC information to the auxiliary server, and then the auxiliary server sends the updated TMC information to the auxiliary server, so that the main server is only responsible for receiving the user side information and updating the TMC information, and the auxiliary server shares the task of being responsible for sending the TMC information, thereby reducing the workload of each server and improving the system operation efficiency.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The foregoing and other objects, features and advantages of the application will be apparent from the following more particular descriptions of exemplary embodiments of the application, as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the application.
Fig. 1 is a schematic flow chart illustrating a method for processing real-time traffic information according to an embodiment of the present disclosure;
fig. 2 is another schematic flow chart of a processing method of real-time traffic information according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a real-time traffic information processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a real-time traffic information processing system according to an embodiment of the present application.
Detailed Description
Preferred embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In the related art, for the nationwide TMC system, generally, one server processes TMC information requests from nationwide, millions of TMC information transmissions need to be processed per minute, and the data load is large, which may delay data update of part of the user terminals. In view of the above problems, embodiments of the present application provide a method for processing real-time traffic information, which can reduce a load of a server and improve operation efficiency of the server. The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Example one
Fig. 1 is a flowchart illustrating a method for processing real-time traffic information according to an embodiment of the present application.
Referring to fig. 1, the method for processing real-time traffic information includes:
in step S110, the main server receives the information of the user terminal.
In one embodiment, the user terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, vehicle-mounted smart devices, portable wearable devices, and the like. In one embodiment, the main server receives the position information and the speed corresponding to each user terminal; and storing the position information and the speed corresponding to the user side in a temporary cache area of the main server. Specifically, a part of the memory in the main server is set as a temporary cache area, and after the main server receives the information sent by the user side, the information is stored in the temporary cache area. The information of the user side includes position information and speed corresponding to the user side. The speed may be a vehicle travel speed. For example, the congestion degree at the current position is reflected by collecting the position information and the vehicle running speed corresponding to the current position. Different ranges of speed correspond to different congestion levels. It is understood that positioning and navigation systems rely on sensors and GPS data to determine the position of a vehicle. In one embodiment, when the vehicle travels on the road, the current coordinate position or the travel track of each vehicle can be acquired through a Global Positioning System (GPS) of the vehicle-mounted device, and the travel speed of each vehicle is calculated and acquired, so as to acquire the position information and the speed of the user terminal.
Step S120, when the received information of the user terminal reaches the preset number, the main server converts the preset number of information into the updated TMC information.
In order to avoid that the main server starts processing once when receiving one piece of information, the preset quantity is set, and when the received user side information reaches the preset quantity, the batch starting processing is unified, so that the batch of information is converted into the updated TMC information. In one embodiment, the predetermined number may be 100 to 2000. In one embodiment, the predetermined number may be 500, 800, 1000, 1500, or 2000.
In one embodiment, the received information is stored in the temporary buffer of the main server before the received information of the user side does not reach the preset amount. When the number of the information reaches a preset number, for example, 1000, the preset number of the information is collectively transferred to the processing area of the main server for processing. After the transfer, the temporary buffer area of the main server is emptied, and then a new batch of information of the user terminals can be received again. In one embodiment, the primary server converts the received preset amount of information in the same transaction to generate updated TMC information. By adopting the design, the conversion efficiency can be improved. Of course, in other embodiments, the main server converts the received preset amount of information separately, i.e. each information is converted separately.
Step S130, the primary server sends the updated TMC information to the corresponding secondary server, so that the secondary server sends the updated TMC information to the user side.
In order to avoid the overload caused by the direct connection of the main server and a plurality of user terminals, in one embodiment, at least one auxiliary server is provided, the main server sends the updated TMC information to the corresponding auxiliary server, and the auxiliary server sends the updated TMC information to the corresponding user terminal.
According to the method for processing the real-time traffic information, after the information of the user side is received by the preset amount, the main server processes the information in a batch mode to convert the received information into the updated TMC information in batches, so that the main server is prevented from being influenced by the information sent by the user side at any moment and frequently starting to process the information, the data processing of the main server is more centralized and efficient, and the resource of the main server is prevented from being occupied at any moment. Meanwhile, the main server sends the updated TMC information to the auxiliary server, and then the auxiliary server sends the updated TMC information to the user side. By the design, a link of the user side, namely the main server, the auxiliary server and the user side is formed, the main server is only responsible for receiving the information of the user side and updating the TMC information, and the auxiliary server shares the task of sending the TMC information, so that the workload of each server is reduced, and the operation efficiency of the system is improved.
Example two
To further describe the processing method of the real-time traffic information of the present application, referring to fig. 2, the processing method of the real-time traffic information includes:
step S210, the main server receives the location information and the speed of the user side, and stores the received location information and the speed of the user side in the temporary buffer area.
In one embodiment, the main server stores all map road data in advance, and after the main server receives the location information of the user terminal, the location information of the user terminal is located in a map road data range stored by the main server. The main server caches the received position information and speed of the user side in a temporary cache region for subsequent batch processing.
In step S220, when the received location information and speed of the user terminal reach the preset number, the main server converts the preset number of information into updated TMC information.
In one embodiment, when the received position information and speed of the user terminal reach a preset number, the preset number of information is converted into SQL statements; and updating the map road data prestored on the main server by using SQL sentences to obtain updated TMC information.
Specifically, Structured Query Language (SQL), which is a database Query and programming Language, is used to access data and Query, update, and manage a relational database system; and is also an extension of the database script file. Structured query languages are high-level, non-procedural programming languages that allow users to work on high-level data structures. The method does not require a user to specify a data storage method and does not require the user to know a specific data storage mode, so that different database systems with completely different underlying structures can use the same structured query language as an interface for data input and management. The structured query language statements can be nested, which allows for great flexibility and powerful functionality. When TMC information corresponding to certain position information is updated, the updating of the TMC information can be realized through an SQL statement command, and the method is convenient to use and high in efficiency.
Further, in order to facilitate storage of map road data and improve reading efficiency, in one embodiment, the master server is provided with a master Redis database. In one embodiment, map road data is stored in a primary Redis database; and executing SQL sentences in the main Redis database, updating the map road data and obtaining updated TMC information. In one embodiment, the primary server stores a predetermined number of SQL statements in the primary Redis database in the same transaction
And executing to obtain the updated TMC information. Specifically, a Remote directory Server (Remote directory Server) is an in-memory cache database, which is written in C language, and the data model is key-value. Redis is widely used because it can support rich data types, such as String, List, Hash, Set, Sorted Set, etc. Through saving map road data in Redis database, through caching at Redis, avoid calling the data of server to realize quick reading, reduce simultaneously and occupy the server, thereby reduce the hardware cost. Further, in order to load the SQL statement, the main Redis database is loaded with a redisql module, so that TMC information can be updated through the SQL statement command.
Further, in order to reduce the storage of redundant data and improve the memory utilization efficiency and data processing efficiency of the main server, in one embodiment, the map road data is stored according to preset elements; the preset elements comprise tile numbers, road numbers of all roads, corresponding TMC numbers, traveling directions of the roads, position information of the roads, corresponding TMC frame areas, road condition identifications and latest refreshing time of the road condition identifications. Specifically, in the related art, the electronic map may be simulated and built through a tile map pyramid model. By slicing the electronic map, each layer of map data is sliced into a plurality of tiles. Each tile corresponds to a local section of the layer of map data, and the sections corresponding to the tiles are independent. Each Tile has a corresponding Tile number (Tile id), i.e. the tiles are marked and distinguished by numbers. The TMC bounding box area (bounding box) may be obtained by calculation of the location information of the road. Each TMC frame area belongs to the corresponding tile, that is, the tile area covers the TMC frame area, and the TMC frame area is the area covering the corresponding road. The location information of each road may specifically specify the location of the road on the electronic map. In order to further distinguish each Road, marking may be performed by a unique Road number (Road id) of each Road and a unique TMC number (TMC id) corresponding to the Road. Meanwhile, for a bidirectional road or a unidirectional road, a traveling direction (Heading) of each road needs to be specified. The traffic condition Flag (TMC Flag) is used to identify whether traffic is congested or not. The latest Update time (Update time) is updated according to the state of whether the traffic is congested or not, namely, the Update is performed according to the Update of the road condition identification, so that the real-time traffic information of the corresponding road can be reflected in real time, namely, whether the road is congested at the latest Update time. Further, in one embodiment, the map road data is pre-stored according to the preset elements, and a TMC table with a specific table structure is formed, so that data interference of other non-preset elements is avoided, redundant data is reduced, and lightweight processing of the map road data in an early storage stage is realized.
Further, in order to update the TMC information stored in the main server according to the received location information and speed of the user side, the specific method is as follows: the position information and the speed of the current vehicle are matched with the TMC table having the above-mentioned preset elements. That is, the position information of the current vehicle is respectively matched with the tile number, the TMC frame area, and the traveling direction of the road. In one embodiment, the location information of the vehicle is first matched to the tile number to determine the approximate geographic range in which the vehicle is located. I.e. from the position information of the vehicle, it can be determined that the vehicle is within the corresponding tile area. The geographical range of the vehicle position information is narrowed through the tile area, the vehicle position information is compared with the TMC frame area in the tile area, and when the vehicle position is located in the TMC frame area, the vehicle is proved to be located on a corresponding road in the TMC frame area. In order to distinguish the bidirectional lanes, the road on which the vehicle is located is finally determined according to the traveling direction of the road, and is represented by the corresponding road number and TMC number. After matching according to the steps, if the position information and the speed of the current vehicle are successfully matched with the map road data stored according to the preset elements in the TMC table, the road on which the vehicle travels can be determined. And then according to the speed of the vehicle, whether the road is congested can be judged, and the road condition identification of the road and the corresponding latest refreshing time can be updated, so that the updated TMC information is obtained.
Step S230, according to the query request of the auxiliary server, the main server sends the updated TMC information to the corresponding auxiliary server; and the auxiliary server carries out a query request according to a preset period.
In one embodiment, the number of secondary servers is at least one. And when the number of the auxiliary servers is multiple, each auxiliary server stores the corresponding map road number according to the map area. That is, each secondary server only stores different parts of all the map road data, and the set of all the map road data stored by each secondary server is all the map road data stored on the primary server. Further, when the number of the auxiliary servers is at least one, each auxiliary server stores the TMC information, and each auxiliary server searches whether the corresponding TMC information needs to be updated. In order to avoid the auxiliary servers from frequently inquiring the main server, each auxiliary server is enabled to send inquiry requests to the main server according to the preset period by setting the preset period, so that the interaction frequency is reduced, and the operation load of the system is reduced. In one specific implementation, each secondary server queries a primary Redis database of the primary server according to a preset period. Because each auxiliary server only stores a small part of map road data in all map road data, and the main server stores all map road data, the auxiliary server only needs to search the corresponding map road data in the main database of the main server during query.
Further, in order to facilitate the distribution and storage of map road data, in one specific embodiment, a corresponding number of secondary servers are set according to the number of map tiles; and dividing the map road data according to the map tiles, and distributing and storing the divided map road data to the corresponding auxiliary server. In the related art, the electronic map can be simulated and built through a tile map pyramid model. Specifically, the tile map pyramid model is a multi-resolution hierarchical model, and the resolution is lower and lower from the bottom layer to the top layer of the tile pyramid, but the represented geographic range is unchanged. Firstly, determining the number N of zoom levels to be provided by a map service platform, taking a map picture with the highest zoom level and the largest map scale as the bottom layer of a pyramid, namely a layer 0, partitioning the map picture, cutting the map picture from the left upper corner of the map picture to the right and from the top to the bottom, and dividing the map picture into square map tiles with the same size (such as 256 multiplied by 256 pixels) to form a layer 0 tile matrix; on the basis of the map picture of the 0 th layer, generating the map picture of the 1 st layer by a method of synthesizing one pixel by every 2 multiplied by 2 pixels, partitioning the map picture, and dividing the map picture into square map tiles with the same size as the next layer to form a tile matrix of the 1 st layer; generating a layer 2 tile matrix by the same method; …, respectively; this continues until layer N-1, which forms the entire tile pyramid.
It is understood that the map road data is a part of the map data. In the application, the storage of redundant data can be reduced and the memory can be saved only by storing the tile layer where the map road data are located. In order to uniformly distribute and store the map road data in each auxiliary server, in one specific embodiment, the number of the map road data to be distributed is calculated and obtained according to the number of map tiles and the number of the auxiliary servers; and distributing and storing each piece of map road data in a corresponding auxiliary server. In one embodiment, the number of copies of the map road data to be distributed is calculated by dividing the number of map tiles by the number of secondary servers. In one embodiment, the number of secondary servers may be a multiple of 4 but is not limited to such. In one embodiment, the number of secondary servers may be 4, 16, 64, etc. The total number of the tiles is 65536 when the tiles are divided by 256 × 256 pixels, for example, and by setting the appropriate number of the auxiliary servers, the map road data corresponding to all the tiles can be distributed, the map data corresponding to each tile can be distributed uniformly on each auxiliary server, and the number of the auxiliary servers can be reduced, so that the hardware cost can be controlled.
In one embodiment, each secondary server has a secondary Redis database, and the map road data in the secondary server can also be stored in the secondary Redis database according to the preset elements. By the design, the storage mode of each auxiliary server corresponds to that of the main server, so that quick query and update are facilitated. In one embodiment, the primary server sends the updated TMC information to the corresponding secondary server through the log, so that the TMC information of the secondary server is synchronized with the TMC information of the primary server. After the main server receives the query request of the auxiliary server, if the TMC information of the auxiliary server is inconsistent with that of the main server, the main server sends the TMC information to the corresponding auxiliary server in a log mode, so that the sending efficiency is improved, and the auxiliary server can update data conveniently.
In step S240, the auxiliary server sends the updated TMC information to the corresponding user side according to the request of the user side.
When the user terminal needs to inquire the TMC information, the user terminal initiates a request. And the auxiliary server corresponding to the current position information of the user side sends the updated TMC information to the user side. In order to avoid unnecessary data interference on the user side, the user side can send the corresponding TMC information through the auxiliary server after actively requesting the TMC information.
In the method for processing real-time traffic information of this embodiment, the main server receives the position information and the speed of the preset number of the user terminals and stores the position information and the speed to the temporary cache area, and when the preset number is reached, the position information and the speed of the user terminals are converted into SQL statements in a centralized and batch manner. The main server stores road map data in advance according to preset elements through a main Redis database, and executes the converted SQL sentences in the main Redis database, so that the data are updated, updated TMC information is obtained, rapid updating processing of the data is achieved, and updating efficiency of the system is improved. Further, in this embodiment, the same map road data is stored in the main server and each auxiliary server, and whether the TMC information of each auxiliary server is the same as the corresponding TMC information in the main server is periodically queried. When the TMC information stored in the auxiliary server is different, the auxiliary server is updated through the main server, and the data of the auxiliary server is ensured to be kept in the latest state. Meanwhile, the main server and the auxiliary server both adopt Redis databases for data storage, so that the data reading and updating efficiency is improved. In addition, the number of the auxiliary servers is set according to the quota of the number of the map tiles, so that the map road data are distributed on each auxiliary server to be stored in a balanced mode. Each auxiliary server only needs to periodically inquire whether the TMC information of the auxiliary server is the same as that of the main server or not, and then the main server updates the data of each auxiliary server to take the best role, so that the overload of the load on a single server is avoided, and the overall operation efficiency of the system is not influenced. Meanwhile, the updated TMC information is sent to the user side by the auxiliary server, that is, the main server is responsible for updating the TMC information, and the auxiliary server is responsible for sending the TMC information according to the request of the user side, so that the work operation load of each server is reduced, the overall operation efficiency of the system is improved, the updating and displaying speed of the TMC information of the user side is increased, and the user experience is improved.
Corresponding to the embodiment of the application function implementation method, the application also provides a device and a system for processing real-time traffic information and a corresponding embodiment. Specifically, the apparatus described in this embodiment of the present application may implement part or all of the processes in the embodiment of the method for processing real-time traffic information described in this application in conjunction with fig. 1-2.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a device for processing real-time traffic information according to an embodiment of the present application.
Referring to fig. 3, the embodiment provides a processing apparatus of real-time traffic information. The device comprises an information receiving module 310, an information converting module 320 and an information sending module 330. Wherein:
the information receiving module 310 is used for the main server to receive the information of the user side.
The information conversion module 320 is configured to, whenever the information of the user side received by the information receiving module 310 reaches a preset number, convert the preset number of information into updated TMC information by the main server.
The information sending module 330 is configured to send the TMC information updated by the information conversion module 320 to the corresponding auxiliary server by the main server, so that the auxiliary server sends the updated TMC information to the user side.
Specifically, the information receiving module 310 of the main server is used for receiving the location information and the speed of the user terminal. In one embodiment, the received information of the user terminal may be stored in a temporary buffer. When the received information of the user side reaches a preset amount, converting the information of the preset amount into SQL sentences; and updating the map road data prestored on the main server by using SQL sentences to obtain updated TMC information. In one embodiment, the main server is provided with a main Redis database, and the main Redis database is loaded with a redisql module, so that TMC information can be updated through an SQL statement command. The main Redis database stores map road data according to preset elements, and each preset element forms a specific TMC table, so that SQL sentences can directly update the TMC tables to obtain updated TMC information. Specifically, the preset elements may include tile numbers, road numbers of each road and corresponding TMC numbers, traveling directions of the roads, location information of the roads and corresponding TMC frame areas, road condition identifiers, and latest refreshing time of the road condition identifiers. Furthermore, the number of the auxiliary servers is at least one, each auxiliary server only stores different parts of all the map road data, and the set of all the map road data stored by each auxiliary server is all the map road data stored on the main server. Each auxiliary server is also provided with an auxiliary Redis database respectively, and stores respective map road data according to preset elements. When the auxiliary server queries the request from the main server according to a preset period, if the TMC information stored in the auxiliary server is inconsistent with the information stored in the main server, the information sending module 330 of the main server may send the latest TMC information to the auxiliary server in a log form for updating and synchronizing.
The device for processing the real-time traffic information receives the information of the user side by the information receiving module, and then the information conversion module of the main server processes the information in a batch mode to convert the received information into the updated TMC information in batches, so that the main server is prevented from being influenced by the information sent by the user side constantly and frequently starting to process the information, the data processing of the main server is more concentrated and efficient, and the resource of the main server is prevented from being occupied constantly. Meanwhile, the information sending module of the main server sends the updated TMC information to the auxiliary server, and then the auxiliary server sends the updated TMC information to the user side.
For a specific description of the processing device of the real-time traffic information, reference may be made to the above description of the processing method of the real-time traffic information, which is not described herein again. The various modules in the above-described apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Example four
Fig. 4 is a schematic structural diagram of a real-time traffic information processing system according to an embodiment of the present application.
Referring to fig. 4, a system 400 for processing real-time traffic information includes a primary server 410 and at least one secondary server 420. Wherein:
the main server is used for receiving the information of the user side; when the received information of the user side reaches the preset number, the main server converts the preset number of information into updated TMC information and sends the updated TMC information to the corresponding auxiliary server;
and the auxiliary server is used for receiving the updated TMC information sent by the main server and sending the updated TMC information to the user side.
Further, the primary Redis database of the primary server 410 and the secondary Redis database of each secondary server 420 pre-store map road data according to the preset elements, respectively. And the main server performs batch processing on the received user side preset information, executes the user side preset information in the main Redis database by using SQL statements, updates the map road data in the main Redis database and obtains the updated TMC information. And the main server sends the updated TMC information to the corresponding auxiliary server in a log mode. And the auxiliary server sends the updated TMC information to the corresponding user side for displaying according to the request of the user side.
In summary, in the real-time traffic information processing system 400 of the present application, the main server 410 and the at least one auxiliary server 420 coordinate to perform work division, so that the main server 410 is responsible for updating, and the auxiliary server 420 is responsible for querying, which avoids concentrating all matters on one main server 410 for processing, thereby reducing the data processing load of a single server and improving the updating efficiency of TMC information. Meanwhile, the main server updates TMC information in batch in the form of SQL sentences and sends the TMC information to the corresponding auxiliary server in the form of logs for synchronization, so that the updating efficiency of data in the system is improved, the latest TMC information can be conveniently and timely sent to the user side, and the user experience is improved.
The aspects of the present application have been described in detail hereinabove with reference to the accompanying drawings. In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. Those skilled in the art should also appreciate that the acts and modules referred to in the specification are not necessarily required in the present application. In addition, it can be understood that the steps in the method of the embodiment of the present application may be sequentially adjusted, combined, and deleted according to actual needs, and the modules in the system of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
Furthermore, the method according to the present application may also be implemented as a computer program or computer program product comprising computer program code instructions for performing some or all of the steps of the above-described method of the present application.
Alternatively, the present application may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or electronic device, server, etc.), causes the processor to perform part or all of the various steps of the above-described method according to the present application.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the applications disclosed herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present application, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A method for processing real-time traffic information is characterized in that:
the main server receives information of a user side;
when the received information of the user side reaches a preset number, the main server converts the information of the preset number into updated TMC information;
and the main server sends the updated TMC information to the corresponding auxiliary server, so that the auxiliary server sends the updated TMC information to the user side.
2. The method of claim 1, wherein the main server receives information from the user side, comprising:
the main server receives the position information and the speed corresponding to each user side;
and storing the position information and the speed corresponding to the user side in a temporary cache area of the main server.
3. The method of claim 1, wherein the converting, by the master server, the preset amount of information into updated TMC information each time the received information of the user side reaches a preset amount includes:
converting the preset amount of information into SQL statements;
and updating the map road data prestored on the main server by adopting the SQL sentence to obtain updated TMC information.
4. The method according to claim 3, wherein the updating the map road data pre-stored on the main server by using the SQL statement to obtain updated TMC information comprises:
storing the map road data in a main Redis database;
and executing the SQL statement in the main Redis database, updating the map road data and obtaining updated TMC information.
5. The method according to claim 3, wherein the map road data is stored in accordance with preset elements; the preset elements comprise tile numbers, road numbers of all roads, corresponding TMC numbers, traveling directions of the roads, position information of the roads, corresponding TMC frame areas, road condition identifications and latest refreshing time of the road condition identifications.
6. The method of claim 1, wherein the sending, by the primary server, the updated TMC information to the corresponding secondary server comprises:
according to the query request of the auxiliary server, the main server sends the updated TMC information to the corresponding auxiliary server; and the auxiliary server carries out a query request according to a preset period.
7. The method of claim 1, wherein the sending, by the primary server, the updated TMC information to the corresponding secondary server comprises:
and the main server sends the updated TMC information to the corresponding auxiliary server through the log so as to synchronize the TMC information of the auxiliary server with the TMC information of the main server.
8. A processing device of real-time traffic information is characterized in that,
the information receiving module is used for receiving the information of the user side by the main server;
the information conversion module is used for converting the information of the preset quantity into the updated TMC information by the main server when the information of the user side received by the information receiving module reaches the preset quantity;
and the information sending module is used for sending the TMC information updated by the information conversion module to the corresponding auxiliary server by the main server so as to enable the auxiliary server to send the updated TMC information to the user side.
9. A system for processing real-time traffic information, comprising a primary server and at least one secondary server, wherein:
the main server is used for receiving information of the user side; when the received information of the user side reaches a preset number, the main server converts the information of the preset number into updated TMC information and sends the updated TMC information to the corresponding auxiliary server;
and the auxiliary server is used for receiving the updated TMC information sent by the main server and sending the updated TMC information to the user side.
10. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method of any one of claims 1-7.
CN202011539389.9A 2020-12-23 2020-12-23 Method, device and system for processing real-time traffic information Active CN112286952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011539389.9A CN112286952B (en) 2020-12-23 2020-12-23 Method, device and system for processing real-time traffic information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011539389.9A CN112286952B (en) 2020-12-23 2020-12-23 Method, device and system for processing real-time traffic information

Publications (2)

Publication Number Publication Date
CN112286952A true CN112286952A (en) 2021-01-29
CN112286952B CN112286952B (en) 2021-10-01

Family

ID=74425992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011539389.9A Active CN112286952B (en) 2020-12-23 2020-12-23 Method, device and system for processing real-time traffic information

Country Status (1)

Country Link
CN (1) CN112286952B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7440842B1 (en) * 2003-05-09 2008-10-21 Dimitri Vorona System for transmitting, processing, receiving, and displaying traffic information
CN204537459U (en) * 2015-03-20 2015-08-05 江苏大学 A kind of intelligent driving backup system based on car networking
CN104954474A (en) * 2015-06-19 2015-09-30 北京奇虎科技有限公司 Method and device for data updating in load balancing
CN106254417A (en) * 2016-07-12 2016-12-21 乐视控股(北京)有限公司 Data cache method, Apparatus and system
CN107819795A (en) * 2016-09-12 2018-03-20 北京金山云网络技术有限公司 A kind of major-minor server data synchronous method of DNS, apparatus and system
CN109241092A (en) * 2018-10-15 2019-01-18 北京金山云网络技术有限公司 Data query method, system and computer equipment
CN109905459A (en) * 2019-01-16 2019-06-18 平安科技(深圳)有限公司 A kind of data transmission method and device
CN111629333A (en) * 2020-03-05 2020-09-04 蘑菇车联信息科技有限公司 Vehicle-mounted voice communication method and device, electronic equipment and storage medium
CN111930874A (en) * 2020-09-11 2020-11-13 蘑菇车联信息科技有限公司 Data acquisition method and electronic equipment
CN112100196A (en) * 2020-11-23 2020-12-18 蘑菇车联信息科技有限公司 Real-time traffic information processing method and system and electronic equipment
CN112097785A (en) * 2020-11-11 2020-12-18 蘑菇车联信息科技有限公司 Vehicle-mounted intelligent device data processing method and device and electronic device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7440842B1 (en) * 2003-05-09 2008-10-21 Dimitri Vorona System for transmitting, processing, receiving, and displaying traffic information
CN204537459U (en) * 2015-03-20 2015-08-05 江苏大学 A kind of intelligent driving backup system based on car networking
CN104954474A (en) * 2015-06-19 2015-09-30 北京奇虎科技有限公司 Method and device for data updating in load balancing
CN106254417A (en) * 2016-07-12 2016-12-21 乐视控股(北京)有限公司 Data cache method, Apparatus and system
CN107819795A (en) * 2016-09-12 2018-03-20 北京金山云网络技术有限公司 A kind of major-minor server data synchronous method of DNS, apparatus and system
CN109241092A (en) * 2018-10-15 2019-01-18 北京金山云网络技术有限公司 Data query method, system and computer equipment
CN109905459A (en) * 2019-01-16 2019-06-18 平安科技(深圳)有限公司 A kind of data transmission method and device
CN111629333A (en) * 2020-03-05 2020-09-04 蘑菇车联信息科技有限公司 Vehicle-mounted voice communication method and device, electronic equipment and storage medium
CN111930874A (en) * 2020-09-11 2020-11-13 蘑菇车联信息科技有限公司 Data acquisition method and electronic equipment
CN112097785A (en) * 2020-11-11 2020-12-18 蘑菇车联信息科技有限公司 Vehicle-mounted intelligent device data processing method and device and electronic device
CN112100196A (en) * 2020-11-23 2020-12-18 蘑菇车联信息科技有限公司 Real-time traffic information processing method and system and electronic equipment

Also Published As

Publication number Publication date
CN112286952B (en) 2021-10-01

Similar Documents

Publication Publication Date Title
EP2958033A1 (en) Tile-based distribution of searchable geospatial data to client devices
US8463809B2 (en) Method and computing system for distributed stream data processing using plural of computers
CN112100196B (en) Real-time traffic information processing method and system and electronic equipment
US8538973B1 (en) Directions-based ranking of places returned by local search queries
EP3298555A1 (en) System and method for accelerating route search
CN103530330B (en) A kind of processing method of inverse geocoding processing system
CN112214561B (en) Map data processing method, map data processing device, computer equipment and storage medium
CN110461037B (en) Dynamic gridding network RTK positioning method and system
CN101865695A (en) The method and system that is used for refreshing location code data
US20230375363A1 (en) Map tile update method and apparatus
CN107295047B (en) Map data updating method, device and system
KR20040018322A (en) Information management system, server and information terminal for an information management system
CN113779091A (en) Information query method and device, electronic equipment and readable storage medium
WO2022089162A1 (en) Path display method and related apparatus
CN112286952B (en) Method, device and system for processing real-time traffic information
CN112289033B (en) Real-time traffic information processing method and device
CN111209462B (en) Data processing method, device and equipment
CN112162987A (en) Data processing method, device, equipment and storage medium
CN112287063A (en) Method, device and system for processing real-time traffic information
CN112097785B (en) Vehicle-mounted intelligent device data processing method and device and electronic device
CN112287062B (en) Real-time traffic information synchronization method and device and electronic equipment
CN111861182B (en) Schedule creation method, device and system
CN103575266A (en) Method and system of mobile navigation as well as GIS (geographic information system) server
CN113139258A (en) Road data processing method, device, equipment and storage medium
CN109325057B (en) Middleware management method, device, computer equipment 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