Gating switching method and device, electronic equipment and storage medium

By determining the corresponding gating mechanism according to the working mode of the vehicle system, the complex problems of low bandwidth utilization and gating list solving caused by the gating mechanism in the prior art are solved, and more efficient network resource utilization and response speed are achieved.

CN119449607APending Publication Date: 2025-02-14CHINA AUTOMOTIVE INNOVATION CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411386498.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-02-14

Smart Images

  • Figure CN119449607A_ABST
    Figure CN119449607A_ABST
Patent Text Reader

Abstract

The invention discloses a gating switching method and device, electronic equipment and a storage medium. The method comprises the steps that the current working mode of a vehicle is determined; determining a target gating mechanism corresponding to the current working mode; the target gating mechanism represents a time distribution mechanism of the traffic of the vehicle in the current working mode; acquiring a current moment of the system, a first gating period of a current gating mechanism and a first gating opening moment; determining a gating switching moment according to the current moment of the system, the first gating period and the first gating opening moment; and switching to a target gating mechanism according to the gating switching moment. The corresponding gating mechanism is determined based on the working mode of the vehicle system, the flow number and the time slot number processed by the server in each working mode are reduced, the solving complexity of the gating table is remarkably reduced, meanwhile, the working mode corresponds to the time slot of the gating mechanism, the time slot can be effectively utilized, and the system reliability is improved. And the bandwidth utilization rate of a network link is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of in-vehicle Ethernet, and in particular to a gated switching method, device, electronic device and storage medium. Background Art

[0002] With the emergence of applications such as industrial Internet, telemedicine, and driverless cars, the requirements for networks have also shifted from non-determinism to determinism. From the perspective of industry trends and technological evolution, deterministic networks are the main evolution direction of future communication networks. Deterministic scheduling is a key technology in system design, which ensures the predictability and stability of the system by precisely controlling the time and order of task execution.

[0003] However, the bandwidth utilization rate of the current gating mechanism is low. This is because if the bridge or end device does not use the time slots in the gating mechanism in time, these time slots and bandwidth will be lost, resulting in low utilization of network bandwidth. Furthermore, when the traffic and number of time slots in the network increase significantly, the gating list solution is complex and time-consuming, and it is impossible to ensure that the gating list can be solved quickly, thus affecting the response speed and efficiency of the network. Summary of the invention

[0004] In order to solve the technical problem that the existing gating mechanism results in low utilization of network bandwidth, the present invention provides a gating switching method, device, electronic device and storage medium, which determine the corresponding gating mechanism based on the working mode of the vehicle system, reduce the number of flows and time slots processed by the server in each working mode, and significantly reduce the complexity of solving the gating table. At the same time, the working mode corresponds to the time slot of the gating mechanism, so that the time slot can be effectively utilized, thereby improving the bandwidth utilization of the network link.

[0005] In a first aspect, an embodiment of the present application provides a gated switching method, the method comprising:

[0006] Determine the current operating mode of the vehicle;

[0007] Determine the target gating mechanism corresponding to the current working mode; the target gating mechanism represents the time distribution mechanism of the vehicle flow in the current working mode;

[0008] Obtain the current time of the system, the first gating cycle of the current gating mechanism and the first gating start time;

[0009] Determine the gate control switching time according to the current time of the system, the first gate control cycle and the first gate control start time;

[0010] According to the gating switching time, switch to the target gating mechanism.

[0011] In an optional embodiment, determining the current operating mode of the vehicle includes:

[0012] Obtaining the vehicle's driving speed information, driving direction information, and driving environment information;

[0013] The current working mode is determined according to the driving speed information, the driving direction information and the driving environment information; the current working mode includes at least one of a forward mode, a deceleration mode, a reverse mode and a parking mode.

[0014] In an optional embodiment, determining a target gating mechanism corresponding to the current working mode includes:

[0015] Get the current gate control flag corresponding to the current working mode;

[0016] Obtain a gating table set; the gating table set includes multiple gating tables;

[0017] If the current gating identifier exists among the gating identifiers of the multiple gating tables, it is determined that the gating table corresponding to the current gating identifier is the target gating mechanism corresponding to the current working mode.

[0018] In an optional embodiment, switching to a target gating mechanism according to the gating switching time includes:

[0019] Get the current entry content of the current gating table and the target entry content of the target gating table;

[0020] If the target entry content includes the current entry content, at the gate switching moment, switch to the target gating table.

[0021] In an optional embodiment, the current entry content of the current gating table and the target entry content of the target gating table are obtained, and then the following steps are further included:

[0022] If the target entry content does not include the current entry content, obtaining the second gating opening time of the target gating table;

[0023] Determining a gate control switching mode according to a first gate control period, a first gate control start time, and a second gate control start time;

[0024] Get the preset delay time;

[0025] According to the preset delay time and the current time of the system, determine the current time of the system after the delay and the gate control switching time after the delay, and use the gate control switching time after the delay as the gate control switching time;

[0026] According to the gate switching mode and gate switching time, switch to the target gate table.

[0027] In an optional embodiment, switching to a target gating table according to a gating switching mode and a gating switching time includes:

[0028] Determining a time interval according to a difference between a first gate-on time and a second gate-on time;

[0029] If the time interval is equal to an integral multiple of the first gating period, the target gating table is switched at the gating switching moment.

[0030] In an optional embodiment, after determining the time interval according to the difference between the first gated start time and the second gated start time, the method further includes:

[0031] If the time interval is not equal to an integer multiple of the first gating period, obtaining the execution status of the current gating table;

[0032] If the execution status indicates that the current cycle task of the current gating table has been completed, an idle loop is inserted, and the gating table is switched to the target gating table at the gating switching time; or; if the execution status indicates that the current cycle task of the current gating table has not been completed, the current gating table executes the current cycle task, and switches to the target gating table at the gating switching time.

[0033] In a second aspect, an embodiment of the present application provides a gated switching device, the device comprising:

[0034] A first determination module, used to determine a current working mode of the vehicle;

[0035] The second determination module is used to determine the target gating mechanism corresponding to the current working mode; the target gating mechanism represents the time distribution mechanism of the vehicle flow in the current working mode;

[0036] A third acquisition module is used to acquire the current time of the system, the first gating cycle of the current gating mechanism and the first gating start time;

[0037] A third determining module, used to determine the gate control switching time according to the current time of the system, the first gate control cycle and the first gate control opening time;

[0038] The switching module is used to switch to the target gating mechanism according to the gating switching time.

[0039] In an optional embodiment, the first determination module is also used to: obtain the vehicle's driving speed information, driving direction information and driving environment information; determine the current working mode based on the driving speed information, driving direction information and driving environment information; the current working mode includes at least one of a forward mode, a deceleration mode, a reverse mode and a parking mode.

[0040] In an optional embodiment, the second determination module is also used to: obtain a current gating identifier corresponding to the current working mode; obtain a gating table set; the gating table set includes multiple gating tables; if the current gating identifier exists among the gating identifiers of the multiple gating tables, determine that the gating table corresponding to the current gating identifier is the target gating mechanism corresponding to the current working mode.

[0041] In an optional implementation, the second determination module is further used to: obtain the current entry content of the current gating table and the target entry content of the target gating table; if the target entry content includes the current entry content, switch to the target gating table at the gating switching moment.

[0042] In an optional embodiment, the second determination module is also used to: if the target entry content does not include the current entry content, obtain the second gating opening time of the current gating table; determine the gating switching mode according to the first gating cycle, the first gating opening time and the second gating opening time; obtain a preset delay time; determine the delayed system current time and the delayed gating switching time according to the preset delay time and the system current time, and use the delayed gating switching time as the gating switching time; switch to the target gating table according to the gating switching mode and the gating switching time.

[0043] In an optional implementation, the second determination module is further used to: determine the time interval based on the difference between the first gating start time and the second gating start time; if the time interval is equal to an integer multiple of the first gating cycle, switch to the target gating table at the gating switching time.

[0044] In an optional embodiment, the second determination module is also used to: if the time interval is not equal to an integer multiple of the first gating period, obtain the execution status of the current gating table; if the execution status indicates that the current cycle task of the current gating table has been completed, insert an idle loop, and switch to the target gating table at the gating switching time; or; if the execution status indicates that the current cycle task of the current gating table has not been completed, the current gating table executes the current cycle task, and switches to the target gating table at the gating switching time.

[0045] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the gated switching method of the first aspect.

[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the gated switching method of the first aspect.

[0047] In a fifth aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the gated switching method of the first aspect.

[0048] The gated switching method, device, electronic device, and storage medium provided by the embodiments of the present application have the following technical effects:

[0049] Determine the current working mode of the vehicle; determine the target gating mechanism corresponding to the current working mode; the target gating mechanism represents the time distribution mechanism of the vehicle's traffic in the current working mode; obtain the current time of the system, the first gating cycle of the current gating mechanism and the first gating start time; determine the gating switching time according to the current time of the system, the first gating cycle and the first gating start time; switch to the target gating mechanism according to the gating switching time. The present application determines the corresponding gating mechanism based on the working mode of the vehicle system, reduces the number of traffic and time slots processed by the server in each working mode, significantly reduces the complexity of solving the gating table, and at the same time, the working mode corresponds to the time slot of the gating mechanism, so that the time slot can be effectively utilized, improving the bandwidth utilization of the network link. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0051] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application;

[0052] Figure 2 This is a schematic diagram of a gated switching method provided in an embodiment of the present application. Figure 1 ;

[0053] Figure 3 This is a schematic diagram of a gated switching method provided in an embodiment of the present application. Figure 2 ;

[0054] Figure 4 This is a flow chart of a method for determining a gate switching mode provided in an embodiment of the present application. Figure 1 ;

[0055] Figure 5 This is a flow chart of a method for determining a gate switching mode provided in an embodiment of the present application. Figure 2 ;

[0056] Figure 6 is a structural schematic diagram of a gate-controlled switching device provided in an embodiment of the present application;

[0057] Figure 7 This is a hardware structure block diagram of a server of a gated switching method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0059] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0060] See also Figure 1 , Figure 1 1 is a schematic diagram of an application environment provided by an embodiment of the present application, including an information detection device 101 and a vehicle-mounted server 102. The information detection device 101 and the vehicle-mounted server 102 are connected to each other through a wired link or a wireless link, which is not limited in the present application.

[0061] In a possible embodiment, in order to detect relevant information about the vehicle itself and its surroundings, the information detection device 101 provided on the vehicle may include a speed detection device, a position detection device, an environment detection device, and the like.

[0062] Specifically, in a possible embodiment, the speed detection device can be used to detect the speed of the vehicle itself, and can be used to detect the speed of surrounding vehicle obstacles.

[0063] Among them, the speed detection device for detecting the speed of the vehicle may be specifically configured as a wheel speed sensor installed on the wheel axle, which calculates the driving speed of the vehicle by detecting the rotation speed of the wheel. It can also be configured as an inertial measurement unit or other device to obtain the driving speed of the vehicle through calculation and deduction.

[0064] The speed detection device for detecting the speed of surrounding vehicle obstacles may be specifically configured as one or more of a radar speed measurement device that measures the speed of a vehicle by sending a radio frequency signal and receiving its reflection, a laser speed meter that uses a laser beam to measure the speed of a vehicle, and an image speed detection device that uses computer vision technology to analyze the movement of the vehicle to estimate the speed of the vehicle. These speed detection devices can be used alone or in combination to provide accurate measurement of the speed of surrounding vehicles.

[0065] In a possible embodiment, the position detection device may be specifically configured as one or more of a radar sensor that determines the position of the vehicle by sending radio waves and receiving their reflections, an ultrasonic sensor that determines the position of the vehicle by sending ultrasonic pulses and measuring their return time, and a camera sensor. Furthermore, the exchange of position and other status information between vehicles can be achieved through on-board communication technologies such as on-board communication modules and vehicle-to-vehicle communication standards (such as vehicle networking technology), thereby realizing the detection and tracking of the position of the vehicle itself and surrounding vehicles.

[0066] In a possible embodiment, the environment detection device may be specifically configured as an image acquisition device such as a camera, which continuously captures images or videos around the vehicle through the camera, and then subsequently identifies objects in the images or videos through object detection or object recognition technology. For example, it can identify whether it is a car, truck or pedestrian, as well as their speed, direction, etc., and can further analyze the current environment of the vehicle, such as a parking lot, highway, etc.

[0067] In a possible embodiment, the vehicle-mounted server 102 is used to receive speed information, location information, direction information, and environmental information detected by the information detection device 101, and determine the current working mode of the vehicle; determine the target gating mechanism corresponding to the current working mode; the target gating mechanism represents the time distribution mechanism of the vehicle's traffic in the current working mode; obtain the current time of the system, the first gating cycle of the current gating mechanism, and the first gating start time; determine the gating switching time according to the current time of the system, the first gating cycle, and the first gating start time; switch to the target gating mechanism according to the gating switching time. The present application determines the corresponding gating mechanism based on the working mode of the vehicle system, reduces the number of traffic and time slots processed by the server in each working mode, and significantly reduces the complexity of solving the gating table. At the same time, the working mode corresponds to the time slot of the gating mechanism, so that the time slot can be effectively utilized, improving the bandwidth utilization of the network link.

[0068] The following describes a specific embodiment of a gated switching method of the present application. Figure 2 This is a schematic diagram of a gated switching method provided in an embodiment of the present application. Figure 1 , this specification provides method operation steps such as embodiments or flow charts, but may include more or fewer operation steps based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, Figure 2 As shown, it may include:

[0069] S201: Determine the current operating mode of the vehicle.

[0070] S202: Determine a target gating mechanism corresponding to the current working mode; the target gating mechanism represents a time distribution mechanism of vehicle flow in the current working mode.

[0071] S203: Acquire the current time of the system, the first gating cycle of the current gating mechanism, and the first gating start time.

[0072] S204: Determine a gating switching time according to the current system time, the first gating cycle and the first gating start time.

[0073] S205: Switch to the target gating mechanism according to the gating switching time.

[0074] Figure 3 This is a schematic diagram of a gated switching method provided in an embodiment of the present application. Figure 2 , the method may include:

[0075] S301: Determine the current operating mode of the vehicle.

[0076] In a possible embodiment, the current working mode includes at least one of a forward mode, a deceleration mode, a reverse mode, and a parking mode. Specifically, the forward mode indicates that the vehicle is currently in a normal driving state, and is driving within a set speed range or speed limit; the deceleration mode indicates that the vehicle is currently decelerating or needs to reduce speed to adapt to specific road conditions or environmental conditions. The vehicle switches to the deceleration mode when there are obstacles ahead, the road conditions are complex, or emergency braking is required; the reverse mode indicates that the vehicle is currently driving backwards, and is usually used for parking, backing up to adjust the position, or other operations that require moving backwards. In the reverse mode, the vehicle may be limited by the field of vision and the controller, and special attention needs to be paid to surrounding obstacles and safety distances; the parking mode is an auxiliary mode when the vehicle is parking, usually with the help of auxiliary equipment such as reversing radar and cameras to assist the driver in precise parking operations.

[0077] According to the specific meaning of the above working modes, in different vehicle working modes, the data and information that the vehicle relies on are different. As a key mechanism for controlling network data transmission, the gated list also needs to change dynamically according to changes in the working mode.

[0078] For example, in forward mode, there may be more sensor data that needs to be transmitted, while in deceleration or reverse mode, the data flow of control signals may increase. Therefore, the gating list needs to be dynamically adjusted according to the different working modes to optimize the use of network resources, avoid congestion and delay of information and data, and meet the requirements of real-time and security.

[0079] In a possible embodiment, determining the current working mode of the vehicle includes:

[0080] S3011: Obtain the vehicle's driving speed information, driving direction information and driving environment information.

[0081] S3012: Determine the current working mode based on the driving speed information, driving direction information and driving environment information.

[0082] The driving speed information represents the current driving speed of the vehicle and can be obtained through the speed sensor or the engine control unit of the vehicle. The driving speed information is used to determine what speed range the vehicle is in. For example, when the vehicle is in a low speed range, the vehicle is usually in parking mode or deceleration mode; when the vehicle is in a medium speed range, the vehicle is usually in normal driving state, forward mode; when the vehicle is in a high speed range, the vehicle is usually in forward mode, but it needs to be further determined in combination with environmental factors.

[0083] The driving direction information represents the current driving direction of the vehicle, including forward, reverse, turning and other states, which can be obtained through the steering wheel angle sensor or the vehicle's direction sensor.

[0084] The driving environment information represents the surrounding environment of the vehicle, including road conditions, surrounding obstacles, weather conditions, etc. The above driving environment information can be obtained through cameras, radars, laser radars, road sensors, etc. The driving environment information is used to further determine the current working mode of the vehicle.

[0085] In the embodiment of the present application, each working mode has its own driving speed information, driving direction information and driving environment information, which constitutes a mapping relationship table between working modes and driving information, for example, "if the speed is extremely low or close to stopping, the direction is any direction, and the surrounding environment is a parking area, the corresponding parking mode". If the driving information of the current vehicle matches a mapping relationship in the mapping relationship table, then the current working mode is the working mode corresponding to the mapping relationship.

[0086] By comprehensively analyzing the above driving information, the vehicle can accurately determine its working mode in real time to determine the gating list that adapts to the current driving situation and environmental conditions to ensure driving safety and efficiency.

[0087] S302: Determine a target gating mechanism corresponding to the current working mode.

[0088] In a possible embodiment, determining a target gating mechanism corresponding to the current working mode includes:

[0089] S3021: Obtain the current gate control identifier corresponding to the current working mode.

[0090] S3022: Obtain a gating table set.

[0091] Optionally, the gating table set includes multiple gating tables.

[0092] In the embodiment of the present application, the gating table set includes four gating tables, corresponding to the forward mode, the deceleration mode, the reverse mode and the parking mode, respectively. Furthermore, the gating identifiers of the four gating tables are "SET0", "SET1", "SET2" and "SET3". It should be clear that if the working mode of the vehicle is further subdivided, more one-to-one corresponding gating tables need to be set. This application only takes four gating tables as an example for explanation.

[0093] S3023: If the current gating identifier exists among the gating identifiers of the multiple gating tables, determine that the gating table corresponding to the current gating identifier is the target gating mechanism corresponding to the current working mode.

[0094] In a possible embodiment, since the gating table is pre-configured and corresponds to the working mode one by one, there is no situation where the current gating identifier does not exist in the gating identifiers of multiple gating tables.

[0095] In a possible embodiment, configuring the gating table requires configuring the various time windows and queue states, gating cycles, and gating opening times of the gating table. Specifically, a time window refers to a specific time period within a gating cycle, during which the gating list controls the open or closed state of a specific queue. The queue state refers to whether a specific data queue is in an open state (Open) or a closed state (Close) within a certain time window. If it is in an open state, data packets in the queue can be sent within the time window. If it is in a closed state, data packets in the queue cannot be sent within the time window. The gating cycle T is the cycle period of the gating list, which defines the time period of the entire gating operation. The gating opening time refers to the time point when the gating table starts to execute.

[0096] In a possible embodiment, when switching the gating table, it is necessary not only to determine which gating table to switch, but also to determine when the gating table starts working, so as to ensure that the gating table starts working at an appropriate time point to avoid interruption of data transmission or time synchronization errors.

[0097] S303: Acquire the current time of the system, the first gating cycle of the current gating mechanism, and the first gating start time.

[0098] S304: Determine a gating switching time according to the current system time, the first gating cycle and the first gating start time.

[0099] In a possible embodiment, the current time of the system is the current value of a system clock or a network synchronization clock.

[0100] In the embodiment of the present application, the first gating period T of the current gating mechanism cycle is 2000μs, the first gate opening time T gate opening is 5000μs, indicating that the current gating table starts executing at 5000 microseconds. The current time of the system is T current is 10500μs.

[0101] In order to ensure that the new gating table switches exactly at the beginning of the next cycle, it is necessary to calculate how many complete cycles have passed between the current time point and the gating opening moment, that is, how many cycles are required from the current moment to the next global working window.

[0102] In the embodiment of the present application, the time difference between the current time of the system and the first gate opening time is first calculated, that is, T current -T gate opening Then, divide this time difference by the first gating period T cycle, a decimal or integer is obtained, which represents how many cycles have been experienced from the start time to the current time. Finally, the decimal is rounded up to ensure that the calculation result is an integer, representing the number of complete cycles n, in this application n = 3.

[0103] After the cycle number is calculated, the sum of the system current time and the product of the cycle number and the first gate control cycle is T current +n×T cycle That is the gate switching time T switch In this application T switch =11000μs.

[0104] S305: Switch to the target gating mechanism according to the gating switching time.

[0105] The above calculation method can ensure that when a new gating table is switched, the previous gating table has been run to completion, and the new gating table starts from a complete cycle instead of switching in the middle of a cycle, thereby avoiding uncertainty in data transmission.

[0106] Figure 4 This is a flow chart of a method for determining a gate switching mode provided in an embodiment of the present application. Figure 1 , the method may include:

[0107] S401: Acquire the current entry content of the current gating table and the target entry content of the target gating table.

[0108] S402: Determine whether the target entry content includes the current entry content, if so, execute S403; if not, execute S404.

[0109] In a possible embodiment, the target gating table adds a new entry after the current entry content of the current gating table to form the target entry content.

[0110] In this case, it is possible to immediately switch to the target gating table at the gating switching moment.

[0111] In other possible embodiments, the target gating table is not formed by adding a new entry after the current entry content of the current gating table. In this case, it is necessary to switch according to the preset delay time to ensure that the start time of the new gating table is aligned with the global working window, thereby avoiding inconsistencies or delays in data transmission.

[0112] S403: At the gating switching moment, switch to the target gating table.

[0113] S404: Obtain the second gating opening time of the target gating table.

[0114] S405: Determine a gating switching mode according to the first gating cycle, the first gating start time and the second gating start time.

[0115] In a possible embodiment, the gated switching mode further includes a first delayed switching mode and a second delayed switching mode.

[0116] In one possible embodiment, Figure 5 This is a flow chart of a method for determining a gate switching mode provided in an embodiment of the present application. Figure 2 ,like Figure 5 As shown, the method for determining the gate switching mode includes:

[0117] S4051: Determine a time interval according to a difference between the first gated-on time and the second gated-on time.

[0118] In the embodiment of the present application, the first gated opening time of the current gated table is 5000 μs, and the second gated opening time of the target gated table is 8000 μs, then the time interval is the difference between the first gated opening time and the second gated opening time, 3000 μs.

[0119] S4052: Determine whether the time interval is equal to an integer multiple of the first gating period, if so, execute S4053; if not, execute S4054.

[0120] S4053: Determine that the first delayed switching mode is the current gated switching mode.

[0121] S4054: Determine that the second delayed switching mode is the current gated switching mode.

[0122] In the embodiment of the present application, if the first gating cycle is 3000 μs, then the time interval 3000 μs is equal to an integer multiple of the first gating cycle 3000 μs, and the first delay switching mode is determined to be the current gating switching mode. If the first gating cycle is 2000 μs, then the time interval 2000 μs is not equal to an integer multiple of the first gating cycle 3000 μs, and the second delay switching mode is determined to be the current gating switching mode.

[0123] In the embodiment of the present application, the first delayed switching mode is characterized by being aligned with the second gating start time of the target gating table after the first gating cycle of the current gating table ends.

[0124] In the embodiment of the present application, the second delayed switching mode is characterized by that after the first gating cycle of the current gating table ends, the current time is not aligned with the second gating start time of the target gating table, and adjustment is required to start the target gating table to work.

[0125] S406: Obtain a preset delay time.

[0126] S407: Determine the delayed current system time and the delayed gated switching time according to the preset delay time and the current system time, and use the delayed gated switching time as the gated switching time.

[0127] S408: Switch to the target gating table according to the gating switching mode and the gating switching time.

[0128] In a possible embodiment, a preset delay time Tdelay is obtained, and a waiting time Tdelay is used based on the system current time Tcurrent. The delayed system current time Tcurrent+Tdelay is used as the system current time Tcurrent to calculate the gate switching time Tswitch. Then, based on a specific gate switching mode, the gate switching time Tswitch is waited for.

[0129] In a possible embodiment, if the gating switching mode is the first delayed switching mode, at the gating switching time, the target gating table is switched.

[0130] In another possible embodiment, if the gating switching mode is the second delayed switching mode, the execution state of the current gating table is acquired.

[0131] In a possible embodiment, if the execution status indicates that the current cycle task of the current gating table has been completed, an idle cycle is inserted, and the target gating table is switched at the gating switching time. The idle cycle means that the current task has been completed, but before the gating switching time arrives, the system does not perform any new tasks and is only in a waiting state. When the gating switching time arrives, it immediately switches to the target gating table. Since the current cycle task of the current gating table has been completed and the system is in an idle state, the switching process can proceed smoothly.

[0132] In another possible embodiment, if the execution status indicates that the current cycle task of the current gating table is not completed, the current gating table executes the current cycle task and switches to the target gating table at the gating switching time.

[0133] Through the above process, the system can smoothly and effectively switch to the target gating table to maintain the stability of the network and the continuity of the task.

[0134] The embodiment of the present application also provides a gate control switching device, Figure 6 is a schematic diagram of the structure of a gate-controlled switching device provided in an embodiment of the present application, such as Figure 6 As shown, the device 500 includes:

[0135] A first determination module 510, configured to determine a current operating mode of the vehicle;

[0136] The second determination module 520 is used to determine the target gating mechanism corresponding to the current working mode; the target gating mechanism represents the time distribution mechanism of the vehicle flow in the current working mode;

[0137] The third acquisition module 530 is used to acquire the current time of the system, the first gating cycle of the current gating mechanism and the first gating start time;

[0138] A third determining module 540, configured to determine a gating switching time according to a current time of the system, a first gating cycle and a first gating start time;

[0139] The switching module 550 is used to switch to the target gating mechanism according to the gating switching time.

[0140] In an optional embodiment, the first determination module 510 is also used to: obtain the vehicle's driving speed information, driving direction information and driving environment information; determine the current working mode based on the driving speed information, driving direction information and driving environment information; the current working mode includes at least one of a forward mode, a deceleration mode, a reverse mode and a parking mode.

[0141] In an optional embodiment, the second determination module 520 is also used to: obtain a current gating identifier corresponding to the current working mode; obtain a gating table set; the gating table set includes multiple gating tables; if the current gating identifier exists among the gating identifiers of the multiple gating tables, determine that the gating table corresponding to the current gating identifier is the target gating mechanism corresponding to the current working mode.

[0142] In an optional implementation, the switching module 550 is further used to: obtain the current entry content of the current gating table and the target entry content of the target gating table; if the target entry content includes the current entry content, switch to the target gating table at the gating switching moment.

[0143] In an optional embodiment, the switching module 550 is also used to: if the target entry content does not include the current entry content, obtain the second gating start time of the current gating table; determine the gating switching mode according to the first gating cycle, the first gating start time and the second gating start time; obtain a preset delay time; determine the delayed system current time and the delayed gating switching time according to the preset delay time and the system current time, and use the delayed gating switching time as the gating switching time; switch to the target gating table according to the gating switching mode and the gating switching time.

[0144] In an optional implementation, the switching module 550 is further used to: determine the time interval based on the difference between the first gating start time and the second gating start time; if the time interval is equal to an integer multiple of the first gating cycle, switch to the target gating table at the gating switching time.

[0145] In an optional embodiment, the switching module 550 is also used to: if the time interval is not equal to an integer multiple of the first gating period, obtain the execution status of the current gating table; if the execution status indicates that the current cycle task of the current gating table has been completed, insert an idle loop, and switch to the target gating table at the gating switching time; or; if the execution status indicates that the current cycle task of the current gating table has not been completed, the current gating table executes the current cycle task, and switches to the target gating table at the gating switching time.

[0146] The device and method embodiments in the embodiments of this application are based on the same application concept.

[0147] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal, a server or a similar computing device. Taking running on a server as an example, Figure 7 1 is a hardware structure block diagram of a server of a gated switching method provided in an embodiment of the present application. Figure 7 As shown, the server 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 810 (the processor 810 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 830 for storing data, and one or more storage media 820 (such as one or more mass storage devices) for storing application programs 823 or data 822. Among them, the memory 830 and the storage medium 820 can be short-term storage or permanent storage. The program stored in the storage medium 820 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 810 can be configured to communicate with the storage medium 820 and execute a series of instruction operations in the storage medium 820 on the server 800. The server 800 may also include one or more power supplies 860, one or more wired or wireless network interfaces 850, one or more input and output interfaces 840, and / or one or more operating systems 821, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0148] The input / output interface 840 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 800. In one example, the input / output interface 840 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 840 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0149] It can be understood by those skilled in the art that Figure 7 The structure shown is for illustration only and does not limit the structure of the above electronic device. Figure 7 More or fewer components as shown, or with Figure 7 Different configurations shown.

[0150] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, at least one program, a code set, or an instruction set is loaded and executed by the processor to implement the above-mentioned data processing method.

[0151] An embodiment of the present application also provides a computer-readable storage medium, which can be set in a server to store at least one instruction, at least one program, a code set or an instruction set related to a gated switching method in an implementation method embodiment. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned gated switching method.

[0152] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0153] It can be seen from the embodiments of the gated switching method, device, electronic device or storage medium provided by the present application that the present application determines the current working mode of the vehicle; determines the target gating mechanism corresponding to the current working mode; the target gating mechanism represents the time distribution mechanism of the vehicle's traffic in the current working mode; obtains the current time of the system, the first gating cycle and the first gating start time of the current gating mechanism; determines the gated switching time according to the current time of the system, the first gating cycle and the first gating start time; switches to the target gating mechanism according to the gated switching time. The present application determines the corresponding gating mechanism based on the working mode of the vehicle system, reduces the number of traffic and time slots processed by the server in each working mode, significantly reduces the complexity of solving the gating table, and at the same time, the working mode corresponds to the time slot of the gating mechanism, so that the time slot can be effectively utilized, improving the bandwidth utilization of the network link.

[0154] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0155] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0156] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0157] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A gated switching method, characterized in that: include: Determine the current operating mode of the vehicle; Determining a target gating mechanism corresponding to the current working mode; The target gating mechanism represents a time distribution mechanism of the traffic of the vehicle in the current working mode; Obtain the current time of the system, the first gating cycle of the current gating mechanism and the first gating start time; Determining a gate control switching time according to the current time of the system, the first gate control cycle and the first gate control start time; According to the gating switching time, switch to the target gating mechanism.

2. A gated switching method according to claim 1, characterized in that: Determining the current operating mode of the vehicle includes: Acquiring the driving speed information, driving direction information and driving environment information of the vehicle; The current working mode is determined according to the driving speed information, the driving direction information and the driving environment information; the current working mode includes at least one of a forward mode, a deceleration mode, a reverse mode and a parking mode.

3. A gated switching method according to claim 1, characterized in that: The determining of the target gating mechanism corresponding to the current working mode includes: Obtaining a current gate control identifier corresponding to the current working mode; Acquire a gating table set; the gating table set includes multiple gating tables; If the current gating identifier exists among the gating identifiers of the multiple gating tables, it is determined that the gating table corresponding to the current gating identifier is the target gating mechanism corresponding to the current working mode.

4. A gated switching method according to claim 3, characterized in that: The switching to the target gating mechanism according to the gating switching time includes: Get the current entry content of the current gating table and the target entry content of the target gating table; If the target entry content includes the current entry content, the target gating table is switched to at the gating switching moment.

5. A gated switching method according to claim 4, characterized in that: The step of obtaining the current entry content of the current gating table and the target entry content of the target gating table further includes: If the target entry content does not include the current entry content, obtaining a second gating opening time of the target gating table; Determining a gating switching mode according to the first gating cycle, the first gating start time and the second gating start time; Get the preset delay time; According to the preset delay time and the current time of the system, determine the delayed current time of the system and the delayed gate switching time, and use the delayed gate switching time as the gate switching time; According to the gating switching mode and the gating switching time, switch to the target gating table.

6. A gated switching method according to claim 5, characterized in that: The step of switching to the target gating table according to the gating switching mode and the gating switching time includes: Determining a time interval according to a difference between the first gated-on time and the second gated-on time; If the time interval is equal to an integer multiple of the first gating period, the target gating table is switched at the gating switching moment.

7. A gated switching method according to claim 6, characterized in that: After determining the time interval according to the difference between the first gated opening time and the second gated opening time, the method further includes: If the time interval is not equal to an integer multiple of the first gating period, acquiring an execution state of the current gating table; If the execution status indicates that the current cycle task of the current gating table has been completed, an idle loop is inserted, and at the gating switching time, the target gating table is switched; or; if the execution status indicates that the current cycle task of the current gating table has not been completed, the current gating table executes the current cycle task, and at the gating switching time, the target gating table is switched.

8. A gate control switching device, characterized in that: The device comprises: A first determination module, used to determine a current working mode of the vehicle; A second determination module is used to determine a target gating mechanism corresponding to the current working mode; the target gating mechanism represents a time distribution mechanism of the vehicle flow in the current working mode; A third acquisition module is used to acquire the current time of the system, the first gating cycle of the current gating mechanism and the first gating start time; a third determining module, configured to determine a gating switching time according to the current time of the system, the first gating cycle and the first gating start time; A switching module is used to switch to the target gating mechanism according to the gating switching moment.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the gated switching method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the gated switching method according to any one of claims 1 to 7.