Edge cloud traffic scheduling method and device based on OpenResty
Through OpenResty, the real-time collection and processing of vehicle information in intelligent connected vehicles has been solved, and the problems of resource waste and data security threats have been achieved, rapid data transmission and resource optimization have been achieved, and the stability and driving safety of the system have been improved.
Patent Information
- Application Number
- CN202411164304.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-17
AI Technical Summary
In the prior art, intelligent connected vehicles have problems of resource waste, imbalance and data security threats in vehicle-road collaboration systems, and the increase in data transmission delay affects the system response speed and performance.
Adopt the edge cloud traffic scheduling method based on OpenResty, and collects vehicle information and roadside perception information in real time, formats and reports it to the edge cloud, uses Lua script to analyze and verify data, divide it to different edge computing nodes for processing, and generates a path Planning and traffic detection information is sent to the vehicle through OpenResty to adjust the driving route, achieving rapid data transmission and optimized resource scheduling.
It reduces data delay, improves data processing speed and efficiency, avoids the inclination of resource hotspots, optimizes resource usage, and improves driving safety and system stability.
Smart Images

Figure CN119152675A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile and Internet technologies, and in particular to an edge cloud traffic scheduling method and device based on OpenResty. Background Art
[0002] At present, a new round of global scientific and technological revolution and industrial transformation with intelligence and networking as important features is booming. The rapid development of artificial intelligence and new generation information technology has promoted profound changes in the automotive industry and road traffic system. As a typical representative of the combination of smart cars and intelligent transportation systems, the vehicle-road cooperative system realizes vehicle-to-vehicle and vehicle-to-road information interaction, provides timely and rich information to traffic control departments, and provides technical support and basic environmental support for real-time control.
[0003] Traffic accidents have already caused casualties or property losses, but the current accident handling takes a long time. In particular, major accidents require the arrival of traffic police and other functional departments to handle them. The time from the occurrence of the accident to the on-site handling is long. As time goes by, the risk of secondary accidents continues to increase, and the impact of traffic bottlenecks becomes more and more obvious. Therefore, it is necessary to conduct in-depth research on the rapid handling of accidents and risk control methods in the vehicle-road collaborative environment to ensure traffic safety and improve traffic efficiency.
[0004] In the prior art, although there is a method of horizontally switching the application layer of the intelligent networked vehicle operating system by using nodes as the operation granularity, the operation and data processing of each node requires a certain amount of computing resources and storage resources. If the resources are not managed properly, it may lead to resource waste or imbalance. In addition, in the prior art, multiple layers and multiple levels of cloud nodes are introduced, such as edge cloud and central cloud, which makes the system architecture complicated on the one hand, and the management and maintenance of these nodes require more resources and technical support, which may increase the complexity and cost of the system; on the other hand, in the field of intelligent vehicles, data security is of vital importance, and in the process of data transmission between cloud nodes, it will face security threats, such as the risk of data leakage, hijacking or tampering, which may lead to serious consequences. In addition, when data needs to be transmitted and processed between multiple cloud nodes, it may also cause an increase in the transmission delay of the application layer switching instructions, and the intelligent networked vehicle has high requirements for real-time performance, and the increase in delay may affect the response speed and performance of the system. Summary of the invention
[0005] The present invention provides an edge cloud traffic scheduling method and device based on OpenResty, so as to overcome at least one technical problem existing in the prior art.
[0006] On the one hand, the present invention provides an edge cloud traffic scheduling method based on OpenResty, comprising:
[0007] Real-time collection of vehicle information and roadside perception information;
[0008] Formatting the vehicle information and the roadside sensing information to obtain a standard data packet; the standard data packet at least includes the vehicle ID and location information;
[0009] Report the standard data packet to the edge cloud through OpenResty;
[0010] Use Lua script to parse and verify the reported standard data packet;
[0011] Splitting the standard data packets to different edge computing nodes;
[0012] Process the data information divided into each node to obtain pre-processed data;
[0013] Calling the computing service of the edge cloud to analyze and calculate the pre-processed data to generate path planning information and traffic detection information;
[0014] Send the path planning information to the corresponding vehicle through OpenResty, so that the corresponding vehicle travels according to the path planning information;
[0015] The traffic detection information is broadcasted through OpenResty, so that related vehicles adjust their driving routes according to the traffic detection information.
[0016] Optionally, after formatting the vehicle information and the roadside perception information, the method further includes:
[0017] The formatted vehicle information and the formatted roadside perception information are subjected to data fusion.
[0018] Optionally, after reporting the standard data packet to the edge cloud through OpenResty, the method further includes:
[0019] The formatted vehicle information and the formatted roadside perception information are subjected to data fusion.
[0020] Optionally, the standard data packet is divided into different edge computing nodes, specifically:
[0021] According to the location information of the vehicle, the data in the standard data packet is reported to the corresponding edge computing node in a manner that is closest to the location.
[0022] Optionally, the standard data packet is divided into different edge computing nodes, specifically:
[0023] The data in the standard data packet is reported to the corresponding edge computing node in a polling manner of the edge computing node.
[0024] Optionally, the standard data packet is divided into different edge computing nodes, specifically:
[0025] The data in the standard data packet is reported to the corresponding edge computing node in a manner of minimum average delay.
[0026] Optionally, it also includes: using OpenResty for log monitoring.
[0027] Optionally, after the standard data packet is divided into different edge computing nodes, the method further includes:
[0028] Perform data fusion on the data split to each edge computing node.
[0029] Optionally, the data information divided into each node is processed, specifically:
[0030] The Lua script is used to sort the data information divided into each node by time and remove outliers.
[0031] On the other hand, the present invention also provides an edge cloud traffic scheduling device based on OpenResty, comprising:
[0032] Collection module, used to collect vehicle information and roadside perception information in real time;
[0033] A formatting module, used to format the vehicle information and the roadside sensing information to obtain a standard data packet; the standard data packet at least includes the vehicle ID and location information;
[0034] A reporting module, used to report the standard data packet to the edge cloud through OpenResty;
[0035] A verification module, used for parsing and verifying the reported standard data packet using a Lua script;
[0036] A segmentation module, used to segment the standard data packets to different edge computing nodes;
[0037] A processing module is used to process the data information divided into each node to obtain pre-processed data;
[0038] A computing module, used to call the computing service of the edge cloud, analyze and calculate the pre-processed data, and generate path planning information and traffic detection information;
[0039] A sending module, used for sending the path planning information to the corresponding vehicle through OpenResty, so that the corresponding vehicle travels according to the path planning information;
[0040] The broadcast module is used to broadcast the traffic detection information through OpenResty, so that related vehicles adjust their driving routes according to the traffic detection information.
[0041] The innovative features of the embodiments of the present invention include:
[0042] 1. In this embodiment, through multi-edge computing, cloud data delivery strategy, edge cloud resource pool dynamic scheduling and other functions, fast data transmission, optimal resource scheduling and stable operation of the system are achieved, which is one of the innovations of the embodiment of the present invention.
[0043] 2. In this embodiment, seamless connection of data traffic reporting is achieved through a cross-edge cloud approach, and data packets are divided into different edge computing nodes, which can reduce data latency and improve the speed and efficiency of data processing. This is one of the innovations of the embodiment of the present invention.
[0044] 3. In this embodiment, seamless connection of data traffic reporting is achieved through a cross-edge cloud approach, and data packets are divided into different edge computing nodes, thereby reasonably allocating the resources of the edge computing nodes. This can not only avoid data hotspot inclination to achieve load balancing, but also make full use of the computing power resources of edge computing, which is conducive to optimizing resource utilization. It is one of the innovations of the embodiment of the present invention.
[0045] 4. In this embodiment, the cloud data sending strategy is used to send the path planning information to the corresponding vehicle, so that the corresponding vehicle can travel along the optimal path. At the same time, the traffic detection information is broadcast to the relevant vehicles, so that the relevant vehicles adjust the driving route according to the traffic detection information, thereby improving driving safety. This is one of the innovative points of the embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A flow chart of the edge cloud traffic scheduling method provided by an embodiment of the present invention;
[0048] Figure 2 Another flow chart of the edge cloud traffic scheduling method provided by the embodiment of the present invention
[0049] Figure 3 Another flow chart of the edge cloud traffic scheduling method provided by an embodiment of the present invention;
[0050] Figure 4 Another flow chart of the edge cloud traffic scheduling method provided by the embodiment of the present invention;
[0051] Figure 5 A structural schematic diagram of an edge cloud traffic scheduling device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or equipment.
[0054] The embodiment of the present invention discloses an edge cloud traffic scheduling method and device based on OpenResty, which are described in detail below.
[0055] Figure 1 For a flow chart of the edge cloud traffic scheduling method provided by an embodiment of the present invention, please refer to Figure 1 , an edge cloud traffic scheduling method based on OpenResty provided by an embodiment of the present invention includes:
[0056] Step 1: Collect vehicle information and roadside perception information in real time;
[0057] Step 2: Format the vehicle information and roadside sensing information to obtain a standard data packet; the standard data packet at least includes the vehicle ID and location information;
[0058] Step 3: Report the standard data packet to the edge cloud through OpenResty;
[0059] Step 4: Use Lua script to parse and verify the reported standard data packet;
[0060] Step 5: Divide the standard data packets into different edge computing nodes;
[0061] Step 6: Process the data information divided into each node to obtain pre-processed data;
[0062] Step 7: Call the computing service of the edge cloud to analyze and calculate the pre-processed data to generate path planning information and traffic detection information;
[0063] Step 8: Send the path planning information to the corresponding vehicle through OpenResty, so that the corresponding vehicle drives according to the path planning information;
[0064] Step 9: Broadcast the traffic detection information through OpenResty so that related vehicles can adjust their driving routes based on the traffic detection information.
[0065] Specifically, please refer to Figure 1 , the edge cloud traffic scheduling method based on OpenResty provided by the embodiment of the present invention first collects vehicle information and roadside perception information in real time through step 1. It should be noted here that when collecting vehicle information, the position, speed and status light information of the vehicle itself are collected in real time through sensors on the vehicle body, where the status light information includes, for example, brake lights, turn lights, etc.
[0066] After obtaining the vehicle information and the roadside sensing information, in step 2, the collected vehicle information and the roadside sensing information are formatted into standard data packets. The standard data packet after the vehicle information is formatted includes at least the vehicle ID, location information, status light information, speed information, etc.
[0067] Then, in step 3, the formatted standard data packet is reported to the edge cloud. In the present invention, OpenResty is used as the entrance to the edge cloud, so the standard data packet is reported to the OpenResty server. Here, when reporting the standard data packet, the data can be reported to the OpenResty server in real time using the mobile network or V2X (Vehicle-to-Everything) technology.
[0068] In order to ensure that the reported data format is correct and valid, after receiving the reported data, the OpenResty server parses and verifies it through step 4. Lua is a lightweight and compact scripting language that can be embedded in other applications to provide flexible expansion and customization functions for the application. Therefore, the present invention uses Lua scripts to parse and verify the reported standard data packets to confirm whether the data format of the received standard data packets is correct and valid.
[0069] When the data format in the received standard data packet is correct and valid, the received data needs to be processed. During data processing, if the distance between the vehicle end and the roadside and the computing node is far, data delay may be aggravated. Therefore, the present invention dynamically divides the received standard data packet into different edge computing nodes through step 5.
[0070] When splitting data packets, you can use the closest distance method, the edge computing node polling method, the historical data minimum average delay method, or the weight calculation method of the above methods. By cross-edge cloud methods, seamless connection of data flow reporting is achieved, and data packets are split to different edge computing nodes. On the one hand, data latency can be reduced and the speed and efficiency of data processing can be improved; on the other hand, by reasonably allocating the resources of edge computing nodes, not only can data hotspots be avoided to achieve load balancing, but also the computing power resources of edge computing can be fully utilized to ensure that the resources of each computing node are reasonably utilized, avoiding the situation where a certain node is overloaded while other nodes are idle, which is conducive to optimizing resource usage.
[0071] After the data segmentation is completed, in step 6, OpenResty is used to process the data information segmented to each node to obtain preprocessed data. Here, OpenResty calls the Lua script to process the data, sort the data information segmented to each node by time, and perform a simple cleaning on it, so as to remove the abnormal values in the data of each node, so as to avoid the adverse effects of the abnormal values on the path planning process and cause the path planning to deviate.
[0072] After data preprocessing, path planning can be performed in step 7. When implementing path planning, the edge cloud computing service is called through the lua script, and the preprocessed data is analyzed and calculated through the edge cloud computing service to obtain real-time traffic conditions and road conditions. Combined with real-time traffic conditions, road conditions and vehicle information, personalized path planning information can be generated for each vehicle. Here, the path planning information corresponding to each vehicle can be determined based on the vehicle ID.
[0073] After obtaining the path planning information of the vehicle, in step 8, the path planning information is sent to the corresponding vehicle through OpenResty through the recommendation of the cloud. After the vehicle receives the path planning information, it can adjust the driving path according to the path planning information, so that the vehicle can travel along the optimal path. Here, the recommendation of the cloud can, for example, be a method of making decisions based on the vehicle ID information or based on the nearest resource in the geographical scope. Among them, according to the method of making decisions based on the nearest resource in the geographical scope, it is first necessary to determine the geographical area where the vehicle is located and its coverage, and then select the data management node closest to the vehicle based on the geographical area of the vehicle.
[0074] It should be noted that while generating the path planning information in step 7, the edge cloud can also call the lua script so that the lua script monitors events in the surrounding area, such as traffic accidents, road construction and other events, based on real-time traffic conditions, road conditions and vehicle information, and generates traffic detection information. And through step 9, the traffic detection information is broadcast through OpenResty. For example, when a traffic accident occurs or there is road construction, the relevant information can be broadcast to multiple nearby vehicles, so that the relevant vehicles can obtain traffic detection information in time, and adjust the driving route according to the traffic detection information, so as to avoid problems such as vehicle inability to drive and congestion due to traffic accidents or road construction. The relevant vehicles here can be, for example, all affected vehicles, which can be determined by searching the geographical range.
[0075] In addition, since the system collects vehicle status and roadside perception information in real time, when the vehicle status changes or the surrounding environment changes, the calculation results can be quickly updated and sent to the vehicle to ensure real-time performance. And while the vehicle is driving, new status information is continuously reported, so it can ensure that edge cloud computing always makes decisions based on the latest data.
[0076] The present invention can also transmit the data of the edge cloud to the regional cloud, and use the regional cloud to perform pool management on the edge cloud, so that the edge cloud resource pool can be dynamically managed, so that resources can be flexibly scheduled according to data requirements and algorithm requirements, and the algorithm can be quickly responded to and efficiently run, thereby improving the flexibility and resource utilization of the system. Moreover, the pool management of the edge cloud can avoid data processing interruptions caused by single node failures, and improve the overall reliability and stability of the system.
[0077] The OpenResty-based edge cloud traffic scheduling method provided by the present invention realizes rapid data transmission, optimal scheduling of resources and stable operation of the system through functions such as multi-edge computing, cloud data delivery strategy, and dynamic scheduling of edge cloud resource pool.
[0078] Optionally, Figure 2 For another flow chart of the edge cloud traffic scheduling method provided by the embodiment of the present invention, please refer to Figure 2 After formatting the vehicle information and the roadside perception information, it also includes: step 03, data fusion of the formatted vehicle information and the formatted roadside perception information.
[0079] Specifically, please refer to Figure 2Since the collected vehicle information and roadside perception information have a time-space mismatch problem, in this embodiment, through step 03, the vehicle information and roadside perception information are data-fused to achieve time and space alignment, so as to perform subsequent calculations. When performing data fusion in this embodiment, the vehicle information is uploaded to the roadside, and the two are aligned in time and space on the roadside to achieve data fusion, and then the fused data is reported to the edge cloud through the roadside module.
[0080] Optionally, Figure 3 For another flow chart of the edge cloud traffic scheduling method provided by the embodiment of the present invention, please refer to Figure 3 After the standard data packet is reported to the edge cloud through OpenResty, it also includes: step 04, data fusion of the formatted vehicle information and the formatted roadside perception information.
[0081] Specifically, please refer to Figure 3 Since the collected vehicle information and roadside perception information do not match in time and space, in this embodiment, after the edge cloud receives the data packet, it performs data fusion on the vehicle information and roadside perception information in step 04 to achieve time and space alignment for subsequent calculations. In this embodiment, the roadside perception information and vehicle information are aligned in time and space at the edge cloud to achieve data fusion.
[0082] Optionally, refer to Figure 1 ,In step 5, the standard data packet is divided into different edge computing nodes, specifically: according to the location information of the vehicle, the data in the standard data packet is reported to the corresponding edge computing node in the closest way.
[0083] Specifically, please refer to Figure 1 In this embodiment, the edge computing node is selected according to the vehicle location. Openresty accesses the real-time location data reported by the vehicle. In order to ensure security, the data reported by the vehicle needs to be verified and checked for security to prevent injection attacks.
[0084] Write a Lua plug-in to dispatch traffic to the server closest to the cloud node for sharding calculation and storage according to the vehicle location. The location information is obtained by parsing the reported vehicle location information, and the edge node information is obtained from the GIS database through the get_edge_servers function.
[0085] After obtaining the location information and edge node information, the nearest edge server is selected according to the vehicle location, and the data is dispatched to the nearest server for processing. When obtaining the nearest edge server, the vehicle location is received through the find_nearest_server function, and then all edge servers are traversed, the distance is calculated using the Haversine formula, and the nearest server is returned.
[0086] In addition, in order to reduce the frequency of database queries, after querying the edge node information, use resty.lrucache to create an LRU cache with a maximum number of entries of 100, and store the edge node information in the cache. The specific cache strategy and database query frequency can be adjusted according to actual needs to improve performance. At the same time, in actual applications, more detailed error handling and logging can be added.
[0087] Optionally, refer to Figure 1 In step 5, the standard data packet is divided into different edge computing nodes, specifically: the data in the standard data packet is reported to the corresponding edge computing node according to the edge computing node polling method.
[0088] Specifically, in this embodiment, a polling method is adopted to select edge computing nodes. First, the edge node IP list is queried and cached. At this time, if cached data exists, the cached data is used directly. After obtaining the cache node IP list, the consistent hashing algorithm is used to generate a logical IP ring from the physical IP list, so that each IP corresponds to multiple logical nodes. Then parse the information of the vehicle-side data request device, obtain the characteristic data of the upload traffic location, such as the device ID + longitude and latitude in the IP jurisdiction, and then take the hash remainder with the IP logical point. Then perform list polling. During the polling process, it is necessary to ensure that the same car within the IP jurisdiction is processed by the same server, but multiple cars will be evenly distributed to different IP nodes for processing.
[0089] Optionally, refer to Figure 1 In step 5, the standard data packet is divided into different edge computing nodes, specifically: the data in the standard data packet is reported to the corresponding edge computing node in a manner of minimum average delay.
[0090] Specifically, in this embodiment, the method of minimum average delay is adopted to select the computing node. First, the reported vehicle location information is parsed. Then the IP database is queried to obtain the edge node information, and the edge node information is cached to reduce the database query frequency and the delay of each node processing the data in the same geographical range. The edge server with the minimum delay is selected according to the vehicle location, and the data is dispatched to the server with the minimum delay for processing.
[0091] It should be noted that the calculation method with the minimum delay can be, for example, an ant colony algorithm. Through the information decay function, the shortest path is selected each time to increase the data receiving authority of the node server on the shortest path. The token bucket algorithm can be used to calculate and perform traffic segmentation scheduling.
[0092] Optionally, it also includes: using OpenResty for log monitoring. Specifically, in order to optimize traffic scheduling in a targeted manner according to vehicle status information and traffic changes, this embodiment uses OpenResty to perform log monitoring on traffic conditions during the entire execution process. For example, OpenResty is used to collect logs of edge request traffic, and the edge request traffic is carefully monitored and analyzed. The collected traffic logs are counted according to edge cloud, edge node, and specific traffic requests, so as to monitor the performance and status of traffic processing equipment. This helps to discover potential problems and bottlenecks, so as to perform targeted optimization.
[0093] Optionally, Figure 4 For another flow chart of the edge cloud traffic scheduling method provided by the embodiment of the present invention, please refer to Figure 4 After the standard data packets are divided into different edge computing nodes, the method further includes: step 06, performing data fusion on the data divided into each edge computing node.
[0094] Specifically, please refer to Figure 4 The fusion here gradually integrates the data in layers. First, the roadside perception vehicle data and the networked vehicle data are integrated to find the perception vehicle and the real reporting vehicle that are actually identified as the same vehicle. The roadside perception will label, de-duplicate, clean, de-encrypt, and blur the data after the previous step, as well as the information of vehicles and social traffic participants that are not connected to the cloud control platform, and then generate a scene data package and provide it to the vehicle end and the upper cloud that need to use it.
[0095] After the vehicle receives the scene data packet, it can be displayed through the HMI or the vehicle computing unit can be used for decision-making calculations. After the upper cloud receives the scene data packet, it integrates the supporting platform data, such as weather, traffic events, and socially reported events, to conduct cloud business and overall traffic situation control, such as fair right of way scheduling, road management measures, and quasi-real-time notification of regional events.
[0096] Based on the same inventive concept, the present invention also provides an edge cloud traffic scheduling device 100 based on OpenResty. Figure 5 For a structural diagram of an edge cloud traffic scheduling device provided by an embodiment of the present invention, please refer to Figure 5 , the edge cloud traffic scheduling device 100 based on OpenResty provided by an embodiment of the present invention includes:
[0097] The acquisition module 10 is used to collect vehicle information and roadside perception information in real time;
[0098] The formatting module 20 is used to format the vehicle information and the roadside sensing information to obtain a standard data packet; the standard data packet at least includes the vehicle ID and location information;
[0099] The reporting module 30 is used to report the standard data packet to the edge cloud through OpenResty;
[0100] Verification module 40, used to parse and verify the reported standard data packet using Lua script;
[0101] A splitting module 50 is used to split the standard data packets to different edge computing nodes;
[0102] The processing module 60 is used to process the data information divided into each node to obtain pre-processed data;
[0103] The computing module 70 is used to call the computing service of the edge cloud, analyze and calculate the pre-processed data, and generate path planning information and traffic detection information;
[0104] The sending module 80 is used to send the path planning information to the corresponding vehicle through OpenResty, so that the corresponding vehicle travels according to the path planning information;
[0105] The broadcast module 90 is used to broadcast the traffic detection information through OpenResty, so that related vehicles adjust their driving routes according to the traffic detection information.
[0106] Specifically, please refer to Figure 5 , the edge cloud traffic scheduling device 100 based on OpenResty provided by the embodiment of the present invention first collects vehicle information and roadside perception information in real time through the collection module 10. It should be noted here that when collecting vehicle information, the position, speed and status light information of the vehicle itself are collected in real time through sensors on the vehicle body, wherein the status light information includes, for example, brake lights, turn lights, etc.
[0107] After obtaining the vehicle information and the roadside sensing information, the formatting module 20 formats the collected vehicle information and the roadside sensing information into standard data packets. The standard data packets after the vehicle information is formatted include at least the vehicle ID, location information, status light information, speed information, etc.
[0108] Then, the formatted standard data packet is reported to the edge cloud through the reporting module 30. In the present invention, OpenResty is used as the entrance to the edge cloud, so the standard data packet is reported to the OpenResty server. Here, when reporting the standard data packet, the data can be reported to the OpenResty server in real time using the mobile network or V2X (Vehicle-to-Everything) technology.
[0109] In order to ensure that the reported data format is correct and valid, after receiving the reported data, the OpenResty server parses and verifies it through the verification module 40. Lua is a lightweight and compact scripting language that can be embedded in other applications to provide flexible expansion and customization functions for the application. Therefore, the present invention uses Lua scripts to parse and verify the reported standard data packets to confirm whether the data format of the received standard data packets is correct and valid.
[0110] When the data format in the received standard data packet is correct and valid, the received data needs to be processed. During data processing, if the distance between the vehicle end and the roadside and the computing node is far, data delay may be aggravated. Therefore, the present invention dynamically divides the received standard data packet into different edge computing nodes through the segmentation module 50.
[0111] When splitting data packets, you can use the closest distance method, the edge computing node polling method, the historical data minimum average delay method, or the weight calculation method of the above methods. By cross-edge cloud methods, seamless connection of data flow reporting is achieved, and data packets are split to different edge computing nodes. On the one hand, data latency can be reduced and the speed and efficiency of data processing can be improved; on the other hand, by reasonably allocating the resources of edge computing nodes, not only can data hotspots be avoided to achieve load balancing, but also the computing power resources of edge computing can be fully utilized to ensure that the resources of each computing node are reasonably utilized, avoiding the situation where a certain node is overloaded while other nodes are idle, which is conducive to optimizing resource usage.
[0112] After the data segmentation is completed, the processing module 60 processes the data information segmented to each node through OpenResty to obtain preprocessed data. Here, OpenResty calls the Lua script to process the data, sorts the data information segmented to each node by time, and performs a simple cleaning on it, so as to remove the abnormal values in the data of each node, so as to avoid the adverse effects of the abnormal values on the path planning process and cause the path planning to deviate.
[0113] After data preprocessing, path planning can be performed through the computing module 70. When implementing path planning, the edge cloud computing service is called through the lua script, and the preprocessed data is analyzed and calculated through the edge cloud computing service to obtain real-time traffic conditions and road conditions information. Combined with real-time traffic conditions, road conditions and vehicle information, personalized path planning information can be generated for each vehicle. Here, the path planning information corresponding to each vehicle can be determined according to the vehicle ID.
[0114] After obtaining the path planning information of the vehicle, the sending module 80 sends the path planning information to the corresponding vehicle through OpenResty through the recommendation of the cloud. After the vehicle receives the path planning information, it can adjust the driving path according to the path planning information, so that the vehicle can travel along the optimal path. Here, the recommendation of the cloud can, for example, be a method of making decisions based on the vehicle ID information or based on the nearest resource in the geographical scope. Among them, according to the method of making decisions based on the nearest resource in the geographical scope, it is first necessary to determine the geographical area where the vehicle is located and its coverage, and then select the data management node closest to the vehicle based on the geographical area of the vehicle.
[0115] It should be noted that while the computing module 70 generates the path planning information, the edge cloud can also call the Lua script so that the Lua script monitors events in the surrounding area, such as traffic accidents, road construction and other events, based on real-time traffic conditions, road conditions and vehicle information, and generates traffic detection information. And the traffic detection information is broadcast through OpenResty through the broadcast module 90. For example, when a traffic accident occurs or there is road construction, the relevant information can be broadcast to multiple nearby vehicles, so that the relevant vehicles can obtain traffic detection information in time, and adjust the driving route according to the traffic detection information, so as to avoid problems such as vehicle inability to drive and congestion due to traffic accidents or road construction. The relevant vehicles here can be, for example, all affected vehicles, which can be determined by searching the geographical range.
[0116] In addition, since the system collects vehicle status and roadside perception information in real time, when the vehicle status changes or the surrounding environment changes, the calculation results can be quickly updated and sent to the vehicle to ensure real-time performance. And while the vehicle is driving, new status information is continuously reported, so it can ensure that edge cloud computing always makes decisions based on the latest data.
[0117] The present invention can also transmit the data of the edge cloud to the regional cloud, and use the regional cloud to perform pool management on the edge cloud, so that the edge cloud resource pool can be dynamically managed, so that resources can be flexibly scheduled according to data requirements and algorithm requirements, and the algorithm can be quickly responded to and efficiently run, thereby improving the flexibility and resource utilization of the system. Moreover, the pool management of the edge cloud can avoid data processing interruptions caused by single node failures, and improve the overall reliability and stability of the system.
[0118] The OpenResty-based edge cloud traffic scheduling method provided by the present invention realizes rapid data transmission, optimal scheduling of resources and stable operation of the system through functions such as multi-edge computing, cloud data delivery strategy, and dynamic scheduling of edge cloud resource pool.
[0119] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0120] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An edge cloud traffic scheduling method based on OpenResty, characterized in that: include: Real-time collection of vehicle information and roadside perception information; Formatting the vehicle information and the roadside sensing information to obtain a standard data packet; The standard data packet includes at least the vehicle ID and location information; Report the standard data packet to the edge cloud through OpenResty; Use Lua script to parse and verify the reported standard data packet; Splitting the standard data packets to different edge computing nodes; Process the data information divided into each node to obtain pre-processed data; Calling the computing service of the edge cloud to analyze and calculate the pre-processed data to generate path planning information and traffic detection information; Send the path planning information to the corresponding vehicle through OpenResty, so that the corresponding vehicle travels according to the path planning information; The traffic detection information is broadcasted through OpenResty, so that related vehicles adjust their driving routes according to the traffic detection information.
2. The edge cloud traffic scheduling method based on OpenResty according to claim 1 is characterized in that: After formatting the vehicle information and the roadside perception information, the method further includes: The formatted vehicle information and the formatted roadside perception information are subjected to data fusion.
3. The edge cloud traffic scheduling method based on OpenResty according to claim 1 is characterized in that: After the standard data packet is reported to the edge cloud through OpenResty, it also includes: The formatted vehicle information and the formatted roadside perception information are subjected to data fusion.
4. The edge cloud traffic scheduling method based on OpenResty according to claim 1 is characterized in that: The standard data packets are divided into different edge computing nodes, specifically: According to the location information of the vehicle, the data in the standard data packet is reported to the corresponding edge computing node in a manner that is closest to the location.
5. The edge cloud traffic scheduling method based on OpenResty according to claim 1 is characterized in that: The standard data packets are divided into different edge computing nodes, specifically: The data in the standard data packet is reported to the corresponding edge computing node in a polling manner of the edge computing node.
6. The edge cloud traffic scheduling method based on OpenResty according to claim 1 is characterized in that: The standard data packets are divided into different edge computing nodes, specifically: The data in the standard data packet is reported to the corresponding edge computing node in a manner of minimum average delay.
7. The edge cloud traffic scheduling method based on OpenResty according to claim 1 is characterized in that: Also includes: Use OpenResty for log monitoring.
8. The edge cloud traffic scheduling method based on OpenResty according to claim 1 is characterized in that: After the standard data packets are divided into different edge computing nodes, the following steps are also included: Perform data fusion on the data split to each edge computing node.
9. The edge cloud traffic scheduling method based on OpenResty according to claim 8 is characterized in that: Process the data information divided into each node, specifically: The Lua script is used to sort the data information divided into each node by time and remove outliers.
10. An edge cloud traffic scheduling device based on OpenResty, characterized in that: include: Collection module, used to collect vehicle information and roadside perception information in real time; A formatting module, used to format the vehicle information and the roadside sensing information to obtain a standard data packet; the standard data packet at least includes the vehicle ID and location information; A reporting module, used to report the standard data packet to the edge cloud through OpenResty; A verification module, used for parsing and verifying the reported standard data packet using a Lua script; A segmentation module, used to segment the standard data packets to different edge computing nodes; A processing module is used to process the data information divided into each node to obtain pre-processed data; A computing module, used to call the computing service of the edge cloud, analyze and calculate the pre-processed data, and generate path planning information and traffic detection information; A sending module, used for sending the path planning information to the corresponding vehicle through OpenResty, so that the corresponding vehicle travels according to the path planning information; The broadcast module is used to broadcast the traffic detection information through OpenResty, so that related vehicles adjust their driving routes according to the traffic detection information.
