Traffic management method and device, electronic equipment and storage medium
By detecting the remaining traffic flow of vehicles and selecting on-board equipment in the same group for traffic sharing, the problem of uneven traffic flow of operating vehicles is solved, traffic utilization is improved and costs are reduced.
Patent Information
- Application Number
- CN202511903848.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-02-27
AI Technical Summary
In existing technologies, the cellular network traffic consumption of operating vehicles is uneven, causing some vehicles to quickly run out of traffic and go offline, while other vehicles have more traffic remaining, resulting in a waste of resources.
By detecting the remaining traffic in vehicles in real time, the communication working mode is determined, and other on-board devices in the same group are selected to provide traffic to the vehicles based on beacon frames and their received signal strength indication values, thereby realizing traffic sharing among vehicles.
This improved the utilization rate of vehicle traffic, avoided the problem of going offline due to traffic exhaustion, and reduced the overall traffic cost.
Smart Images

Figure CN121585977A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle management, and more particularly to a traffic management method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, special vehicles, such as commercial vehicles, are equipped with smart devices with cellular networks (such as 4G / 5G) to provide data for functions such as video surveillance, alarm uploading, and OTA upgrades. These functions consume a large amount of cellular data traffic;
[0003] Due to differences in vehicle usage (such as alarm frequency, driver habits, and vehicle idle time), data usage is extremely uneven. For example, some vehicles quickly run out of data and go offline, affecting management; while other vehicles have a lot of data remaining, resulting in wasted resources. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a traffic management method, apparatus, electronic device, and storage medium to solve the problem of excessive remaining traffic flow for other vehicles in the prior art, resulting in resource waste.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] The first aspect illustrates a traffic management method applied to an in-vehicle device of a vehicle, the method comprising:
[0007] When the vehicle-mounted device is determined to be in the first communication working mode based on the real-time detected vehicle remaining traffic, other vehicle-mounted devices in the same group as the vehicle-mounted device within the preset connection range are determined based on the pre-acquired credential list.
[0008] Acquire beacon frames broadcast by other vehicle-mounted devices in the same group as the vehicle-mounted device and their corresponding received signal strength indication values, wherein the beacon frames are broadcast according to a preset time period;
[0009] Based on each beacon frame and its corresponding received signal strength indication value, target other vehicle devices are determined to provide traffic to the vehicle device, so that the target other vehicle devices provide traffic to the vehicle device.
[0010] Optional, also includes:
[0011] When the vehicle-mounted device is determined to be in the second communication mode based on the real-time detected vehicle remaining traffic, it broadcasts beacon frames generated based on the vehicle remaining traffic according to a preset time period so that other vehicles can scan them.
[0012] Optionally, the in-vehicle device determines its communication operating mode based on the real-time detected remaining traffic in the vehicle, including:
[0013] Detect the remaining vehicle flow at preset time intervals;
[0014] Compare the remaining vehicle flow rate with the magnitudes of the first threshold and the second threshold;
[0015] If the remaining traffic of the vehicle is greater than or equal to the first threshold, the communication working mode of the vehicle-mounted device is determined to be the second communication working mode.
[0016] If the remaining traffic of the vehicle is less than or equal to the second threshold, the communication working mode of the vehicle-mounted device is determined to be the first communication working mode.
[0017] Optionally, other vehicle-mounted devices within a preset connection range that are in the same group as the vehicle-mounted device are determined based on a pre-acquired list of monthly vouchers, including:
[0018] Scan for other in-vehicle devices within the preset connection range;
[0019] Determine whether other vehicle-mounted devices broadcasting beacon frames according to a preset time period are detected within the preset connection range;
[0020] If so, based on the pre-acquired monthly voucher list, other vehicle devices in the same group as the vehicle device are determined from other vehicle devices that broadcast beacon frames according to a preset time period.
[0021] Optional, also includes:
[0022] If it is determined that there is no vehicle with the same vehicle ID as the target other vehicle device within the preset connection range, the vehicle device is controlled to disconnect from the current target other vehicle device, and the process returns to the step of scanning other vehicle devices within the preset connection range.
[0023] Optionally, based on each beacon frame and its corresponding received signal strength indication value, other target vehicle-mounted devices that provide traffic to the vehicle-mounted device are determined, including:
[0024] For each beacon frame, the beacon frame is parsed to obtain the remaining vehicle traffic of the other vehicle-mounted devices;
[0025] For each beacon frame, the comprehensive score of the other vehicle-mounted devices is determined based on the remaining vehicle traffic of the other vehicle-mounted devices and the received signal strength indication value corresponding to the beacon frame;
[0026] The target other vehicle devices for providing traffic to the vehicle device are determined based on the overall score of each of the other vehicle devices.
[0027] Optionally, for each beacon frame, a comprehensive score for the other vehicle-mounted devices is determined based on the remaining vehicle traffic of the other vehicle-mounted devices and the received signal strength indication value corresponding to the beacon frame, including:
[0028] For each beacon frame, a first coefficient and a second coefficient are determined based on the Received Signal Strength Indication (RSSI) value corresponding to the beacon frame.
[0029] The first value is determined based on the first coefficient and the Received Signal Strength Indication (RSSI) value corresponding to the beacon frame;
[0030] The second value is determined based on the second coefficient and the vehicle remaining flow R_remaining of the other on-board equipment;
[0031] The sum of the first value and the second value is used as the overall score for the other vehicle-mounted devices.
[0032] The second aspect illustrates a flow management device for use in a vehicle's onboard equipment, the device comprising:
[0033] The determining unit is used to determine other vehicle-mounted devices in the same group as the vehicle-mounted device within a preset connection range based on a pre-acquired list of credentials when the vehicle-mounted device is in the first communication working mode based on the real-time detected vehicle remaining traffic.
[0034] The acquisition unit is used to acquire beacon frames broadcast by other vehicle-mounted devices in the same group as the vehicle-mounted device and their corresponding received signal strength indication values. The beacon frames are broadcast according to a preset time period.
[0035] The processing unit is configured to determine, based on each beacon frame and its corresponding received signal strength indication value, a target other vehicle-mounted device that provides traffic to the vehicle-mounted device, so that the target other vehicle-mounted device provides traffic to the vehicle-mounted device.
[0036] The third aspect discloses an electronic device including a processor and a memory, the memory being used to store program code and data for data generation, and the processor being used to invoke program instructions in the memory to execute a traffic management method as described in any of the first aspects.
[0037] The fourth aspect discloses a storage medium including a stored program, wherein, when the program is executed, it controls the device on which the storage medium resides to perform a traffic management method as described in any of the first aspects.
[0038] Based on the above embodiments of the present invention, a traffic management method, apparatus, electronic device, and storage medium are provided. The method includes: when the vehicle-mounted device is determined to be in a first communication working mode based on the real-time detected remaining traffic of the vehicle, determining other vehicle-mounted devices in the same group as the vehicle-mounted device within a preset connection range based on a pre-acquired credential list; acquiring beacon frames broadcast by other vehicle-mounted devices in the same group as the vehicle-mounted device and their corresponding received signal strength indication values, wherein the beacon frames are broadcast according to a preset time period; and determining target other vehicle-mounted devices that provide traffic to the vehicle-mounted device based on each beacon frame and its corresponding received signal strength indication value, so that the target other vehicle-mounted devices provide traffic to the vehicle-mounted device. In the embodiments of the present invention, the current communication working mode of the vehicle-mounted device is determined by the detected remaining traffic of the vehicle; when the vehicle-mounted device is determined to be in the first communication working mode, target other vehicle-mounted devices are selected from other vehicle-mounted devices in the same group as the vehicle-mounted device according to the beacon frames and their corresponding received signal strength indication values, so that the target other vehicle-mounted devices provide traffic to the vehicle-mounted device, thereby improving the traffic utilization rate of each vehicle and avoiding resource waste. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0040] Figure 1 This is a schematic diagram illustrating the connection between a server and a vehicle's onboard equipment, as shown in an embodiment of the present invention.
[0041] Figure 2 This is a schematic diagram illustrating the interaction between the server and the vehicle according to an embodiment of the present invention;
[0042] Figure 3 This is a schematic flowchart illustrating a traffic management method according to an embodiment of the present invention;
[0043] Figure 4 This is a schematic diagram illustrating the process of traffic management for in-vehicle equipment according to an embodiment of the present invention;
[0044] Figure 5 This is an example diagram illustrating traffic management in an embodiment of the present invention;
[0045] Figure 6 This is a schematic diagram of the structure of a flow management device according to an embodiment of the present invention. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0048] It should be noted that the descriptions involving "first," "second," etc., in this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0049] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0050] See Figure 1 This is a schematic diagram illustrating the connection between a server and a vehicle's onboard equipment, as shown in an embodiment of the present invention.
[0051] The server 10 is wirelessly connected to the in-vehicle equipment 20 of multiple vehicles.
[0052] It should be noted that there is one in-vehicle terminal 20 inside a vehicle;
[0053] It should be noted that the server 10 can be deployed in the cloud;
[0054] The server includes a vehicle information database, a traffic monitoring module, a policy management module, and a security authentication module.
[0055] The vehicle information database stores hotspot information for each vehicle, including its Wi-Fi hotspot name, MAC address, Wi-Fi password, and real-time location information.
[0056] The traffic monitoring module is used to periodically receive the remaining traffic data reported by the on-board equipment of each vehicle.
[0057] It should be noted that the remaining data allowance for vehicles refers to cellular data allowance.
[0058] The strategy management module is used to obtain traffic threshold parameters that users can set based on experience or experimentation, namely the first threshold and the second threshold.
[0059] It should be noted that, generally speaking, the first threshold can be 60% for T_high and 20% for the second threshold T_low.
[0060] The security authentication module is used to trigger a credential list update when a preset traffic reset time is reached. Specifically, for each preset traffic reset time, the server generates a random password based on the vehicle ID and MAC address of each vehicle. Then, based on the company ID, vehicle ID, and the current preset traffic reset time, a target SSID corresponding to the preset traffic reset time is set. That is, the naming rule for each vehicle's SSID is CompanyID_VehicleID_Month. Then, the vehicle ID, MAC address, target SSID, and password of each vehicle are used as a data entry to update the credential list of the previous preset traffic reset time. Finally, the updated credential list is pushed to each vehicle via the cellular network.
[0061] Optionally, the updated list of credentials may also include information on all vehicles in the same group.
[0062] Since the preset traffic reset time is day a of each month, a random password can be used as the password for this month.
[0063] For example: If the preset traffic reset time is day 'a' of each month, then if it is determined that the current time reaches day 'a' of each month, the credential list update will be triggered. Specifically, for day 'a' of each month, the server generates a random password (Random()) based on the vehicle ID and MAC address of each vehicle. Then, based on the company ID, vehicle ID, and the current preset traffic reset time, the target SSID corresponding to the preset traffic reset time is set, that is, the SSID is CompanyID_VehicleID_Month. Then, the vehicle ID, MAC address, target SSID, and password of each vehicle are used as a data entry to update the credential list of the previous preset traffic reset time. Next, the updated credential list is pushed to vehicle A and vehicle B via the cellular network so that vehicle A and vehicle B can store the updated credential list in their local storage. Figure 2 As shown, this is to prevent unauthorized access and malicious traffic consumption.
[0064] The vehicle's onboard equipment includes a cellular communication module, a WiFi module, a storage module, and a processing module.
[0065] The cellular communication module supports SIM card slots for 4G / 5G networks;
[0066] The WiFi module supports a second communication mode, namely AP mode (hotspot mode), and a first communication mode, namely STA mode (client mode).
[0067] The storage module is used to store configuration information and a list of credentials.
[0068] Optionally, to prevent malicious data consumption after individual vehicle passwords are leaked, the network addresses connected to the WiFi module are restricted. Policy routing is configured in the operating system kernel of the vehicle device, and filtering rules are set using iptables to allow access only to the management server IP range or server IP.
[0069] The above diagram illustrates the interaction between the server and the in-vehicle equipment. Below is a diagram showing the specific process by which the processing module in the in-vehicle equipment implements vehicle traffic management. Figure 3 The diagram shown is a flowchart illustrating a traffic management method according to an embodiment of the present invention. The method includes:
[0070] Step S301: Determine whether the vehicle-mounted device is in the first communication working mode based on the real-time detected vehicle remaining traffic. If it is, proceed to step S302. If not, determine whether the vehicle-mounted device is in the second communication working mode.
[0071] It should be noted that the specific implementation of step S301 includes the following steps.
[0072] Step S11: Detect the remaining flow of vehicles at preset time intervals;
[0073] In the specific implementation of step S11, the processing module in the vehicle-mounted equipment checks the remaining vehicle traffic in the current cellular communication module once at a preset time interval.
[0074] It should be noted that the remaining vehicle flow is expressed as a percentage.
[0075] Optionally, the onboard device will generate a message with the collected remaining vehicle traffic and its own vehicle ID and report it to the server via the cellular network.
[0076] Step S12: Compare the remaining vehicle traffic with the first threshold and the second threshold. If the remaining vehicle traffic is greater than or equal to the first threshold, proceed to step S13. If the remaining vehicle traffic is less than or equal to the second threshold, proceed to step S14. If the remaining vehicle traffic is less than the first threshold but greater than the second threshold, control the on-board equipment to shut down the second communication working mode, i.e., AP mode.
[0077] In the specific implementation of step S12, it is determined whether the remaining traffic of the vehicle is greater than or equal to a first threshold, or less than or equal to a second threshold. If the remaining traffic of the vehicle is greater than or equal to the first threshold, step S13 is executed; if the remaining traffic of the vehicle is less than or equal to the second threshold, step S14 is executed. If the remaining traffic of the vehicle is less than the first threshold but greater than the second threshold, the vehicle-mounted device is controlled to shut down the second communication working mode, i.e., AP mode.
[0078] The first threshold is greater than the second threshold.
[0079] Step S13: Determine that the communication working mode of the vehicle-mounted device is the second communication working mode;
[0080] Optionally, it also includes: if it is determined that the communication working mode of the vehicle-mounted device is the second communication working mode, controlling the vehicle-mounted device to turn on the second communication working mode and turn off the first communication working mode;
[0081] Specifically, the control module controls the WiFi module of the vehicle-mounted device to enable AP mode, i.e., the second communication working mode, and disable STA mode, i.e., the first communication working mode.
[0082] Step S14: Determine that the communication working mode of the vehicle-mounted device is the first communication working mode, and execute step S302.
[0083] Optional, also includes:
[0084] If it is determined that the communication working mode of the vehicle-mounted device is the first communication working mode, the vehicle-mounted device is controlled to start the first communication working mode and stop the second communication working mode.
[0085] Specifically, the control module controls the WiFi module of the vehicle-mounted device to turn off AP mode, i.e., the second communication working mode, and turn on STA mode, i.e., the first communication working mode.
[0086] Step S302: Based on the pre-acquired monthly voucher list, determine other vehicle-mounted devices within the preset connection range that are in the same group as the vehicle-mounted device;
[0087] It should be noted that the specific implementation of step S302 includes the following steps.
[0088] Step S21: Scan other vehicle-mounted devices within the preset connection range;
[0089] In the specific implementation step S302, the processor calls the WiFi module to scan the in-vehicle devices of other vehicles within the preset connection range;
[0090] It should be noted that the preset connection range is set based on the signal strength of the hotspot.
[0091] Step S22: Determine whether other vehicle-mounted devices broadcasting beacon frames according to a preset time period are detected within the preset connection range;
[0092] In the specific implementation of step S22, it is determined whether other vehicle-mounted devices detected within the preset connection range broadcast beacon frames according to the preset time period. If so, step S23 is executed; otherwise, they are deleted.
[0093] It should be noted that, in addition to steps S21 and S22 above, other vehicle-mounted devices that broadcast beacon frames within the preset connection range according to a preset time period can also be directly scanned. In other words, the other vehicle-mounted devices that can be scanned are those that broadcast beacon frames according to a preset time period.
[0094] Step S23: Based on the pre-acquired monthly voucher list, determine other vehicle-mounted devices in the same group as the vehicle-mounted device from other vehicle-mounted devices that broadcast beacon frames according to a preset time period.
[0095] The credential list is a list of each vehicle's vehicle ID, MAC address, target SSSID, and password, which is pre-stored by the server according to a preset traffic reset time.
[0096] In the specific implementation step S23, other vehicle IDs of other vehicle-mounted devices within the preset connection range are obtained; for each other vehicle ID, it is determined whether it is its own vehicle ID in the same group of vehicle information in the monthly voucher list. If it is included, the other vehicle-mounted device is obtained; if it is not included, it is removed; thereby determining other vehicle-mounted devices in the same group as the vehicle-mounted device.
[0097] Optional, also includes:
[0098] If it is determined that there are no other vehicle devices in the same group as the vehicle device among the other vehicle devices that broadcast beacon frames according to the preset time period, the traffic request triggered by the customer in the vehicle is received.
[0099] Determine whether the service priority corresponding to the traffic request is a high-priority traffic request;
[0100] If it is a high-priority traffic request, activate the business priority policy to execute high-priority traffic requests first;
[0101] Specifically, the system uses its own SIM card's cellular network for communication. To ensure critical management functions, the system will activate a service priority policy to execute the traffic requests.
[0102] High-priority traffic requests can include emergency alarms, vehicle status, or location information.
[0103] For low-priority traffic requests, the requests are temporarily cached in local storage and executed only after an available shared WiFi hotspot is detected, in order to save data usage.
[0104] Low-priority traffic requests may include non-real-time log uploads or requests for partial video clips.
[0105] Optionally, after performing step S23, the following may also be included:
[0106] Determine whether the target SSID of other vehicle devices in the same group as the vehicle device conforms to the preset rules. If it does, determine that the other vehicle device is in the whitelist, keep it, and execute step S303; otherwise, remove it.
[0107] It should be noted that the default rule refers to the SSID being generated according to CompanyID_VehicleID_Month.
[0108] Step S303: Obtain the beacon frames broadcast by other vehicle-mounted devices in the same group as the vehicle-mounted device and their corresponding received signal strength indication values. The beacon frames are broadcast according to a preset time period.
[0109] In the specific implementation of step S303, beacon frames broadcast by other vehicle devices in the same group as the vehicle device are obtained by broadcasting; at the moment the beacon frame is received, the underlying driver or API of the vehicle device will return the received signal strength indicator (RSSI) value of the beacon frame.
[0110] It should be noted that the Received Signal Strength Indication (RSSI) is provided directly by the WiFi chip's hardware and is the most direct physical quantity for measuring signal quality.
[0111] The moment a device receives a beacon frame, the underlying driver or application interface API returns the frame's RSSI value (usually a negative value, such as -50dBm). This value does not need to be parsed from the beacon frame's data content; rather, it represents the frame's physical properties.
[0112] Step S304: Based on each beacon frame and its corresponding received signal strength indication value, determine the target other vehicle-mounted devices that will provide traffic to the vehicle-mounted device, so that the target other vehicle-mounted devices will provide traffic to the vehicle-mounted device.
[0113] It should be noted that the specific implementation of step S304 includes the following steps.
[0114] Step S31: For each beacon frame, parse the beacon frame to obtain the remaining vehicle traffic of the other vehicle-mounted devices;
[0115] In the specific implementation step S31, the beacon frame will be parsed, and the remaining vehicle traffic of other in-vehicle devices will be extracted from the custom data "Vendor Specific" reserved in the beacon frame.
[0116] Step S32: For each beacon frame, determine the comprehensive score of the other vehicle-mounted devices based on the remaining vehicle traffic of the other vehicle-mounted devices and the received signal strength indication value corresponding to the beacon frame;
[0117] It should be noted that the specific implementation of step S32 includes the following steps:
[0118] Step S41: For each beacon frame, determine the first coefficient and the second coefficient based on the Received Signal Strength Indication (RSSI) value corresponding to the beacon frame.
[0119] The sum of the first coefficient and the second coefficient is 1.
[0120] In the specific implementation of step S41, for each beacon frame, the relationship between the preset Received Signal Strength Indication (RSSI) value and the weighting coefficient is traversed to determine the first coefficient and the second coefficient corresponding to the RSSI value.
[0121] Among them, the first coefficient and the second coefficient are weighting coefficients.
[0122] It should be noted that, in addition to the implementation method described in step S41, other methods are also included to determine the weight coefficients.
[0123] In one implementation, the distance between the vehicle-mounted device and each other vehicle-mounted device is obtained; based on the distance, a first coefficient and a second coefficient corresponding to the distance are determined by traversing a preset relationship between distances and weight coefficients.
[0124] Step S42: Determine a first value based on the first coefficient and the Received Signal Strength Indication (RSSI) value corresponding to the beacon frame;
[0125] In the specific implementation step S42, the absolute value of the Received Signal Strength Indication (RSSI) value corresponding to the beacon frame is calculated and multiplied by the first coefficient to obtain the first value.
[0126] Step S43: Determine the second value based on the second coefficient and the vehicle remaining flow R_remaining of the other on-board equipment;
[0127] In the specific implementation step S43, the product of the second coefficient and the vehicle remaining flow R_remaining of the other vehicle-mounted devices is calculated to obtain the second value.
[0128] Step S44: The sum of the first value and the second value is taken as the comprehensive score of the other vehicle-mounted devices;
[0129] In other words, in the specific implementation of steps S32 to S34, for each beacon frame, the vehicle remaining traffic R_remaining of the other vehicle-mounted devices and the received signal strength indication RSSI value corresponding to the beacon frame are substituted into formula (1) for calculation to obtain the comprehensive score of the other vehicle-mounted devices.
[0130]
[0131] Where S represents the overall score of other in-vehicle devices. As the first coefficient, This is the second coefficient.
[0132] Step S33: Based on the comprehensive score of each of the other vehicle-mounted devices, determine the target other vehicle-mounted devices that will provide traffic to the vehicle-mounted devices.
[0133] It should be noted that the specific implementation process of step S33 includes:
[0134] Step S51: Sort the other vehicle-mounted devices in descending order of their comprehensive scores.
[0135] Step S52: Select the other vehicle-mounted devices with the highest comprehensive score as the target other vehicle-mounted devices.
[0136] In the specific implementation of steps S51 and S52, each other vehicle-mounted device is first sorted according to the size of the comprehensive score to obtain other vehicle-mounted devices sorted in descending order; then, the other vehicle-mounted device with the highest comprehensive score is selected as the target other vehicle-mounted device.
[0137] Optionally, before the target other in-vehicle devices provide traffic to the in-vehicle device, the method further includes:
[0138] The vehicle-mounted device obtains the Wi-Fi hotspot name or MAC address of the target other vehicle-mounted device from the credential list, along with the corresponding password; it then connects to the Wi-Fi hotspot under the Wi-Fi module of the target other vehicle-mounted device based on the Wi-Fi hotspot name or MAC address and the corresponding password, so that the target other vehicle-mounted device can provide traffic to the vehicle-mounted device.
[0139] It should be noted that the flowcharts for steps S301 to S304 are shown below. Figure 4 As shown.
[0140] Step S305: When the vehicle-mounted device is determined to be in the second communication working mode based on the real-time detected vehicle remaining traffic, a beacon frame generated based on the vehicle remaining traffic is broadcast according to a preset time period so that other vehicles can scan it.
[0141] Specifically, when the vehicle-mounted device generates and broadcasts a beacon frame, it encapsulates its real-time remaining traffic percentage, R_remaining (i.e., the vehicle's remaining traffic), as a data block into a custom Vendor Specific IE. This allows the vehicle-mounted device in STA mode to iterate through all information elements in the beacon frame upon receiving it. When it finds a custom Vendor Specific IE that matches the company's OUI, it extracts the value of R_remaining from its Data portion.
[0142] Its data block structure can be [Element ID][Length][OUI (Company Identifier)][Data (containing R_remaining)].
[0143] Optional, also includes:
[0144] The vehicle-mounted device scans other vehicle-mounted devices within a preset connection range in real time. If it is determined that there is no vehicle with the same vehicle ID as the target other vehicle-mounted device within the preset connection range, or if the RSSI value is detected to be less than the preset RSSI value, the vehicle-mounted device is controlled to disconnect from the current target other vehicle-mounted device and the process returns to step S21.
[0145] Next, the new target other vehicle-mounted devices are reconnected according to steps S301 to S304 to achieve breakpoint resume, that is, to continue providing traffic from the point where it was last disconnected.
[0146] To better understand the methods shown in steps S301 to S305 above, the following will be combined with... Figure 5 Please provide an explanation.
[0147] First, based on the real-time detected remaining vehicle data traffic, the vehicle device is determined to enter STA mode; then, the surrounding Wi-Fi hotspots are scanned, i.e., other vehicle devices within the preset connection range;
[0148] Next, filter out hotspots of other in-vehicle devices whose SSIDs conform to the naming rules and are in the same group;
[0149] Then, the beacon frames of each other in-vehicle device hotspot are parsed to obtain the vehicle remaining traffic R_remaining and the corresponding signal strength RSSI of the beacon frames;
[0150] Next, the comprehensive score of each hotspot, i.e., the vehicle-mounted device, is calculated using formula (1);
[0151] Secondly, select the hotspot of the other in-vehicle device with the highest overall score (S) and use it as the target other in-vehicle device; then find the corresponding password from the local credential list based on the hotspot's SSID or MAC address;
[0152] Use a password to connect to the hotspot of other in-vehicle devices on the target;
[0153] Finally, determine whether the connection is successful. If the connection is successful, route traffic through the cellular network of the shared hotspot to other in-vehicle devices. If the connection fails, the signal weakens, or the connection is lost, return to rescan.
[0154] In this embodiment of the invention, the current communication mode of the vehicle-mounted device is determined by detecting the remaining traffic in the vehicle. When it is determined that the vehicle-mounted device is in the first communication mode, a target other vehicle-mounted device is selected from other vehicle-mounted devices in the same group as the vehicle-mounted device according to the beacon frame and its corresponding received signal strength indication value, so as to achieve traffic balance through inter-vehicle WiFi sharing, so that the target other vehicle-mounted device can provide traffic to the vehicle-mounted device. This not only solves the problem of uneven traffic consumption of operating vehicles, but also prevents vehicles from going offline due to traffic exhaustion, while improving traffic utilization and reducing overall traffic costs.
[0155] Based on the above embodiments of the present invention, a traffic management method is shown. Correspondingly, embodiments of the present invention also show a traffic management device, such as... Figure 6 As shown, an in-vehicle device applied to a vehicle, the device comprising:
[0156] The determining unit 601 is used to determine other vehicle-mounted devices in the same group as the vehicle-mounted device within a preset connection range based on a pre-acquired credential list when the vehicle-mounted device is determined to be in the first communication working mode based on the real-time detected vehicle remaining traffic.
[0157] The acquisition unit 602 is used to acquire beacon frames broadcast by other vehicle-mounted devices in the same group as the vehicle-mounted device and their corresponding received signal strength indication values. The beacon frames are broadcast according to a preset time period.
[0158] The processing unit 603 is configured to determine, based on each beacon frame and its corresponding received signal strength indication value, a target other vehicle-mounted device that provides traffic to the vehicle-mounted device, so that the target other vehicle-mounted device provides traffic to the vehicle-mounted device.
[0159] The specific principles and execution processes of each unit in the traffic management device disclosed in the above embodiments of the present invention are the same as the corresponding contents in the traffic management method provided in the above embodiments of the present invention. Please refer to the corresponding parts in the traffic management method disclosed in the above embodiments of the present invention, and they will not be repeated here.
[0160] In this embodiment of the invention, the current communication mode of the vehicle-mounted device is determined by detecting the remaining traffic of the vehicle. When it is determined that the vehicle-mounted device is in the first communication mode, a target other vehicle-mounted device is selected from other vehicle-mounted devices in the same group as the vehicle-mounted device according to the beacon frame and its corresponding received signal strength indication value, so that the target other vehicle-mounted device can provide traffic to the vehicle-mounted device, thereby improving the traffic utilization rate of each vehicle and avoiding the problem of resource waste.
[0161] Optionally, based on the traffic management device shown in the above embodiments of the present invention, the processing unit 603 is further configured to:
[0162] When the vehicle-mounted device is determined to be in the second communication mode based on the real-time detected vehicle remaining traffic, it broadcasts beacon frames generated based on the vehicle remaining traffic according to a preset time period so that other vehicles can scan them.
[0163] Optionally, based on the traffic management device shown in the above embodiments of the present invention, the determining unit 601 for determining the communication operating mode of the vehicle-mounted device based on the real-time detected remaining traffic of the vehicle is specifically used for:
[0164] Detect the remaining vehicle flow at preset time intervals;
[0165] Compare the remaining vehicle flow rate with the magnitudes of the first threshold and the second threshold;
[0166] If the remaining traffic of the vehicle is greater than or equal to the first threshold, the communication working mode of the vehicle-mounted device is determined to be the second communication working mode.
[0167] If the remaining traffic of the vehicle is less than or equal to the second threshold, the communication working mode of the vehicle-mounted device is determined to be the first communication working mode.
[0168] Optionally, based on the traffic management device shown in the above embodiments of the present invention, the determining unit 601, which determines other vehicle-mounted devices within a preset connection range that are in the same group as the vehicle-mounted device based on a pre-acquired monthly voucher list, is specifically used for:
[0169] Scan for other in-vehicle devices within the preset connection range;
[0170] Determine whether other vehicle-mounted devices broadcasting beacon frames according to a preset time period are detected within the preset connection range;
[0171] If so, based on the pre-acquired monthly voucher list, other vehicle devices in the same group as the vehicle device are determined from other vehicle devices that broadcast beacon frames according to a preset time period.
[0172] Optionally, based on the traffic management device shown in the above embodiments of the present invention, the processing unit 603 is further configured to:
[0173] If it is determined that there is no vehicle with the same vehicle ID as the target other vehicle device within the preset connection range, the vehicle device is controlled to disconnect from the current target other vehicle device, and the process returns to scanning other vehicle devices within the preset connection range.
[0174] Optionally, based on the traffic management device shown in the above embodiments of the present invention, the processing unit 603 is specifically used for:
[0175] For each beacon frame, the beacon frame is parsed to obtain the remaining vehicle traffic of the other vehicle-mounted devices;
[0176] For each beacon frame, the comprehensive score of the other vehicle-mounted devices is determined based on the remaining vehicle traffic of the other vehicle-mounted devices and the received signal strength indication value corresponding to the beacon frame;
[0177] The target other vehicle devices for providing traffic to the vehicle device are determined based on the overall score of each of the other vehicle devices.
[0178] Specifically, for each beacon frame, the comprehensive score of the other vehicle-mounted devices is determined based on the remaining vehicle traffic of the other vehicle-mounted devices and the received signal strength indication value corresponding to the beacon frame, including:
[0179] For each beacon frame, a first coefficient and a second coefficient are determined based on the Received Signal Strength Indication (RSSI) value corresponding to the beacon frame.
[0180] The first value is determined based on the first coefficient and the Received Signal Strength Indication (RSSI) value corresponding to the beacon frame;
[0181] The second value is determined based on the second coefficient and the vehicle remaining flow R_remaining of the other on-board equipment;
[0182] The sum of the first value and the second value is used as the overall score for the other vehicle-mounted devices.
[0183] This application provides an electronic device, which includes a processor and a memory. The memory is used to store traffic management program code and data, and the processor is used to call the program instructions in the memory to execute the steps shown in the traffic management method in the above embodiments.
[0184] This invention provides a storage medium, namely a computer-readable storage medium, which includes the electronic device provided in the above-described embodiments of this application. The electronic device is used to execute the traffic management method disclosed in the embodiments of this application.
[0185] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0186] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0187] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A traffic management method, characterized in that, An in-vehicle device applied to a vehicle, the method comprising: When the vehicle-mounted device is determined to be in the first communication working mode based on the real-time detected vehicle remaining traffic, other vehicle-mounted devices in the same group as the vehicle-mounted device within the preset connection range are determined based on the pre-acquired credential list. Acquire beacon frames broadcast by other vehicle-mounted devices in the same group as the vehicle-mounted device and their corresponding received signal strength indication values, wherein the beacon frames are broadcast according to a preset time period; Based on each beacon frame and its corresponding received signal strength indication value, target other vehicle devices are determined to provide traffic to the vehicle device, so that the target other vehicle devices provide traffic to the vehicle device.
2. The method according to claim 1, characterized in that, Also includes: When the vehicle-mounted device is determined to be in the second communication mode based on the real-time detected vehicle remaining traffic, it broadcasts beacon frames generated based on the vehicle remaining traffic according to a preset time period so that other vehicles can scan them.
3. The method according to claim 1, characterized in that, The in-vehicle device determines its communication operating mode based on real-time detected remaining vehicle traffic, including: Detect the remaining vehicle flow at preset time intervals; Compare the remaining vehicle flow rate with the magnitudes of the first threshold and the second threshold; If the remaining traffic of the vehicle is greater than or equal to the first threshold, the communication working mode of the vehicle-mounted device is determined to be the second communication working mode. If the remaining traffic of the vehicle is less than or equal to the second threshold, the communication working mode of the vehicle-mounted device is determined to be the first communication working mode.
4. The method according to claim 1, characterized in that, Based on a pre-acquired list of monthly vouchers, other vehicle-mounted devices within a preset connection range that are in the same group as the vehicle-mounted device are identified, including: Scan for other in-vehicle devices within the preset connection range; Determine whether other vehicle-mounted devices broadcasting beacon frames according to a preset time period are detected within the preset connection range; If so, based on the pre-acquired monthly voucher list, other vehicle devices in the same group as the vehicle device are determined from other vehicle devices that broadcast beacon frames according to a preset time period.
5. The method according to claim 4, characterized in that, Also includes: If it is determined that there is no vehicle with the same vehicle ID as the target other vehicle device within the preset connection range, the vehicle device is controlled to disconnect from the current target other vehicle device, and the process returns to the step of scanning other vehicle devices within the preset connection range.
6. The method according to claim 1, characterized in that, Based on each beacon frame and its corresponding received signal strength indication value, other target vehicle-mounted devices that provide traffic to the vehicle-mounted device are determined, including: For each beacon frame, the beacon frame is parsed to obtain the remaining vehicle traffic of the other vehicle-mounted devices; For each beacon frame, the comprehensive score of the other vehicle-mounted devices is determined based on the remaining vehicle traffic of the other vehicle-mounted devices and the received signal strength indication value corresponding to the beacon frame; The target other vehicle devices for providing traffic to the vehicle device are determined based on the overall score of each of the other vehicle devices.
7. The method according to claim 6, characterized in that, For each beacon frame, a comprehensive score for the other vehicle-mounted devices is determined based on their remaining vehicle bandwidth and the received signal strength indication value corresponding to the beacon frame, including: For each beacon frame, a first coefficient and a second coefficient are determined based on the Received Signal Strength Indication (RSSI) value corresponding to the beacon frame. The first value is determined based on the first coefficient and the Received Signal Strength Indication (RSSI) value corresponding to the beacon frame; The second value is determined based on the second coefficient and the vehicle remaining flow R_remaining of the other on-board equipment; The sum of the first value and the second value is used as the overall score for the other vehicle-mounted devices.
8. A flow management device, characterized in that, An in-vehicle device for use in a vehicle, the device comprising: The determining unit is used to determine other vehicle-mounted devices in the same group as the vehicle-mounted device within a preset connection range based on a pre-acquired list of credentials when the vehicle-mounted device is in the first communication working mode based on the real-time detected vehicle remaining traffic. The acquisition unit is used to acquire beacon frames broadcast by other vehicle-mounted devices in the same group as the vehicle-mounted device and their corresponding received signal strength indication values. The beacon frames are broadcast according to a preset time period. The processing unit is configured to determine, based on each beacon frame and its corresponding received signal strength indication value, a target other vehicle-mounted device that provides traffic to the vehicle-mounted device, so that the target other vehicle-mounted device provides traffic to the vehicle-mounted device.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store program code and data for data generation, and the processor being used to call program instructions in the memory to execute the traffic management method as described in any one of claims 1-7.
10. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the traffic management method as described in any one of claims 1-7.