Electronic fence function test method and device of vehicle and vehicle
Patent Information
- Application Number
- CN202610767734.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-08-18
AI Technical Summary
[0007]本申请实施例提供了一种车辆的电子围栏功能测试方法、装置以及车辆,以至少解决车辆的电子围栏功能测试效率低的技术问题
[0022]In this embodiment, trigger logs are obtained when the vehicle triggers the electronic fence function in a real road environment. Then, a target scenario in a simulated road environment is generated based on these trigger logs, and tests are performed in the simulated road environment corresponding to the target scenario to obtain test results. Since the simulated road environment generated by the above method provides accurate test conditions for the vehicle and can cover extreme operating conditions that are difficult to achieve during real-vehicle testing, it overcomes the obstacles of related technologies where test conditions are difficult to quantify and operating conditions are incomplete. Furthermore, because the above steps can replace the scenario of repeated real-vehicle testing in related technologies with a simulated road environment, it overcomes the obstacles of related technologies where repeated vehicle testing is required and testing is difficult when a real vehicle malfunctions, thus delaying the vehicle testing process. This solves the technical problem of low testing efficiency for the vehicle's electronic fence function and achieves the technical effect of improving the testing efficiency of the vehicle's electronic fence function.
Smart Images

Figure CN122602212A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicles, and more specifically, to a method, apparatus, and vehicle for testing the electronic fence function of a vehicle. Background Technology
[0002] Currently, the electronic fence function of testing vehicles is mainly tested through real-vehicle testing.
[0003] However, the above methods are difficult to control the vehicle's positioning precisely, making it difficult to quantify the test conditions and thus failing to cover the extreme working conditions during the test, which affects the test results.
[0004] Furthermore, the above methods rely on repeated testing on actual vehicles, resulting in lengthy testing times. Also, because these methods depend on actual vehicles, it becomes difficult to test when a malfunction occurs in the vehicle, thus delaying the testing process.
[0005] Therefore, the technical problem of low testing efficiency for vehicle electronic fence functions still exists.
[0006] There is currently no effective solution to the aforementioned technical problems. Summary of the Invention
[0007] This application provides a method, apparatus, and vehicle for testing the electronic fence function of a vehicle, so as to at least solve the technical problem of low testing efficiency of the electronic fence function of a vehicle.
[0008] According to one aspect of the embodiments of this application, a method for testing the electronic fence function of a vehicle is provided. The method may include: acquiring vehicle positioning data; determining the initial scene in which the vehicle is located based on the positioning data, and acquiring a trigger log of the electronic fence function in the initial scene, wherein the initial scene represents a scenario where the vehicle triggers the electronic fence function in a real road environment, and the trigger log represents data generated by the vehicle when the electronic fence function is triggered; constructing a target scene based on the trigger log, wherein the target scene simulates a scenario where the vehicle triggers the electronic fence function in a virtual road environment, and the simulated road environment represents an environment consistent with the real road environment used to simulate vehicle operation; and controlling the electronic fence function to perform a simulation test in the target scene to obtain test results for the electronic fence function.
[0009] Optionally, based on the location data, the initial scenario in which the vehicle is located is determined, including: based on the location data, determining an electronic fence that matches the electronic fence function; based on the electronic fence, determining the initial scenario as an initial scenario for controlling the vehicle to enter the electronic fence, or as an initial scenario for controlling the vehicle to leave the electronic fence.
[0010] Optionally, based on the trigger log, a target scenario is constructed, including: determining the vehicle's driving status data from the trigger log; simulating the scenario where the electronic fence function is triggered by the driving status data to obtain the target scenario.
[0011] Optionally, the driving status data includes the vehicle's initial driving trajectory. The vehicle's driving status data is determined from the trigger log, including: determining the trigger event and the initial driving trajectory in the trigger log, wherein the trigger event is used to indicate the event that the vehicle triggers the electronic fence function; simulating the scenario of triggering the electronic fence function through the driving status data to obtain the target scenario, including: simulating the scenario of triggering the electronic fence function through the trigger event and the initial driving trajectory to obtain the target scenario.
[0012] Optionally, the driving status data includes the vehicle's initial driving trajectory and offset driving trajectory. The vehicle's driving status data is determined from the trigger log, including: determining the initial driving trajectory in the trigger log; applying an offset to the initial driving trajectory to obtain the vehicle's offset driving trajectory, wherein the offset represents the displacement amount of the offset from the initial driving trajectory in different directions; simulating the scenario of triggering the electronic fence function through the driving status data to obtain the target scenario, including: simulating the scenario of triggering the electronic fence function through the offset driving trajectory to obtain the target scenario.
[0013] Optionally, the driving status data includes the vehicle's initial speed and target speed. The driving status data of the vehicle is determined from the trigger log, including: determining the initial speed of the vehicle in the trigger log; applying a disturbance signal to the initial speed to obtain the target speed; and simulating the scenario of triggering the electronic fence function through the driving status data to obtain the target scenario, including: simulating the scenario of triggering the electronic fence function through the target speed to obtain the target scenario.
[0014] Optionally, controlling the electronic fence function to perform a simulation test in the target scenario to obtain the test results of the electronic fence function includes: responding to the vehicle triggering the electronic fence function with an offset driving trajectory, controlling the electronic fence function to perform a simulation test in the target scenario to obtain the test results of the electronic fence function, wherein the offset driving trajectory is obtained by applying an offset amount to the initial driving trajectory of the vehicle in the trigger log, and the offset amount is used to represent the displacement amount in different directions relative to the initial driving trajectory; or, responding to the vehicle triggering the electronic fence function at a target speed, controlling the electronic fence function to perform a simulation test in the target scenario to obtain the test results of the electronic fence function, wherein the target speed is obtained by applying a disturbance signal to the initial speed in the trigger log.
[0015] Optionally, the method further includes: synchronously recording the trigger log of the electronic fence function in the initial scenario through at least two applications; wherein the different applications run on different operating systems.
[0016] According to another aspect of the embodiments of this application, an electronic fence function testing device is also provided. The device may include: an acquisition unit for acquiring vehicle positioning data; a first determination unit for determining the initial scene where the vehicle is located based on the positioning data, and acquiring a trigger log of the electronic fence function in the initial scene, wherein the initial scene represents a scenario where the vehicle triggers the electronic fence function in a real road environment, and the trigger log represents data generated when the vehicle triggers the electronic fence function in the initial scene; a second determination unit for constructing a target scene based on the trigger log; and a control unit for controlling the electronic fence function to perform a simulation test in the target scene to obtain the test results of the electronic fence function.
[0017] According to another aspect of the embodiments of this application, a vehicle is also provided. The vehicle includes a memory and a processor, the memory storing a computer program, and the processor being configured to run the computer program to perform the methods described in the embodiments of this application.
[0018] According to another aspect of the embodiments of this application, an electronic device is also provided. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the methods described in the embodiments of this application.
[0019] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided. The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the methods described in the embodiments of this application.
[0020] According to another aspect of the embodiments of this application, a processor is also provided. This processor is used to run a program, wherein the program executes the methods described in the embodiments of this application during runtime.
[0021] According to another aspect of the embodiments of this application, a computer program product is also provided. This computer program product includes a computer program that, when executed by a processor, implements the methods described in the embodiments of this application.
[0022] In this embodiment, trigger logs are obtained when the vehicle triggers the electronic fence function in a real road environment. Then, a target scenario in a simulated road environment is generated based on these trigger logs, and tests are performed in the simulated road environment corresponding to the target scenario to obtain test results. Since the simulated road environment generated by the above method provides accurate test conditions for the vehicle and can cover extreme operating conditions that are difficult to achieve during real-vehicle testing, it overcomes the obstacles of related technologies where test conditions are difficult to quantify and operating conditions are incomplete. Furthermore, because the above steps can replace the scenario of repeated real-vehicle testing in related technologies with a simulated road environment, it overcomes the obstacles of related technologies where repeated vehicle testing is required and testing is difficult when a real vehicle malfunctions, thus delaying the vehicle testing process. This solves the technical problem of low testing efficiency for the vehicle's electronic fence function and achieves the technical effect of improving the testing efficiency of the vehicle's electronic fence function. Attached Figure Description
[0023] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0024] Figure 1 This is a flowchart of a method for testing the electronic fence function of a vehicle according to an embodiment of this application;
[0025] Figure 2 This is a schematic diagram of an electronic fence function testing application scenario according to an embodiment of this application;
[0026] Figure 3 This is a schematic diagram of an automated testing architecture based on real vehicle road test data according to an embodiment of this application;
[0027] Figure 4 This is a schematic diagram of an electronic fence function testing system according to an embodiment of this application;
[0028] Figure 5 This is a schematic diagram of an electronic fence function testing device according to an embodiment of this application;
[0029] Figure 6 This is a schematic diagram of a vehicle according to an embodiment of this application. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover 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 explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] According to an embodiment of this application, an embodiment of a method for testing the electronic fence function of a vehicle is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0033] Figure 1 This is a flowchart of a method for testing the electronic fence function of a vehicle according to an embodiment of this application, as shown below. Figure 1 As shown, the method may include the following steps.
[0034] Step S102: Obtain the vehicle's location data.
[0035] In the technical solution provided in step S102 of this application, the vehicle's positioning data can be obtained through the Global Positioning System (GPS) acquisition module in the vehicle and / or the Telematics Box (T-Box) in the vehicle.
[0036] The aforementioned location data may include, but is not limited to, the vehicle's real-time location and direction of travel.
[0037] Optionally, satellite positioning signals can be acquired through the GPS acquisition module built into the vehicle; the vehicle's positioning data can be obtained by processing the satellite positioning signals. Alternatively, positioning data can be acquired from the vehicle's Controller Area Network (CAN) bus or the vehicle's in-vehicle Ethernet via the T-Box built into the vehicle.
[0038] In this embodiment of the application, the positioning data of the vehicle can be obtained through the above step S102, thereby providing a usable data foundation for the electronic fence function test.
[0039] Step S104: Based on the location data, determine the initial scene where the vehicle is located, and obtain the trigger log of the electronic fence function in the initial scene.
[0040] In the technical solution provided in step S104 of this application, after obtaining the vehicle's location data, the initial scene where the vehicle is located can be determined based on the location data, and the trigger log of the electronic fence function in the initial scene can be obtained.
[0041] The initial scenario described above can be used to represent a scenario where a vehicle triggers the geofence function in a real road environment, and the trigger log described above can be used to represent the data generated when the vehicle triggers the geofence function.
[0042] Optionally, based on the real-time location of the vehicle in the above-mentioned positioning data, the positional relationship between the real-time location and the preset fence boundary in the electronic fence function is identified to obtain the initial scenario that triggers the electronic fence function; the trigger log in the vehicle's in-vehicle system and / or at least one mobile terminal associated with the vehicle can be obtained simultaneously after the electronic fence function is triggered.
[0043] Optionally, spatial calculations can be performed between the location data and the preset fence boundary in the electronic fence function to obtain the calculation result. This result can be used to represent changes in the relative positional relationship between the vehicle and the fence, thereby triggering the electronic fence function. Trigger logs can be obtained simultaneously when the relative positional relationship between the vehicle and the fence changes. The trigger logs may include, but are not limited to, CAN event codes reported by the vehicle's T-Box, system notification logs of the mobile terminal associated with the vehicle, and push records and status change logs from the Telematics Service Platform (TSP) associated with the vehicle.
[0044] In this embodiment, step S104 above can identify the specific scenario in which the electronic fence function is triggered in a real road environment based on the vehicle's positioning data, and simultaneously obtain the response record of the above scenario to obtain the trigger log. This avoids the testing method that relies on subjective human judgment in related technologies.
[0045] Step S106: Construct the target scenario based on the trigger log.
[0046] In the technical solution provided by step S106 of this application, after determining the initial scene where the vehicle is located based on the positioning data and obtaining the trigger log of the electronic fence function in the initial scene, a target scene can be constructed based on the trigger log. The target scene is used to simulate the scene where the vehicle triggers the electronic fence function in a simulated road environment. The simulated road environment is used to simulate the real road environment.
[0047] The aforementioned target scenario can be used to simulate a vehicle triggering the electronic fence function in a simulated road environment. The simulated road environment is used to represent an environment consistent with the real road environment, used to simulate vehicle operation.
[0048] Optionally, a sequence of location points can be selected from the trigger log as the movement path of the target scenario. This sequence can represent a set of timestamped coordinate data collected continuously before and after the vehicle triggers the geofence function, as recorded in the trigger log. Based on the configuration information recorded in the trigger log, the geometry, position, and trigger threshold of the geofence can be simulated. The trigger threshold can represent a preset condition in the geofence function used to determine whether a vehicle has triggered the geofence, such as the minimum distance threshold between the geofence boundary and the vehicle's real-time position. The timing of vehicle movement in the target scenario can be constructed using the timestamps of vehicle movement in the trigger log as a benchmark, ensuring that the timing of the simulated vehicle trajectory matches the timing of the real road environment. Based on abnormal behaviors recorded in the trigger log (e.g., communication delays), signal loss or message delays can be added to the target scenario to simulate uncertainties in the real road environment.
[0049] In this embodiment of the application, the trigger logs collected in the real road environment can be transformed into target scenarios that can be run multiple times and whose parameters are controllable through the above step S106. This makes vehicle testing no longer limited by real vehicle resources and road conditions, and at the same time can reproduce edge situations that are difficult to reproduce manually, thereby improving the repeatability and coverage of the test.
[0050] Step S108: Control the electronic fence function to perform a simulation test in the target scenario and obtain the test results of the electronic fence function.
[0051] In the technical solution provided in step S108 of this application, after constructing the target scenario based on the trigger log, the electronic fence function can be controlled to perform simulation testing in the target scenario to obtain the test results of the electronic fence function.
[0052] The simulation tests described above can be used to represent the entire process of a vehicle triggering the geofence function in a target scenario without the involvement of a real vehicle. The test results can be used to represent the feedback information obtained by the geofence function during the simulation test.
[0053] Optionally, in response to determining the target scenario, the vehicle's GPS playback module can send location data consistent with the target scenario to the onboard T-Box to simulate the vehicle's movement in a real road environment. The CAN event codes uploaded by the T-Box and the event logs from the TSP platform can be obtained to verify whether the fence trigger / release time, location, and status match the target scenario, thus obtaining test results. Optionally, the T-Box logs and TSP records can be compared item by item with the trigger logs obtained under the initial scenario to obtain test results, such as whether there are missed alarms, false alarms, delays, or content errors.
[0054] In this embodiment, vehicle positioning data is obtained through steps S102 to S108. Based on the positioning data, a first scenario is determined, and a trigger log for the electronic fence function in the first scenario is recorded. The first scenario represents a scenario where the vehicle triggers the electronic fence function in a real road environment, and the trigger log represents the data recorded when the vehicle triggers the electronic fence function in the first scenario. Based on the trigger log, a second scenario is determined, representing a scenario simulated based on the trigger log. The electronic fence function is controlled to perform a simulation test in the second scenario, and the test results are obtained. In other words, in this embodiment, by obtaining the trigger log when the vehicle triggers the electronic fence function in a real road environment, a target scenario in a simulated road environment is generated based on the trigger log, and a test is performed in the simulated road environment corresponding to the target scenario to obtain test results. Because the simulated road environment generated by the above method provides accurate test conditions for vehicles and can cover extreme operating conditions that are difficult to achieve during real vehicle testing, it overcomes the obstacles of difficulty in quantifying test conditions and incomplete coverage of operating conditions in related technologies. At the same time, because the above steps can replace the scenario of relying on repeated real vehicle testing in related technologies with simulated road environments, it overcomes the obstacles of repeated vehicle testing and difficulty in testing when real vehicle malfunctions, which delays the vehicle testing process. Thus, it solves the technical problem of low testing efficiency of vehicle electronic fence function and achieves the technical effect of improving the testing efficiency of vehicle electronic fence function.
[0055] The method described in this embodiment will be further described below.
[0056] As an optional embodiment, step S104, based on the positioning data, determines the initial scenario in which the vehicle is located, including: based on the positioning data, determining an electronic fence that matches the electronic fence function; based on the electronic fence, determining the initial scenario as either an initial scenario for controlling the vehicle to enter the electronic fence or an initial scenario for controlling the vehicle to leave the electronic fence.
[0057] In this embodiment of the application, the above-mentioned electronic fence can be used to represent an area with a clear geographical boundary set on a map, and to determine whether a vehicle is allowed to enter or leave the area.
[0058] Optionally, based on vehicle location information, the area traversed by the vehicle can be determined. This area can then be matched against a list of electronic fences configured in the electronic fence function, selecting electronic fences where the area spatially intersects with the fence boundary. Alternatively, the vehicle's stopping points or frequently traversed areas within a set time period can be determined based on vehicle location information, thereby filtering out actively triggered electronic fences.
[0059] Optionally, the relative positional change sequence between the vehicle's location information and the boundary of the electronic fence can be analyzed: when the vehicle moves from outside the fence to inside the fence, the scenario in which the vehicle triggers the electronic fence function can be determined as an "entry scenario"; when the vehicle moves from inside the fence to outside the fence, the initial scenario in which the vehicle triggers the electronic fence function can be determined as an "exit scenario". Alternatively, the initial scenario can be determined by combining the first or last location point in the location data. For example, if the first valid location point is outside the electronic fence and the vehicle subsequently enters the electronic fence, it is marked as an "entry scenario"; if the last location point is inside the electronic fence and the vehicle subsequently leaves, the initial scenario is marked as an "exit scenario".
[0060] In this embodiment of the application, the above method can be used to identify the actual use scenario (entering or exiting the scenario) of the electronic fence from the positioning data of the actual vehicle road test, avoiding the subjectivity and omissions of manually selecting test scenarios.
[0061] As an optional implementation method, step S106, based on the trigger log, constructs a target scenario, including: determining the vehicle's driving status data from the trigger log; simulating the scenario where the electronic fence function is triggered by the driving status data to obtain the target scenario.
[0062] In this embodiment of the application, the above-mentioned driving status data can be used to represent specific parameters related to position, speed, direction of movement or time when the vehicle triggers the electronic fence function.
[0063] From the trigger log, the vehicle's driving status data can be determined. A sequence of consecutive positioning points before and after the electronic fence triggering time can be extracted from the trigger log, and this sequence of positioning points can be used as the driving trajectory in the driving status data. The speed value and direction angle corresponding to each positioning point can be read to simulate the vehicle's driving behavior when the electronic fence function is triggered (e.g., constant speed entry, sudden braking approach, low speed hovering) to obtain the target scene. At the same time, the timestamp of the triggering event can be recorded and associated with the CAN status code or notification time reported by the T-Box to determine the response delay. Abnormal data marked in the trigger log can be identified, such as positioning jumps (sudden changes in position exceeding a reasonable threshold), sudden drops in GPS accuracy, and loss of network messages.
[0064] Optionally, a vehicle travel path consistent with the above trajectory can be constructed in a simulated road environment, and the extracted positioning point sequence can be used to simulate the vehicle moving in the same order; the geometry and trigger threshold of the electronic fence can be set so that the electronic fence is completely consistent with the fence configuration recorded in the trigger log; the movement process of the vehicle from outside the fence to inside the fence can be simulated based on the timestamp in the trigger log and synchronized with the real time sequence; abnormal states can be injected during the simulation, such as simulating positioning drift, signal interruption, or message delay, to reproduce the uncertainty in the real environment.
[0065] In this embodiment of the application, the above method can completely reproduce the actual vehicle motion characteristics that occur in the real vehicle test in the simulated road environment, making the test scenario closer to the actual use conditions, avoiding misjudgment caused by testing the triggering of the electronic fence function with only an ideal driving trajectory, and improving the credibility of the test results.
[0066] As an optional implementation method, the driving status data includes the vehicle's initial driving trajectory. The driving status data of the vehicle is determined from the trigger log, including: determining the trigger event and the initial driving trajectory in the trigger log, wherein the trigger event is used to indicate the event that the vehicle triggers the electronic fence function; simulating the scenario of triggering the electronic fence function through the driving status data to obtain the target scenario, including: simulating the scenario of triggering the electronic fence function through the trigger event and the initial driving trajectory to obtain the target scenario.
[0067] In this embodiment of the application, the aforementioned initial driving trajectory can be used to represent a sequence of continuous location points collected by the positioning module before and during the triggering of the electronic fence function, which is used to reflect the actual movement process of the vehicle approaching, entering or leaving the electronic fence.
[0068] Optionally, the location points related to the electronic fence function response are extracted from the trigger log as the initial driving trajectory; the relative position changes between the location points and the preset electronic fence boundary are analyzed to identify the type of trigger event. For example, when the vehicle enters the fence for the first time from outside the fence, it is marked as an "entry trigger event"; when the vehicle leaves the fence from inside the fence to outside the fence, it is marked as an "exit trigger event"; the trajectory within a certain time range before and after the trigger event is captured to ensure that the initial driving trajectory contains the complete action process.
[0069] Optionally, for scenarios where the electronic fence function is triggered by a trigger event and the initial driving trajectory, the electronic fence boundary configuration information consistent with the trigger log can be loaded into the simulated road environment, such as fence shape, center coordinates, radius, or boundary polygon; the extracted initial driving trajectory is used as the path for simulating vehicle movement, and the vehicle's speed and direction are simulated according to the timestamp in the trigger log; abnormal behavior characteristics recorded in the trigger log can be retained, such as inserting a 1-2 second positioning pause or a random offset of ±15 meters into the trajectory to simulate signal instability that may occur in the real environment, thus obtaining the target scenario.
[0070] In the embodiments of this application, the above method can utilize the actual trajectories and triggering events that occur in real vehicle testing to construct a repeatable simulation scenario, so that the test no longer depends on the repeated execution of the real vehicle under the same road conditions, thereby improving the accuracy and consistency of the test results.
[0071] As an optional implementation, the driving status data includes the vehicle's initial driving trajectory and offset driving trajectory. Determining the vehicle's driving status data from the trigger log includes: determining the vehicle's initial driving trajectory in the trigger log; applying an offset to the initial driving trajectory to obtain the vehicle's offset driving trajectory, where the offset represents the displacement in different directions relative to the initial driving trajectory; and simulating a scenario where the electronic fence function is triggered by the driving status data to obtain a target scenario, including: simulating a scenario where the electronic fence function is triggered by the offset driving trajectory to obtain the target scenario.
[0072] In this embodiment of the application, the aforementioned offset driving trajectory can be used to represent the vehicle's driving path after a fixed or random displacement is artificially added based on the initial driving trajectory obtained by the vehicle in a real road environment.
[0073] Optionally, a sequence of location points from a complete triggering process can be selected from the trigger log as the initial driving trajectory. This trajectory includes the entire process of the vehicle approaching the trigger fence from outside the fence. At each location point on the initial driving trajectory, a displacement is applied in a preset direction, including: a displacement of ±3 meters along the trajectory normal (lateral), a displacement of ±2 meters along the initial driving trajectory tangential (front-back), or a displacement in a randomly generated direction. The displacement can be constrained to ensure that the offset driving trajectory after the displacement is still within a reasonable range and does not exceed the physical boundary of the real road or electronic fence area. Multiple displacement directions can be generated, such as generating different displacement trajectories such as upward, downward, leftward, and rightward deviations to cover different possible driving deviations.
[0074] Optionally, simulating a scenario where the electronic fence function is triggered by an offset driving trajectory can keep the geometric parameters (position, shape, radius) of the electronic fence unchanged, only changing the vehicle's driving path to obtain the target scenario. The electronic fence function's response capability to the offset driving trajectory can be tested through the target scenario. During the simulation, timestamps and speed curves consistent with the trigger logs are injected synchronously to ensure that the offset driving trajectory is aligned with the initial driving trajectory in the time dimension. Whether the offset trajectory triggers the fence and whether the trigger position is offset during the simulation are recorded as test results.
[0075] In this embodiment of the application, the above method can generate different test conditions based on the vehicle's driving trajectory in a real road environment without increasing the test cost, and test the function of the electronic fence under conditions such as positioning deviation and route deviation, thereby improving the robustness of the functional test.
[0076] As an optional implementation, the driving status data includes the vehicle's initial speed and target speed. Determining the vehicle's driving status data from the trigger log includes: determining the vehicle's initial speed in the trigger log; applying a disturbance signal to the initial speed to obtain the target speed; and simulating a scenario where the electronic fence function is triggered by the driving status data to obtain the target scenario, including: simulating a scenario where the electronic fence function is triggered by the target speed to obtain the target scenario.
[0077] In this embodiment, the initial speed can be used to represent the speed at which the vehicle triggers the electronic fence function in a real road environment. The disturbance signal can be used to represent the speed change artificially applied to the initial speed, simulating speed fluctuations caused by driving behavior, road gradient, signal delay, or system response lag during real driving.
[0078] Optionally, the average speed from the moment the electronic fence function was triggered to the moment of triggering can be extracted from the trigger log as the initial speed. A fixed speed change, such as +3km / h or -5km / h, can be superimposed on the initial speed to simulate the situation of accelerating into or decelerating close to the electronic fence. Random noise can be superimposed on the initial speed to simulate the speed vibration of the vehicle in a real road environment.
[0079] Optionally, the scenario of triggering the electronic fence function at the target speed is simulated to obtain the target scenario. The electronic fence boundary and position can be simulated to match the trigger log. Only the vehicle's speed is replaced with the perturbed target speed to obtain the target scenario. Optionally, the initial running trajectory position is kept unchanged, and only the time-speed relationship of the speed is changed to obtain the target scenario, so that the vehicle passes through the electronic fence area at different speeds in the same spatial position. The electronic fence function is observed to see if it can still respond correctly. Simulation tests are performed on the vehicle under multiple sets of different perturbation conditions, including simulation tests on the vehicle passing through at a constant speed, accelerating into the target scenario, decelerating to approach, and accelerating then decelerating, to obtain the test results.
[0080] In the embodiments of this application, the above method can generate multiple target scenarios using a single real speed data without relying on repeated testing, thereby verifying the response of the electronic fence function under different vehicle speed changes and improving the comprehensiveness and reliability of the electronic fence function test.
[0081] As an optional embodiment, controlling the electronic fence function to perform a simulation test in a target scenario to obtain the test results of the electronic fence function includes: responding to the vehicle triggering the electronic fence function with an offset driving trajectory, controlling the electronic fence function to perform a simulation test in the target scenario to obtain the test results of the electronic fence function, wherein the offset driving trajectory is used to represent the driving trajectory obtained by applying an offset amount to the initial driving trajectory of the vehicle in the trigger log, wherein the offset amount is used to represent the displacement amount in different directions relative to the initial driving trajectory; or, responding to the vehicle triggering the electronic fence function at a target speed, controlling the electronic fence function to perform a simulation test in the target scenario to obtain the test results of the electronic fence function, wherein the target speed is used to represent the target speed obtained by applying a disturbance signal to the initial speed in the trigger log.
[0082] Optionally, during simulation testing, the boundary parameters, trigger thresholds, and configuration information of the electronic fence are kept completely consistent with the trigger logs, and only the vehicle's driving path is changed to an offset driving trajectory. The offset positioning data can be injected into the vehicle-mounted T-Box through the vehicle's GPS playback module to simulate the vehicle moving along the offset trajectory, simulating the electronic fence function triggering due to positioning drift or route deviation in a real road environment. Log records related to the electronic fence function can be monitored synchronously, and the CAN event codes reported by the T-Box and the fence event logs of the TSP platform can be compared to determine whether the test results are normal.
[0083] Optionally, during simulation testing, the running trajectory and the boundaries of the geofence in the trigger log are maintained, and only the vehicle's speed curve is replaced with the target speed after disturbance. The disturbance speed includes fixed offsets (e.g., +3km / h, -5km / h) or random fluctuations to simulate instantaneous speed changes caused by driving behavior or response delays. During the speed change, a location reporting delay corresponding to the disturbance time point can be applied synchronously to simulate T-Box communication congestion or processing lag. The response behavior of the geofence function under different speed conditions can be recorded, including whether it is triggered at the expected location, whether the notification is delayed, and whether it is falsely triggered or missed due to sudden speed changes, to obtain test results. The test results can be compared with the response records under normal speed in the trigger log to determine the consistency of the function.
[0084] In this embodiment of the application, the above method can verify the stability and accuracy of the electronic fence function under various non-ideal operating conditions by means of trajectory deviation and speed disturbance without relying on repeated testing. It effectively covers functional abnormalities caused by common problems in real scenarios such as positioning drift, route deviation, vehicle speed fluctuation, and communication delay, thereby improving the comprehensiveness and reliability of the test.
[0085] As an optional embodiment, the method further includes: synchronously recording the trigger log of the electronic fence function in the initial scenario through at least two applications, wherein the different applications run on different operating systems.
[0086] In this application embodiment, the above-mentioned application can be used to represent a program installed on a mobile terminal device that can communicate with the vehicle to configure an electronic fence, receive fence trigger notifications, and record related events.
[0087] Optionally, during the testing of the aforementioned vehicles in real-world scenarios, applications associated with the aforementioned electronic fence function are launched on mobile terminal devices running different operating systems, and the trigger logs of the electronic fence function in the initial scenario are recorded synchronously. Each application independently collects and stores local trigger event data. The log files generated by each device can be exported in a unified format and time-aligned and spatially matched to ensure that the trigger logs obtained by applications under different operating systems can be cross-verified. Network Time Protocol (NTP) synchronization or the vehicle's T-Box time can be used as a reference to eliminate recording misalignment caused by clock drift of mobile terminal devices.
[0088] In this embodiment, the vehicle's location data can be obtained using the above method; based on the location data, a first scenario is determined, and a trigger log for the electronic fence function in the first scenario is recorded. The first scenario represents a scenario where the vehicle triggers the electronic fence function in a real road environment, and the trigger log represents the data recorded when the vehicle triggers the electronic fence function in the first scenario. Based on the trigger log, a second scenario is determined, representing a scenario simulated based on the trigger log. The electronic fence function is controlled to perform a simulation test in the second scenario, and the test results are obtained. In other words, in this embodiment, by obtaining the trigger log when the vehicle triggers the electronic fence function in a real road environment, a second scenario in a simulated road environment is generated based on the trigger log, and a test is performed in the simulated road environment to obtain test results. Because the simulated road environment generated by the above method provides accurate test conditions and can cover extreme conditions that are difficult to achieve during real vehicle testing, it overcomes the obstacles of difficulty in quantifying test conditions and incomplete coverage of operating conditions in related technologies. At the same time, because the above steps can replace the scenario of relying on repeated real vehicle testing in related technologies with simulated road environments, it overcomes the obstacles of repeated trials and difficulty in testing when real vehicle malfunctions, which delays the testing process. Thus, it solves the technical problem of low testing efficiency of vehicle electronic fence function and achieves the technical effect of improving the testing efficiency of vehicle electronic fence function.
[0089] The technical solutions of the embodiments of this application will be illustrated below with reference to preferred embodiments.
[0090] Currently, vehicle geofencing functionality largely relies on real-vehicle testing. Testers depend on their subjective perception to determine whether a vehicle has entered or left the fenced area, and on checking SMS messages and app notifications to decide whether to execute the function. This heavy reliance on real vehicles means that any issues with the actual vehicle will extend testing time and delay the overall testing schedule. Furthermore, it struggles to cover extreme and edge-of-the-road scenarios, such as barely touching the edge without actually entering, and cannot provide quantifiable testing conditions. Because testing with multiple different phones is required to ensure compatibility, real-vehicle testing necessitates repeated testing of the same scenarios multiple times, which is time-consuming and labor-intensive.
[0091] In related technologies, problems are mainly solved through automation and simulation. For example, automated testing improves testing efficiency; test cases are generated based on information from real-vehicle testing scenarios, resulting in more comprehensive test scenarios and quantifiable test conditions. Furthermore, the introduction of automated testing provides repeatable test conditions, improving test coverage and ensuring better product quality. Automated testing also reduces the investment of human resources.
[0092] In this application embodiment, a method for testing the electronic fence function of a vehicle is proposed to test the effectiveness of the electronic fence function.
[0093] The embodiments of this application include a host computer, a device matrix, signal simulation, a data channel, and a verification system.
[0094] The host computer acts as the central controller, coordinating the workflow of each module; the device matrix contains a cluster of mobile devices that run on different operating systems, controlled through a dedicated communication software library; signal simulation includes GPS acquisition and playback modules that inject pre-recorded tracks into the vehicle-mounted TBOX to simulate vehicle movement; the data channel achieves bidirectional synchronization of electronic fence configuration data and vehicle status through the TSP platform; and the verification system includes a triple detection mechanism integrating message push, interface status, and background logs.
[0095] Optionally, in addition to simulating the trigger function, the functional testing of the electronic fence can be easily automated: the host computer uses a software library that communicates with the mobile phone to simulate human hand operations and obtain page setting results. Based on the feedback data, the host computer determines the test results.
[0096] Optionally, the challenge in simulating electronic fences lies in simulating the triggering function, which involves changes in vehicle positioning. This paper proposes a simulation testing method based on real-vehicle road test information, including acquiring this information and synchronously recording electronic fence triggering events using applications from different operating systems.
[0097] Optionally, vehicle positioning data can be collected through the vehicle's GPS acquisition module and in-vehicle network. Electronic fences can be set and entry and exit from the electronic fences can be triggered. At the same time, mobile application and real vehicle logs can be recorded. The logs include fence configuration parameters, vehicle movement trajectory, system response records, etc.
[0098] Optionally, test cases can be obtained. Basic scene extraction can be completed by parsing typical triggering events (entry, departure, boundary wandering) in the logs and automatically annotating key trajectory feature points; boundary scenes can be expanded by generating eight-directional offset paths or creating velocity disturbance scenes based on the original trajectory; abnormal scenes can be constructed by simulating signal drift and randomly generating communication gaps.
[0099] Optionally, test cases can be automated by using a unified clock source to align the time base of the test equipment, vehicle bus, and monitoring system; fence configuration parameters can be synchronized to all devices via a broadcast channel, and the electronic fence configuration data can be broadcast via a host computer; if the consistency of test scenario data can be ensured, electronic fence data can also be configured and broadcast via mobile phone.
[0100] Optionally, the GPS replay module can be linked to the TBOX positioning module to replay the processed vehicle trajectory according to the test case requirements.
[0101] Optionally, monitor the arrival delay and content accuracy of SMS / notifications, detect changes in status bar icons and the timing of pop-up appearances, and verify the completeness of event records in the background service logs.
[0102] In this embodiment, the system can be expanded from single-point positioning to dynamic trajectory verification, supporting real-time testing and historical scene playback, and enabling concurrent testing of multiple types of terminals.
[0103] Optionally, test time can be compressed by accelerating playback of the trajectory, the time spent on serial test cases can be reduced by using the parallel execution of the device matrix, and test reports can be automatically generated to reduce the workload of manual compilation.
[0104] Optionally, the communication protocol abstraction layer supports different operating systems, the positioning signal interface is compatible with mainstream vehicle TBOX models, and the log analysis module is adapted to various TSP platform data formats.
[0105] The embodiments of this application will be further described below.
[0106] Figure 2 This is a schematic diagram of an electronic fence function testing application scenario according to an embodiment of this application, such as... Figure 2 As shown, the above scenario may include: terminal device 10, network 20, and vehicle 30.
[0107] The aforementioned terminal device 10 can be used to obtain location data acquisition instructions from the vehicle's user (e.g., the driver). This terminal device can be a mobile phone, laptop, or personal computer, or a graphical user interface (e.g., a vehicle infotainment screen) within the vehicle. The location data acquisition instructions can also be generated by the vehicle itself. These instructions can be sent to the vehicle 30 via network 20. At this point, the vehicle 30 needs to execute steps S202 to S208 to achieve vehicle control.
[0108] The following steps can be performed by vehicle 30: Step S202, obtain the vehicle's positioning data; Step S204, based on the positioning data, determine the initial scene where the vehicle is located, and obtain the trigger log of the electronic fence function in the initial scene; Step S206, based on the trigger log, construct the target scene; Step S208, control the electronic fence function to perform simulation testing in the target scene, and obtain the test results of the electronic fence function.
[0109] In this embodiment, through steps S202 to S208, the driver's vital signs parameters under different parameter dimensions are obtained in the vehicle; based on the vital signs parameters, the driver's driving state is determined; in response to an abnormal driving state, at least one controllable execution device associated with the abnormal driving state is determined from the vehicle; based on the abnormal driving state, the execution device is controlled to perform the target function, and multi-level prompt information is output. In other words, in this embodiment, by obtaining the trigger logs when the vehicle triggers the electronic fence function in a real road environment, a target scenario in a simulated road environment is generated based on the trigger logs, and tests are performed in the simulated road environment corresponding to the target scenario to obtain test results. Because the simulated road environment generated by the above method provides accurate test conditions for vehicles and can cover extreme operating conditions that are difficult to achieve during real vehicle testing, it overcomes the obstacles of difficulty in quantifying test conditions and incomplete coverage of operating conditions in related technologies. At the same time, because the above steps can replace the scenario of relying on repeated real vehicle testing in related technologies with simulated road environments, it overcomes the obstacles of repeated vehicle testing and difficulty in testing when real vehicle malfunctions, which delays the vehicle testing process. Thus, it solves the technical problem of low testing efficiency of vehicle electronic fence function and achieves the technical effect of improving the testing efficiency of vehicle electronic fence function.
[0110] Figure 3 This is a schematic diagram of an automated testing architecture based on real vehicle road test data according to an embodiment of this application, such as... Figure 3The automated testing architecture based on real vehicle road test data includes a software library 302 for communicating with a mobile phone, a host computer 304, a positioning acquisition and playback module 306, an in-vehicle intelligent communication terminal 308, a vehicle network service platform 310, and an application program 312.
[0111] The software library 302, which communicates with the mobile phone, is used to send operation commands to mobile terminals with different operating systems and read their application response data through wired or network connections under the control of a host computer. For example, it can start or close applications, simulate user click operations, read notification bar messages, obtain interface status information, and extract background log files.
[0112] The host computer 304 is used to coordinate the runtime sequence of different modules in the vehicle, load test cases, send trajectory instructions to the positioning acquisition and playback module, issue operation commands to the software library that communicates with the mobile phone, and receive test feedback data from the application and the vehicle networking service platform to generate a unified test report.
[0113] The positioning acquisition and playback module 306 is used to acquire high-precision GPS positioning data of the vehicle during the actual vehicle road test phase, and to play back the trajectory data to the vehicle's intelligent communication terminal in a time-synchronized manner according to the test case requirements during the simulation test phase, simulating the actual movement process of the vehicle within the fenced area.
[0114] The vehicle-mounted intelligent communication terminal 308 is used to receive simulated positioning data from the positioning acquisition and playback module, and upload the data as the vehicle's current location information to the vehicle network service platform. At the same time, when the electronic fence trigger condition is detected, the corresponding CAN event is generated.
[0115] The vehicle-to-everything (V2X) service platform 310 and application 312 are used to receive electronic fence configuration information issued by the V2X service platform, determine whether to enter or leave the fence based on the location changes reported by the vehicle-mounted intelligent communication terminal, and push notifications to users when triggered, while recording local trigger event logs.
[0116] This application also provides an electronic fence function testing system. It should be noted that this electronic fence function testing system can be used to execute the electronic fence function testing method of this application.
[0117] Figure 4 This is a schematic diagram of an electronic fence function testing system according to an embodiment of this application, as shown below. Figure 4 As shown, the electronic fence function testing system 40 includes: a host computer 402 and a module set 404.
[0118] The host computer 402 is used to load preset test cases, control the coordinated operation of each sub-module in the module set 404, receive and record test response data from the module set 404, compare the actual output results with the expected results, and generate a test report containing pass / fail judgments.
[0119] Module set 404 includes a software library for communicating with mobile phones, a positioning acquisition and playback module, an in-vehicle intelligent communication terminal, applications, and a vehicle networking service platform.
[0120] This application also provides an electronic fence function testing device. It should be noted that this electronic fence function testing device can be used to execute the electronic fence function testing method of this application.
[0121] Figure 5 This is a schematic diagram of an electronic fence function testing device according to an embodiment of this application, as shown below. Figure 5 As shown, the electronic fence function testing device 50 includes an acquisition unit 502, a first determination unit 504, a second determination unit 506, and a control unit 508.
[0122] The acquisition unit 502 is used to acquire the vehicle's positioning data.
[0123] The first determining unit 504 is used to determine the initial scene where the vehicle is located based on the positioning data, and to obtain the trigger log of the electronic fence function in the initial scene. The initial scene is used to represent the scene in which the vehicle triggers the electronic fence function in a real road environment, and the trigger log is used to represent the data generated when the vehicle triggers the electronic fence function in the initial scene.
[0124] The second determining unit 506 is used to construct a target scenario based on the trigger log, wherein the target scenario is used to simulate the scenario in which a vehicle triggers the electronic fence function in a simulated road environment, and the simulated road environment is used to simulate the real road environment.
[0125] The control unit 508 is used to control the electronic fence function to perform simulation tests in the target scenario and obtain the test results of the electronic fence function.
[0126] In this embodiment, the electronic fence function testing device 50 described above can acquire vehicle positioning data through the acquisition unit 502; determine the initial scene of the vehicle based on the positioning data through the first determination unit 504, and acquire the trigger log of the electronic fence function in the initial scene. The initial scene represents the scenario where the vehicle triggers the electronic fence function in a real road environment, and the trigger log represents the data generated when the vehicle triggers the electronic fence function in the initial scene; the second determination unit 506 constructs a target scene based on the trigger log; and the control unit 508 controls the electronic fence function to perform simulation testing in the target scene to obtain the test results of the electronic fence function. This solves the technical problem of low vehicle control safety and achieves the technical effect of improving vehicle control safety.
[0127] Figure 6 This is a schematic diagram of a vehicle according to an embodiment of this application. Figure 6 The vehicle 60 includes a memory 602 and an actuator 604, wherein the memory 602 is used to store computer programs; and the processor 604 is used to execute the programs stored in the memory 602 to implement any of the methods in the embodiments of this application.
[0128] According to another aspect of the embodiments of this application, an electronic device is also provided. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the methods described in the embodiments of this application.
[0129] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided. The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the methods described in the embodiments of this application.
[0130] According to another aspect of the embodiments of this application, a processor is also provided. This processor is used to run a program, wherein the program executes the methods described in the embodiments of this application during runtime.
[0131] According to another aspect of the embodiments of this application, a computer program product is also provided. This computer program product includes a computer program that, when executed by a processor, implements the methods described in the embodiments of this application.
[0132] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0133] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0134] 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 units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0135] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0136] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0137] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for testing the electronic fence function of a vehicle, characterized in that, include: Obtain the location data of the vehicle; Based on the location data, the initial scene where the vehicle is located is determined, and the trigger log of the electronic fence function in the initial scene is obtained. The initial scene is used to represent the scene in which the vehicle triggers the electronic fence function in a real road environment, and the trigger log is used to represent the data generated by the vehicle when the electronic fence function is triggered. Based on the trigger log, a target scenario is constructed, wherein the target scenario is used to simulate the scenario in which the vehicle triggers the electronic fence function in a simulated road environment, and the simulated road environment is used to simulate the real road environment; The electronic fence function is controlled to perform a simulation test in the target scenario, and the test results of the electronic fence function are obtained.
2. The method according to claim 1, characterized in that, Determining the initial scene of the vehicle based on the positioning data includes: Based on the location data, determine the electronic fence that matches the electronic fence function; Based on the electronic fence, the initial scenario is determined to be either the initial scenario for controlling the vehicle to enter the electronic fence, or the initial scenario for controlling the vehicle to exit the electronic fence.
3. The method according to claim 1, characterized in that, The construction of the target scenario based on the trigger log includes: The vehicle's driving status data is determined from the trigger log; The target scenario is obtained by simulating the scenario where the electronic fence function is triggered by the driving status data.
4. The method according to claim 3, characterized in that, The driving status data includes the vehicle's initial driving trajectory. Determining the vehicle's driving status data from the trigger log includes: Determine the triggering event in the triggering log and the initial driving trajectory, wherein the triggering event is used to indicate an event in which the vehicle triggers the electronic fence function; The simulation of the scenario in which the electronic fence function is triggered by the driving status data to obtain the target scenario includes: The target scenario is obtained by simulating the scenario in which the electronic fence function is triggered by the triggering event and the initial driving trajectory.
5. The method according to claim 3, characterized in that, The driving status data includes the vehicle's initial driving trajectory and deviation from the driving trajectory. Determining the vehicle's driving status data from the trigger log includes: Determine the initial driving trajectory in the trigger log; An offset is applied to the initial driving trajectory to obtain the offset driving trajectory of the vehicle, wherein the offset is used to represent the displacement amount of the offset in different directions relative to the initial driving trajectory; The simulation of the scenario in which the electronic fence function is triggered by the driving status data to obtain the target scenario includes: The target scenario is obtained by simulating the scenario where the electronic fence function is triggered by the offset driving trajectory.
6. The method according to claim 3, characterized in that, The driving status data includes the vehicle's initial speed and target speed. Determining the vehicle's driving status data from the trigger log includes: Determine the initial speed of the vehicle in the trigger log; A perturbation signal is applied to the initial velocity to obtain the target velocity; The simulation of the scenario in which the electronic fence function is triggered by the driving status data to obtain the target scenario includes: The target scenario is obtained by simulating the scenario in which the electronic fence function is triggered by the target speed.
7. The method according to claim 1, characterized in that, The control of the electronic fence function to perform simulation testing in the target scenario, and to obtain the test results of the electronic fence function, include: In response to the vehicle triggering the geofence function while deviating from its driving trajectory, the geofence function is controlled to perform a simulation test in the target scenario to obtain the test results of the geofence function. The deviated driving trajectory is obtained by applying an offset to the initial driving trajectory of the vehicle in the trigger log, and the offset represents the displacement in different directions relative to the initial driving trajectory; or... In response to the vehicle triggering the electronic fence function at a target speed, the electronic fence function is controlled to perform a simulation test in the target scenario to obtain the test result of the electronic fence function, wherein the target speed is obtained by applying a disturbance signal to the initial speed in the trigger log.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The trigger logs of the electronic fence function in the initial scenario are recorded synchronously using at least two applications, wherein the different applications run on different operating systems.
9. A device for testing the electronic fence function of a vehicle, characterized in that, include: An acquisition unit is used to acquire the positioning data of the vehicle; The first determining unit is used to determine the initial scene where the vehicle is located based on the positioning data, and to obtain the trigger log of the electronic fence function in the initial scene, wherein the initial scene is used to represent the scene in which the vehicle triggers the electronic fence function in a real road environment, and the trigger log is used to represent the data generated when the vehicle triggers the electronic fence function in the initial scene; The second determining unit is used to construct a target scenario based on the trigger log, wherein the target scenario is used to simulate the scenario in which the vehicle triggers the electronic fence function in a simulated road environment, and the simulated road environment is used to simulate the real road environment; The control unit is used to control the electronic fence function to perform simulation tests in the target scenario and obtain the test results of the electronic fence function.
10. A vehicle, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 7.