Running track simulation processing longitude and latitude point uploading method and device and computer equipment
By obtaining the vehicle standard trajectory sample configuration to generate effective coordinates and upload it, the problem that GPS simulation tools in the Internet of Vehicles are unable to simulate vehicle driving trajectory is solved, and automated testing of driving trajectory simulation is realized, the test depth and breadth are improved, and manpower is reduced. Time cost.
Patent Information
- Application Number
- CN202310540691.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2024-11-12
AI Technical Summary
The existing GPS simulation tools cannot effectively simulate vehicle driving trajectories in the Internet of Vehicles ecosystem, and the depth and breadth coverage of the tests are insufficient, so they cannot support the upload of multiple sets of latitude and longitude simulations with continuous correlation.
By obtaining the vehicle standard trajectory sample configuration, random coordinates are generated and valid coordinates are filtered, uploaded to the vehicle backend for driving trajectory simulation, recording and summarizing the results to generate a test report, and automated testing is realized.
It realizes automated testing of driving trajectory simulation, reduces labor and time costs, supports continuous related vehicle GPS positioning, and improves the depth and breadth of the test.
Smart Images

Figure CN118938273A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle trajectory processing, and in particular to a method, device, computer equipment and storage medium for uploading longitude and latitude points for vehicle trajectory simulation processing. Background Art
[0002] The GPS positioning system is a satellite-based positioning system used to obtain geographic location information and accurate universal coordinated time. GPS is widely used in transportation. Using this technology in cars, logistics vehicles, and buses can improve efficiency and reasonably allocate traffic resources. The current mainstream GPS simulation tools usually obtain the latitude and longitude of the current device, or randomly generate a latitude and longitude, and upload it to the cloud server through the http / https protocol. It is mainly used to simulate mobile phone scenarios, with a limited scope and poor flexibility. It does not support continuous and associated multiple sets of latitude and longitude simulation. In the existing technology, it is based on a single, unrelated GPS positioning simulation upload, lacking continuous and associated multiple sets of GPS simulation of vehicle travel trajectories. The main disadvantages of the existing technology are: the protocol is single, and the support level is not friendly enough in the ecology of different fields; the function is relatively single, the application scope is limited, and it cannot support the simulation of driving routes and trajectories in the Internet of Vehicles ecology, and does not support functions such as frequency customization of latitude and longitude segmentation and customization of upload frequency. In the Internet of Vehicles ecosystem, the products derived from GPS positioning during vehicle driving are huge. However, the single, unrelated GPS simulation tool used to test them cannot be close to the actual driving scenario, and the depth and breadth of the test coverage is insufficient. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to propose a method, device, computer equipment and storage medium for uploading longitude and latitude points for simulating driving trajectories, so as to solve the problem that the driving trajectories are tested using unrelated GPS simulation tools in the prior art, which cannot be close to the actual driving scene and the coverage of the depth and breadth of the test is insufficient.
[0004] In order to solve the above technical problems, the present invention provides a method for uploading longitude and latitude points by simulating driving trajectories, which adopts the following technical solution and includes the following steps:
[0005] Obtaining a vehicle standard trajectory sample configuration, wherein the sample configuration includes a valid coordinate rule configuration;
[0006] According to the sample configuration, a plurality of groups of random coordinates are generated, and according to the valid coordinate rule configuration, valid coordinates are screened out from the random coordinates;
[0007] Upload the valid coordinates to the vehicle backend to simulate and upload the driving trajectory;
[0008] Record and summarize the results of driving trajectory simulation upload and generate a test report.
[0009] Preferably, the step of obtaining the vehicle standard trajectory sample configuration, wherein the sample configuration includes a valid coordinate rule configuration, specifically comprises:
[0010] Acquire vehicle simulation information, the vehicle simulation information including the vehicle's frequently visited coordinate information, coordinate weight, historical passing times, test track starting longitude and latitude, test track ending longitude and latitude, simulation coordinate quantity, and valid coordinate rules, the valid coordinate rules including the setting of valid distance;
[0011] Generate a configuration file using the vehicle simulation information;
[0012] The configuration file is stored.
[0013] Preferably, the step of generating a plurality of groups of random coordinates according to the sample configuration and selecting valid coordinates from the random coordinates according to the valid coordinate rule configuration specifically includes:
[0014] Calculate the longitude difference and latitude difference according to the starting longitude and latitude of the test track and the ending longitude and latitude of the test track respectively;
[0015] Evenly divide the longitude difference and latitude difference into coordinate sample intervals of the number of simulated coordinates respectively;
[0016] In each coordinate sample interval, check whether the frequently visited coordinates of the traversal vehicle are within the coordinate sample interval, if so, they are hit coordinates;
[0017] In each coordinate sample interval, a test coordinate is generated by a random method, and the distance between the test coordinate and the hit coordinate of the current interval is calculated;
[0018] If the distance is less than the effective distance, the current coordinates are considered to be valid coordinates.
[0019] Preferably, the step of uploading the valid coordinates to the vehicle backend and performing driving trajectory simulation uploading specifically includes:
[0020] Simulate the vehicle side and establish an MQTT communication connection with the vehicle side backend;
[0021] Each set of test coordinate samples is uploaded to the vehicle backend in sequence by subscription and push;
[0022] Upload random test coordinate samples in sequence at the preset upload frequency until all random test coordinate samples have been uploaded.
[0023] Preferably, the step of generating test coordinates by a random method in each coordinate sample interval and calculating the distance between the test coordinates and the hit coordinates in the current interval specifically includes:
[0024] Assuming the test coordinates are (lat1, lon1) and the current interval hit coordinates are (lat2, lon2), the distance d between the test coordinates and the current interval hit coordinates is:
[0025] d=R×arccos(sin(lat1)×sin(lat2)
[0026] +cos(lat1)×cos(lat2)×cos(lon1-lon2)), where R is the radius of the earth.
[0027] Preferably, after the step of considering the current coordinates as valid coordinates if the distance is less than the effective distance, the method further includes:
[0028] If the distance is less than the effective distance, the number of historical paths that hit the coordinates is increased by one;
[0029] If there are no hit coordinates in the current interval, the first set of test coordinates generated is considered to be valid coordinates;
[0030] Generate multiple groups of valid test coordinate samples in sequence.
[0031] Preferably, after the step of recording and summarizing the results of the driving trajectory simulation upload and generating a test report, the following step is further included:
[0032] The test report is stored in the blockchain.
[0033] In order to solve the above technical problems, the present invention also provides a device for uploading longitude and latitude points for simulating and processing driving trajectories, which adopts the following technical solution, including:
[0034] An acquisition module, used to acquire a vehicle standard trajectory sample configuration, wherein the sample configuration includes a valid coordinate rule configuration;
[0035] A screening module, used to generate a plurality of groups of random coordinates according to the sample configuration, and screen out valid coordinates from the random coordinates according to the valid coordinate rule configuration;
[0036] A simulation upload module, used to upload the valid coordinates to the vehicle backend to simulate the driving trajectory upload;
[0037] The recording module is used to record and summarize the results of driving trajectory simulation upload and generate a test report.
[0038] In order to solve the above technical problems, the present invention also provides a computer device, which adopts the technical solution described below, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, it implements the steps of the above-mentioned driving trajectory simulation processing latitude and longitude point uploading method.
[0039] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, which adopts the technical solution described below, and stores computer-readable instructions on the computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-mentioned driving trajectory simulation processing latitude and longitude point uploading method are implemented.
[0040] Compared with the prior art, the present invention has the following beneficial effects: by reading the coordinates frequently visited on the standard route of the vehicle, randomly generating and calculating and filtering the effective test longitude and latitude, executing the full-process method of simulating the vehicle driving trajectory route upload, statistically uploading the results and recording the document, the driving trajectory simulation automated test is realized; the program automatically generates the associated random longitude and latitude, and can automatically and continuously upload the coordinates according to the set rules, which can reduce a lot of manpower and time costs in the test of large-scale data simulation; it can solve the problem of simulating driving trajectory behavior and uploading the GPS positioning of continuously associated vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the scheme in the present invention, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 It is a flow chart of an embodiment of the method for uploading longitude and latitude points by simulating driving trajectory of the present invention;
[0043] Figure 2 It is a schematic diagram of multiple coordinate sample intervals divided by the longitude and latitude interval consisting of the starting longitude and latitude and the ending longitude and latitude used in the method for uploading longitude and latitude points for simulating driving trajectory of the present invention;
[0044] Figure 3 It is another schematic diagram of multiple coordinate sample intervals divided by the longitude and latitude interval consisting of the starting longitude and latitude and the ending longitude and latitude used in the method for uploading longitude and latitude points for simulating driving trajectory of the present invention;
[0045] Figure 4 It is a schematic diagram of the uploaded records obtained in the method for uploading longitude and latitude points by simulating the driving trajectory of the present invention;
[0046] Figure 5It is a schematic diagram of a test report obtained in the method for uploading longitude and latitude points by simulating the driving trajectory of the present invention;
[0047] Figure 6 It is a structural schematic diagram of an embodiment of a device for uploading longitude and latitude points for simulating and processing driving trajectory of the present invention;
[0048] Figure 7 It is a schematic structural diagram of an embodiment of a computer device of the present invention. DETAILED DESCRIPTION
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present invention; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present invention or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0050] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0051] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.
[0052] It should be noted that the method for uploading longitude and latitude points for driving trajectory simulation processing provided in the embodiment of the present invention is generally executed by a server / terminal device, and accordingly, the device for uploading longitude and latitude points for driving trajectory simulation processing is generally arranged in a server / terminal device.
[0053] It should be understood that the number of terminal devices, networks and servers is only illustrative. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0054] Embodiment 1
[0055] Continue to refer Figure 1 , showing a flow chart of an embodiment of the method for uploading longitude and latitude points by simulating and processing driving trajectories of the present invention. The method for uploading longitude and latitude points by simulating and processing driving trajectories comprises the following steps:
[0056] Step S1, obtaining a vehicle standard trajectory sample configuration, where the sample configuration includes a valid coordinate rule configuration.
[0057] In this embodiment, the electronic device (server / terminal device) on which the method for uploading the latitude and longitude points of the driving trajectory simulation processing runs can receive the request for uploading the latitude and longitude points of the driving trajectory simulation processing through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAXX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0058] In some optional implementations of this embodiment, step S1 may further include the following steps:
[0059] S11. Obtain vehicle simulation information, including the vehicle's frequently visited coordinate information, coordinate weight, historical number of passes, starting longitude and latitude of the test track, ending longitude and latitude of the test track, number of simulated coordinates, and valid coordinate rules. The valid coordinate rules include the setting of the effective distance.
[0060] The valid coordinate rules include: if the distance between the current coordinate and the frequently visited coordinate is within the valid distance range, the current coordinate can be considered as a valid coordinate. The frequently visited coordinates of the vehicle refer to the coordinates of the vehicle's historical driving trajectory. The number of historical passes indicates the total number of times the frequently visited coordinates have been passed in the vehicle's historical driving trajectory. The starting longitude and latitude of the test track indicate the longitude and latitude at the beginning of the test track. The ending longitude and latitude of the test track indicate the longitude and latitude at the end of the test track. The number of simulated coordinates indicates the total number of simulated coordinates set during the test. The coordinate weight refers to the relative importance of the coordinate factor, which is expressed as a percentage. It emphasizes the relative importance of factors or indicators, and tends to be contribution or importance. For example, the valid coordinate rules can also include: the weight calculation formula is
[0061] Total weight = coordinate basic weight value × 60% + number of historical paths × 40%. The frequently visited coordinate with the largest total weight is set as the hit coordinate of the current coordinate interval.
[0062] S12, generating a configuration file from the vehicle simulation information.
[0063] Generate a configuration file with the vehicle's frequently visited coordinate information, coordinate weight, historical number of passes, starting longitude and latitude of the test track, ending longitude and latitude of the test track, number of simulated coordinates, valid coordinate rules, etc. to facilitate continued information sharing.
[0064] S13. Store the configuration file.
[0065] The configuration file is stored in a certain format such as TXT format, DOC format, XLS format, etc. It should be noted that when reading the configuration file, the same format as that used to store the configuration file needs to be used.
[0066] For example, the configuration file generated by the vehicle simulation information may also include the vehicle VIN code, frequently visited coordinates (longitude, latitude), basic weight value, and historical route times, as shown in Table 1:
[0067] Table 1 Example of configuration file generated by vehicle simulation information
[0068]
[0069]
[0070] The vehicle VIN (Vehicle Identification Number) code represents the vehicle identification code. The first 3 digits (WMI): manufacturer, brand and type; the second digit: automobile manufacturer code; the fourth to eighth digits (VDS): vehicle characteristics; the ninth digit: check digit, calculated according to standard weighted calculation; the tenth digit: model year; the 11th digit: assembly plant; the 12th to 17th digits: serial number.
[0071] The configuration file generated by the vehicle simulation information also includes the effective distance, such as 100 meters, the number of coordinates, such as 6, the duration of the simulated upload, etc. As can be seen from the above table, the starting longitude and latitude of the test track are (113.171977, 23.383468), and the ending longitude and latitude of the test track are (118.171977, 28.383468).
[0072] Step S2, generating several groups of random coordinates according to the sample configuration, and selecting valid coordinates from the random coordinates according to the valid coordinate rule configuration.
[0073] Several sets of random coordinates constitute the driving trajectory, that is, several sets of longitude and latitude.
[0074] In some optional implementations of this embodiment, step S2 may further include the following steps:
[0075] S21. Calculate the longitude difference and latitude difference according to the starting longitude and latitude of the test track and the ending longitude and latitude of the test track.
[0076] Taking Table 1 above as an example, the starting longitude and latitude of the test track are (113.171977, 23.383468), and the ending longitude and latitude of the test track are (118.171977, 28.383468), then:
[0077] Longitude difference = 118.171977 - 113.171977 = 5;
[0078] Latitude difference = 28.383468-23.383468=5.
[0079] S22. Evenly divide the longitude difference and the latitude difference into coordinate sample intervals equal to the number of simulated coordinates.
[0080] Figure 2 Schematic diagram of multiple coordinate sample intervals divided by the latitude and longitude interval consisting of the starting longitude and longitude and the ending longitude and longitude used in the method for uploading the latitude and longitude points for simulating the driving trajectory of the present invention. Figure 2 As shown, if the number of simulated coordinates is equal to 3, the longitude difference and latitude difference from the starting point to the end point are calculated and evenly divided into 3 collection intervals.
[0081] Figure 3 This is another schematic diagram of multiple coordinate sample intervals divided by the longitude and latitude interval consisting of the starting longitude and latitude and the ending longitude and latitude used in the method for uploading longitude and latitude points for simulating the driving trajectory of the present invention. Figure 3 As shown, if the number of simulated coordinates is equal to 5, the longitude difference and latitude difference from the starting point to the end point are calculated and evenly divided into 5 collection intervals.
[0082] S23. In each coordinate sample interval, check whether the frequently visited coordinates of the vehicle are within the coordinate sample interval. If yes, they are hit coordinates.
[0083] Then, from each interval, check whether the vehicle's frequently visited coordinates are within the sample interval, and calculate the hit coordinates. If one or more frequently visited coordinates are within the interval, the weight calculation formula is used: total weight = coordinate basic weight value * 60% + historical number of passes * 40%. The frequently visited coordinates with the largest total weight are set as the hit coordinates of the current coordinate interval.
[0084] S24. In each coordinate sample interval, a test coordinate is generated by a random method, and the distance between the test coordinate and the hit coordinate of the current interval is calculated.
[0085] In the specific implementation, assuming that the test coordinate is (lat1, lon1) and the current interval hit coordinate is (lat2, lon2), the distance d between the test coordinate and the current interval hit coordinate is:
[0086] d=R×arccos(sin(lat1)×sin(lat2)
[0087] +cos(lat1)×cos(lat2)×cos(lon1-lon2)), where R is the radius of the earth.
[0088] S25. If the distance is less than the effective distance, the current coordinates are considered to be valid coordinates.
[0089] In specific implementation, after step S25, the following steps may also be included:
[0090] S26. If the distance is less than the effective distance, the number of historical paths that hit the coordinates is increased by one.
[0091] S27. If there is no hit coordinate in the current interval, the first set of test coordinates generated is considered to be valid coordinates.
[0092] S28. Generate multiple groups of valid test coordinate samples in sequence.
[0093] Step S3, upload the valid coordinates to the vehicle backend to simulate and upload the driving trajectory.
[0094] In some optional implementations of this embodiment, step S3 may further include the following steps:
[0095] S31. Simulate the vehicle side and establish an MQTT communication connection with the vehicle side backend.
[0096] The simulation of the vehicle side can be realized through software programs. MQTT (Message Queue Telemetry Transport) is a message protocol based on the publish / subscribe paradigm under the ISO standard (ISO / IECPRF 20922). It works on the TCP / IP protocol family and is a publish / subscribe message protocol designed for remote devices with low hardware performance and poor network conditions. It is a client-server based message publish / subscribe transmission protocol. The MQTT protocol is lightweight, simple, open and easy to implement.
[0097] S32. Use the subscription and push method to upload each set of test coordinate samples to the vehicle backend in sequence.
[0098] S33. Upload random test coordinate samples in sequence at a preset upload frequency until all random test coordinate samples are uploaded.
[0099] The software program is as follows:
[0100] def test_IVC_GPS_upload(self,gps_list):
[0101] """Upload longitude and latitude"""
[0102] vin="TESTP33AVIN000033"
[0103] deviceId="TIVC00000000000033" TargetId="Notification"
[0104] client=self.common.connect_mqtt(self.HOST,self.username,self.password,self.PORT,deviceld)for gps in gps_list:
[0105] vlolo=gps[0]
[0106] vlola=gps[1]
[0107] GPS.message:dict=self.get_gps_body(vin,deviceId,TargetId,vlolo,vlola)
[0108] self.common.publish_message(client,GPS_message["topic'],GPS_message['payload'],GPS_message['comment'])time.sleep(10)
[0109] def connect_mqtt(self,host=None,username="",passwond="',pont=1883,client_id="",keepalive=60):
[0110] """..."""
[0111] def on_connect(lient,userdata,flags,rc):...
[0112] def on_disconnect(lient,userdata,rc):
[0113] try:
[0114] client=mqtt.client(clean_session=False,client_id=client_id)
[0115] client.username_pw_set(username=username,password=password)
[0116] client.connect(host=host,port=port,keepalive=keepalive)
[0117] client.on_connect=on_connect
[0118] client.on_disconnect=on_disconnect
[0119] client.loop_start()
[0120] return client
[0121] Step S4, record and summarize the results of the driving trajectory simulation upload and generate a test report.
[0122] Figure 4 Schematic diagram of the uploaded records obtained in the method for uploading longitude and latitude points by simulating the driving trajectory of the present invention. Figure 4 As shown in the figure, during the execution of driving trajectory simulation upload, the upload record will be printed on the console and the result will be saved in a local file.
[0123] Figure 5 Schematic diagram of the test report obtained in the method for uploading longitude and latitude points during the vehicle trajectory simulation process of the present invention. Figure 5 As shown, after the driving trajectory simulation upload is completed, the upload results can be sorted and counted, including: report summary, duration, total number of uploaded samples, total number of uploaded coordinates, frequently visited coordinates of hit vehicles and number of hits, etc.
[0124] Implementing this embodiment has the following beneficial effects:
[0125] The system reads the coordinates of the vehicle's standard route, randomly generates and calculates and filters the effective test longitude and latitude, executes the simulated vehicle driving trajectory route upload, counts the uploaded results and records the document, and realizes the automated test of driving trajectory simulation. The program automatically generates relevant random longitude and latitude, and can automatically and continuously upload the coordinates according to the set rules. In the test of large-scale data simulation, a lot of manpower and time costs can be reduced. It can solve the problem of simulating driving trajectory behavior and uploading continuous related vehicle GPS positioning.
[0126] It should be emphasized that in order to further ensure the privacy and security of the above test report information, the above test report information can also be stored in a blockchain node.
[0127] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0128] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0129] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0130] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0131] Embodiment 2
[0132] Further references Figure 6 , as a response to the above Figure 1 The present invention provides an embodiment of a device for uploading longitude and latitude points for simulating and processing driving trajectory, and the device embodiment is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0133] like Figure 6 As shown, the driving trajectory simulation processing latitude and longitude point upload device 50 of this embodiment includes: an acquisition module 51, a screening module 52, a simulation upload module 53 and a recording module 54. Among them:
[0134] An acquisition module 51 is used to acquire a vehicle standard trajectory sample configuration, wherein the sample configuration includes a valid coordinate rule configuration;
[0135] A screening module 52, configured to generate a plurality of groups of random coordinates according to the sample configuration, and to screen out valid coordinates from the random coordinates according to the valid coordinate rule configuration;
[0136] A simulation uploading module 53 is used to upload the valid coordinates to the vehicle backend to simulate the uploading of the driving trajectory;
[0137] The recording module 54 is used to record and summarize the results of the driving trajectory simulation upload and generate a test report.
[0138] The implementation of this embodiment has the following beneficial effects: by reading the coordinates frequently visited on the standard route of the vehicle, randomly generating and calculating and filtering the effective test longitude and latitude, executing the full-process method of simulating the vehicle's driving trajectory route upload, and statistically uploading the results and recording the document, the driving trajectory simulation automated test is realized; the program automatically generates associated random longitude and latitude, and can automatically and continuously upload the coordinates according to the set rules, which can reduce a lot of manpower and time costs in the test of large-scale data simulation; it can solve the problem of simulating driving trajectory behavior and uploading the GPS positioning of continuously associated vehicles.
[0139] Embodiment 3
[0140] To solve the above technical problems, the embodiment of the present invention also provides a computer device. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.
[0141] The above-mentioned computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 6 having components of a memory 61, a processor 62, and a network interface 63, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a programmable gate array (FPGA), a digital processor (DSP), an embedded device, etc.
[0142] The computer device may be a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote control, a touch pad, or a voice control device.
[0143] The memory 61 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 can also be an external storage device of the computer device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 6. Of course, the memory 61 can also include both the internal storage unit of the computer device 6 and its external storage device. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed on the computer device 6, such as computer-readable instructions of the method for uploading the latitude and longitude points of the driving trajectory simulation processing. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or are to be output.
[0144] The processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run the computer-readable instructions stored in the memory 61 or process data, such as running the computer-readable instructions of the method for uploading the latitude and longitude points of the driving trajectory simulation processing.
[0145] The network interface 63 may include a wireless network interface or a wired network interface. The network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.
[0146] The implementation of this embodiment has the following beneficial effects: by reading the coordinates frequently visited on the standard route of the vehicle, randomly generating and calculating and filtering the effective test longitude and latitude, executing the full-process method of simulating the vehicle's driving trajectory route upload, and statistically uploading the results and recording the document, the driving trajectory simulation automated test is realized; the program automatically generates associated random longitude and latitude, and can automatically and continuously upload the coordinates according to the set rules, which can reduce a lot of manpower and time costs in the test of large-scale data simulation; it can solve the problem of simulating driving trajectory behavior and uploading the GPS positioning of continuously associated vehicles.
[0147] Embodiment 4
[0148] The present invention also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable at least one processor to perform the steps of the method for uploading longitude and latitude points for simulating driving trajectories as described above.
[0149] The implementation of this embodiment has the following beneficial effects: by reading the coordinates frequently visited on the standard route of the vehicle, randomly generating and calculating and filtering the effective test longitude and latitude, executing the full-process method of simulating the vehicle's driving trajectory route upload, and statistically uploading the results and recording the document, the driving trajectory simulation automated test is realized; the program automatically generates associated random longitude and latitude, and can automatically and continuously upload the coordinates according to the set rules, which can reduce a lot of manpower and time costs in the test of large-scale data simulation; it can solve the problem of simulating driving trajectory behavior and uploading the GPS positioning of continuously associated vehicles.
[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the various embodiment methods of the present invention.
[0151] Obviously, the embodiments described above are only some embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are given in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific embodiments, or to perform equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of the present invention, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.
Claims
1. A method for uploading longitude and latitude points by simulating driving trajectories. It is characterized in that The steps include: Obtaining a vehicle standard trajectory sample configuration, wherein the sample configuration includes a valid coordinate rule configuration; According to the sample configuration, a plurality of groups of random coordinates are generated, and according to the valid coordinate rule configuration, valid coordinates are screened out from the random coordinates; Upload the valid coordinates to the vehicle backend to simulate and upload the driving trajectory; Record and summarize the results of driving trajectory simulation upload and generate a test report.
2. The method for uploading longitude and latitude points for simulating driving trajectory according to claim 1, It is characterized in that The step of obtaining the vehicle standard trajectory sample configuration, wherein the sample configuration includes a valid coordinate rule configuration, specifically comprises: Acquire vehicle simulation information, the vehicle simulation information including the vehicle's frequently visited coordinate information, coordinate weight, historical passing times, test track starting longitude and latitude, test track ending longitude and latitude, simulation coordinate quantity, and valid coordinate rules, the valid coordinate rules including the setting of valid distance; Generate a configuration file using the vehicle simulation information; The configuration file is stored.
3. The method for uploading longitude and latitude points for simulating driving trajectory according to claim 2, It is characterized in that The step of generating a plurality of groups of random coordinates according to the sample configuration and selecting valid coordinates from the random coordinates according to the valid coordinate rule configuration specifically includes: Calculate the longitude difference and latitude difference according to the starting longitude and latitude of the test track and the ending longitude and latitude of the test track respectively; Evenly divide the longitude difference and latitude difference into coordinate sample intervals of the number of simulated coordinates respectively; In each coordinate sample interval, check whether the frequently visited coordinates of the traversal vehicle are within the coordinate sample interval, if so, they are hit coordinates; In each coordinate sample interval, a test coordinate is generated by a random method, and the distance between the test coordinate and the hit coordinate of the current interval is calculated; If the distance is less than the effective distance, the current coordinates are considered to be valid coordinates.
4. The method for uploading longitude and latitude points for simulating driving trajectory according to claim 3, It is characterized in that The steps of uploading the valid coordinates to the vehicle backend and simulating the driving trajectory specifically include: Simulate the vehicle side and establish an MQTT communication connection with the vehicle side backend; Each set of test coordinate samples is uploaded to the vehicle backend in sequence by subscription and push; Upload random test coordinate samples in sequence at the preset upload frequency until all random test coordinate samples have been uploaded.
5. The method for uploading longitude and latitude points for simulating driving trajectory according to claim 3, It is characterized in that The step of generating test coordinates by random method in each coordinate sample interval and calculating the distance between the test coordinates and the hit coordinates in the current interval specifically includes: Assuming the test coordinates are (lat1, lon1) and the current interval hit coordinates are (lat2, lon2), the distance d between the test coordinates and the current interval hit coordinates is: d=R×arccos(sin(lat1)×sin(lat2) +cos(lat1)×cos(lat2)×cos(lon1-lon2)), where R is the radius of the earth.
6. The method for uploading longitude and latitude points for simulating driving trajectory according to claim 3, It is characterized in that After the step of considering the current coordinates as valid coordinates if the distance is less than the effective distance, the method further includes: If the distance is less than the effective distance, the number of historical paths that hit the coordinates is increased by one; If there are no hit coordinates in the current interval, the first set of test coordinates generated is considered to be valid coordinates; Generate multiple groups of valid test coordinate samples in sequence.
7. The method for uploading longitude and latitude points for simulating driving trajectory according to any one of claims 1 to 6, It is characterized in that After the step of recording and summarizing the results of the driving trajectory simulation upload and generating a test report, the following steps are also included: The test report is stored in the blockchain.
8. A driving trajectory simulation and processing latitude and longitude point upload device, It is characterized in that include: An acquisition module, used to acquire a vehicle standard trajectory sample configuration, wherein the sample configuration includes a valid coordinate rule configuration; A screening module, used to generate a plurality of groups of random coordinates according to the sample configuration, and screen out valid coordinates from the random coordinates according to the valid coordinate rule configuration; A simulation upload module, used to upload the valid coordinates to the vehicle backend to simulate the driving trajectory upload; The recording module is used to record and summarize the results of driving trajectory simulation upload and generate a test report.
9. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the method for uploading longitude and latitude points for driving trajectory simulation processing as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the method for uploading longitude and latitude points for driving trajectory simulation processing according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method and system for simulating sending coordinates and computer equipment
CN119512956A
Method and system for simulating sending coordinates, and computer equipment
CN119512956B
