CAN (Controller Area Network) message recording method and device for remotely configuring acquisition frequency, equipment and medium

By parsing platform commands and configuring timer interrupt signals, the collection frequency of CAN messages is dynamically adjusted, which solves the problem that traditional methods cannot flexibly adjust the frequency and achieves efficient and accurate data collection and storage.

CN118784469AInactive Publication Date: 2024-10-15天津布尔科技有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411270470.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional CAN message recording method cannot flexibly adjust the collection frequency according to actual needs, resulting in the inability to meet data collection needs in different application scenarios, resulting in a waste of resources and a lack of information.

Method used

By parsing the commands issued by the platform, the timer interrupt signal of the acquisition device is dynamically configured, CAN messages are collected according to different frequencies, and uploaded to the platform for storage, realizing the function of remotely configuring the collection frequency.

Benefits of technology

It achieves the flexibility and efficiency of CAN message recording, can dynamically adjust the collection frequency according to actual needs, adapts to different application scenarios, and improves the accuracy and reliability of data collection, storage and analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784469A_ABST
    Figure CN118784469A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data acquisition, in particular to a CAN message recording method and device for remotely configuring acquisition frequency, equipment and a medium, and the method comprises the following steps: in response to a received command issued by a platform, analyzing the command to obtain an analyzed acquisition frequency value; based on the analyzed acquisition frequency value and the acquisition frequency of the acquisition device, determining whether the acquisition device needs to configure the acquisition frequency; in response to determining that the acquisition device needs to configure the acquisition frequency, configuring an interrupt signal of a timer corresponding to the acquisition device by using the analyzed acquisition frequency value; according to the acquisition frequency corresponding to the interrupt signal of the timer, the CAN message is acquired, the CAN message is uploaded to the platform to be stored, and by remotely configuring the acquisition frequency of the CAN message, a user can dynamically adjust the recording frequency of the CAN message according to actual requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data acquisition technology, and in particular to a CAN message recording method, device, equipment and medium for remotely configuring acquisition frequency. Background Art

[0002] In recent years, with the development of the Internet of Things and Internet of Vehicles technologies, the CAN (Controller Area Network) bus has been increasingly used in data collection. For example, in new energy vehicles, T-BOX (Telematics Box) collects various vehicle information through the CAN bus and transmits it to the enterprise's cloud platform through a wireless network, which can realize remote monitoring, real-time collection, and data storage of CAN messages, providing strong support for fault diagnosis and performance optimization in the automotive and industrial fields.

[0003] Devices that collect CAN bus information at different frequencies need to have separate embedded software, and the different frequencies in the software must be consistent with the corresponding devices. Different devices cannot be used interchangeably, which will cause CAN bus information loss or waste of resources. Traditional CAN message recording methods usually use fixed collection frequencies, which cannot be flexibly adjusted according to actual needs to achieve remote configuration and monitoring, limiting their effectiveness in practical applications. Summary of the invention

[0004] The main purpose of this application is to provide a CAN message recording method, device, equipment and medium for remotely configuring the collection frequency; to solve the limitations of the traditional CAN message recording method, make the CAN message recording method more flexible, and be able to adjust the collection frequency in real time according to different application scenarios and requirements. Improve the flexibility and efficiency of CAN message recording.

[0005] To achieve the above object, the present invention provides a CAN message recording method for remotely configuring the acquisition frequency, comprising: in response to receiving a command issued by a platform, parsing the command to obtain a parsed acquisition frequency value; Based on the analyzed acquisition frequency value and the acquisition frequency of the acquisition device, determining whether the acquisition device needs to be configured with an acquisition frequency; In response to determining that the acquisition device needs to be configured with an acquisition frequency, configuring an interrupt signal of a timer corresponding to the acquisition device using the analyzed acquisition frequency value; According to the collection frequency corresponding to the interrupt signal of the timer, CAN messages are collected, and the CAN messages are uploaded to the platform for storage.

[0006] Optionally, before the step of parsing the command in response to receiving the command issued by the platform to obtain the parsed acquisition frequency value, the method further includes: In response to detecting that the acquisition device is started, initializing the timer; Receiving a command issued by the platform; In response to not receiving the command sent by the platform, CAN messages are collected according to the collection frequency corresponding to the initialized timer.

[0007] Optionally, the method further comprises: In response to determining that the acquisition device does not need to be configured with an acquisition frequency, CAN messages are acquired according to the acquisition frequency corresponding to the initialized timer.

[0008] Optionally, after parsing the command in response to receiving the command issued by the platform to obtain the parsed acquisition frequency value, the method further includes: Writing the analyzed acquisition frequency value into FLASH; In response to detecting that the acquisition device is restarted, CAN messages are acquired according to the acquisition frequency corresponding to the analyzed acquisition frequency value.

[0009] Optionally, after configuring an interrupt signal of a timer corresponding to the acquisition device using the analyzed acquisition frequency value in response to determining that the acquisition device needs to configure an acquisition frequency, the method further includes: Determine whether the interrupt signal has expired at the current time; In response to determining that the interrupt signal expires at the current time, CAN messages are collected according to a collection frequency corresponding to the interrupt signal of the timer.

[0010] Optionally, the method further comprises: In response to determining that the interrupt signal has not expired at the current time, determining a target time for the interrupt signal to expire according to a collection frequency corresponding to the interrupt signal; In response to the current time being the target time, CAN messages are collected according to the collection frequency corresponding to the interrupt signal of the timer.

[0011] Optionally, after collecting CAN messages according to the collection frequency corresponding to the interrupt signal of the timer and uploading the CAN messages to the platform for storage, the method further includes: In response to the platform receiving a first CAN message, obtaining a current absolute time; Clearing the relative time when the platform receives the first CAN message; Recording the relative time corresponding to each CAN message received by the platform relative to the absolute time; Pack the received CAN messages and the corresponding relative time to obtain the data packets corresponding to each CAN message; The data packet is stored in a circular buffer of the platform.

[0012] In addition, to achieve the above-mentioned purpose, the present invention also provides a CAN message recording device for remotely configuring the acquisition frequency, comprising: a parsing module, for parsing the command in response to receiving a command issued by the platform, and obtaining the parsed acquisition frequency value; A determination module, used to determine whether the acquisition device needs to be configured with an acquisition frequency based on the analyzed acquisition frequency value and the acquisition frequency of the acquisition device; A configuration module, configured to configure an interrupt signal of a timer corresponding to the acquisition device using the analyzed acquisition frequency value in response to determining that the acquisition device needs to configure an acquisition frequency; The acquisition module is used to acquire CAN messages according to the acquisition frequency corresponding to the interrupt signal of the timer, and upload the CAN messages to the platform for storage.

[0013] Optionally, before the parsing module, the device further includes: An initialization submodule, configured to initialize the timer in response to detecting that the acquisition device is started; A receiving submodule, used for receiving commands issued by the platform; The first acquisition submodule is used to, in response to not receiving a command sent by the platform, acquire CAN messages according to the acquisition frequency corresponding to the initialized timer.

[0014] Optionally, the device further comprises: The second acquisition submodule is used for, in response to determining that the acquisition device does not need to be configured with an acquisition frequency, acquiring CAN messages according to the acquisition frequency corresponding to the initialized timer.

[0015] Optionally, after the parsing module, the device further includes: A writing submodule is used to write the analyzed acquisition frequency value into FLASH; The third acquisition submodule is used for acquiring CAN messages according to the acquisition frequency corresponding to the analyzed acquisition frequency value in response to detecting that the acquisition device is restarted.

[0016] Optionally, after the configuration module, the device further includes: A determination submodule, used to determine whether the interrupt signal has expired at the current time; The fourth collection submodule is used to collect CAN messages according to the collection frequency corresponding to the interrupt signal of the timer in response to determining that the interrupt signal expires at the current time.

[0017] Optionally, the device further comprises: A target time determination submodule, configured to determine a target time for the interrupt signal to expire according to a collection frequency corresponding to the interrupt signal in response to determining that the interrupt signal has not expired at the current time; The fifth acquisition submodule is used to acquire CAN messages according to the acquisition frequency corresponding to the interrupt signal of the timer in response to the current time being the target time.

[0018] Optionally, after the acquisition module, the device further includes: An acquisition submodule, configured to acquire the current absolute time in response to the platform receiving the first CAN message; A clearing submodule, used to clear the relative time when the platform receives the first CAN message; A recording submodule, used to record the relative time corresponding to each CAN message received by the platform relative to the absolute time; The packing submodule is used to pack the received CAN messages and the corresponding relative time to obtain the data packet corresponding to each CAN message; The storage submodule is used to store the data packet in the circular buffer area of ​​the platform.

[0019] In addition, to achieve the above-mentioned purpose, the present invention also provides a CAN message recording device for remotely configuring the collection frequency, characterized in that the CAN message recording device for remotely configuring the collection frequency includes: a memory, a processor, and a CAN message recording program for remotely configuring the collection frequency stored in the memory and executable on the processor, and when the CAN message recording program for remotely configuring the collection frequency is executed by the processor, the steps of the CAN message recording method for remotely configuring the collection frequency as described in any one of the above are implemented.

[0020] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, characterized in that a CAN message recording program for remotely configuring the acquisition frequency is stored on the computer-readable storage medium, and when the CAN message recording program for remotely configuring the acquisition frequency is executed by the processor, the steps of the CAN message recording method for remotely configuring the acquisition frequency as described in any one of the above are implemented.

[0021] Compared with the prior art, the present invention has the following beneficial effects: In response to receiving a command issued by the platform, the command is parsed to obtain a parsed acquisition frequency value; based on the parsed acquisition frequency value and the acquisition frequency of the acquisition device, it is determined whether the acquisition device needs to configure the acquisition frequency; in response to determining that the acquisition device needs to configure the acquisition frequency, the parsed acquisition frequency value is used to configure the interrupt signal of the timer corresponding to the acquisition device; according to the acquisition frequency corresponding to the interrupt signal of the timer, CAN messages are collected, and the CAN messages are uploaded to the platform for storage. In this embodiment, by remotely configuring the acquisition frequency of CAN messages, users can dynamically adjust the recording frequency of CAN messages according to actual needs. This flexibility enables the system to adapt to different application scenarios and meet different data acquisition needs, providing a more efficient, accurate and reliable solution for the collection, storage and analysis of CAN bus data. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic diagram of an embodiment of a CAN message recording method for remotely configuring the acquisition frequency in an embodiment of the present invention; Figure 2 It is a schematic diagram of another embodiment of the CAN message recording method for remotely configuring the collection frequency in an embodiment of the present invention; Figure 3 A schematic diagram of an embodiment of a CAN message recording device for remotely configuring the collection frequency in an embodiment of the present invention; Figure 4 A schematic diagram of an embodiment of a CAN message recording device for remotely configuring the collection frequency in an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The main purpose of this application is to provide a CAN message recording method, device, equipment and medium with remote configuration of collection frequency; by remotely configuring the collection frequency of CAN messages, users can dynamically adjust the recording frequency of CAN messages according to actual needs. This flexibility enables the system to adapt to different application scenarios and meet different data collection requirements, providing a more efficient, accurate and reliable solution for the collection, storage and analysis of CAN bus data.

[0024] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , is a schematic diagram of an embodiment of a CAN message recording method for remotely configuring the acquisition frequency in an embodiment of the present invention; the CAN message recording method for remotely configuring the acquisition frequency includes: Step 101, in response to receiving a command issued by the platform, the command is parsed to obtain a collected frequency value after parsing.

[0026] It is understandable that the execution subject of the present invention can be a CAN message recording method for remotely configuring the collection frequency, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.

[0027] The above-mentioned platform can parse the command issued by the platform after receiving the command, and obtain the acquisition frequency value after analysis; the command issued by the above-mentioned platform can be the acquisition frequency set manually on the above-mentioned platform, and the acquisition frequency is sent to the acquisition device by triggering the sending control on the platform; then, the acquisition device parses the sent command and obtains the acquisition frequency set manually on the above-mentioned platform as the acquisition frequency value after analysis.

[0028] As an example, the execution subject can be a terminal multithreading, and the terminal can be a collection device; the terminal multithreading will always listen to the remote configuration command, and when receiving the configuration command, it will parse the command to extract the required new collection frequency value. This value is a number, indicating the number of CAN messages that need to be collected per second.

[0029] Optionally, before the response to receiving a command issued by the platform, parsing the command, and obtaining the analyzed acquisition frequency value, the method also includes: in response to detecting that the acquisition device is started, initializing the timer; receiving the command issued by the platform; in response to not receiving the command issued by the platform, collecting CAN messages according to the acquisition frequency corresponding to the initialized timer.

[0030] The execution subject can initialize the timer and determine the initial acquisition frequency when the acquisition device is started; when no command issued by the platform is received, the CAN message is collected according to the initial acquisition frequency. The acquisition frequency can ensure that the acquisition device collects CAN message data within a specific time interval.

[0031] As an example, after the device is started, the timer will be initialized to ensure that data is collected within a specific time interval, thereby controlling the collection frequency of CAN messages.

[0032] Optionally, in response to determining that the acquisition device does not need to be configured with an acquisition frequency, CAN messages are acquired according to the acquisition frequency corresponding to the initialized timer.

[0033] When it is determined that the acquisition device does not need to configure the acquisition frequency, the CAN message is collected according to the acquisition frequency corresponding to the initialized timer. When it is determined that the acquisition device does not need to configure the acquisition frequency, the acquisition device does not need to receive the command issued by the platform.

[0034] Optionally, in response to receiving a command issued by the platform, parsing the command to obtain the analyzed acquisition frequency value, the method further includes: writing the analyzed acquisition frequency value into FLASH; in response to detecting that the acquisition device is restarted, collecting CAN messages according to the acquisition frequency corresponding to the analyzed acquisition frequency value.

[0035] The above-mentioned FLASH usually refers to Flash Memory, which is a non-volatile memory that can still save data after power failure. Flash memory is widely used in various electronic devices, such as solid-state hard drives, USB flash drives, memory cards, smart phones, tablet computers, etc. When it is detected that the acquisition device is restarted, CAN messages are collected according to the acquisition frequency corresponding to the analyzed acquisition frequency value.

[0036] As an example, if the user needs to adjust the collection frequency of CAN messages in real time, the platform can set the corresponding frequency and send it to the device. After parsing the command, the device will write the new frequency into FLASH. After the next startup, it can directly collect according to the configured frequency, which is convenient for user operation.

[0037] Step 102: Determine whether the acquisition device needs to be configured with an acquisition frequency based on the analyzed acquisition frequency value and the acquisition frequency of the acquisition device.

[0038] If the acquisition frequency corresponding to the acquired frequency value after analysis is the same as the acquisition frequency of the acquisition device, then the acquisition device does not need to configure the acquisition frequency; if the acquisition frequency corresponding to the acquired frequency value after analysis is different from the acquisition frequency of the acquisition device, then the acquisition device needs to configure the acquisition frequency.

[0039] Step 103: in response to determining that the acquisition device needs to configure the acquisition frequency, configure the interrupt signal of the timer corresponding to the acquisition device using the analyzed acquisition frequency value.

[0040] When it is determined that the acquisition device needs to be configured with an acquisition frequency, the analyzed acquisition frequency value is used to configure an interrupt signal of a timer corresponding to the acquisition device; and the time interval corresponding to the timer interrupt signal is made consistent with the time interval of the acquisition data corresponding to the acquisition frequency.

[0041] As an example, the new interval of the timer needs to be calculated according to the collected frequency value after analysis. Then the calculated new interval is used to reconfigure the timer interrupt signal, so that the timer will be triggered periodically according to the new interval, thereby controlling the collection frequency of CAN messages. The timer does not need to be restarted during configuration, reducing the possibility of CAN message loss during the configuration process.

[0042] Optionally, after configuring the interrupt signal of the timer corresponding to the acquisition device using the analyzed acquisition frequency value in response to determining that the acquisition device needs to configure the acquisition frequency, the method further includes: determining whether the interrupt signal has expired at the current time; in response to determining that the interrupt signal has expired at the current time, collecting CAN messages according to the acquisition frequency corresponding to the interrupt signal of the timer.

[0043] The execution subject can determine whether the interrupt signal has expired at the current time. If the interrupt signal has expired at the current time, the CAN message is collected according to the collection frequency corresponding to the interrupt signal of the timer.

[0044] Optionally, in response to determining that the interrupt signal has not expired at the current time, a target time for the expiration of the interrupt signal is determined according to a collection frequency corresponding to the interrupt signal; in response to the current time being the target time, CAN messages are collected according to the collection frequency corresponding to the interrupt signal of the timer.

[0045] If the interrupt signal has not expired at the current time, determine the target time for the interrupt signal to expire based on the collection frequency corresponding to the interrupt signal; when the current time becomes the target time, collect CAN messages based on the collection frequency corresponding to the interrupt signal of the timer.

[0046] Step 104, collecting CAN messages according to the collection frequency corresponding to the interrupt signal of the timer, and uploading the CAN messages to the platform for storage.

[0047] The execution subject collects CAN messages according to the collection frequency corresponding to the interrupt signal of the timer, and uploads the CAN messages to the platform for storage.

[0048] Optionally, after collecting CAN messages according to the collection frequency corresponding to the interrupt signal of the timer and uploading the CAN messages to the platform for storage, the method also includes: in response to the platform receiving the first CAN message, obtaining the current absolute time; clearing the relative time when the platform receives the first CAN message; recording the relative time corresponding to the absolute time for each CAN message received by the platform; packaging the received CAN messages and the corresponding relative times to obtain data packets corresponding to each CAN message; and storing the data packets in the circular buffer area of ​​the platform.

[0049] The above absolute time is the time when the first CAN message is received, and the above relative time can be the time when the message is recorded on the platform. For example, the absolute time of the first CAN message can be 14:00:00, and the relative time can be 00:00:00; the recorded time of the second CAN message is 14:05:00, that is, the relative time; and the relative time of the third CAN message is 14:10:00.

[0050] As an example, when receiving the first CAN message to be collected, the current absolute time is obtained and the relative time is cleared. When receiving other CAN messages, only the current relative time needs to be obtained to save the space occupied by the message packaging. The packaged messages to be reported will be stored in the circular buffer so that the oldest data can be automatically overwritten when the storage space is insufficient. Finally, the device will report the configuration results to the platform to facilitate users to track device configuration changes.

[0051] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 2 , is a schematic diagram of another embodiment of a CAN message recording method for remotely configuring a collection frequency in an embodiment of the present invention; the CAN message recording method for remotely configuring a collection frequency comprises: Start the acquisition device, log in to the platform, initialize the timer, and read the acquisition frequency; When the platform issues a command, it parses the command and determines whether the collection frequency needs to be configured; If not, collect CAN messages according to the original collection frequency, store them, and report the data; then you can export and view the messages on the platform.

[0052] If yes, write the new acquisition frequency; The new acquisition frequency is written successfully and the timer interrupt signal is updated; When receiving a CAN message, determine whether the signal is expired; If the signal expires, CAN messages are collected according to the new collection frequency, stored, and the data reported; the messages can then be exported and viewed on the platform.

[0053] If the signal has not expired, do not collect CAN messages and wait for the signal to expire.

[0054] The above describes the CAN message recording method for remotely configuring the acquisition frequency in the embodiment of the present invention. The following describes the CAN message recording device 300 for remotely configuring the acquisition frequency in the embodiment of the present invention. Figure 3 , an embodiment of a CAN message recording device for remotely configuring the collection frequency in an embodiment of the present invention includes: The parsing module 301 is used to parse the command in response to receiving the command issued by the platform, and obtain the collected frequency value after parsing; A determination module 302, configured to determine whether the acquisition device needs to be configured with an acquisition frequency based on the analyzed acquisition frequency value and the acquisition frequency of the acquisition device; A configuration module 303, configured to configure an interrupt signal of a timer corresponding to the acquisition device using the analyzed acquisition frequency value in response to determining that the acquisition device needs to configure an acquisition frequency; The collection module 304 is used to collect CAN messages according to the collection frequency corresponding to the interrupt signal of the timer, and upload the CAN messages to the platform for storage.

[0055] The functional implementation of each module in the above-mentioned CAN message recording device for remotely configuring the collection frequency corresponds to the steps in the above-mentioned CAN message recording method embodiment for remotely configuring the collection frequency, and its functions and implementation processes will not be repeated here one by one.

[0056] Optionally, before the parsing module, the device further includes: An initialization submodule, configured to initialize the timer in response to detecting that the acquisition device is started; A receiving submodule, used for receiving commands issued by the platform; The first acquisition submodule is used to, in response to not receiving a command sent by the platform, acquire CAN messages according to the acquisition frequency corresponding to the initialized timer.

[0057] Optionally, the device further comprises: The second acquisition submodule is used for, in response to determining that the acquisition device does not need to be configured with an acquisition frequency, acquiring CAN messages according to the acquisition frequency corresponding to the initialized timer.

[0058] Optionally, after the parsing module, the device further includes: A writing submodule is used to write the analyzed acquisition frequency value into FLASH; The third acquisition submodule is used for acquiring CAN messages according to the acquisition frequency corresponding to the analyzed acquisition frequency value in response to detecting that the acquisition device is restarted.

[0059] Optionally, after the configuration module, the device further includes: A determination submodule, used to determine whether the interrupt signal has expired at the current time; The fourth collection submodule is used to collect CAN messages according to the collection frequency corresponding to the interrupt signal of the timer in response to determining that the interrupt signal expires at the current time.

[0060] Optionally, the device further comprises: A target time determination submodule, configured to determine a target time for the interrupt signal to expire according to a collection frequency corresponding to the interrupt signal in response to determining that the interrupt signal has not expired at the current time; The fifth acquisition submodule is used to acquire CAN messages according to the acquisition frequency corresponding to the interrupt signal of the timer in response to the current time being the target time.

[0061] Optionally, after the acquisition module, the device further includes: An acquisition submodule, configured to acquire the current absolute time in response to the platform receiving the first CAN message; A clearing submodule, used to clear the relative time when the platform receives the first CAN message; A recording submodule, used to record the relative time corresponding to each CAN message received by the platform relative to the absolute time; The packing submodule is used to pack the received CAN messages and the corresponding relative time to obtain the data packet corresponding to each CAN message; The storage submodule is used to store the data packet in the circular buffer area of ​​the platform.

[0062] In an embodiment of the present invention, in response to receiving a command issued by the platform, the command is parsed to obtain a parsed acquisition frequency value; based on the parsed acquisition frequency value and the acquisition frequency of the acquisition device, it is determined whether the acquisition device needs to configure the acquisition frequency; in response to determining that the acquisition device needs to configure the acquisition frequency, the parsed acquisition frequency value is used to configure the interrupt signal of the timer corresponding to the acquisition device; according to the acquisition frequency corresponding to the interrupt signal of the timer, CAN messages are collected, and the CAN messages are uploaded to the platform for storage. In this embodiment, by remotely configuring the acquisition frequency of CAN messages, users can dynamically adjust the recording frequency of CAN messages according to actual needs. This flexibility enables the system to adapt to different application scenarios and meet different data acquisition needs, providing a more efficient, accurate and reliable solution for the collection, storage and analysis of CAN bus data.

[0063] above Figure 3 The CAN message recording device for remotely configuring the collection frequency in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The CAN message recording device for remotely configuring the collection frequency in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0064] Figure 4 It is a structural schematic diagram of a CAN message recording device with remote configuration collection frequency provided by an embodiment of the present invention. The CAN message recording device 400 with remote configuration collection frequency may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 410 (for example, one or more processors) and a memory 420, and one or more storage media 430 (for example, one or more mass storage devices) storing application programs 433 or data 432. Among them, the memory 420 and the storage medium 430 can be temporary storage or permanent storage. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of computer program operations in the CAN message recording device 400 with remote configuration collection frequency. Furthermore, the processor 410 may be configured to communicate with the storage medium 430, and execute a series of computer program operations in the storage medium 430 on the CAN message recording device 400 with remote configuration collection frequency.

[0065] The CAN message recording device 400 with remote configuration collection frequency may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input and output interfaces 460, and / or one or more operating systems 431, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 4 The structure of the CAN message recording device with remotely configured acquisition frequency shown does not constitute a limitation on the CAN message recording device with remotely configured acquisition frequency, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0066] The present invention also provides a CAN message recording device with remotely configured collection frequency, comprising: a memory and at least one processor, wherein a computer program is stored in the memory, and the memory and the at least one processor are interconnected via a line; the at least one processor calls the computer program in the memory so that the CAN message recording device with remotely configured collection frequency executes the steps in the above-mentioned CAN message recording method with remotely configured collection frequency.

[0067] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the computer executes the steps of a CAN message recording method for remotely configuring an acquisition frequency.

[0068] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0069] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several computer programs to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0070] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A CAN message recording method for remotely configuring the acquisition frequency, characterized in that: include: In response to receiving a command issued by the platform, the command is parsed to obtain a collected frequency value after parsing; Based on the analyzed acquisition frequency value and the acquisition frequency of the acquisition device, determining whether the acquisition device needs to be configured with an acquisition frequency; In response to determining that the acquisition device needs to be configured with an acquisition frequency, configuring an interrupt signal of a timer corresponding to the acquisition device using the analyzed acquisition frequency value; According to the collection frequency corresponding to the interrupt signal of the timer, CAN messages are collected, and the CAN messages are uploaded to the platform for storage.

2. A CAN message recording method for remotely configuring the acquisition frequency according to claim 1, characterized in that: Before the step of parsing the command in response to receiving the command issued by the platform to obtain the parsed acquisition frequency value, the method further includes: In response to detecting that the acquisition device is started, initializing the timer; Receiving a command issued by the platform; In response to not receiving the command sent by the platform, CAN messages are collected according to the collection frequency corresponding to the initialized timer.

3. A CAN message recording method for remotely configuring the acquisition frequency according to claim 2, characterized in that: The method further comprises: In response to determining that the acquisition device does not need to be configured with an acquisition frequency, CAN messages are acquired according to the acquisition frequency corresponding to the initialized timer.

4. A CAN message recording method for remotely configuring the acquisition frequency according to claim 2, characterized in that: After the command is parsed in response to receiving the command issued by the platform to obtain the parsed acquisition frequency value, the method further includes: Writing the analyzed acquisition frequency value into FLASH; In response to detecting that the acquisition device is restarted, CAN messages are acquired according to the acquisition frequency corresponding to the analyzed acquisition frequency value.

5. A CAN message recording method for remotely configuring the acquisition frequency according to claim 2, characterized in that: After, in response to determining that the acquisition device needs to configure the acquisition frequency, configuring the interrupt signal of the timer corresponding to the acquisition device using the analyzed acquisition frequency value, the method further includes: Determine whether the interrupt signal has expired at the current time; In response to determining that the interrupt signal expires at the current time, CAN messages are collected according to a collection frequency corresponding to the interrupt signal of the timer.

6. A CAN message recording method for remotely configuring acquisition frequency according to claim 4, characterized in that: The method further comprises: In response to determining that the interrupt signal has not expired at the current time, determining a target time for the interrupt signal to expire according to a collection frequency corresponding to the interrupt signal; In response to the current time being the target time, CAN messages are collected according to the collection frequency corresponding to the interrupt signal of the timer.

7. A CAN message recording method for remotely configuring acquisition frequency according to claim 1, characterized in that: After collecting CAN messages according to the collection frequency corresponding to the interrupt signal of the timer and uploading the CAN messages to the platform for storage, the method further includes: In response to the platform receiving a first CAN message, obtaining a current absolute time; Clear the relative time when the platform receives the first CAN message; Recording the relative time corresponding to each CAN message received by the platform relative to the absolute time; Pack the received CAN messages and the corresponding relative time to obtain the data packets corresponding to each CAN message; The data packet is stored in a circular buffer of the platform.

8. A CAN message recording device with remotely configured acquisition frequency, characterized in that: include: The parsing module is used to parse the command in response to receiving the command issued by the platform, and obtain the collected frequency value after parsing; A determination module, used to determine whether the acquisition device needs to be configured with an acquisition frequency based on the analyzed acquisition frequency value and the acquisition frequency of the acquisition device; A configuration module, configured to configure an interrupt signal of a timer corresponding to the acquisition device using the analyzed acquisition frequency value in response to determining that the acquisition device needs to configure an acquisition frequency; The acquisition module is used to acquire CAN messages according to the acquisition frequency corresponding to the interrupt signal of the timer, and upload the CAN messages to the platform for storage.

9. A CAN message recording device with remotely configured acquisition frequency, characterized in that: The CAN message recording device for remotely configuring the collection frequency includes: a memory, a processor, and a CAN message recording program for remotely configuring the collection frequency stored in the memory and executable on the processor. When the CAN message recording program for remotely configuring the collection frequency is executed by the processor, the steps of the CAN message recording method for remotely configuring the collection frequency as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a CAN message recording program for remotely configuring the acquisition frequency. When the CAN message recording program for remotely configuring the acquisition frequency is executed by the processor, the steps of the CAN message recording method for remotely configuring the acquisition frequency as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Synchronous serial interface signal sensor data acquisition device

    CN102866979A

  • User-configurable vehicle acceleration data collecting method

    CN109947020A

  • Lossless CAN data transmission method and device thereof

    CN111641635A

  • 4G / 5G wireless transmission method for vehicle-mounted maintenance terminal of urban rail vehicle

    CN114338775A

  • Long -range collection system of electronic electric energy meter electric flux

    CN207233184U