A method and system for analyzing big data based on vehicle function on / off
By automatically analyzing the big data of on-board functions on and off, the problem of low efficiency of manual statistics is solved, fast and accurate frequency and duration statistics are achieved, and work efficiency is improved.
Patent Information
- Application Number
- CN202210335381.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-03-31
AI Technical Summary
In the existing technology, the frequency of use of vehicle-mounted functions and the duration of each use can only be counted manually and one by one, which is inefficient and costly.
Through an analysis method that turns on and off big data based on on-board functions, including obtaining the excel file path, reading the file name, initializing the number and frequency of files, calculating the frequency and duration of use, and storing the results in the newly generated excel file , to achieve automated statistics.
Quickly count the frequency and duration of use of in-vehicle functions by each car user, which improves work efficiency and reduces labor costs.
Smart Images

Figure CN114780492B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicle-mounted big data analysis, and specifically relates to an analysis technology based on turning on and off big data of vehicle-mounted functions. Background Art
[0002] With the development of science and technology and digitalization, the design of the automotive industry will focus on users. In automobiles, the smart cockpit is the most direct interactive product for users. The usage habits of users of the smart cockpit software functions have become the most concerned issue for various OEMs. Therefore, by analyzing the big data of the on-board functions being turned on and off, we can understand the frequency and duration of the software functions being used, and know the design and development verification of the products, so as to provide users with better and more reliable products. In actual vehicle data analysis, the amount of data collected is very large. Through preliminary big data preprocessing, these data are stored in Excel tables; each Excel table stores the function on and off data for each car during a predetermined period; each attribute in each Excel table represents each function; the time interval for each row of data is 1s, and each function is represented by 1 when it is turned on and by 0 when it is turned off.
[0003] By counting the data of turning on and off the in-vehicle functions, we can know the frequency of users' use of the in-vehicle functions and the duration of each use. If we need to know the frequency of users' use of a certain function of the smart cockpit and the duration of each use, manual statistics will consume a lot of manpower and the work efficiency will be very low. Summary of the invention
[0004] The purpose of the present invention is to provide an analysis method and system based on big data of vehicle function on and off, to solve the technical problem that the frequency of use of vehicle functions and the duration of each use can only be counted manually one by one, which is inefficient and costly.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: an analysis method based on big data of vehicle function on and off, comprising the following steps:
[0006] S01: Get the storage path of the Excel file of the vehicle function on and off data;
[0007] S02: Read the excel file name under the storage path;
[0008] S03: Initialize the number i of Excel files and assign 0 to the i;
[0009] S04: Determine whether the i is greater than the number of the vehicle function on and off data Excel files, if not, execute the next processing logic;
[0010] S05: Initialize the usage frequency k of the vehicle-mounted function in the Excel file, and assign 0 to the k;
[0011] S06: Initialize the duration of the k-th use of the vehicle-mounted function as b[k], and assign 0 to b[k];
[0012] S07: Calculate the usage frequency k of the vehicle-mounted function;
[0013] S08: Calculate the duration B[k] of the k-time use of the vehicle-mounted function, ie, {b[0], ..., b[k]};
[0014] S09: storing the k and {b[0], ..., b[k]} in newly generated excel respectively;
[0015] S10: Output the corresponding new excel file;
[0016] S11: the i is incremented by 1;
[0017] S12: Execute the processing logic of S03, and loop the processing logic of S03 to S11 until i is greater than the number of Excel files of the on-board function on-off data, that is, the frequency of use of the on-board function and the duration of each use are counted.
[0018] Preferably,
[0019] In S07, the calculation process of the usage frequency k of the vehicle-mounted function is:
[0020] S0701: Calculate the number of records h in the data in the Excel file;
[0021] S0702: Read each column of data a[i] in the Excel file, where i is an integer from 1 to h;
[0022] S0703: assign a[x] to g[x], assign a[x+1] to h[x], and assign 1 to x, where the first h-1 data of each vehicle function G[x]={a[1], …a[h-1]}, and the last h-1 data of each vehicle function H[x]={a[2], …a[h]};
[0023] S0704: Determine whether x is equal to h. If not, determine whether the value of g[x]-h[x] is less than 0. If yes, execute the next processing logic;
[0024] S0705: k increments by 1, and then x increments by 1;
[0025] S0706: Repeat the process from S0703 to S0705 until x is equal to h, and complete the statistics of the usage frequency of the vehicle function, that is, the usage frequency k is the cumulative number of the number of data less than 0 in the array G[x]-H[x]={a[1]-a[2], …,a[h-1]-a[h]}.
[0026] Preferably,
[0027] In S08, the calculation process of the duration of the vehicle-mounted function being used k times is as follows:
[0028] S0801: Assign 0 to m[t], 0 to n[t], 0 to t, and {} to N[]
[0029] That is, when N[] is initialized, there is no element in N[], and {} is assigned to M[], that is, when M[] is initialized, there is no element in M[], where m[t] is the recording time when g[x]-h[x] is less than 0, and m[t] is stored in M[], n[t] is the recording time when g[x]-h[x] is greater than 0, and n[t] is stored in N[], and the value of t ranges from 0 to k;
[0030] S0802: If g[x]-h[x] is less than 0, assign x to m[t];
[0031] S0803: Store m[t] in M[];
[0032] S0804: t increases by 1;
[0033] S0805: x increases by 1;
[0034] S0806: Repeat the process from S0801 to S0805;
[0035] S0807: In S0802, if g[x]-h[x] is greater than 0, assign x to n[t];
[0036] S0808: Store n[t] in the array N[], increment x by 1, and then continue to execute S0801;
[0037] S0809: Assign the value of N[]-M[] to C[], where N[]-M[] is {c[0], …,c[k]};
[0038] S0810: Determine whether the last data a[h] of the vehicle function described in Excel is equal to 1, if not, proceed to the next step;
[0039] S0811: The duration of the k-time use of the vehicle-mounted function B[k], ie, {b[0], …, b[k]}, is equal to C[], ie, {c[0], …, c[k]};
[0040] S0812: In S0810, if a[h] is equal to 1, assign 0 to i;
[0041] S0813: Determine whether i is less than k; if so, b[i]=c[i];
[0042] S0814: i increases by 1;
[0043] S0815: cyclically executing S0812 to S0814;
[0044] S0816: In S0813, if no, then b[k]=c[k]+1, completing the statistics of the usage time of each vehicle function;
[0045] Preferably,
[0046] In S10, the layout of the new Excel file is:
[0047] The first line stores the attribute name of each feature;
[0048] The second row stores the field "frequency of use";
[0049] The third line stores the calculated usage frequency of the corresponding function;
[0050] The fourth row stores the field "Duration of each use";
[0051] The fifth to 5+k rows store the calculated usage time of each in-vehicle function.
[0052] The present invention also provides an analysis method based on big data of vehicle function on and off, comprising:
[0053] The acquisition module is used to obtain the storage path of the Excel file of the on and off data of the vehicle functions;
[0054] A reading module is used to read the excel file name under the storage path;
[0055] The first initialization module is used to initialize the number i of Excel files and assign 0 to the i;
[0056] A judgment module, used to judge whether i is greater than the number of the Excel files of the on-board function on-off data, if not, execute the next processing logic;
[0057] A second initialization module is used to initialize the usage frequency k of the vehicle-mounted function in the Excel file and assign 0 to the k;
[0058] A third initialization module is used to initialize the duration of the k-th use of the vehicle-mounted function as b[k], and assign 0 to b[k];
[0059] A first calculation module, used to calculate the usage frequency k of the vehicle-mounted function;
[0060] The second calculation module is used to calculate the duration B[k] of the k-time use of the vehicle-mounted function, that is, {b[0], ..., b[k]};
[0061] A storage module, used for storing the k and {b[0], ..., b[k]} in a newly generated excel respectively;
[0062] Output module, used to output the corresponding new Excel file;
[0063] A self-incrementing module, used for self-incrementing i by 1;
[0064] A loop module is used to execute the processing logic of the first initialization module, and loop the processing logic of the first initialization module to the self-adding module until i is greater than the number of Excel files of the on-board function opening and closing data, that is, the frequency of use of the on-board function and the duration of each use are completed.
[0065] Preferably,
[0066] In the first calculation module, the calculation process of the usage frequency k of the vehicle-mounted function is:
[0067] The first step is to calculate the number of records h of the data in the Excel file; the second step is to read each column of data a[i] in the Excel file, where i is an integer from 1 to h; the third step is to assign a[x] to g[x], assign a[x+1] to h[x], and assign 1 to x, where the first h-1 data of each vehicle function G[x]={a[1], …a[h-1]}, and the last h-1 data of each vehicle function H[x]={a[2], …a[h]}; the fourth step is to determine whether x is equal to h. If not, then determine whether the value of g[x]-h[x] is less than 0. If so, execute the next processing logic; the fifth step is to add 1 to k, and then add 1 to x; the sixth step is to repeat the process from the third step to the fifth step until x is equal to h, and complete the statistics of the usage frequency of the vehicle function, that is, the usage frequency k is G[x]-H[x]={a[1]-a[2], …, the cumulative number of data in the array of a[h-1]-a[h]} that is less than 0.
[0068] Preferably,
[0069] In the second calculation module, the calculation process of the duration of the k-time use of the vehicle-mounted function is as follows:
[0070] The first step is to assign 0 to m[t], 0 to n[t], 0 to t, and {} to N[]
[0071] That is, when N[] is initialized, there is no element in N[], and {} is assigned to M[], that is, when M[] is initialized, there is no element in M[], where m[t] is the recording time when g[x]-h[x] is less than 0, and m[t] is stored in M[], n[t] is the recording time when g[x]-h[x] is greater than 0, and n[t] is stored in N[], and the value of t ranges from 0 to k;
[0072] Step 2: If g[x]-h[x] is less than 0, assign x to m[t];
[0073] Step 3: Store m[t] in M[].
[0074] Step 4, t adds 1;
[0075] Step 5, x adds 1;
[0076] Step 6, repeat the process from step 1 to step 5;
[0077] Step 7. In the second step, if g[x]-h[x] is greater than 0, assign x to n[t];
[0078] Step 8, store n[t] in the array N[], increment x by 1, and then continue to execute the first step;
[0079] Step 9. Assign the value of N[]-M[] to C[], where N[]-M[] is {c[0], …,c[k]};
[0080] Step 10: Determine whether the last data a[h] of the vehicle function in Excel is equal to 1. If not, proceed to the next step.
[0081] Step 11: The duration of the k-time use of the vehicle function B[k], i.e., {b[0], ..., b[k]}, is equal to C[], i.e., {c[0], ..., c[k]};
[0082] Step 12: In the tenth step, if a[h] is equal to 1, assign 0 to i;
[0083] Step 13: Determine whether i is less than k; if so, b[i]=c[i];
[0084] Step 14, i is incremented by 1;
[0085] Step 15, looping through steps 12 to 14;
[0086] Step 16: In the step 13, if no, then b[k]=c[k]+1, completing the statistics of the duration of each use of the vehicle function, that is, the duration of the k-time use of the vehicle function B[k]={b[0], …,b[k]}={c[0], …,c[k]+1};
[0087] Preferably,
[0088] In the output module, the layout of the new Excel file is:
[0089] The first line stores the attribute name of each feature;
[0090] The second row stores the field "frequency of use";
[0091] The third line stores the calculated usage frequency of the corresponding function;
[0092] The fourth row stores the field "Duration of each use";
[0093] The fifth to 5+k rows store the calculated usage time of each in-vehicle function.
[0094] By adopting the above technical scheme, the present invention can achieve the following beneficial technical effects: the present invention can quickly collect statistics on the big data of turning on and off the in-vehicle functions, and obtain the frequency of use of the in-vehicle functions by users of each car and the duration of each use, thereby improving work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] Figure 1 It is a flow chart of the present invention;
[0096] Figure 2 A flow chart of a method for calculating the frequency of use of vehicle functions;
[0097] Figure 3 A flow chart for recording the time when the vehicle functions are turned on and off;
[0098] Figure 4 Calculate the flow chart for the duration of each use of the vehicle function. DETAILED DESCRIPTION
[0099] The present invention will be further described below in conjunction with the accompanying drawings.
[0100] The development environment of the present invention adopts Anaconda plus PyQt5 plus pycharm, and the platform adopts windows7. The environment can be used for the development of desktop GUI, which is convenient for user interaction.
[0101] In the present invention, if it involves initializing and assigning values to variables, the initialization assignment operation is only performed once at the beginning of the loop. For example, to initialize the number i of Excel files, 0 is assigned to i, and the operation of initializing the variable i is only performed once at the beginning of the loop. If the loop reaches the initialization assignment step for the second time, the step is directly skipped and the next step of the step is executed.
[0102] Anaconda is a Python distribution for scientific computing. It runs on Linux, Mac, and Windows systems. It provides package management and environment management functions, which can easily solve the problems of coexistence and switching of multiple versions of Python and installation of various third-party packages. Anaconda is a packaged collection that comes pre-installed with conda, a version of Python, many packages, scientific computing tools, etc. Among them, conda is a tool / command for package management and environment management.
[0103] pyQt5 is a combination of Digia's Qt5 application framework and python, supporting both 2.x and 3.x. The Qt library is developed by Riverbank Computng and is one of the most powerful GUI libraries. PyQt5 is composed of a series of Python modules, more than 620 classes, 6,000 functions and methods, and can run on mainstream operating systems such as Unix, Windows and Mac OS. PyQt5 has two certificates, namely GPL and commercial certificates.
[0104] GUI stands for Graphical User Interface.
[0105] In this embodiment, the three-day data stored in each car is copied, and then the data is preprocessed, and the on and off data of the relevant functions of each car are stored in the same Excel table, and each car is named with the car VIN number, and the Excel tables of all cars are placed under the same file path.
[0106] The operation steps of this embodiment include: the first step is to obtain the file path of the data on and off the car functions; the second step is to display the VIN numbers of each car in turn; the third step is to select the storage path of the output file of the big data analysis statistics, that is, the path of the Excel file storing the frequency of use of each car function and the duration of each use of the function; the fourth step is to analyze the big data on the on and off of the vehicle functions; the fifth step is to output the analysis results after the display analysis is completed.
[0107] Specifically, Figure 1 As shown, the present invention provides an analysis method based on vehicle function on-off big data, comprising the steps of:
[0108] The first step is to obtain the storage path of the Excel file of the vehicle function on and off data. This step can be used to obtain the storage location of the analysis object.
[0109] The second step is to read the Excel file name under the storage path. Through this step, you can traverse to the Excel file that stores the vehicle function on and off data.
[0110] The third step is to initialize the number of Excel files i and assign 0 to i. Specifically, initialization means assigning values to variables. When the program is executed, the operating system will reclaim its memory, but will not clean up the remaining data in the space. The data becomes garbage data. Therefore, when allocating memory to variables, it is very likely that this memory contains values left by other programs. When using the compiler, if the compiler finds that the variable is used without being assigned a value, it will default to a large number starting with "85". After allocating storage space, the memory space must be initialized.
[0111] The fourth step is to determine whether i is greater than the number of Excel files of vehicle function on and off data. If not, execute the next processing logic. Specifically, the same path stores Excel tables, which store the on and off data of related functions, i.e., statistical objects. If you want to know which vehicle function users like most or prefer the most, or if they use it for a long time each time, then the user must be satisfied with the function. In the future, when developing the smart cockpit of the car, you can focus more on improving the function to better meet the needs of users.
[0112] The fifth step is to initialize the usage frequency k of the vehicle function in the Excel file and assign 0 to k. As above, the memory space must be initialized after allocating the storage space, otherwise the compiler will fill it with a large number by default, which is the fill number, indicating that the variable is not initialized, then the program may not run, and using this program to perform statistics on big data will result in errors.
[0113] Step 6: Initialize the duration of the k-th use of the vehicle function to b[k] and assign 0 to b[k].
[0114] The seventh step is to calculate the usage frequency k of the vehicle-mounted function. This step is the key to the present invention. Entering this step means starting to count the processed data in order to obtain the desired result.
[0115] Specifically, Figure 2 As shown, in the seventh step, the calculation steps of the usage frequency k of the vehicle function are:
[0116] First, calculate the number of records h in the Excel file, that is, how much data there is.
[0117] Second, read each column of data a[i] in the Excel file, where i is an integer from 1 to h, i is a variable, and it is limited to an integer, that is, int type.
[0118] Third, assign a[x] to g[x], assign a[x+1] to h[x], and assign 1 to x, where the first h-1 data of each vehicle function G[x]={a[1], …a[h-1]}, and the last h-1 data of each vehicle function H[x]={a[2], …a[h]}.
[0119] Fourth, determine whether x is equal to h. If not, then determine whether the value of g[x]-h[x] is less than 0. If so, execute the next processing logic.
[0120] Fifth, k increments by 1, and then x increments by 1.
[0121] Sixth, repeat the third to fifth processes until x is equal to h, and complete the statistics of the usage frequency of the vehicle-mounted function, that is, the usage frequency k is the cumulative number of the number of data less than 0 in the array G[x]-H[x]={a[1]-a[2], …,a[h-1]-a[h]}.
[0122] Step 8: Calculate the duration B[k] of the k-time use of the vehicle function, that is, {b[0], ..., b[k]};
[0123] Specifically, Figure 3 and Figure 4 As shown, in S08, the calculation process of the duration of the k-time use of the vehicle-mounted function is as follows:
[0124] First: assign 0 to m[t], 0 to n[t], 0 to t, and {} to N[]
[0125] That is, when N[] is initialized, there is no element in N[], and {} is assigned to M[], that is, when M[] is initialized, there is no element in M[], where m[t] is the recording time when g[x]-h[x] is less than 0, and m[t] is stored in M[], n[t] is the recording time when g[x]-h[x] is greater than 0, and n[t] is stored in N[], and the value of t ranges from 0 to k;
[0126] Second: If g[x]-h[x] is less than 0, assign x to m[t];
[0127] Third: store m[t] in M[];
[0128] Fourth: t adds 1 to itself;
[0129] Fifth: x adds 1;
[0130] Sixth: Repeat the process from the first to the fifth;
[0131] Seventh: In the S0802, if g[x]-h[x] is greater than 0, assign x to n[t];
[0132] Eighth: store n[t] in the array N[], increment x by 1, and then continue to execute S0801;
[0133] Ninth: Assign the value of N[]-M[] to C[], where N[]-M[] is {c[0], …,c[k]};
[0134] Tenth: Determine whether the last data a[h] of the vehicle function described in Excel is equal to 1. If not, proceed to the next step;
[0135] Eleventh: The duration of the k-time use of the vehicle function B[k], i.e. {b[0], …, b[k]}, is equal to C[], i.e. {c[0], …, c[k]};
[0136] 12. In the 10th step, if a[h] is equal to 1, assign 0 to i;
[0137] Thirteenth: Determine whether i is less than k; if so, b[i]=c[i];
[0138] 14th: i adds 1;
[0139] Fifteenth: loop through the twelfth to fourteenth steps;
[0140] Sixteenth: In the thirteenth, if not, then b[k]=c[k]+1, completing the statistics of the duration of each use of the vehicle function, that is, the duration of the k-time use of the vehicle function B[k]={b[0], …,b[k]}={c[0], …,c[k]+1};
[0141] Step 9. Store k and {b[0],…,b[k]} in the newly generated Excel respectively.
[0142] Step 10. Output the corresponding new Excel file and name it out_i.
[0143] Step 11, i is incremented by 1.
[0144] In the twelfth step, execute the processing logic of the third step, and loop the processing logic of the third step to the eleventh step until i is greater than the number of Excel files of the on-board function on-off data, that is, the frequency of use of the on-board function and the duration of each use are counted.
[0145] The present invention also provides an analysis system based on the big data of vehicle-mounted function on and off, which can be stored on a mobile medium with storage function, so as to facilitate statistical analysis of objects that need statistics anytime and anywhere.
[0146] The system includes: an acquisition module for acquiring an Excel file storage path for on-board function on-off data;
[0147] Reading module, used to read the excel file name under the storage path;
[0148] The first initialization module is used to initialize the number i of Excel files and assign 0 to i;
[0149] The judgment module is used to judge whether i is greater than the number of Excel files of on-board function on-off data. If not, the next processing logic is executed;
[0150] The second initialization module is used to initialize the usage frequency k of the vehicle-mounted function in the Excel file and assign 0 to k;
[0151] The third initialization module is used to initialize the duration of the k-th use of the vehicle function as b[k], and assign 0 to b[k];
[0152] A first calculation module, used to calculate the usage frequency k of the vehicle function;
[0153] The second calculation module is used to calculate the duration B[k] of the k-time use of the vehicle function, that is, {b[0], ..., b[k]};
[0154] A storage module is used to store k and {b[0], ..., b[k]} in newly generated Excel files respectively;
[0155] Output module, used to output the corresponding new Excel file;
[0156] The self-increment module is used to add 1 to i;
[0157] The loop module is used to execute the processing logic of the first initialization module, and loop the processing logic from the first initialization module to the self-adding module until i is greater than the number of Excel files of the on-board function opening and closing data, that is, the frequency of use of the on-board function and the duration of each use are counted.
[0158] Specifically, in the first calculation module, the calculation process of the usage frequency k of the vehicle-mounted function is:
[0159] The first step is to calculate the number of records h in the data in the Excel file; the second step is to read each column of data a[i] in the Excel file, where i is an integer from 1 to h; the third step is to assign a[x] to g[x], assign a[x+1] to h[x], and assign 1 to x, where the first h-1 data of each vehicle function G[x]={a[1], …a[h-1]}, and the last h-1 data of each vehicle function H[x]={a[2], …a[h]}; the fourth step is to determine whether x is equal to h. If not, then determine whether the value of g[x]-h[x] is less than 0. If so, execute the next processing logic; the fifth step is to add 1 to k, and then add 1 to x; the sixth step is to repeat the process from the third step to the fifth step until x is equal to h, and the frequency of use of the vehicle function is completed. That is, the frequency of use k is G[x]-H[x]={a[1]-a[2], …, the cumulative number of data in the array of a[h-1]-a[h]} that is less than 0.
[0160] Specifically, in the second calculation module, the calculation process of the duration of the vehicle function k times of use is as follows:
[0161] The first step is to assign 0 to m[t], 0 to n[t], 0 to t, and {} to N[]
[0162] That is, when N[] is initialized, there is no element in N[], and {} is assigned to M[], that is, when M[] is initialized, there is no element in M[], where m[t] is the recording time when g[x]-h[x] is less than 0, and m[t] is stored in M[], n[t] is the recording time when g[x]-h[x] is greater than 0, and n[t] is stored in N[], and the value of t ranges from 0 to k;
[0163] Step 2: If g[x]-h[x] is less than 0, assign x to m[t];
[0164] Step 3: Store m[t] in M[].
[0165] Step 4, t adds 1;
[0166] Step 5, x adds 1;
[0167] Step 6: Repeat the process from step 1 to step 5;
[0168] Step 7. In the second step, if g[x]-h[x] is greater than 0, assign x to n[t];
[0169] Step 8. Store n[t] in the array N[], increment x by 1, and continue with the first step.
[0170] Step 9. Assign the value of N[]-M[] to C[], where N[]-M[] is {c[0], …,c[k]};
[0171] Step 10: Determine whether the last data a[h] of the vehicle function in Excel is equal to 1. If not, proceed to the next step.
[0172] Step 11: The duration of the k-time use of the vehicle function B[k], i.e., {b[0], …, b[k]}, is equal to C[], i.e., {c[0], …, c[k]};
[0173] Step 12. In step 10, if a[h] is equal to 1, assign 0 to i;
[0174] Step 13: Determine whether i is less than k; if so, b[i]=c[i];
[0175] Step 14, i is incremented by 1;
[0176] Step 15, loop through steps 12 to 14;
[0177] Step 16: In step 13, if no, then b[k]=c[k]+1, completing the statistics of the usage time of each vehicle function;
[0178] Specifically,
[0179] In the output module, the layout of the new Excel file is:
[0180] The first line stores the attribute name of each feature;
[0181] The second row stores the field "frequency of use";
[0182] The third line stores the calculated usage frequency of the corresponding function;
[0183] The fourth row stores the field "Duration of each use";
[0184] The fifth to 5+k rows store the calculated usage time of each in-vehicle function.
[0185] The present invention is used to count the usage frequency of each vehicle-mounted function and the duration of each usage, which can guide R&D personnel to be more focused in the later development of smart cockpit software functions and provide users with better and more reliable products.
Claims
1. An analysis method based on big data of vehicle function on and off, characterized in that: The steps involved are: S01: Get the storage path of the Excel file of the vehicle function on and off data; S02: Read the excel file name under the storage path; S03: Initialize the number i of Excel files and assign 0 to the i; S04: Determine whether the i is greater than the number of the vehicle function on and off data Excel files, if not, execute the next processing logic; S05: Initialize the usage frequency k of the vehicle-mounted function in the Excel file, and assign 0 to the k; S06: Initialize the duration of the k-th use of the vehicle-mounted function as b[k], and assign 0 to b[k]; S07: Calculate the usage frequency k of the vehicle-mounted function; S08: Calculate the duration B[k] of the k-time use of the vehicle-mounted function, ie, {b[0], ..., b[k]}; S09: storing the k and {b[0], ..., b[k]} in newly generated excel respectively; S10: Output the corresponding new excel file; S11: the i is incremented by 1; S12: Execute the processing logic of S03, and loop the processing logic of S03 to S11 until i is greater than the number of the Excel files of the on-board function on-off data, that is, the frequency of use of the on-board function and the duration of each use are counted; In S07, the calculation process of the usage frequency k of the vehicle-mounted function is: S0701: Calculate the number of records h in the data in the Excel file; S0702: Read each column of data a[i] in the Excel file, where i is an integer from 1 to h; S0703: assign a[x] to g[x], assign a[x+1] to h[x], and assign 1 to x, where the first h-1 data of each vehicle function G[x]={a[1], …a[h]}, and the last h-1 data of each vehicle function H[x]={a[2], …a[h]}; S0704: Determine whether x is equal to h. If not, determine whether the value of g[x]-h[x] is less than 0. If yes, execute the next processing logic; S0705: k increments by 1, and then x increments by 1; S0706: Repeat the process from S0703 to S0705 until x is equal to h, and complete the statistics of the usage frequency of the vehicle function, that is, the usage frequency k is the cumulative number of the number of data less than 0 in the array G[x]-H[x]={a[1]-a[2], …,a[h-1]-a[h]}; In S08, the calculation process of the duration of the vehicle-mounted function being used k times is as follows: S0801: Assign 0 to m[t], 0 to n[t], 0 to t, and {} to N[] That is, when N[] is initialized, there is no element in N[], and {} is assigned to M[], that is, when M[] is initialized, there is no element in M[], where m[t] is the recording time when g[x]-h[x] is less than 0, and m[t] is stored in M[], n[t] is the recording time when g[x]-h[x] is greater than 0, and n[t] is stored in N[], and the value of t ranges from 0 to k; S0802: If g[x]-h[x] is less than 0, assign x to m[t]; S0803: Store m[t] in M[]; S0804: t increases by 1; S0805: x increases by 1; S0806: Repeat the process from S0801 to S0805; S0807: In S0802, if g[x]-h[x] is greater than 0, assign x to n[t]; S0808: Store n[t] in the array N[], increment x by 1, and then continue to execute S0801; S0809: Assign the value of N[]-M[] to C[], where N[]-M[] is {c[0], …,c[k]}; S0810: Determine whether the last data a[h] of the vehicle function described in Excel is equal to 1, if not, proceed to the next step; S0811: The duration of the k-time use of the vehicle-mounted function B[k], ie, {b[0], …, b[k]}, is equal to C[], ie, {c[0], …, c[k]}; S0812: In S0810, if a[h] is equal to 1, assign 0 to i; S0813: Determine whether i is less than k; if so, b[i]=c[i]; S0814: i increases by 1; S0815: cyclically executing S0812 to S0814; S0816: In S0813, if not, then b[k]=c[k]+1, completing the statistics of the duration of each use of the vehicle function, that is, the duration of the k-time use of the vehicle function B[k]={b[0], …,b[k]}={c[0], …,c[k]+1}.
2. The analysis method based on vehicle function on / off big data according to claim 1 is characterized in that: In S10, the layout of the new Excel file is: The first line stores the attribute name of each feature; The second row stores the field "frequency of use"; The third line stores the calculated usage frequency of the corresponding function; The fourth row stores the field "duration of each use"; The fifth to 5+k rows store the calculated usage time of each in-vehicle function.
3. An analysis system based on big data of vehicle function on and off, characterized in that: include: The acquisition module is used to obtain the storage path of the Excel file of the on and off data of the vehicle functions; A reading module is used to read the excel file name under the storage path; The first initialization module is used to initialize the number i of Excel files and assign 0 to the i; A judgment module, used to judge whether i is greater than the number of the vehicle function on and off data Excel files, if not, execute the next processing logic; A second initialization module is used to initialize the usage frequency k of the vehicle-mounted function in the Excel file and assign 0 to the k; A third initialization module is used to initialize the duration of the k-th use of the vehicle-mounted function as b[k], and assign 0 to b[k]; A first calculation module, used to calculate the usage frequency k of the vehicle-mounted function; The second calculation module is used to calculate the duration B[k] of the k-time use of the vehicle-mounted function, that is, {b[0], ..., b[k]}; A storage module, used for storing the k and {b[0], ..., b[k]} in a newly generated excel respectively; Output module, used to output the corresponding new Excel file; A self-incrementing module, used for self-incrementing i by 1; A loop module, used for executing the processing logic of the first initialization module, looping the processing logic of the first initialization module to the self-adding module, until i is greater than the number of the Excel files of the on-board function opening and closing data, that is, completing the statistics of the frequency of use of the on-board function and the duration of each use; In the first calculation module, the calculation process of the usage frequency k of the vehicle-mounted function is: The first step is to calculate the number of records h of the data in the Excel file; the second step is to read each column of data a[i] in the Excel file, where i is an integer from 1 to h; the third step is to assign a[x] to g[x], assign a[x+1] to h[x], and assign 1 to x, where the first h-1 data of each vehicle function G[x]={a[1], …a[h-1]}, and the last h-1 data of each vehicle function H[x]={a[2], …a[h]}; the fourth step is to determine whether x is equal to h. If not, then determine whether the value of g[x]-h[x] is less than 0. If so, execute the next processing logic; the fifth step is to add 1 to k, and then add 1 to x; the sixth step is to repeat the process from the third step to the fifth step until x is equal to h, and complete the statistics of the usage frequency of the vehicle function, that is, the usage frequency k is G[x]-H[x]={a[1]-a[2], …, the cumulative number of data in the array of a[h-1]-a[h]} that is less than 0; In the second calculation module, the calculation process of the duration of the k-time use of the vehicle-mounted function is as follows: The first step is to assign 0 to m[t], 0 to n[t], 0 to t, and {} to N[] That is, when N[] is initialized, there is no element in N[], and {} is assigned to M[], that is, when M[] is initialized, there is no element in M[], where m[t] is the recording time when g[x]-h[x] is less than 0, and m[t] is stored in M[], n[t] is the recording time when g[x]-h[x] is greater than 0, and n[t] is stored in N[], and the value of t ranges from 0 to k; Step 2: If g[x]-h[x] is less than 0, assign x to m[t]; Step 3: Store m[t] in M[]. Step 4, t adds 1; Step 5, x adds 1; Step 6, repeat the process from step 1 to step 5; Step 7. In the second step, if g[x]-h[x] is greater than 0, assign x to n[t]; Step 8, store n[t] in the array N[], increment x by 1, and then continue to execute the first step; Step 9. Assign the value of N[]-M[] to C[], where N[]-M[] is {c[0], …,c[k]}; Step 10: Determine whether the last data a[h] of the vehicle function in Excel is equal to 1. If not, proceed to the next step. Step 11: The duration of the k-time use of the vehicle function B[k], i.e., {b[0], ..., b[k]}, is equal to C[], i.e., {c[0], ..., c[k]}; Step 12: In the tenth step, if a[h] is equal to 1, assign 0 to i; Step 13: Determine whether i is less than k; if so, b[i]=c[i]; Step 14, i is incremented by 1; Step 15, looping through steps 12 to 14; Step 16. In the step 13, if no, then b[k]=c[k]+1, completing the statistics of the duration of each use of the vehicle function, that is, the duration of the k-time use of the vehicle function B[k]={b[0], …,b[k]}={c[0], …,c[k]+1}.
4. The analysis system based on vehicle function on / off big data according to claim 3 is characterized in that: In the output module, the layout of the new Excel file is: The first line stores the attribute name of each feature; The second row stores the field "frequency of use"; The third line stores the calculated usage frequency of the corresponding function; The fourth row stores the field "duration of each use"; The fifth to 5+k rows store the calculated usage time of each in-vehicle function.
Citation Information
Patent Citations
Airborne equipment failure rate detection method based on flight data
CN106372323A
Method for carrying out statistics on software utilization rates and adjusting probation periods
CN106850335A
System and Method for Dynamic Resource Provisioning for Job Placement
US20100058352A1
