Disclosure of Invention
In view of the foregoing, it is necessary to provide a method, a device, an electronic apparatus and a storage medium for extracting working condition circulation, which are used for solving the problem of low efficiency and accuracy of the existing working condition circulation extraction method.
In order to solve the above problems, the present invention provides a method for extracting working condition circulation, comprising:
identifying a thermodynamic point in GPS data of the vehicle based on a moving window thermodynamic diagram identification method;
identifying a docking point in the GPS data based on a distance matrix; the distance matrix is constructed based on the distances between the thermal points;
Dividing the operation data of the vehicle into a plurality of pieces of circulation data based on the heating point and the stop point;
and extracting working condition circulation based on the operation characteristics corresponding to the circulation data.
In one possible implementation, the identifying the docking point in the GPS data based on the distance matrix includes:
Constructing a distance mark matrix based on the distance matrix;
and identifying the stop point based on the distance mark matrix.
In one possible implementation manner, the identifying the stop point based on the distance marking matrix includes:
Based on the sum of each row or each column in the distance marking matrix, sequentially storing the row or column corresponding to the maximum value into a list;
and determining a point with time jump exceeding a preset value in the list as the stop point.
In one possible implementation manner, the extracting the working condition cycle based on the operation feature corresponding to the cycle data includes:
respectively determining an average value of running characteristics corresponding to each cycle data;
And based on the error between the running characteristic and the average value, taking the running characteristic corresponding to the value with the minimum error as the working condition circulation.
In one possible implementation, the operating characteristics include at least one of:
Average driving speed, driving mileage, driving time, idling time duty ratio, braking mileage duty ratio, economic rotation speed time duty ratio, shift frequency, start-stop frequency or hundred kilometers oil consumption.
In one possible implementation manner, after the thermodynamic diagram identification method based on the moving window, the method further includes:
and cleaning the heating power points based on the time at which any two adjacent points in the heating power points are positioned.
The invention also provides a working condition circulation extraction device, which comprises:
The first identification module is used for identifying a heating point in GPS data of the vehicle based on a moving window thermodynamic diagram identification method;
The second identification module is used for identifying the stop points in the GPS data based on the distance matrix; the distance matrix is constructed based on the distances between the thermal points;
the dividing module is used for dividing the running data of the vehicle into a plurality of pieces of circulating data based on the heating point and the stopping point;
And the extraction module is used for extracting working condition circulation based on the operation characteristics corresponding to the circulation data.
In another aspect, the present invention also provides an electronic device comprising a memory and a processor, wherein,
The memory is used for storing programs;
the processor is coupled to the memory and is configured to execute the program stored in the memory, so as to implement the method for extracting the working condition cycle in any implementation manner.
In another aspect, the present invention further provides a computer readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for extracting a cycle of operating conditions in any of the above implementations.
In another aspect, the present invention further provides a computer program product, including a computer program, where the computer program when executed by a processor implements the method for extracting the working condition cycle in any implementation manner.
The beneficial effects of the invention are as follows: according to the working condition cycle extraction method, the device, the electronic equipment and the storage medium, the GPS data of the vehicle is analyzed by using the moving window thermodynamic diagram identification method to identify the thermodynamic point, namely the region where the vehicle is always stopped or moves, the distance matrix is constructed according to the distance between the thermodynamic points, and further the stopping point of the vehicle near the thermodynamic point, namely the actual stopping position of the vehicle is identified, so that the continuous vehicle operation data can be divided into multiple independent pieces of cycle data according to the identified thermodynamic point and the stopping point, each piece of cycle data respectively represents the data segments of the vehicle in different working periods or operation modes, and therefore the corresponding operation characteristics, such as the running speed, the running time, the stopping time and the like, of each cycle data segment can be analyzed, the working condition cycle of the vehicle is obtained, the working condition cycle is extracted by adopting the dividing algorithm of the thermodynamic point and the stopping point in the fixed period acquired by the Internet of vehicles, and the extraction period is shortened, and the efficiency and the accuracy are improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the embodiments of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more. "and/or", describes an association relationship of an associated object, meaning that there may be three relationships, for example: a and/or B may represent: a exists alone, A and B exist together, and B exists alone.
References to "first," "second," etc. in the embodiments of the present invention are for descriptive purposes only and are not to be construed as indicating or implying a relative importance or the number of technical features indicated. Thus, a technical feature defining "first", "second" may include at least one such feature, either explicitly or implicitly.
FIG. 1 is one of the flow charts of an embodiment of the duty cycle extraction method according to the present invention, as shown in FIG. 1, the duty cycle extraction method includes:
s101, identifying a heating point in GPS data of a vehicle based on a moving window thermodynamic diagram identification method;
S102, identifying a stop point in the GPS data based on a distance matrix; the distance matrix is constructed based on the distances between the thermal points;
S103, dividing the operation data of the vehicle into a plurality of pieces of circulation data based on the heating point and the stopping point;
s104, extracting working condition circulation based on the operation characteristics corresponding to the circulation data.
It should be noted that: in the embodiment of the invention, the working condition cycle refers to the general term of various working states or load conditions experienced by the vehicle in the actual use process.
Compared with the prior art, the working condition cycle extraction method provided by the embodiment of the invention uses the moving window thermodynamic diagram identification method to analyze GPS data of the vehicle to identify thermodynamic points, namely areas where the vehicle is often stopped or moves, and constructs a distance matrix according to the distance between the thermodynamic points, so as to identify the stopping point of the vehicle near the thermodynamic points, namely the actual stopping position of the vehicle, thereby dividing continuous vehicle operation data into multiple independent cycle data according to the identified thermodynamic points and the stopping point, wherein each cycle data respectively represents data fragments of the vehicle in different working periods or operation modes, so that corresponding operation characteristics such as running speed, running time, stopping time and the like of each cycle data segment can be analyzed to obtain working condition cycle of the vehicle, and the working condition cycle is extracted by adopting a thermodynamic point and stopping point dividing algorithm in a fixed period acquired by the Internet of vehicles, thereby shortening the extraction period and improving efficiency and accuracy.
In some embodiments of the present invention, after identifying the thermal point in the GPS data of the vehicle, the method further includes:
and cleaning the heating power points based on the time at which any two adjacent points in the heating power points are positioned.
Optionally, the GPS data is extracted for a vehicle, the longitude and latitude are divided into sections (the longitude is 0.0001, the latitude is 0.00001), the number of sample track points in different sections is counted in a crossed manner, then the reverse order sorting is performed, a group of points with the maximum number of points are sampled, the marked positions on the curve are shown in fig. 2, and fig. 2 is a schematic diagram of the thermal points provided by the invention.
Because the route may not be fixed, the hottest point of each section of the route cannot be completely captured by adopting the global hottest point, the method adopts a moving window thermodynamic diagram identification method to identify the hottest point of each section of data, and then the hottest points are summarized together for duplication removal and sequencing. It can be seen from fig. 2 that the thermal point identification algorithm identifies a start point and an end point (latitude minimum and maximum values), only single-pass data is contained between the two points, and the complete working condition cycle comprises return trip. And cutting the operation data according to the division points to form a plurality of working condition loops, and then calculating the loop characteristics to obtain the loop most typical loop with the minimum error.
For example, a moving window thermodynamic diagram identification method may be utilized to identify a thermodynamic point in the GPS data of the vehicle. The thermodynamic point is the area where the vehicle is often parked or moving and can be determined by analyzing the data density.
GPS data of the vehicle is extracted, and longitude and latitude are divided into sections, wherein the longitude is 0.0001 and the latitude is 0.00001. Fig. 3 is a schematic diagram of a method for identifying a thermodynamic diagram of a moving window according to the present invention, as shown in fig. 3, a time window W and a sliding step S are set, the numbers of sample track points in different intervals are counted in the time window W in a crossing manner, then the sequence is ordered in reverse order, and the data sequence numbers at the moments where a group of points with the maximum number of sample points are located are stored in a list L.
And then moving the time window backwards by the step S, counting the thermodynamic points in the next time window, counting indexes of thermodynamic points in all windows backwards in sequence, storing all indexes into L, and performing de-duplication and sequencing on the L, as shown in a table 1.
TABLE 1
After identifying the thermal point, a large number of points are generated near one location due to the long time that elapses when the vehicle is loaded and unloaded, and thus a large number of points that are continuous or relatively close in time are included in L. Therefore, the thermodynamic point can be cleaned according to the moment when any two adjacent points in the thermodynamic point are positioned.
And calculating the difference value of the data sequence numbers of the adjacent two data in the L, and reserving a second point in which the difference value is larger than a preset threshold value H.
The calculation formula of the preset threshold value H is as follows: h=full data duration/max (sum of number of longitude peaks and troughs, sum of number of latitude peaks and troughs).
According to the working condition circulation extraction method provided by the embodiment of the invention, after the thermodynamic diagram identification method of the moving window is used for identifying the thermodynamic point in the GPS data of the vehicle, the thermodynamic point is cleaned based on the moment of any two adjacent points in the thermodynamic point, so that the identification result of the thermodynamic point is further optimized, and the accuracy of subsequent analysis is improved.
In some embodiments of the invention, the identifying a dock in the GPS data based on the distance matrix comprises:
Constructing a distance mark matrix based on the distance matrix;
and identifying the stop point based on the distance mark matrix.
In some embodiments of the invention, the identifying the stop point based on the distance marking matrix includes:
Based on the sum of each row or each column in the distance marking matrix, sequentially storing the row or column corresponding to the maximum value into a list;
and determining a point with time jump exceeding a preset value in the list as the stop point.
According to the cleaned thermodynamic point list L, the actual distances between all thermodynamic points are calculated to obtain a distance matrix M d, and fig. 4 is a schematic diagram of the actual distances between thermodynamic points provided by the present invention.
Comparing the distance between every two points with max (average value of all the point distances, 20), if the distance is larger than the distance, the distance is marked as 0, and if the distance is smaller than the distance, the distance is marked as 1, so as to obtain a distance marking matrix M f, and fig. 5 is a value schematic diagram of the distance marking matrix provided by the invention.
The distance mark matrix M f is summed up by rows or columns, and for example, the list L p is obtained by taking the list L number with the largest sum row and corresponding row value of 1, and the row and column in L p corresponding to the distance mark matrix M f are assigned 0.
As shown in fig. 5, the sum of rows (columns) of 0, 2, 5, 7, 9, 12, 13, 15, 16, 17 in the distance mark matrix M f is 4, which is the largest of all columns, and 0, 2, 5, 7, 9, 12, 13, 15, 16, 17 is saved to the list L p, while all values of rows and columns of 0, 2, 5, 7, 9, 12, 13, 15, 16, 17 in the matrix M f are set to 0.
The above steps are repeated until all values of the distance mark matrix M f are 0, resulting in a complete list L p.
Traversing all points in L p, searching points with time jump exceeding a preset value (for example, 1800 s) within the range of front and back 3600s as stop points, storing indexes of corresponding points to L s, and dividing the original data into a plurality of circulating data according to L s.
According to the working condition cycle extraction method provided by the embodiment of the invention, the operation data of the vehicle is divided into a plurality of cycle data by combining the recognized heating power point and the recognized stopping point, and each cycle data segment represents the data of the vehicle in different working periods or operation modes, so that data support is provided for the subsequent extraction working condition cycle.
In some embodiments of the present invention, the extracting the working condition cycle based on the operation characteristic corresponding to the cycle data includes:
respectively determining an average value of running characteristics corresponding to each cycle data;
And based on the error between the running characteristic and the average value, taking the running characteristic corresponding to the value with the minimum error as the working condition circulation.
In some embodiments of the invention, the operational characteristics include at least one of:
Average driving speed, driving mileage, driving time, idling time duty ratio, braking mileage duty ratio, economic rotation speed time duty ratio, shift frequency, start-stop frequency or hundred kilometers oil consumption.
Extracting operation characteristics corresponding to each section of circulation data according to the segmented circulation data, wherein the operation characteristics can comprise: running average speed, running mileage, running time, idle time duty ratio, braking mileage duty ratio, economic rotation speed time duty ratio, gear shifting frequency, start-stop times, hundred kilometers oil consumption and the like, and calculating the average value of each running characteristic.
For example, if the vehicle is divided into 10 cycles, the average running speed, the running mileage, the running time, the idling time duty ratio, the braking mileage duty ratio, the economic rotation speed time duty ratio, the shift frequency, the start-stop frequency and the average value of hundred kilometers of fuel consumption are calculated respectively for 10 cycles.
And calculating the error between each operation characteristic and the average value (absolute error is adopted for proportion, relative error is adopted for real value), and taking the operation characteristic corresponding to the value with the minimum error as a typical cycle, namely a working condition cycle.
According to the working condition cycle extraction method provided by the embodiment of the invention, the GPS data of the vehicle is effectively converted into the working condition cycle data with practical significance by combining the thermal point identification and the distance matrix analysis, so that the basis and convenience are provided for the subsequent vehicle operation management and data analysis.
FIG. 6 is a second flowchart of a method according to an embodiment of the present invention, as shown in FIG. 6, the method includes:
s601, identifying a heating point.
Firstly, GPS data is extracted for a trolley, the longitude and the latitude are divided into sections, the longitude is 0.0001, the latitude is 0.00001, a time window W and a sliding step length S are set, the number of sample track points in different sections is counted in the window W in a crossing manner, then reverse order sorting is carried out, the data sequence numbers of the moments where a group of points with the maximum number of the sample points are located are stored in a list L, the window moves backwards for S steps, the hottest point in the next window is counted, the hottest point indexes in all windows are counted backwards in sequence, all the hottest point indexes are stored in the L, and the L is subjected to duplication removal and sorting as shown in a table 1.
S602, cleaning a heating point.
The time elapsed during loading and unloading of the vehicle is long, a large number of points are generated near one position, so that L contains a large number of points which are continuous or relatively close in time, the difference of the data sequence numbers of the moments where two adjacent data in L are located is calculated, and the second point where the difference is larger than H is reserved.
H=full data duration/max (sum of number of longitude peaks and troughs, sum of number of latitude peaks and troughs).
S603, calculating a distance matrix.
The cleaned thermodynamic point list L is used to calculate the actual distances between all points to obtain a distance matrix M d, and the thermodynamic diagram is shown in fig. 4. And comparing the distance between every two points with a max (average value of all the point distances, 20), wherein the distance is marked as 0 when the distance is larger than the value, and the distance is marked as 1 when the distance is smaller than the value, so as to obtain a distance marking matrix M f.
S604, matrix assignment.
The distance mark matrix M f is summed up by rows or columns, and for example, the list L p is obtained by taking the list L number with the largest sum row and corresponding row value of 1, and the row and column in L p corresponding to the distance mark matrix M f are assigned 0.
As shown in fig. 5, the sum of rows (columns) of 0, 2, 5, 7, 9, 12, 13, 15, 16, 17 in the distance mark matrix M f is 4, which is the largest of all columns, and 0, 2, 5, 7, 9, 12, 13, 15, 16, 17 is saved to the list L p, while all values of rows and columns of 0, 2, 5, 7, 9, 12, 13, 15, 16, 17 in the matrix M f are set to 0.
The above steps are repeated until all values of the distance mark matrix M f are 0, resulting in the complete list L p.
S605, calculating the stop points.
Traversing all points in L p, searching points with time jump exceeding 1800s in the range of front and back 3600s as stop points, storing indexes of corresponding points in L s, and dividing the original data into a plurality of circulating data according to L s.
S606, circularly screening.
The following features of all loops obtained in S605 are calculated: the method comprises the steps of calculating characteristic average values of cycles, namely, calculating average values of 10 cycles, namely, calculating average values of the running speed, the running distance, the running time, the idle time, the running mileage, the running time, the idle time, the braking mileage, the economic rotation speed, the braking mileage, the economic rotation speed, the gear shift frequency, the starting and stopping times and the hundred kilometers of oil consumption, calculating errors (absolute errors are adopted for proportion and relative errors are adopted for real value) between each cycle and the average value, and taking the cycle with the smallest error as a typical cycle.
The working condition cycle extraction method provided by the embodiment of the invention aims to divide a plurality of cycles in a period into single cycles, can utilize operation GPS data of a single vehicle or a plurality of vehicles collected by the Internet of vehicles in a period of time to extract typical cycles through strokes according to the periodicity of the running tracks of the vehicles, identify the hottest point of running according to the distribution density of GPS position points, identify the hottest point of running as a starting point or an ending point, identify parking points near the hottest point of running as a dividing point, divide the operation data in a period of time into a plurality of working condition cycles, and screen out the cycle closest to an average value as the typical cycle by using an error algorithm. Some routes are not fixed and need to be segmented for identifying the driving hot spot. Because the scheme is arranged at the cloud, the steps of installing equipment under a communication line with a user, collecting data, dismantling the equipment and the like can be avoided, time and cost are effectively saved, meanwhile, the method can be completed based on historical data, and the research and development period is effectively shortened.
In order to better implement the working condition cycle extraction method in the embodiment of the present invention, on the basis of the working condition cycle extraction method, the embodiment of the present invention further provides a working condition cycle extraction device, and fig. 7 is a schematic structural diagram of an embodiment of the working condition cycle extraction device provided by the present invention, as shown in fig. 7, where the working condition cycle extraction device 700 includes:
A first identification module 710 for identifying a thermal point in the GPS data of the vehicle based on a moving window thermodynamic diagram identification method;
A second identifying module 720 for identifying a stop point in the GPS data based on a distance matrix; the distance matrix is constructed based on the distances between the thermal points;
a dividing module 730 for dividing the operation data of the vehicle into a plurality of pieces of circulation data based on the heating point and the stop point;
And an extracting module 740, configured to extract the working condition cycle based on the operation feature corresponding to the cycle data.
The working condition cycle extraction device 700 provided in the foregoing embodiment may implement the technical solution described in the foregoing working condition cycle extraction method embodiment, and the specific implementation principle of each module or unit may refer to the corresponding content in the working condition cycle extraction method embodiment, which is not described herein again.
As shown in fig. 8, the present invention further provides an electronic device 800 accordingly. The electronic device 800 includes a processor 801, a memory 802, and a display 803. Fig. 8 shows only some of the components of the electronic device 800, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead.
Processor 801, in some embodiments, may be a central processing unit (Central Processing Unit, CPU), microprocessor, or other data processing chip, for executing program code or processing data stored in memory 802, such as the duty cycle extraction method of the present invention.
In some embodiments, the processor 801 may be a single server or a group of servers. The server farm may be centralized or distributed. In some embodiments, the processor 801 may be local or remote. In some embodiments, the processor 801 may be implemented in a cloud platform. In some embodiments, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multiple cloud, or the like, or any combination thereof.
The memory 802 may be an internal storage unit of the electronic device 800, such as a hard disk or memory of the electronic device 800, in some embodiments. The memory 802 may also be an external storage device of the electronic device 800 in other embodiments, such as a plug-in hard disk provided on the electronic device 800, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), or the like.
Further, the memory 802 may also include both internal storage units and external storage devices of the electronic device 800. The memory 802 is used to store application software and various types of data for installing the electronic device 800.
The display 803 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch, or the like in some embodiments. The display 803 is for displaying information at the electronic device 800 and for displaying a visual user interface. The components 801-803 of the electronic device 800 communicate with each other over a system bus.
In one embodiment, when processor 801 executes the duty cycle extraction program in memory 802, the following steps may be implemented:
identifying a thermodynamic point in GPS data of the vehicle based on a moving window thermodynamic diagram identification method;
identifying a docking point in the GPS data based on a distance matrix; the distance matrix is constructed based on the distances between the thermal points;
Dividing the operation data of the vehicle into a plurality of pieces of circulation data based on the heating point and the stop point;
and extracting working condition circulation based on the operation characteristics corresponding to the circulation data.
It should be understood that: processor 801, when executing the duty cycle extraction program in memory 802, may perform other functions in addition to those described above, as more particularly described above with respect to the corresponding method embodiments.
Further, the type of the electronic device 800 is not particularly limited, and the electronic device 800 may be a mobile phone, a tablet computer, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a wearable device, a laptop (laptop), or other portable electronic devices. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices that carry IOS, android, microsoft or other operating systems. The portable electronic device described above may also be other portable electronic devices, such as a laptop computer (laptop) or the like having a touch-sensitive surface, e.g. a touch panel. It should also be appreciated that in other embodiments of the invention, the electronic device 800 may not be a portable electronic device, but rather a desktop computer having a touch-sensitive surface (e.g., a touch panel).
Correspondingly, the embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium is used for storing a computer readable program or instruction, and when the program or instruction is executed by a processor, the steps or functions in the working condition cycle extraction method provided by the embodiments of the method can be realized.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute steps or functions in the working condition cycle extraction method provided in the foregoing method embodiments.
Those skilled in the art will appreciate that all or part of the flow of the methods of the embodiments described above may be accomplished by way of a computer program stored in a computer readable storage medium to instruct related hardware (e.g., a processor, a controller, etc.). The computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory.
The working condition cycle extraction method, the device, the electronic equipment and the storage medium provided by the invention are described in detail, and specific examples are applied to the description of the principle and the implementation mode of the invention, and the description of the examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.