Track data processing method, electronic equipment and storage medium
By analyzing the client's data query instructions, calculating data sparseness and extracting the trajectory data, the problems of low efficiency and poor response timeliness in the prior art are solved, and efficient trajectory data processing and fast response are achieved.
Patent Information
- Application Number
- CN202411928109.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, the system is less efficient in processing trajectory data, which makes it difficult for the timeliness of system responses to meet the user's query needs.
By analyzing the data query instructions sent by the client, determining the device information, time period information, scale information and frame rate information, calculating the data sparseness, and diluting the historical trajectory data to obtain the target trajectory data.
It effectively reduces the amount of trajectory data that the system needs to render and process, improves the system's analysis ability and data processing efficiency of data query instructions, realizes the timeliness of system response, and meets the users' real-time query needs.
Smart Images

Figure CN119884198A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of trajectory data processing, and in particular to a trajectory data processing method, electronic device and storage medium. Background Art
[0002] In scenarios such as autonomous driving and mining operations, it is usually necessary to replay or review the trajectory curves of different equipment. That is, to record and analyze the trajectory paths of different equipment during operation through positioning technology, and to analyze the equipment operation status by replaying historical trajectory data, identify potential problems and improve equipment performance. This can be used to adjust the subsequent operation path of the equipment and improve efficiency and safety.
[0003] In the related art, when replaying or reviewing the trajectory data of different devices, the system needs to perform a large amount of data processing operations in the process of acquiring and subsequently rendering and processing to generate the trajectory curve. The system's processing speed is difficult to meet the user's query needs, and system response delays are prone to occur, affecting the user's query experience. That is, the efficiency of the system in processing trajectory data in the related art is low, and the timeliness of the system response is difficult to meet the user's query needs.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method for processing trajectory data, an electronic device, and a storage medium to at least solve the technical problems in the related art that the efficiency of the system in processing trajectory data is low and the timeliness of the system response is difficult to meet the query needs of users.
[0006] According to one aspect of an embodiment of the present invention, a method for processing trajectory data is provided, comprising: in response to receiving a data query instruction sent by a client, parsing the data query instruction to determine device information of a to-be-queried device, start and end information of a to-be-queried time period, scale information of a map displayed on the client, and frame rate information of trajectory data played on the client; determining data sparsity based on the device information, start and end information, scale information, and frame rate information, wherein the data sparsity is used to characterize the proportion of data extracted in the trajectory data during the thinning process of the trajectory data; thinning the historical trajectory data of the to-be-queried device within the to-be-queried time period based on the data sparsity to obtain target trajectory data; and sending the target trajectory data to the client.
[0007] According to another aspect of an embodiment of the present invention, a method for processing trajectory data is also provided, including: in response to an input instruction acting on an operation interface, determining device information of a to-be-queried device corresponding to the input instruction and start and end information of a to-be-queried time period; in response to a query instruction acting on the operation interface, determining scale information of a map displayed on the operation interface and frame rate information of playing trajectory data; generating a data query instruction based on the device information, the start and end information, the scale information and the frame rate information; sending the data query instruction to a server, and receiving target trajectory data returned by the server, wherein the target trajectory data is obtained by thinning out historical trajectory data of the to-be-queried device within the to-be-queried time period based on data sparsity, and the data sparsity is data sparsity generated based on the device information, the start and end information, the scale information and the frame rate information and is used to characterize the proportion of data extracted in the trajectory data during the thinning out of the trajectory data; and displaying the target trajectory data on the operation interface.
[0008] According to another aspect of an embodiment of the present invention, a trajectory data processing device is further provided, including: a parsing module, for parsing the data query instruction in response to receiving a data query instruction sent by a client, and determining device information of a device to be queried, start and end information of a time period to be queried, scale information of a map displayed on the client, and frame rate information of trajectory data played on the client; a determination module, for determining data sparsity based on the device information, start and end information, scale information and frame rate information, wherein the data sparsity is used to characterize the proportion of data extracted in the trajectory data during the thinning process of the trajectory data; a thinning module, for thinning the historical trajectory data of the device to be queried within the time period to be queried based on the data sparsity to obtain target trajectory data; and a sending module, for sending the target trajectory data to the client.
[0009] According to another aspect of an embodiment of the present invention, a trajectory data processing device is provided, including: a first determination module, for responding to an input instruction acting on an operation interface, and determining device information of a to-be-queried device and start and end information of a to-be-queried time period corresponding to the input instruction; a second determination module, for responding to a query instruction acting on the operation interface, and determining scale information of a map displayed on the operation interface, and frame rate information of playing trajectory data; a generation module, for generating a data query instruction based on the device information, the start and end information, the scale information, and the frame rate information; a sending module, for sending the data query instruction to a server, and receiving target trajectory data returned by the server, wherein the target trajectory data is obtained by thinning out historical trajectory data of the to-be-queried device within the to-be-queried time period based on data sparsity, and the data sparsity is generated based on the device information, the start and end information, the scale information, and the frame rate information, and is used to characterize the proportion of data extracted in the trajectory data during the thinning out of the trajectory data; and a display module, for displaying the target trajectory data on the operation interface.
[0010] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.
[0011] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0012] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0013] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0014] According to another aspect of the embodiments of the present invention, a computer program is further provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.
[0015] In an embodiment of the present invention, according to the data query instruction sent by the client, the instruction is first parsed to determine the device information of the device to be queried, the start and end information of the time period to be queried, the scale information of the map displayed on the client, and the frame rate information of the trajectory data played on the client. Then, the data sparsity is determined according to the device information, time period information, scale information and frame rate information, and the data sparsity is used to indicate the proportion of the data selected in the thinning process in the trajectory data. Then, according to the data sparsity, the historical trajectory data of the device to be queried in the time period to be queried is thinned to obtain the target trajectory data. Finally, the target trajectory data is sent to the client. It is easy to notice that the present application parses the data query instruction, and determines the data sparsity based on the device information of the device to be queried, the start and end information of the time period to be queried, the scale information of the map displayed on the client, and the frame rate information of the trajectory data played on the client, and thins the historical trajectory data of the device to be queried within the time period to be queried. The system parses the data query instruction and can accurately obtain the user's diverse query needs, and then can extract the appropriate amount of data in the process of thinning the trajectory data according to the user's needs. By performing reasonable data thinning on the historical trajectory data, the amount of trajectory data that the system needs to render and process can be effectively reduced. The system renders the thinned trajectory data and displays it to the user more efficiently, which can achieve the timeliness of the system response. The user can obtain the query results more quickly to meet the user's real-time query needs, thereby solving the technical problem that the system in the related technology has low efficiency in processing trajectory data and the timeliness of the system response is difficult to meet the user's query needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 is a flow chart of a method for processing trajectory data according to an embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of an optional trajectory data processing process according to an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of an optional processing effect of trajectory data according to an embodiment of the present invention;
[0020] Figure 4 is a flowchart of another method for processing trajectory data according to an embodiment of the present invention;
[0021] Figure 5is a schematic diagram of a device for processing vehicle data according to an embodiment of the present invention;
[0022] Figure 6 It is a schematic diagram of another device for processing vehicle data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] According to one aspect of an embodiment of the present invention, a method for processing trajectory data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0026] Figure 1 is a flow chart of a method for processing trajectory data according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0027] Step S102, in response to receiving a data query instruction sent by the client, the data query instruction is parsed to determine the device information of the device to be queried, the start and end information of the time period to be queried, the scale information of the map displayed on the client, and the frame rate information of the trajectory data played on the client.
[0028] The above-mentioned devices to be queried may refer to various types of vehicles that need to perform trajectory data query, including self-driving vehicles, equipment or personnel that can move and generate trajectories, etc. The devices to be queried may be equipped with positioning devices, which can automatically collect and upload the positioning information generated by the devices to be queried. The devices to be queried can be determined according to actual needs, and there is no limitation here.
[0029] The above-mentioned device information may refer to identification information, type information, etc. of the device to be queried. The device information may be used to specifically describe the device to be queried. The content of the device information may be determined according to actual needs and is not limited here.
[0030] The start and end information of the above-mentioned time period to be queried may refer to the start time and end time of the time period to be queried. The start and end information of the time period to be queried may be selected by the user or may be the default time period in the data query instruction, etc. It may be determined according to actual needs and is not limited here.
[0031] The above scale information may refer to the proportional relationship between the distance displayed on the client's map and the actual distance. The scale may be expressed in the form of a fraction, such as 1:10,000, which means that 1 unit of distance on the map corresponds to 10,000 units of distance on the actual ground. For example, when the scale is 1:100, the map displays a smaller area with richer details; while when the scale is 1:10,000, the map displays a larger area with relatively fewer details. The scale information can help users understand the distance and scale relationship on the map, and facilitate users to measure and navigate when using the map.
[0032] The above-mentioned frame rate information may refer to the number of frames displayed per unit time when the client plays the trajectory data, or may refer to the speed information of playing the trajectory data on the client. The higher the frame rate, the faster the playback speed; the lower the frame rate, the slower the playback speed. The frame rate information may be selected by the user or may be the default parameter in the data query instruction, etc. It may be determined according to actual needs and is not limited here.
[0033] In an optional embodiment, for a data query instruction received from a client, the following specific implementation process can be performed: the data query instruction can be parsed. First, the data query instruction sent by the client can be parsed to extract the device information of the device to be queried, the start and end information of the time period to be queried, the scale information of the map displayed on the client, and the frame rate information of the trajectory data played on the client. The device information of the device to be queried can be determined. According to the parsed device information, the relevant information of the device to be queried can be determined, including the unique identifier of the device, the device type, etc.; the start and end information of the time period to be queried can be determined. According to the parsed time period information, the time range of the trajectory data to be queried can be determined, so as to filter out qualified data from the database; the scale information of the map displayed on the client can be determined, and the scale size of the map when the trajectory data is displayed on the client can be determined; the frame rate information of the trajectory data played on the client can also be determined. Based on the above information, it is convenient to implement the subsequent thinning / screening of the trajectory data. The implementation of the above process can be combined with database query, data processing and other technologies, and can be developed through programming languages. In practical applications, the data processing framework can be used to process large-scale trajectory data, and the trajectory data can be thinned and screened through algorithms to improve the efficiency and speed of data processing.
[0034] Step S104, determining data sparsity based on device information, start and end information, scale information and frame rate information.
[0035] The data sparsity is used to characterize the proportion of data extracted in the trajectory data during the thinning process of the trajectory data.
[0036] In an optional embodiment, after determining the device information, time period information, map scale information and frame rate information, the data sparsity, that is, the proportion of data extracted in the trajectory data during the thinning process, can be determined based on this information. The determination of data sparsity can be based on factors such as device information, start and end information, scale information and frame rate information. Specifically, different types of equipment may require different data sparsities, such as high-speed vehicles or vehicles that need to be monitored may require more intensive trajectory data; the shorter the time period between the start and end information, the data sparsity can be appropriately reduced, and the longer the time period between the start and end information, the data sparsity can be appropriately increased to balance the data volume of the trajectory data after the thinning process; regarding the map scale, the higher the map zoom level, the more detailed trajectory data needs to be displayed, and a smaller data sparsity can be set; regarding the frame rate information, the faster the playback speed, the data sparsity can be appropriately increased to reduce the data volume. In practical applications, the device information, start and end information, scale information and frame rate information can be quantified separately to obtain multiple quantized sub-results, and then the multiple sub-results can be fused to obtain data sparsity. The fusion method here can be weighted summation, data fusion based on machine learning models, etc.; or a rough data sparsity can be first determined based on the device information and start and end information, and then the rough data sparsity can be fine-tuned based on the scale information and frame rate information to obtain data sparsity. The specific method for determining data sparsity can be determined according to actual needs and is not limited here. In the above process, by determining data sparsity based on device information, time period information, map scale information and frame rate information, the trajectory data to be displayed can be more accurately screened out during the thinning process, reducing the amount of unnecessary data. At the same time, adjusting data sparsity according to different needs can ensure the accuracy and integrity of data while meeting visualization needs. This setting can improve the efficiency and performance of trajectory data processing and provide users with a smoother and more accurate data display experience.
[0037] Step S106: thinning the historical trajectory data of the device to be queried within the time period to be queried based on data sparsity to obtain target trajectory data.
[0038] The above-mentioned target trajectory data may refer to the trajectory curve obtained by thinning out the historical trajectory data and rendering the result, that is, the rendering and other processing processes are performed on the server side; it may also refer to the historical trajectory data being thinned out, the result being sent to the client, and the trajectory curve being rendered on the client side, that is, the rendering and other processing processes may also be performed on the client side. The target trajectory data may be specifically determined according to actual needs and is not limited here.
[0039] In an optional embodiment, the historical trajectory data of the device to be queried within the time period to be queried can be thinned by the server side based on the determined data sparsity. Different thinning methods can be used, and the thinning method can be selected or specified by the user, or determined by the system according to actual conditions. The thinning methods can include time thinning and distance thinning, etc. Time thinning can be thinning the trajectory data according to the time interval, and distance thinning can be thinning according to the distance between positions. It can also be achieved by retaining the inflection points of parameter mutations in the data and discarding some points of parameter smoothness. The historical trajectory data can be thinned by a thinning algorithm, and the thinning algorithm can be selected according to different needs. The thinning algorithm can screen the data points according to the distance and angle between the data points, retain important data points, and reduce unnecessary data points, so as to obtain the target trajectory data. In the above process, data thinning can be used to effectively reduce the amount of data and the cost of data transmission and storage. Reasonable data thinning of historical trajectory data can effectively reduce the amount of trajectory data that the system needs to render and process. The system can render and display the thinned trajectory data to the user more efficiently, which can achieve the timeliness of system response, reduce unnecessary data transmission, save bandwidth resources, improve the overall performance of the system, improve user experience, save bandwidth resources, and achieve efficient and appropriate processing of trajectory data.
[0040] Step S108, sending the target trajectory data to the client.
[0041] In an optional embodiment, the server can send the target trajectory data after thinning to the client, and the client can display the target trajectory data, or render the target trajectory data and display it to the user. The client can display the data according to the frame rate information and scale information to ensure the fluency and clarity of the data. Specifically, the client receives the target trajectory data from the server, which may include the position information, timestamp, etc. of each frame. The client can parse the acquired trajectory data and convert it into a displayable format, which may include the processing of the data structure, the writing of the parsing algorithm, etc.; then, according to the performance and display requirements of the client device, the appropriate frame rate information can be set; and according to the scene and requirements of the client display, the appropriate scale information can be set. The scale information can affect the clarity and detail of the data display; then, according to the frame rate information and scale information, the parsed trajectory data can be displayed. During the display process, the client can also continuously optimize and debug the display effect to ensure the fluency and clarity of the data display. In the above process, the system renders the thinned trajectory data and displays it to the user more efficiently, which can achieve timely system response. Users can obtain query results more quickly to meet users' real-time query needs. The client can effectively ensure the smoothness and clarity of trajectory data playback by displaying data according to frame rate information and scale information. Adjusting the frame rate can control the playback speed of the data, so that users can better observe the changing trend of the data; adjusting the scale can ensure the clarity of data display on the map, avoid overlap and confusion between data points, improve user experience, and help users better understand and analyze trajectory data.
[0042] In an embodiment of the present invention, according to the data query instruction sent by the client, the instruction is first parsed to determine the device information of the device to be queried, the start and end information of the time period to be queried, the scale information of the map displayed on the client, and the frame rate information of the trajectory data played on the client. Then, the data sparsity is determined according to the device information, time period information, scale information and frame rate information, and the data sparsity is used to indicate the proportion of the data selected in the thinning process in the trajectory data. Then, according to the data sparsity, the historical trajectory data of the device to be queried in the time period to be queried is thinned to obtain the target trajectory data. Finally, the target trajectory data is sent to the client. It is easy to notice that the present application parses the data query instruction, and determines the data sparsity based on the device information of the device to be queried, the start and end information of the time period to be queried, the scale information of the map displayed on the client, and the frame rate information of the trajectory data played on the client, and thins the historical trajectory data of the device to be queried within the time period to be queried. The system parses the data query instruction and can accurately obtain the user's diverse query needs, and then can extract the appropriate amount of data in the process of thinning the trajectory data according to the user's needs. By performing reasonable data thinning on the historical trajectory data, the amount of trajectory data that the system needs to render and process can be effectively reduced. The system renders the thinned trajectory data and displays it to the user more efficiently, which can achieve the timeliness of the system response. The user can obtain the query results more quickly to meet the user's real-time query needs, thereby solving the technical problem that the system in the related technology has low efficiency in processing trajectory data and the timeliness of the system response is difficult to meet the user's query needs.
[0043] In an embodiment of the present invention, data sparsity is determined based on device information, start and end information, scale information and frame rate information, including: determining whether it is necessary to perform segmentation processing on historical trajectory data based on the start and end information; and determining data sparsity based on device information, scale information and frame rate information when it is determined that it is not necessary to perform segmentation processing on the historical trajectory data.
[0044] In an optional embodiment, when determining the data sparsity, multiple factors can be considered, including device information, start and end information, scale information and frame rate information. First, based on the start and end information of the time period to be queried, the range of trajectory data to be processed can be determined. If the query time span is large, considering that the user usually cannot read the entire data to be queried in a short time, the data can be processed in segments, so that a section of query results is first provided for the user to view, and the subsequent data is rendered and processed before being provided to the user. There is no need to wait for the entire section of data to be rendered before providing it to the user, which improves the response efficiency of the system. Specifically, the historical trajectory data can be processed in segments so that segmented loop processing can be performed, which can reduce the pressure caused by processing a large amount of data at one time and improve processing efficiency. In the case of determining that the historical trajectory data does not need to be processed in segments, the data sparsity can be determined based on the device information, scale information and frame rate information. The number of trajectory points that need to be displayed under different device information, scale information and frame rate information will also be different. Based on this information, the data sparsity for thinning processing can be determined by an algorithm. Through the above steps, the determination process of dynamically adjusting the data sparsity based on the start and end information of the user's query time period is realized, and then the trajectory data range for rendering the historical trajectory data is dynamically selected, ensuring that when the user chooses to view the trajectory results under a longer time range, the system can also respond to the user's query request more promptly, reducing the waiting time when the user chooses to view the trajectory results under a longer time range, and improving the system's response efficiency and user experience.
[0045] In an embodiment of the present invention, data sparsity is determined based on device information, scale information and frame rate information, including: determining initial sparsity based on device information; adjusting the initial sparsity based on scale information and frame rate information to obtain data sparsity.
[0046] In an optional embodiment, in the processing of trajectory data, the amount of data can be effectively reduced by thinning and screening the data, and the efficiency of data processing and rendering can be improved. In the process of determining the data sparsity, the initial data sparsity can be determined first based on the device information of the device to be queried. Users have different trajectory requirements for different types of devices to be queried. Therefore, an initial sparsity can be determined based on the device information of the device to be queried, so that the amount of trajectory data matches the user's query requirements for the device to be queried. Then, the initial sparsity can be adjusted based on the scale information of the map displayed on the client and the frame rate information of the trajectory data played on the client. Here, the adjustment can be fine-tuning, that is, the adjustment range can be less than the degree of influence of the device information on the initial sparsity. The scale information can reflect the magnification level of the map. The higher the magnification level, the more trajectory details need to be displayed. At this time, the initial sparsity can be appropriately lowered; the frame rate information can reflect the playback magnification of the client playing the trajectory data. If the frame rate is low, the data sparsity can be appropriately lowered. By comprehensively considering the device information, scale information and frame rate information, with a focus on the device information, the final data sparsity is obtained, thereby realizing data thinning and screening in trajectory data processing. In the above process, by reasonably setting the data sparsity, it is possible to reduce unnecessary data volume, reduce the consumption of device resources, and improve user experience while ensuring data visualization effects. Under different device information, map scales and frame rates, the data sparsity can be flexibly adjusted to adapt to different scene requirements and provide more personalized trajectory data display services, which can effectively improve the efficiency of trajectory data processing and user experience, and provide technical support for real-time display and query of trajectory data.
[0047] In an embodiment of the present invention, data sparsity is determined based on device information, scale information and frame rate information, including: inputting the device information, scale information and frame rate information into a preset mathematical function to obtain data sparsity.
[0048] The above-mentioned preset mathematical function may refer to a function used to calculate data sparsity according to input device information, scale information and frame rate information. The preset mathematical function may be designed according to specific requirements and algorithms, and is not limited here.
[0049] Optionally, the process of inputting the device information, the scale information and the frame rate information into a preset mathematical function to obtain the data sparsity Math.flour can be expressed as follows:
[0050]
[0051] Among them, DeviceType can represent device information, where different device types can have different values. Devices with small differences in device type can have similar device information values; devices with large differences in device type can have greatly different device information values. The device information can be determined based on actual needs and is not limited here. The above-mentioned PlaySpeed can represent frame rate information, for example, it can support 1, 2, 4, 8, 16 times speed, etc., and can also be determined based on actual needs. ZOOM can represent scale information, that is, the map zoom ratio, and can represent the actual length of a 1 cm mark on the map. For example, level 19 can represent 20 meters, level 18 can represent 50 meters, level 17 can represent 100 meters, level 16 can represent 200 meters, level 15 can represent 500 meters, level 14 can represent 1 kilometer, level 13 can represent 2 kilometers, level 12 can represent 5 kilometers, level 11 can represent 10 kilometers, level 10 can represent 20 kilometers, level 9 can represent 25 kilometers, level 8 can represent 50 kilometers, level 7 can represent 100 kilometers, level 6 can represent 200 kilometers, level 5 can represent 500 kilometers, level 4 can represent 1000 kilometers, level 3 can represent 2000 kilometers, level 2 can represent 5000 kilometers, level 1 can represent 10000 kilometers. The specific representation of the above scale information can also be determined according to actual needs and is not limited here.
[0052] In an optional embodiment, in the processing of trajectory data, the thinning process reduces the storage and processing costs of data by reducing the number of data points, and can improve the visualization effect of data. When performing the thinning process of trajectory data, the device information, scale information and frame rate information of the object to be queried can be input into a preset mathematical function, and the data sparsity can be obtained by calculation, thereby realizing the thinning and screening of trajectory data. The device information, scale information and frame rate information can be input into the preset mathematical function to obtain the data sparsity. The thinning and screening of trajectory data can be realized by adjusting the data sparsity. In the above process, by dynamically adjusting according to the device information, scale information and frame rate information, the adaptive display of data can be realized, ensuring that the data can have a good visualization effect in different devices and different situations, the device information, scale information and frame rate information of the object to be queried are input into the preset mathematical function, and the data sparsity is obtained by calculation, so that the thinning and screening of trajectory data can be realized, thereby improving the visualization effect of data, improving data processing efficiency and improving user experience.
[0053] In an embodiment of the present invention, thinning the historical trajectory data of a device to be queried within a time period to be queried based on data sparsity to obtain target trajectory data includes: determining a thinning parameter for thinning the historical trajectory data based on data sparsity, wherein the thinning parameter includes: a thinning time interval or a thinning distance interval; thinning the historical trajectory data according to the thinning parameter to obtain the target trajectory data, wherein the time interval of adjacent trajectory points in the target trajectory data satisfies the thinning time interval or the distance interval of adjacent trajectory points satisfies the thinning distance interval.
[0054] In an optional embodiment, in trajectory data processing, thinning processing reduces the data storage and transmission overhead by reducing the number of data points, and can also simplify the data analysis process and improve data processing efficiency. Based on the data sparsity, the process of thinning the historical trajectory data of the query device in the query time period can filter out the target trajectory data that meets the query requirements from the massive historical trajectory data, which is of great significance in practical applications. First, the thinning parameters can be determined according to the data sparsity. The data sparsity can be determined according to different application scenarios and requirements, and can be evaluated by indicators such as the density and acquisition frequency of the historical trajectory data. The thinning parameters can include a thinning time interval or a thinning distance interval. According to different data sparsities, different thinning parameters can be selected to achieve data thinning, so as to obtain target trajectory data that meets the requirements. Then, the historical trajectory data can be thinned according to the thinning parameters. In actual operation, the data points in the historical trajectory data can be screened according to the thinning time interval or the thinning distance interval, and the data points that meet the thinning requirements can be retained to obtain the target trajectory data. In the data thinning process, it can be ensured that the time interval or distance interval of adjacent trajectory points in the target trajectory data meets the requirements of the thinning parameters to ensure the validity and integrity of the data. Through the above steps, the historical trajectory data can be thinned out to obtain the target trajectory data that meets the query requirements. The thinning method based on data sparsity can effectively reduce the amount of data and improve data processing efficiency, while retaining the main features and information of the trajectory data, providing a basis for subsequent data analysis and application. In addition, by reasonably setting the thinning parameters, data thinning can be achieved according to different application scenarios and requirements, making data processing more flexible and effective.
[0055] In an embodiment of the present invention, when it is determined that the historical trajectory data needs to be segmented, the method further includes: splitting the start and end information to obtain a plurality of sub-start and end information; determining the sparsity of the sub-data corresponding to the sub-start and end information based on the device information, any sub-start and end information, the scale information and the frame rate information; splitting the historical trajectory data based on the sub-start and end information to obtain the sub-historical trajectory data corresponding to the sub-start and end information; thinning the sub-historical trajectory data corresponding to the sub-start and end information based on the sub-data sparsity corresponding to the sub-start and end information to obtain the sub-target trajectory data corresponding to the sub-start and end information; and aggregating the sub-target trajectory data corresponding to the plurality of sub-start and end information to obtain the target trajectory data.
[0056] In an optional embodiment, when it is determined that the historical trajectory data needs to be processed in segments, the start and end information of the query time period can be split first to obtain multiple sub-start and end information. In this way, the entire query time period can be decomposed into multiple small time periods, which is convenient for subsequent processing and analysis. Then, based on the device information, any sub-start and end information, scale information and frame rate information, the sub-data sparsity corresponding to the sub-start and end information is determined, and the data density of each sub-time period is determined, so that the historical trajectory data can be better thinned. Based on the sub-start and end information, the historical trajectory data is split to obtain the sub-historical trajectory data corresponding to the sub-start and end information, so as to realize the division of the entire historical trajectory data according to the sub-time period for subsequent processing and analysis. Then, the sub-historical trajectory data can be thinned based on the sub-data sparsity corresponding to the sub-start and end information to obtain the sub-target trajectory data corresponding to the sub-start and end information, so as to realize the thinning of the trajectory data in each sub-time period to reduce the amount of data and retain the key information of the data. Finally, the sub-target trajectory data corresponding to multiple sub-start and end information can be summarized to obtain the target trajectory data, and the target trajectory data in each sub-time period can be merged to obtain the final target trajectory data for subsequent analysis and application. Through the implementation process of the above steps, the historical trajectory data can be effectively processed and analyzed. Decomposing the large time period into small time periods can process the data more finely, improving the utilization and accuracy of the data. Then, the trajectory data in each sub-time period can be thinned to reduce the amount of data and improve the processing efficiency and visualization effect of the data. Finally, the target trajectory data of each sub-time period can be summarized to obtain the complete target trajectory data, which provides strong support for subsequent analysis and decision-making, and can realize efficient processing and analysis of historical trajectory data, improve the utilization value and application effect of data, reduce data storage space and transmission costs, and improve system performance and stability.
[0057] In an embodiment of the present invention, the method further includes: based on the device information of the device to be queried, reading the initial trajectory data corresponding to the device to be queried from the trajectory database, wherein the initial trajectory data includes trajectory points at multiple times; based on the start and end information, intercepting the initial trajectory data to obtain the historical trajectory data corresponding to the time period to be queried.
[0058] In an optional embodiment, in the trajectory data processing, for large-scale trajectory data, the data can be thinned or screened to reduce the amount of data and improve the data processing efficiency. In practical applications, the corresponding initial trajectory data can be read from the trajectory database according to the device information of the device to be queried, and then the initial trajectory data can be intercepted based on the start and end information to obtain the historical trajectory data corresponding to the time period to be queried. Specifically, the initial trajectory data corresponding to the device to be queried can be read from the trajectory database first, and all trajectory data corresponding to the device can be obtained from the trajectory database according to the device information of the device to be queried. These trajectory data can include the location information of the device at different time points, that is, trajectory points. Then, the initial trajectory data can be intercepted based on the start and end information, and the initial trajectory data can be screened and intercepted according to the start and end time information to be queried to obtain the historical trajectory data corresponding to the time period to be queried, which can specifically include, according to the start and end time information, filtering out the trajectory points within the time period to be queried, sorting the filtered trajectory points in chronological order, and intercepting the historical trajectory data corresponding to the time period to be queried according to the sorted trajectory points. Through the above steps, the historical trajectory data corresponding to the time period to be queried can be obtained, so that these data can be used in subsequent analysis and display. In the above steps, by intercepting the trajectory data, the amount of data can be reduced, and only the data within the time period to be queried can be retained, thereby reducing the complexity of data processing and improving the operating efficiency of the system. By accurately intercepting the historical trajectory data within the time period to be queried, it can be ensured that the data used is accurate and complete, which helps to improve the accuracy and reliability of data analysis. Concise and accurate historical trajectory data can better support user query and analysis needs, and improve user experience and user satisfaction.
[0059] In an embodiment of the present invention, after sending the target trajectory data to the client, the method further includes: in response to receiving an update instruction sent by the client, determining updated scale information or updated frame rate information corresponding to the update instruction; based on the updated scale information or the updated frame rate information, adjusting the data sparsity to obtain updated sparsity; based on the updated sparsity, thinning the target trajectory data to obtain updated trajectory data; and sending the updated trajectory data to the client.
[0060] In an optional embodiment, when the client sends an update instruction, the server can receive and parse the instruction to determine the updated scale information or the updated frame rate information. Based on the updated scale information or frame rate information, the server can adjust the sparsity of the target trajectory data. For example, when the user adjusts the scale information, if the map is enlarged, the density of the trajectory data can be increased to ensure the display of details; if the map is reduced, the density of the trajectory data can be appropriately reduced to save bandwidth and improve system performance. According to the updated sparsity, the server can perform a thinning process on the target trajectory data to obtain the updated trajectory data. Finally, the server can send the updated trajectory data to the client, and the client will display it in real time according to the received data. The user can adjust the scale information and frame rate information at any time during the process of viewing the trajectory playback, and the system will update the sparsity and density of the trajectory data in real time according to the user's adjustment to ensure that the user can obtain a smooth playback experience. Through the above steps, the sparsity of the data can be dynamically adjusted according to the needs of the client, reducing unnecessary data transmission and rendering overhead, and improving data processing and display efficiency. By updating the scale information and frame rate information in real time, users can adjust the map display ratio and trajectory playback speed at any time according to their needs, which improves the user experience and interactivity. By dynamically adjusting the sparsity of data, the system can respond to the user's updated query needs in a timely manner and dynamically adjust the query results, thereby providing users with a better user experience.
[0061] The technical solution proposed in this application is described below in combination with an optional embodiment. This application proposes a more efficient processing method for trajectory playback. In open-pit mine scenes, with the application of various types of unmanned vehicles, manned vehicle terminals, personnel positioning cards, and mobile positioning devices, the collection of positioning information of personnel and equipment has become simpler and the storage cost of data has become lower and lower. However, there are the following problems with the application of historical trajectory information: the amount of data is huge, and it is difficult to quickly and conveniently display and replay the trajectory information in the process of users using trajectory information to analyze and confirm problems. Taking an autonomous driving fleet of 100 vehicles as an example, if the vehicle positioning information collection frequency is 10Hz, the total amount of trajectory information within 1 hour is 3.6 million frames. Whether it is the web page or the application end, the rendering will be slow, and the rendering process will produce jams, which will cause a bad experience for users. With the increase in the number of fleets and the increase in the query time of historical trajectory information, the amount of data will also increase exponentially, and the user experience will become worse. The technical solution proposed in this application can support the historical trajectory playback function of multiple-speed playback and map scale adjustment, and realize fast query and rendering of positioning and trajectory data.
[0062] When a user queries the trajectory information of a device, person or vehicle, in addition to collecting the device information and time period information that the user needs to query, the scale and speed multiple of the user's current map can also be collected. Based on the above information, the data query service calls the parameter parsing service. The parameter parsing service determines the reasonable sparsity of the positioning data based on the device information, time period information, map scale and speed multiple, and provides it to the data query service. The data query service then queries the database based on the device information, time period information and data sparsity, and returns the positioning data after sparseness. The main role of the parameter parsing service in the entire query process can be to determine the reasonable data sparsity based on the query parameters, such as the larger the map scale, the greater the data sparsity, the larger the speed multiple, the greater the data sparsity, and the slower the speed of the device, person or vehicle, the greater the data sparsity. The data query service thins the positioning data according to the data sparsity during the query process. The larger the data sparsity, the less positioning information is returned and the faster the rendering speed. In addition, if the query time range is large during the query process, the time range can be split and queried in stages, which does not affect the calculation of data sparsity by the parameter parsing service. At the same time, by calculating data sparsity, the data query time range of a single query can be increased and the query frequency can be reduced.
[0063] When a user queries the trajectory information of a device, person or vehicle, he can select the device information and query time range according to the scope he wants to query. The user can adjust the map scale to view the device operation trajectory within a certain geographical range, and can choose to play at multiple speeds to quickly view the device operation process. However, when the user's query area is relatively large, the number of devices, people or vehicles queried is relatively large, and the query time range is relatively long, the amount of query data will increase exponentially, and the query process, data transmission process, and trajectory positioning point rendering process are all relatively slow. The user can only passively wait during the entire query, transmission, and rendering process until the trajectory positioning point rendering is completed, and the user experience is not good. In extreme cases, querying and rendering of large amounts of data will cause the system to crash. This application adds a data parsing service to obtain the device, person or vehicle information, time period information, map scale information, and multiple speed playback information when the user queries, and calculates a reasonable data sparsity. For example, the larger the map scale, the larger the geographical scope of the user's attention, the less attention to details, the greater the calculated data sparsity, the larger the speed playback multiple, the less attention the user pays to details in the fine-grained time range, the greater the calculated data sparsity, the slower the speed of the device, person or vehicle, the smaller the change in positioning within the same time unit, the greater the density of positioning data, and the greater the calculated data sparsity. After the data analysis service determines the data sparsity, the data query service will extract the positioning data according to the data sparsity during the query process. The greater the data sparsity, the less positioning information is returned, the shorter the data transmission time, and the faster the rendering speed.
[0064] Open-pit mines are a typical application scenario of the above examples. There are many personnel, equipment, and vehicles in open-pit mines, and the safety production requirements are high. The penetration rate of positioning equipment is high. There are many application scenarios for historical trajectory data during review or analysis, and most of them belong to scenarios where multiple devices, people or vehicles interact. Through this application, the data query speed, data transmission time, and data rendering speed can be significantly improved, the waiting time of users when querying the historical trajectory of the device can be reduced, the user experience can be improved, and the system stability can be improved.
[0065] The technical solution proposed in this application firstly supports users with a larger query scope, including a larger map area, more devices, people or vehicles, longer query time, higher speed playback multiples, reduces the frequency of segmented queries, and reduces the frustration caused by frequent segmented queries. Secondly, according to different devices, map scales and speed playback multiples, determine the reasonable sparsity of trajectory positioning data, which can significantly reduce the time consumption of the entire query process, make data rendering smoother, reduce user waiting time, and optimize user experience; finally, according to different devices, map scales and speed playback multiples, determine the reasonable sparsity of trajectory positioning data, which can reduce the complexity of the query process, reduce the amount of data query, reduce the impact of the query process on the system as a whole, and improve system stability.
[0066] Figure 2 is a schematic diagram of an optional trajectory data processing process according to an embodiment of the present invention, such as Figure 2 As shown, Figure 2 As shown, the user enters the track query page; selects the device information, time period, map scale and speed playback multiples to be queried, and clicks query; determines whether segmented query is required; if segmented query is not required, directly uses the data query service to query; if segmented query is required, cyclically calls the data query service to query; the data analysis service calculates a suitable data sparsity based on the device information, time period, map scale and speed playback multiples; queries the track positioning information based on the data sparsity, device information and time period; transmits data and returns to the front end; renders data and completes the query.
[0067] Figure 3 is a schematic diagram of an optional processing effect of trajectory data according to an embodiment of the present invention, such as Figure 3 As shown, Figure 3 As shown, the processing effect of the final trajectory data displayed by the client to the user is shown. Figure ① can display the start and end information of the time period to be queried, and Figure ② can display the frame rate information of the trajectory data played on the client. The figure can display the trajectory curves of multiple devices to be queried at the same time, and the device information of each device to be queried can be displayed on the trajectory curve.
[0068] According to another aspect of an embodiment of the present invention, a method for processing trajectory data is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0069] Figure 4 is a flow chart of a method for processing trajectory data according to an embodiment of the present invention. Figure 4 As shown, the method comprises the following steps:
[0070] Step S402, in response to an input instruction on the operation interface, determining device information of the device to be queried and start and end information of the time period to be queried corresponding to the input instruction.
[0071] Step S404, responding to the query instruction acting on the operation interface, determining the scale information of the map displayed on the operation interface and the frame rate information of the playback trajectory data.
[0072] Step S406, generating a data query instruction based on the device information, start and end information, scale information and frame rate information.
[0073] Step S408, sending a data query instruction to the server, and receiving the target trajectory data returned by the server.
[0074] Among them, the target trajectory data is obtained by thinning the historical trajectory data of the queried device within the queried time period based on data sparsity. The data sparsity is generated based on device information, start and end information, scale information and frame rate information. The data sparsity is used to characterize the proportion of data extracted in the trajectory data during the thinning process.
[0075] Step S410: displaying target trajectory data on the operation interface.
[0076] In an embodiment of the present invention, the method further includes: responding to an operation instruction acting on an operation interface, determining updated scale information or updated frame rate information corresponding to the operation instruction; generating an update instruction based on the updated scale information or the updated frame rate information; sending the update instruction to a server, and receiving updated trajectory data returned by the server, wherein the updated trajectory data is obtained by thinning out the target trajectory data based on the updated sparsity, and the updated sparsity is obtained by adjusting the data sparsity based on the updated scale information or the updated frame rate information; and displaying the updated trajectory data on the operation interface.
[0077] In an optional embodiment, in the processing of trajectory data, thinning processing can effectively reduce the storage space and transmission bandwidth of trajectory data while maintaining the main features of the data. Rendering after thinning can improve the visualization effect and user experience of the data. The user performs operations on the operation interface, such as zooming in and out of the map, adjusting the frame rate, etc., and the system can generate corresponding operation instructions according to the user's operation. Then, the updated scale information or updated frame rate information corresponding to the operation instruction can be determined. According to the user's operation instruction, the system can determine the updated scale information or frame rate information so as to generate the update instruction later. Then, according to the updated scale information or frame rate information, the system will generate the corresponding update instruction, including parameters such as the sparsity that needs to be thinned. Then, the update instruction can be sent to the server, and the updated trajectory data returned by the server is received. The system can send the update instruction to the server, and the server performs thinning processing on the target trajectory data according to the instruction, and then returns the updated trajectory data to the client. After the client receives the updated trajectory data, it can render and display it on the operation interface, and the user can see the trajectory data after thinning processing. By implementing the above steps, the trajectory data can be dynamically thinned and rendered, thereby achieving smooth display at different scales or frame rates. In the above process, by thinning the trajectory data, the data storage space and transmission bandwidth can be reduced, and the data transmission efficiency can be improved. The trajectory data after thinning can be better displayed on the map interface, reducing data overlap and confusion, and improving data visualization. By dynamically adjusting parameters such as sparsity and frame rate, updated trajectory data can be generated in real time according to user operations, improving the user's interactive experience and operational smoothness.
[0078] According to another aspect of an embodiment of the present invention, a trajectory data processing device is further provided. The device can execute the trajectory data processing method of the above embodiment. The specific implementation method and preferred application scenario are the same as those of the above embodiment and will not be described in detail herein.
[0079] Figure 5 is a schematic diagram of a trajectory data processing device according to an embodiment of the present application, such as Figure 5 As shown, the device includes the following: a parsing module 502 , a determining module 504 , a thinning module 506 and a sending module 508 .
[0080] Among them, the parsing module is used to parse the data query instruction in response to receiving the data query instruction sent by the client, determine the device information of the device to be queried, the start and end information of the time period to be queried, the scale information of the map displayed on the client, and the frame rate information of the trajectory data played on the client; the determination module is used to determine the data sparsity based on the device information, the start and end information, the scale information and the frame rate information, wherein the data sparsity is used to characterize the proportion of the data extracted in the trajectory data during the thinning process of the trajectory data; the thinning module is used to thin the historical trajectory data of the device to be queried within the time period to be queried based on the data sparsity to obtain the target trajectory data; the sending module is used to send the target trajectory data to the client.
[0081] The determination module is further used to determine whether the historical trajectory data needs to be segmented based on the start and end information; if it is determined that the historical trajectory data does not need to be segmented, determine the data sparsity based on the device information, scale information and frame rate information;
[0082] The determination module is further used to determine the initial sparsity based on the device information; and to adjust the initial sparsity based on the scale information and the frame rate information to obtain the data sparsity.
[0083] The determination module is further used to input device information, scale information and frame rate information into a preset mathematical function to obtain data sparsity.
[0084] The determination module is further used to determine a thinning parameter for thinning the historical trajectory data based on data sparsity, wherein the thinning parameter includes: a thinning time interval or a thinning distance interval; the historical trajectory data is thinned according to the thinning parameter to obtain target trajectory data, wherein the time interval between adjacent trajectory points in the target trajectory data satisfies the thinning time interval or the distance interval between adjacent trajectory points satisfies the thinning distance interval.
[0085] Wherein, in the case where it is determined that the historical trajectory data needs to be segmented, the determination module is also used to split the start and end information to obtain multiple sub-start and end information; based on the device information, any sub-start and end information, the scale information and the frame rate information, the sub-data sparsity corresponding to the sub-start and end information is determined; based on the sub-start and end information, the historical trajectory data is split to obtain the sub-historical trajectory data corresponding to the sub-start and end information; based on the sub-data sparsity corresponding to the sub-start and end information, the sub-historical trajectory data corresponding to the sub-start and end information is thinned to obtain the sub-target trajectory data corresponding to the sub-start and end information; the sub-target trajectory data corresponding to multiple sub-start and end information are summarized to obtain the target trajectory data.
[0086] Among them, the determination module is also used to read the initial trajectory data corresponding to the device to be queried from the trajectory database based on the device information of the device to be queried, wherein the initial trajectory data includes trajectory points at multiple times; based on the start and end information, the initial trajectory data is intercepted to obtain the historical trajectory data corresponding to the time period to be queried.
[0087] Among them, after sending the target trajectory data to the client, the determination module is also used to respond to the update instruction sent by the client, determine the updated scale information or the updated frame rate information corresponding to the update instruction; based on the updated scale information or the updated frame rate information, adjust the data sparsity to obtain the updated sparsity; based on the updated sparsity, thin the target trajectory data to obtain the updated trajectory data; and send the updated trajectory data to the client.
[0088] According to another aspect of an embodiment of the present invention, a trajectory data processing device is further provided. The device can execute the trajectory data processing method of the above embodiment. The specific implementation method and preferred application scenario are the same as those of the above embodiment and will not be described in detail herein.
[0089] Figure 6 is a schematic diagram of a trajectory data processing device according to an embodiment of the present application, such as Figure 6 As shown, the device includes the following: a first determining module 602 , a second determining module 604 , a generating module 606 , a sending module 608 and a display module 610 .
[0090] Among them, the first determination module is used to respond to the input instruction acting on the operation interface, and determine the device information of the device to be queried and the start and end information of the time period to be queried corresponding to the input instruction; the second determination module is used to respond to the query instruction acting on the operation interface, and determine the scale information of the map displayed on the operation interface, and the frame rate information of the playback trajectory data; the generation module is used to generate a data query instruction based on the device information, the start and end information, the scale information and the frame rate information; the sending module is used to send the data query instruction to the server, and receive the target trajectory data returned by the server, wherein the target trajectory data is obtained by thinning the historical trajectory data of the device to be queried within the time period to be queried based on the data sparsity, and the data sparsity is generated based on the device information, the start and end information, the scale information and the frame rate information. The data sparsity is used to characterize the proportion of data extracted in the trajectory data during the thinning process of the trajectory data; the display module is used to display the target trajectory data on the operation interface.
[0091] Among them, in response to the operation instruction acting on the operation interface, the updated scale information or the updated frame rate information corresponding to the operation instruction is determined; based on the updated scale information or the updated frame rate information, an update instruction is generated; the update instruction is sent to the server, and the updated trajectory data returned by the server is received, wherein the updated trajectory data is obtained by thinning the target trajectory data based on the updated sparsity, and the updated sparsity is obtained by adjusting the data sparsity based on the updated scale information or the updated frame rate information; the updated trajectory data is displayed on the operation interface.
[0092] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.
[0093] The above-mentioned memory may refer to a device inside a computer for storing data and programs, and may include memory, hard disk, etc., wherein the memory may be used to temporarily store running programs and data, the hard disk may be used to store programs and data for a long time, and the memory may be used to enable the computer to read and write data, and execute programs; the above-mentioned processor may be responsible for executing instructions in computer programs and performing data processing, and may be responsible for controlling and executing various operations, including arithmetic operations, logical operations, data transmission, etc.
[0094] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0095] The above-mentioned computer storage medium may refer to a medium in a computer memory used to store certain discontinuous physical quantities. Computer storage media mainly include semiconductors, magnetic cores, magnetic drums, magnetic tapes, laser disks, etc.; the stored program included in the computer-readable storage medium may be a set of instructions that can be recognized and executed by a computer, running on an electronic computer, and is an information tool that meets certain needs of people.
[0096] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.
[0097] The above-mentioned computer program product may refer to a software program that has been written, tested and released and can be run on a computer or other device. The computer program product may include an application, an operating system, tool software, etc., which is used to implement specific functions or solve specific problems.
[0098] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0099] The above-mentioned non-volatile computer-readable storage medium may refer to a medium for storing data. The non-volatile computer-readable storage medium can keep the data from being lost when the power is off, and can be used to store long-term data, such as operating systems, applications, and user files. The non-volatile storage medium may include hard disk drives, solid-state drives, optical disks, and flash memory storage devices, etc.
[0100] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.
[0101] The above-mentioned computer program may refer to a collection of instructions used to tell a computer to perform a specific task or operation. A computer program may be written by a programmer using a specific programming language and may include algorithms, data structures, logic, and control flows. A computer program may be used for a variety of purposes, including application software, operating systems, and the like.
[0102] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0103] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0104] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0105] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0106] If the integrated unit is implemented in the form of 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 the present invention, 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0107] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing trajectory data, characterized in that: include: In response to receiving a data query instruction sent by the client, parsing the data query instruction to determine device information of the device to be queried, start and end information of the time period to be queried, scale information of the map displayed on the client, and frame rate information of the trajectory data played on the client; Determine data sparsity based on the device information, the start and end information, the scale information and the frame rate information, wherein the data sparsity is used to characterize the proportion of the data extracted in the trajectory data during the thinning process of the trajectory data; Based on the data sparsity, the historical trajectory data of the device to be queried within the time period to be queried are thinned to obtain target trajectory data; The target trajectory data is sent to the client.
2. The method according to claim 1, characterized in that: The determining of data sparsity based on the device information, the start and end information, the scale information and the frame rate information includes: Based on the start and end information, determining whether it is necessary to perform segmentation processing on the historical trajectory data; When it is determined that segmentation processing is not required for the historical trajectory data, the data sparsity is determined based on the device information, the scale information and the frame rate information.
3. The method according to claim 2, characterized in that The determining of data sparsity based on the device information, the scale information and the frame rate information includes: Based on the device information, determining an initial sparsity; The initial sparsity is adjusted based on the scale information and the frame rate information to obtain the data sparsity.
4. The method according to claim 2, characterized in that: The determining of data sparsity based on the device information, the scale information and the frame rate information includes: The device information, the scale information and the frame rate information are input into a preset mathematical function to obtain the data sparsity.
5. The method according to any one of claims 2 to 4, characterized in that The step of thinning the historical trajectory data of the device to be queried within the time period to be queried based on the data sparsity to obtain target trajectory data includes: Based on the data sparsity, determining a thinning parameter for thinning the historical trajectory data, wherein the thinning parameter includes: a thinning time interval or a thinning distance interval; The historical trajectory data is thinned according to the thinning parameter to obtain the target trajectory data, wherein the time interval between adjacent trajectory points in the target trajectory data satisfies the thinning time interval or the distance interval between adjacent trajectory points satisfies the thinning distance interval.
6. The method according to any one of claims 2 to 4, characterized in that In the case where it is determined that the historical trajectory data needs to be segmented, the method further includes: Splitting the start and end information to obtain a plurality of sub-start and end information; Determine the sub-data sparsity corresponding to the sub-start and end information based on the device information, any sub-start and end information, the scale information and the frame rate information; Based on the sub-start and end information, the historical trajectory data is split to obtain the sub-historical trajectory data corresponding to the sub-start and end information; Based on the sub-data sparsity corresponding to the sub-start and end information, the sub-historical trajectory data corresponding to the sub-start and end information is thinned to obtain the sub-target trajectory data corresponding to the sub-start and end information; The sub-target trajectory data corresponding to the plurality of sub-start and end information are aggregated to obtain the target trajectory data.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Based on the device information of the device to be queried, read the initial trajectory data corresponding to the device to be queried from the trajectory database, wherein the initial trajectory data includes trajectory points at multiple time points; The initial trajectory data is intercepted based on the start and end information to obtain the historical trajectory data corresponding to the time period to be queried.
8. The method according to any one of claims 1 to 7, characterized in that After sending the target trajectory data to the client, the method further includes: In response to receiving an update instruction sent by the client, determining updated scale information or updated frame rate information corresponding to the update instruction; Based on the updated scale information or the updated frame rate information, adjusting the data sparsity to obtain an updated sparsity; Thinning the target trajectory data based on the updated sparsity to obtain updated trajectory data; Sending the updated trajectory data to the client.
9. A method for processing trajectory data, characterized in that: include: In response to an input instruction acting on the operation interface, determine device information of the device to be queried and start and end information of the time period to be queried corresponding to the input instruction; In response to a query instruction acting on the operation interface, determine the scale information of the map displayed on the operation interface and the frame rate information of the playback trajectory data; Generate a data query instruction based on the device information, the start and end information, the scale information and the frame rate information; Sending the data query instruction to the server, and receiving the target trajectory data returned by the server, wherein the target trajectory data is obtained by thinning the historical trajectory data of the device to be queried within the time period to be queried based on data sparsity, and the data sparsity is generated based on the device information, the start and end information, the scale information and the frame rate information. The data sparsity is used to characterize the proportion of the data extracted in the trajectory data during the thinning process of the trajectory data; The target trajectory data is displayed on the operation interface.
10. The method according to claim 9, characterized in that The method further comprises: In response to an operation instruction acting on the operation interface, determining updated scale information or updated frame rate information corresponding to the operation instruction; generating an update instruction based on the updated scale information or the updated frame rate information; Sending the update instruction to the server, and receiving updated trajectory data returned by the server, wherein the updated trajectory data is obtained by thinning the target trajectory data based on the updated sparsity, and the updated sparsity is obtained by adjusting the data sparsity based on the updated scale information or the updated frame rate information; The updated trajectory data is displayed on the operation interface.
11. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 10 when running.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 10.
13. A computer program product, characterized in that It comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 10.