Event statistics processing method, terminal device, and storage medium
By acquiring and filtering periodic signal data in real time through an online processing mechanism, the problems of large data volume and repetitive calculations in offline task calculation methods are solved, and fast and accurate event statistical processing is achieved.
Patent Information
- Application Number
- CN202310184671.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-20
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-02-20
AI Technical Summary
In existing technologies, offline task computing methods involve large amounts of data during peak periods, leading to increased sorting pressure, long computing time, and resource waste due to duplicate data. Furthermore, task intervals should not be set too short, resulting in the inability to obtain results quickly.
Through an online processing mechanism, periodic signal data is acquired in real time, and status verification and filtering are performed. Based on the verification results, different preset processing is carried out, including data merging, delayed verification and storage, to reduce redundant calculations.
It enables real-time data processing, reduces single-process time, improves computing efficiency, reduces resource consumption, and ensures accurate storage of event start and end times.
Smart Images

Figure CN116149879B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of vehicle systems, and particularly relates to an event statistical processing method and system and a storage medium. BACKGROUND
[0002] With more and more application of big data technology on vehicles, more and more manufacturers can better and faster optimize vehicle parameters and better design vehicle comfort when designing vehicles through big data. Periodically obtaining state data of the current vehicle and judging events according to state jumps are basic and important contents in big data analysis, that is, event analysis.
[0003] The widely used offline task calculation mode starts a task according to an offline task calculation period, reads data generated in a period of time, sorts the data, judges the start and end of an event according to changes in state values before and after the time, and then stores the result in a database. The applicant found in application that the offline task calculation mode may have a large amount of data input during peak periods, resulting in a large amount of data processed at a time, increased sorting pressure, and a long calculation time. In addition, the task interval should not be set too short, resulting in the inability to quickly obtain the result; and repeated transmission of data may cause repeated operation of the task and waste of computing resources. SUMMARY
[0004] To solve the above problems, the present application provides an event statistical processing method, comprising:
[0005] In response to receiving periodic signal data, performing state verification on the periodic signal data.
[0006] If the verification result meets a first preset condition, performing first preset processing on the periodic signal data; otherwise, performing second preset processing on the periodic signal data.
[0007] Optionally, the step of responding to the reception of periodic signal data and performing state verification on the periodic signal data comprises:
[0008] Performing data filtering processing on the periodic signal data.
[0009] Optionally, the step of performing first preset processing on the periodic signal data if the verification result meets the first preset condition comprises:
[0010] If the verification result determines that the periodic signal data is first state jump data to be counted, the periodic signal data is taken as an intermediate state cache as a start record of the current event, and the start time of the current event is updated.
[0011] Optionally, the step of otherwise performing a second preset processing on the periodic signal data comprises:
[0012] If the check result determines that the periodic signal data is not the state jump data to be counted for the first time, the current state value is compared with the state value of the last data, and a third preset processing is performed according to the comparison result.
[0013] Optionally, the step of comparing the current state value with the state value of the last data and performing a third preset processing according to the comparison result comprises:
[0014] If the comparison result determines that the current state value is the same as the state value of the last data, the state of the current event is merged with the event corresponding to the last data; and / or,
[0015] If the comparison result determines that the current state value is different from the state value of the last data, a delay check is performed according to the time at which the current event occurs, and a fourth preset processing is performed according to the delay check result.
[0016] Optionally, the step of performing a delay check according to the time at which the current event occurs and performing a fourth preset processing according to the delay check result comprises:
[0017] If the delay check result determines that it is normal data without delay, the periodic signal data is stored as the record of the end of the current event; and / or,
[0018] If the delay check result determines that it is delay data, a delay point is determined according to the time at which the current event occurs, and a fifth preset processing is performed according to the delay point.
[0019] Optionally, the step of determining a delay point according to the time at which the current event occurs and performing a fifth preset processing according to the delay point comprises:
[0020] If the delay point is before the start time of the current event, the end record of the previous event is stored; and / or,
[0021] If the delay point is after the start time of the current event, and there is state jump data to be counted after the end time of the current event, the state jump data to be counted is stored as the end record of the current event, the first state jump data after the time of the end record of the current event is recorded as the next event, and the start time of the current event is updated.
[0022] Optionally, the step of storing the end record of the current event if the delay point is before the start time of the current event further comprises:
[0023] If there is still state jump data to be counted before the time when the previous event ends, the state jump data to be counted is stored as the start record of the previous event.
[0024] The application further provides a terminal device, comprising a processor and a memory.
[0025] The memory stores a computer program, and the computer program, when executed by the processor, implements the steps of the event counting processing method.
[0026] The application further provides a storage medium, and the storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the event counting processing method.
[0027] The event counting processing method, the terminal device and the storage medium of the application can continuously obtain each piece of periodic signal data in real time through an online processing mechanism, and perform different processing according to different states of data feedback according to state checking results. The real-time performance of the periodic signal data is guaranteed, the state data to be counted each time can be quickly and little sorted, and saved as an intermediate state in a cache, the reading and writing speed is accelerated, the single operation time is greatly reduced, the computing efficiency is improved, even the delay data can be captured according to the comparison result. Then, the storage of the start and end of an event can be performed according to the states in the cache. The unnecessary repeated calculation can be reduced by filtering repeated data, and the processing pressure is effectively reduced because only one piece of data is processed each time, and at most two pieces of state data are sorted and compared. BRIEF DESCRIPTION OF DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and serve to explain the principles of the application. In order to more clearly illustrate the technical solutions of the embodiments of the application, the accompanying drawings needed to be used in the description of the embodiments will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative labor.
[0029] Figure 1 The event counting processing method flowchart of an embodiment of the application.
[0030] Figure 2 The event processing flowchart of the terminal device of an embodiment of the application.
[0031] The objectives, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. The above-described drawings have shown the specific embodiments of the present application, and will be described in more detail hereinafter. These drawings and the written description are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0032] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0033] In the description of the present application, it should be understood that the terms indicating the position or positional relationship are based on the position or positional relationship shown in the drawings, and are only for the purpose of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular position, be constructed and operated in a particular position, and therefore cannot be understood as a limitation on the present application.
[0034] In the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting", "fixing" and the like should be understood broadly, for example, can be fixed connection, can also be detachable connection, or integral; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be the internal communication of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances of the specification.
[0035] First Embodiment
[0036] The present application provides an event statistical processing method, Figure 1The figure is a flow chart of an event statistical processing method according to an embodiment of the present application. The event statistical processing method according to the present application can be processed by a Flink stream processing engine. Flink is a distributed computing framework for stream processing and batch processing, that is, it supports stream processing and batch processing. Flink is implemented based on a stream processing engine, and it truly realizes stream processing and regards batch processing as a special kind of bounded stream.
[0037] As shown in Figure 1 The event statistical processing method includes the following steps.
[0038] S10: In response to receiving periodic signal data, performing state verification on the periodic signal data.
[0039] In order to better and faster optimize the vehicle operating parameters and better design the comfort of the vehicle, it is necessary to periodically obtain the state data of the current vehicle to perform event analysis according to the state jump of the vehicle to determine the development of the event. The periodic signal data can feed back the running state of the vehicle in real time, and the continuous periodic signal data can reflect the starting, passing and ending of the vehicle in each event. Therefore, when receiving the periodic signal data sent in real time, the state of the vehicle can be verified to determine the current state of the vehicle reflected by the periodic signal data.
[0040] S20: If the verification result meets the first preset condition, performing first preset processing on the periodic signal data; otherwise, performing second preset processing on the periodic signal data.
[0041] The periodic signal data is processed differently according to the different current states of the vehicle reflected by the periodic signal data, which can realize the classification management of real-time data with less computational resource consumption.
[0042] Through the real-time online processing mechanism, each piece of periodic signal data is obtained in real time, and different processing is performed according to the state verification result and the different states of the data feedback. The real-time performance of the periodic signal data is guaranteed, and the corresponding result can be output every time the periodic signal data is received, which speeds up the read-write speed, greatly reduces the single operation time, and improves the computing efficiency.
[0043] Optionally, the step of performing state verification on the periodic signal data in response to receiving the periodic signal data includes the following steps.
[0044] Performing data filtering processing on the periodic signal data.
[0045] In order to avoid the waste of repeated data to the operation resources and the interference of event judgment, the repeated data is filtered before the periodic signal data is processed, which can effectively reduce unnecessary repeated calculation.
[0046] Optionally, if the check result meets the first preset condition, the step of performing the first preset processing on the periodic signal data comprises:
[0047] If the check result determines that the periodic signal data is the state jump data that needs to be counted for the first time, the periodic signal data is recorded as the intermediate state cache as the start of the current event, and the start time of the current event is updated.
[0048] Exemplarily, when a state jumps for the first time, it can be considered that an event worth attention occurs. The start of the event is recorded, and the start time of the event is recorded for subsequent retrieval and use. By caching and maintaining the data before and after the event time as the intermediate state, the read-write speed can be accelerated, and the operation time can be greatly reduced. Even if the data is delayed, it can also be captured according to the comparison result, and the efficiency and safety of the operation are improved.
[0049] Optionally, otherwise, the step of performing the second preset processing on the periodic signal data comprises:
[0050] If the check result determines that the periodic signal data is not the state jump data that needs to be counted for the first time, the state value of the current data is compared with the state value of the last data, and the third preset processing is performed according to the comparison result.
[0051] Exemplarily, if the check result is not the state jump data that needs to be counted for the first time, it indicates that the event corresponding to the current data has not ended, and the third preset processing mode different from the first event can be performed at this time.
[0052] Optionally, the step of comparing the state value of the current data with the state value of the last data and performing the third preset processing according to the comparison result can comprise:
[0053] If the comparison result determines that the state value of the current data is the same as the state value of the last data, the current event and the event corresponding to the last data are merged.
[0054] Exemplarily, if the state value of the current data is the same as the state value of the last data, it indicates that the event has not ended before, and the event occurrence state is still continuing, and the current event and the event corresponding to the last data can be merged as the same event at this time.
[0055] Optionally, the step of comparing the state value of the current data with the state value of the last data and performing the third preset processing according to the comparison result can comprise:
[0056] If the comparison result determines that the current state value is different from the state value of the last data, delay verification is performed according to the time of the current event, and the fourth preset processing is performed according to the delay verification result.
[0057] For example, if the state value corresponding to the current data is different from the state value of the last data, it indicates that the event corresponding to the current data has ended, and at this time, delay verification needs to be performed on the periodic signal data of the current cycle to determine whether the current data is delay data, and the fourth preset processing is performed according to the delay verification result.
[0058] Optionally, the step of performing delay verification according to the time of the current event and performing the fourth preset processing according to the delay verification result can include:
[0059] If the delay verification result determines that the current data is normal data without delay, the periodic signal data is stored as a record of the end of the current event.
[0060] For example, if the delay verification on the periodic signal data shows that the current data is normal data without delay, it indicates that the current data sampling is the first sampling after the corresponding event ends, and at this time, the current data can be stored as a record of the end of the current event for subsequent retrieval and use.
[0061] Optionally, the step of performing delay verification according to the time of the current event and performing the fourth preset processing according to the delay verification result can include:
[0062] If the delay verification result determines that the current data is delay data, a delay point is determined according to the time of the current event, and the fifth preset processing is performed according to the delay point.
[0063] For example, if the delay verification on the periodic signal data shows that the current data is delay data, it indicates that the time of the current data sampling is relatively early, and there may be later sampling data that has been processed. At this time, the delay point of the current data is determined according to the time of the current event, and the fifth preset processing is performed according to the delay point.
[0064] Optionally, the step of determining the delay point according to the time of the current event and performing the fifth preset processing according to the delay point can include:
[0065] If the delay point is before the start time of the current event, the end record of the previous event is stored.
[0066] Exemplarily, assuming that the time interval of the signals is strictly 5 seconds once, and the first received signal A (event time is 2023-02-07 10:00:30, and the state is the state value of event triggered), at this time, the start time of the current event is 2023-02-07 10:00:30; then signal C is received (event time is 2023-02-07 10:00:25, and the state jumps, which is the state value of event not triggered), because the event time of signal C is before the start time of the current event, the previous missed event is stored. At this time, the time of storing the event not triggered state value is supplemented, that is, the time of signal C is stored as the end record of the previous event.
[0067] By determining the time of the delay point, the verification and supplementary storage of the end record of the previous event are performed, so that the logical integrity of the event is ensured.
[0068] Optionally, if the delay point is before the start time of the current event, the step of storing the end record of the current event further includes:
[0069] If there is still state jump data to be counted before the end time of the previous event, the state jump data to be counted is stored as the start record of the previous event.
[0070] Exemplarily, assuming that the time interval of the signals is strictly 5 seconds once, and the first received signal A (event time is 2023-02-07 10:00:30, and the state is the state value of event triggered), at this time, the start time of the current event is 2023-02-07 10:00:30; then signal B is received (event time is 2023-02-07 10:00:20, and the state is still the state value of event triggered), because the event time is before the start time of the current event, and the interval time exceeds the predetermined value 5 seconds, the state is not merged, and single state caching is performed; then signal C is received (event time is 2023-02-07 10:00:25, and the state jumps, which is the state value of event not triggered), because the event time is before the start time of the current event, the previous missed event is stored.
[0071] In this case, there is still state jump data to be counted, and the stored data is signal B (start of the previous event) and signal C (end of the previous event), that is, the missed event caused by delay is compensated. At this time, the time of signal B is before the time of signal C, so the time of signal B is stored as the start record of the previous event. Optionally, the event time is compared with the start time of the cached event every time the data is received.
[0072] By determining the time of the delay point state jump data, the verification and supplementary recording storage of the beginning of the previous event are performed, and the clear and complete logic of the event is ensured.
[0073] Optionally, the step of determining the delay point according to the time of the current event and performing the fifth preset processing according to the delay point can include:
[0074] If the delay point is after the start time of the current event, and there is state jump data to be counted after the end time of the current event, the state jump data to be counted is stored as the end record of the current event.
[0075] For example, it is assumed that the time interval of the signal is strictly 5 seconds, and the first signal A (event time: 2023-02-07 10:00:30, state: event triggered state value) is received, at this time, the start time of the current event is 2023-02-07 10:00:30; then signal B (event time: 2023-02-07 10:00:40, state: event triggered state value) is received, because the event time is after the start time of the current event, and the interval time exceeds the predetermined value 5 seconds, the state is not merged, and a single state cache is performed.
[0076] Then signal C (event time: 2023-02-07 10:00:35, state jump, event not triggered state value) is received, because the event time is after the start time of the current event, the missing event storage is performed. This situation is that there is state jump data to be counted, and the data stored is signal A (current event start) and signal C (current event end), that is, the time of signal C is stored as the end record of the current time, which makes up for the missing event caused by delay. At this time, the event time (2023-02-07 10:00:40) of signal B is taken as the start time of the next event. Optionally, the event time and the start time of the cached event are compared for each received data.
[0077] By determining the time of the delay point state jump data, the verification and supplementary recording storage of the beginning of the current event are performed, and the clear and complete logic of the event is ensured.
[0078] Optionally, the step of storing the state jump data to be counted as the end record of the current event can include:
[0079] The first state jump data after the end record time of the current event is recorded and stored as the next event, and the start time of the current event is updated.
[0080] Optionally, after the time of the current event end record, if the state of the periodically received signal data is state jump data that needs to be recorded again, it means that the occurrence of an event that needs to be paid attention to again, which can be recorded as the start of the next event. For example, assuming that the time interval of the signal is strictly 5 seconds, and the first signal A is received (event time is 2023-02-07 10:00:30, and the state is the state value of the event trigger), at this time, the start time of the current event is 2023-02-07 10:00:30; then signal B is received (event time is 2023-02-07 10:00:40, and the state is still the state value of the event trigger), because the event time is after the start time of the current event, and the interval time exceeds the predetermined value 5 seconds, the state will not be merged, but will be cached as a single state.
[0081] Then signal C is received (event time is 2023-02-07 10:00:35, and the state jumps to the state value of the event not triggered), because the event time is after the start time of the current event, so the missing event will be stored. In this case, there is state jump data that needs to be counted, so the stored data is signal A (the start of the current event) and signal C (the end of the current event), and the event time of signal B (2023-02-07 10:00:40) is used as the start time of the next event.
[0082] By determining the time of the delay point state jump data, the verification and supplementary record storage of the start of the next event are performed, which ensures the clear and complete logic of the event.
[0083] Through the online processing mechanism, each piece of periodic signal data is obtained in real time, different processing is performed according to the state verification result and the different states of the data feedback. The real-time performance of the periodic signal data is guaranteed, the state data that needs to be counted each time can be quickly and small sorted, and saved as an intermediate state in the cache, which accelerates the read-write speed, greatly reduces the single operation time, and improves the calculation efficiency. Even the delay data can be captured according to the comparison result. Then the state in the cache can be used to store the start and end of the event. The unnecessary repeated calculation can be reduced by filtering the repeated data; and only one piece of data is processed each time, and at most two pieces of state data are sorted and compared, so that the resources used for calculation are greatly reduced, and the processing pressure is effectively reduced.
[0084] Second embodiment
[0085] The application also provides a terminal device, comprising a processor and a memory;
[0086] The memory stores a computer program which, when executed by the processor, implements the steps of the event statistics processing method as described above.
[0087] Figure 2 Flow chart of event processing of the terminal device of an embodiment of the present application.
[0088] Please refer to Figure 2 In an embodiment, assuming that a vehicle sends a periodic signal data, and Flink receives the signal data, the following steps are performed:
[0089] 1: Data filtering is performed to filter repeated data within a certain time. After repeated data is filtered, unnecessary repeated calculation is reduced.
[0090] 2: State verification is performed to determine whether each state value of the data is the first state jump data (i.e., the start of an event) to be counted.
[0091] 3: If it is the first state jump data to be counted, the state occurrence time, vehicle speed, latitude and longitude, and driving mileage of the data are cached as intermediate states, the start time of the current event is updated, and the start record of the event is stored in the database; otherwise, the state value is compared with the state value of the last time to determine whether the value jumps again. The data before and after the event time is saved in the cache as an intermediate state, which is read and written quickly, greatly reducing the single calculation time and improving the calculation efficiency.
[0092] 4: If the state value is the same as the state value of the last time (not jump), the states of multiple events that are continuous in time are merged into one state.
[0093] 5: If the state value is different from the state value of the last time (i.e., the end of an event), delay verification is performed according to the event occurrence time.
[0094] 6: If it is normal data, the data is stored as an event end record in the database.
[0095] 7: If it is delay data, the delay point is determined.
[0096] 8: If the delay point is before the start time of the current event and there is state jump data to be counted before the event time of the event, the missing event start record is stored; if not, it is skipped. Then, the missing event end record is stored.
[0097] 9: If the delay point is after the start time of the current event, and there is still state transition data to be counted after the end time of the event, first store the event end record, then take the first state transition data after the event time of the event end record as the event start record, store it in the database, and update the start time of the current event to the event time of the event start record.
[0098] Through the mechanism of Flink, single periodic signal data is obtained in real time, repeated data is filtered, each time state data to be counted is quickly and minimally sorted, and then saved as an intermediate state in the cache. Each time, the state in the cache is used to store the start and end of the event, and to capture the missed start and end of the event. Through online real-time processing of periodic data, real-time performance is guaranteed, and the result can be output as long as periodic signal data is received each time. Because all intermediate states are saved, even delayed data can still be captured according to the comparison result. Each time, only one data is processed, and at most only two state data are sorted and compared, so that the required resources are less and the processing pressure is small.
[0099] Third embodiment
[0100] The application further provides a storage medium, and the storage medium stores a computer program. The computer program is executed by a processor to implement the steps of the event counting processing method.
[0101] The application further provides a computer program product, which includes computer program code. When the computer program code is run on a computer, the computer program code causes the computer to execute the method in any of the possible implementation manners.
[0102] The application further provides a chip, which includes a memory and a processor. The memory is used to store a computer program. The processor is used to call and run the computer program from the memory, so that a device installed with the chip executes the method in any of the possible implementation manners.
[0103] In the embodiments provided in the application, any of the technical features of the above method embodiments can be included, and the description and explanation content is basically the same as that of the above method embodiments, which will not be repeated here.
[0104] The event statistical processing method, the terminal device and the storage medium of the present application can obtain each periodic signal data in real time through an online processing mechanism, and perform different processing according to different states of data feedback according to the state check result. The real-time performance of the periodic signal data is guaranteed, the state data that needs to be counted each time can be quickly and little sorted, and saved as an intermediate state in the cache, the read-write speed is accelerated, the single operation time is greatly reduced, the calculation efficiency is improved, and even delayed data can be captured according to the comparison result. Then the storage of the start and end of the event can be performed according to the state in the cache. The unnecessary repeated calculation can be reduced by filtering the repeated data; and only one data is processed each time, and at most two state data are sorted and compared, so that the resources used for calculation are greatly reduced, and the processing pressure is effectively reduced.
[0105] It should be noted that in the present application, step codes such as S10, S20, etc. are used, the purpose is to more clearly and briefly describe the corresponding content, and does not constitute a substantial limitation on the order, and those skilled in the art may perform S20 before S10, etc. when implementing, but these should be within the protection scope of the present application.
[0106] It can be understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided by the embodiments of the present application. The technical solutions provided by the embodiments of the present application are also applicable to other scenarios. For example, those skilled in the art can know that with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0107] The above sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0108] The steps in the method of the embodiments of the present application can be adjusted, combined and reduced in sequence according to actual needs.
[0109] The units in the device of the embodiments of the present application can be combined, divided and reduced according to actual needs.
[0110] In the present application, for the same or similar term concept, technical solution and / or application scenario description, generally only detailed description is made when it appears for the first time, and for the sake of brevity, it is generally not repeated when it repeatedly appears, and for the understanding of the technical solutions of the present application, the same or similar term concept, technical solution and / or application scenario description which is not described in detail can be referred to the related description before.
[0111] In the present application, the description of each embodiment has its own emphasis, and the parts not described or recorded in a certain embodiment can be referred to the related description of other embodiments.
[0112] Any technical features of the technical solutions of the present application can be combined. In order to make the description simple, all possible combinations of the technical features in the above-mentioned embodiments are not described, however, as long as the combinations of the technical features do not exist, they should be considered as the range disclosed in the present application.
[0113] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An event statistical processing method characterized by comprising: The method comprises the following steps: in response to receiving periodic signal data, performing state verification on the periodic signal data; if the verification result meets a first preset condition, performing first preset processing on the periodic signal data; otherwise, performing second preset processing on the periodic signal data; the step of performing second preset processing on the periodic signal data comprises: if the verification result determines that the periodic signal data is not the first state jump data to be counted, comparing the current state value with the state value of the last data, and performing third preset processing according to the comparison result; the step of comparing the current state value with the state value of the last data, and performing third preset processing according to the comparison result comprises: if the comparison result determines that the current state value is the same as the state value of the last data, merging the current event with the event corresponding to the last data in state; and / or, if the comparison result determines that the current state value is different from the state value of the last data, performing delay verification according to the time when the current event occurs, and performing fourth preset processing according to the delay verification result; the step of performing delay verification according to the time when the current event occurs, and performing fourth preset processing according to the delay verification result comprises: if the delay verification result determines that it is normal data without delay, storing the periodic signal data as the record of the end of the current event; and / or, if the delay verification result determines that it is delayed data, determining a delay point according to the time when the current event occurs, and performing fifth preset processing according to the delay point.
2. The event statistics processing method of claim 1, wherein, the step of performing state verification on the periodic signal data in response to receiving periodic signal data comprises: performing data filtering processing on the periodic signal data.
3. The event statistics processing method of claim 1, wherein, the step of performing first preset processing on the periodic signal data if the verification result meets the first preset condition comprises: if the verification result determines that the periodic signal data is the first state jump data to be counted, storing the periodic signal data as an intermediate state cache as the start record of the current event, and updating the start time of the current event.
4. The event statistics processing method according to any one of claims 1 to 3, characterized by, the step of determining a delay point according to the time when the current event occurs, and performing fifth preset processing according to the delay point comprises: if the delay point is before the start time of the current event, storing the end record of the previous event; and / or, if the delay point is after the start time of the current event, and there is state jump data to be counted after the end time of the current event, storing the state jump data to be counted as the end record of the current event, and storing the first state jump data after the time of the end record of the current event as the record of the next event, and updating the start time of the current event.
5. The event statistics processing method of claim 4, wherein, the step of storing the end record of the current event if the delay point is before the start time of the current event further comprises: if there is still state jump data to be counted before the end time of the previous event, storing the state jump data to be counted as the start record of the previous event.
6. A terminal device, characterized by comprising: the method comprises a processor and a memory; The memory stores a computer program which, when executed by the processor, implements the steps of the event statistics processing method according to any one of claims 1 to 5.
7. A storage medium, characterized by The storage medium stores a computer program which, when executed by the processor, implements the steps of the event statistics processing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
A method for collecting SOE events and a related device
CN109376878A