A bus data acquisition method, device, equipment and medium
By automatically determining the target input/output channels and baud rate of the CAN analyzer, intelligent bus data acquisition is achieved without the need for manual parameter setting, solving the problem of low intelligence in existing technologies and improving the convenience and accuracy of data acquisition.
Patent Information
- Application Number
- CN202310441395.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2043-04-14
AI Technical Summary
Existing CAN analyzers require manual setting of multiple parameters before data acquisition, resulting in low intelligence, a high barrier to entry, and a high risk of errors.
By automatically determining the target input/output channels and target baud rate, intelligent bus data acquisition is achieved without the need for manual parameter setting, including monitoring channel signals, determining baud rate priority, acquiring bus data, and encrypting and storing it.
It lowers the technical requirements for users, improves the intelligence of data collection, reduces manual operation steps, and ensures the accuracy and security of data collection.
Smart Images

Figure CN116488954B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a bus data acquisition method, device, equipment and medium. BACKGROUND
[0002] The CAN analyzer products on the market need manual parameter setting before data acquisition, there are many types of parameters and many steps, the intelligent degree is not high, there are certain technical requirements for users, the threshold is high, and the experience is poor. Moreover, if the parameters are set incorrectly or unreasonably, the product may not be used normally.
[0003] In summary, how to more intelligently acquire bus data to reduce manual participation is a problem to be solved at present. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a bus data acquisition method, device, equipment and medium, which can more intelligently acquire bus data to reduce manual participation. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a bus data acquisition method, comprising:
[0006] determining a target input-output channel with data;
[0007] determining a target baud rate of the target input-output channel, so as to acquire bus data from the target input-output channel at the target baud rate.
[0008] Optionally, the determining of the target input-output channel with data comprises:
[0009] acquiring all input-output channels and monitoring whether a target signal exists in each input-output channel;
[0010] If the target signal exists, it is determined that data exists in the input-output channel, and the input-output channel is taken as the target input-output channel.
[0011] Optionally, the determining of the target baud rate of the target input-output channel comprises:
[0012] acquiring all value information of the baud rate and determining a baud rate priority in the value information;
[0013] communicating the baud rates with different values with the target input-output channel in turn according to the baud rate priority, and if bus data in the target input-output channel is acquired, the current baud rate is determined as the target baud rate of the target input-output channel.
[0014] Optionally, acquiring bus data from the target input / output channel includes:
[0015] Determine a preset acquisition time, and acquire bus data from the target input / output channel within the acquisition time.
[0016] Optionally, acquiring bus data from the target input / output channel includes:
[0017] Determine the pre-set number of channels to be acquired, and simultaneously acquire bus data from the corresponding number of target input / output channels based on the number of channels to be acquired.
[0018] Optionally, the process of acquiring bus data from the target input / output channel further includes:
[0019] The vehicle identification number (VIN) of the vehicle is read using target diagnostic software so that the bus data can be stored based on the VIN.
[0020] Optionally, after acquiring bus data from the target input / output channel, the method further includes:
[0021] The bus data is encrypted, and the encrypted bus data is stored locally.
[0022] Under preset conditions, the bus data is uploaded to the backend server.
[0023] Secondly, this application discloses a bus data acquisition device, comprising:
[0024] The channel determination module is used to determine the target input / output channels where data exists;
[0025] A baud rate determination module is used to determine the target baud rate of the target input / output channel;
[0026] The data acquisition module is used to acquire bus data from the target input / output channel at the target baud rate.
[0027] Thirdly, this application discloses an electronic device, including:
[0028] Memory, used to store computer programs;
[0029] A processor is used to execute the computer program to implement the steps of the aforementioned disclosed bus data acquisition method.
[0030] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed bus data acquisition method.
[0031] It can be seen that the application determines the target input / output channel in which data exists, determines the target baud rate of the target input / output channel, and collects bus data from the target input / output channel at the target baud rate. Thus, the application first determines which input / output channels have data and regards them as target input / output channels, and then determines the target baud rate of the target input / output channel to automatically collect bus data from the target input / output channel at the target baud rate. Through the above technical solution, bus data can be collected more intelligently without manual parameter setting. BRIEF DESCRIPTION OF DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of the provided drawings.
[0033] Figure 1 A bus data collection method flow chart disclosed by the present application;
[0034] Figure 2 A specific bus data collection method flow chart disclosed by the present application;
[0035] Figure 3 A specific bus data collection flow chart disclosed by the present application;
[0036] Figure 4 A schematic diagram of a CAN analyzer disclosed by the present application;
[0037] Figure 5 A bus data collection device structure schematic diagram disclosed by the present application;
[0038] Figure 6 An electronic device structure diagram disclosed by the present application. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present application.
[0040] The CAN analyzer products on the market currently need manual setting of parameters before collecting data, the parameters are of many types and steps, the intelligent degree is not high, the users have certain technical requirements, the threshold is high, and the experience is poor. Moreover, if the parameters are set incorrectly or unreasonably, the product can not be normally used. Therefore, the embodiment of the present application discloses a bus data collection method, device, equipment and medium, which can collect bus data more intelligently to reduce manual participation.
[0041] Referring to Figure 1 The embodiment of the present application discloses a bus data collection method, which comprises:
[0042] Step S11: determining a target input-output channel with data.
[0043] In the embodiment, first of all, it needs to be pointed out that the bus data collection method disclosed by the present application can be applied to a CAN analyzer, that is, the CAN analyzer first determines which input-output channels (i.e., IO channels) have data, and takes them as target input-output channels.
[0044] Step S12: determining a target baud rate of the target input-output channel, so as to collect bus data from the target input-output channel at the target baud rate.
[0045] In the embodiment, after determining the target input-output channel with data, the baud rate of the target input-output channel is determined. It can be understood that the baud rate refers to the rate of data transmission in the communication channel, and the user can set the bus speed according to the specific needs of the CAN bus, that is, set the baud rate. Therefore, the embodiment of the present application needs to determine what the correct baud rate of a single target input-output channel is, so as to collect correct bus data therefrom, and then after determining the target baud rate, the CAN analyzer automatically collects bus data from the target input-output channel at the target baud rate, so as to realize intelligent collection of bus data. Moreover, the above process does not need manual setting of parameters, reduces the steps of manual operation, reduces the threshold of the user, and is convenient for ordinary users and maintenance technicians to use.
[0046] As can be seen, the present application determines a target input-output channel with data, determines a target baud rate of the target input-output channel, so as to collect bus data from the target input-output channel at the target baud rate. As can be seen, the present application first determines which input-output channels have data, and takes them as target input-output channels, and then determines the target baud rate of the target input-output channel, so as to automatically collect bus data from the target input-output channel at the target baud rate. Through the above technical solution, bus data can be collected more intelligently without manual setting of parameters.
[0047] Referring to Figure 2 and Figure 3 The embodiment of the application discloses a specific bus data acquisition method. Compared with the previous embodiment, the embodiment further describes and optimizes the technical solution. Specifically, it includes:
[0048] Step S21: All input and output channels are acquired, and whether there is a target signal in each input and output channel is monitored.
[0049] In this embodiment, first, a list of all possible input and output channels can be listed to acquire all input and output channels. The specific channel list can be 6-14, 3-11, 1-9, 2-10, 12-15, 12-13, 3-8, etc. Then, these input and output channels are traversed to monitor which channels have data. In the specific embodiment, whether the input and output channels have CAN protocol physical signals (ISO 11898 protocol standard) can be monitored.
[0050] Step S22: If there is, it is determined that there is data in the input and output channel, and the input and output channel is used as a target input and output channel.
[0051] In this embodiment, if there is a physical signal in the input and output channel, it can be determined that there is data in the input and output channel, and the input and output channel is used as a target input and output channel. In addition, the CAN analyzer can also name these target input and output channels with data, for example, CH1, CH2, CH3, etc., to facilitate subsequent data management and maintenance.
[0052] Step S23: All value information of the baud rate is acquired, and the baud rate priority in the value information is determined.
[0053] In this embodiment, first, all possible value information of the baud rate of the target input and output channel can be listed, for example: 5M, 2M, 1M, 500K, 250K, 125K, 100K, 75K, 50K, 25K, etc. The baud rate priority in the value information is determined. In general, the common 500K, 250K, 125K has a higher priority.
[0054] Step S24: The baud rates with different values are sequentially communicated with the target input and output channel according to the baud rate priority. If the bus data in the target input and output channel is acquired, the current baud rate is determined as the target baud rate of the target input and output channel.
[0055] In this embodiment, the different baud rates are sequentially communicated with the target input / output channel according to the baud rate priority, and if the bus data in the target input / output channel is acquired, the current baud rate is determined as the target baud rate of the target input / output channel, that is, the correct baud rate of the target input / output channel. For example, the baud rates of 500K, 250K and 125K are used to communicate with the channel, and if the data in the channel is acquired, it is indicated that the current baud rate is the correct target baud rate.
[0056] Step S25: determining a preset acquisition time under the target baud rate, and acquiring bus data from the target input / output channel within the acquisition time.
[0057] In this embodiment, the acquisition time is determined under the target baud rate, which can be controlled by itself or can be a default acquisition time, for example, 2 minutes. Then the bus data is acquired from the target input / output channel within the acquisition time.
[0058] Further, in the specific embodiment, the above-mentioned acquisition of bus data from the target input / output channel includes: determining a preset channel acquisition number, and simultaneously acquiring bus data from a corresponding number of target input / output channels based on the channel acquisition number. It can be understood that when acquiring bus data, data in a single input / output channel can be acquired at the same time, or data in multiple input / output channels can be acquired at the same time.
[0059] In addition, it should be noted that the above-mentioned process of acquiring bus data from the target input / output channel also includes: reading the vehicle identification code of the vehicle by using the target diagnostic software, so as to store the bus data based on the vehicle identification code. It can be understood that, as shown in Figure 4 The CAN analyzer in the embodiment of the application is integrated with vehicle model diagnosis, data acquisition and background management, so the vehicle identification code (i.e. VIN code) and other information of the vehicle can be read by using the standard OBD vehicle model diagnosis software when the bus data is acquired, so as to store the bus data based on the vehicle identification code, which is convenient for subsequent big data analysis and application. The vehicle identification code can be understood as the identity card number of the vehicle, which is determined according to the national vehicle management standard and contains information such as the production factory, brand, age, vehicle model, body type and code, engine code and assembly location of the vehicle. Therefore, when the bus data is stored, the corresponding vehicle identification code is also stored, which can improve the reusability of subsequent data and reduce the frequency of manual data acquisition on the vehicle, manpower and material resources. A single user can query and analyze big data according to the vehicle model, brand, year, VIN code and other information.
[0060] Step S26: encrypting the bus data, storing the encrypted bus data locally, and uploading the bus data to a background server under a preset condition.
[0061] In this embodiment, after the CAN analyzer collects data, the collected bus data is automatically saved in a local path, and is encrypted before being stored, so as to improve security. The user can export the bus data to a PC notebook or desktop through a diagnostic instrument and a U disk, and view or analyze the bus data through a tool. In addition, the bus data is uploaded to a background server for backup storage under a preset condition, so as to solve the problem that the collected bus data is stored locally and is easy to be lost. The preset condition can refer to a networked state, that is, the CAN analyzer automatically uploads the bus data to the background server for storage in the case of networking after collecting the bus data, so as to prevent the bus data from being lost. In this way, the user can view and analyze the bus data stored in the background server through a professional tool on other diagnostic instruments, notebook computers or desktop computers. Specifically, as shown in Figure 4 The CAN analyzer uploads the bus data to the background server for storage under the networking condition, so as to realize cloud backup.
[0062] It can be seen that in the embodiment of the application, whether there is data in the channel can be determined by monitoring whether there is a target signal in the input and output channel. When the target input and output channel is determined to have a correct baud rate, different values of the baud rate are sequentially communicated with the target input and output channel according to the baud rate priority. If data is obtained, the current baud rate is determined as the target baud rate of the target input and output channel, that is, the correct baud rate of the target input and output channel. When collecting bus data, the collection time of data and the number of channels that can be collected at the same time can be set, and the vehicle identification code and other information can be read by using diagnostic software, so as to store the bus data based on the vehicle identification code, and facilitate subsequent big data analysis and application. The CAN analyzer automatically saves the collected bus data in the local after encryption, and uploads the bus data to the background server for storage under the networking condition, so as to realize cloud backup and prevent data loss.
[0063] Referring to Figure 5 The bus data collection device disclosed in the embodiment of the application comprises:
[0064] The channel determination module 11 is configured to determine a target input and output channel in which data exists.
[0065] The baud rate determination module 12 is configured to determine a target baud rate of the target input and output channel.
[0066] The data collection module 13 is configured to collect bus data from the target input / output channel at the target baud rate.
[0067] It can be seen that the target input / output channel with data is determined, and the target baud rate of the target input / output channel is determined so as to collect bus data from the target input / output channel at the target baud rate. It can be seen that the input / output channel with data is determined as the target input / output channel, and the target baud rate of the target input / output channel is determined so as to automatically collect bus data from the target input / output channel at the target baud rate. Through the technical solution, bus data can be collected more intelligently without manual setting of parameters.
[0068] In some specific embodiments, the channel determination module 11 can specifically include:
[0069] The signal monitoring unit is configured to acquire all input / output channels and monitor whether a target signal exists in each input / output channel.
[0070] The determination unit is configured to determine that data exists in the input / output channel if the target signal exists, and determine the input / output channel as a target input / output channel.
[0071] In some specific embodiments, the baud rate determination module 12 can specifically include:
[0072] The priority determination unit is configured to acquire all value information of baud rates and determine a baud rate priority in the value information.
[0073] The communication unit is configured to sequentially communicate different value baud rates with the target input / output channel according to the baud rate priority, and determine a current baud rate as a target baud rate of the target input / output channel if bus data in the target input / output channel is acquired.
[0074] In some specific embodiments, the data collection module 13 can specifically include:
[0075] The time determination unit is configured to determine a pre-set collection time.
[0076] The first collection unit is configured to collect bus data from the target input / output channel within the collection time.
[0077] In some specific embodiments, the data collection module 13 can specifically include:
[0078] The channel number determination unit is configured to determine a pre-set channel collection number.
[0079] The second acquisition unit is configured to acquire bus data from the corresponding number of target input / output channels simultaneously based on the number of channels.
[0080] In some embodiments, the process of the data acquisition module 13 can further include:
[0081] The vehicle identification code reading unit is configured to read the vehicle identification code of the vehicle by using target diagnostic software, so as to store the bus data based on the vehicle identification code.
[0082] In some embodiments, the data acquisition module 13 can further include:
[0083] The encrypted storage unit is configured to encrypt the bus data and store the encrypted bus data locally.
[0084] The data uploading unit is configured to upload the bus data to a background server under a preset condition.
[0085] Figure 6 A structural schematic diagram of an electronic device is provided in the embodiments of the present application. Specifically, it can include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, and the processor 21 is configured to load and execute the computer program to implement the related steps in the bus data acquisition method performed by the electronic device according to any of the preceding embodiments.
[0086] In the embodiments, the power supply 23 is configured to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solutions of the present application, which is not limited in detail herein; the input / output interface 25 is configured to obtain external input data or output data to the outside world, and the specific interface type can be selected according to the specific application needs, which is not limited in detail herein.
[0087] The processor 21 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 21 can also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit), and the coprocessor being a low-power processor for processing data in a standby state. In some embodiments, the processor 21 can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing of content to be displayed by the display screen. In some embodiments, the processor 21 can further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
[0088] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon include an operating system 221, a computer program 222, and data 223, etc., and the storage mode can be temporary storage or permanent storage.
[0089] The operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222, so as to realize the operation and processing of the processor 21 on the mass data 223 in the memory 22, and can be Windows, Unix, Linux, etc. The computer program 222 can further include computer programs for completing other specific work in addition to the computer programs for completing the bus data acquisition method disclosed by the electronic device 20 in any of the preceding embodiments. The data 223 can include data received by the electronic device from an external device, as well as data collected by the self input / output interface 25, etc.
[0090] Further, the embodiments of the present application also disclose a computer readable storage medium, the storage medium storing a computer program, and the computer program is loaded and executed by the processor to realize the method steps executed in the bus data acquisition process disclosed in any of the preceding embodiments.
[0091] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0092] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0093] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0094] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0095] The bus data acquisition method, device, equipment and storage medium provided by the present application are described in detail above, and the principles and implementation manners of the present application are described by applying specific examples. The above example is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description should not be understood as a limitation of the present application.
Claims
1. A method of bus data acquisition, characterized by, Applied to a CAN analyzer, comprising: determining a target input-output channel with data; determining a target baud rate of the target input-output channel to collect bus data from the target input-output channel at the target baud rate; wherein the determining of the target baud rate of the target input-output channel comprises: obtaining all value information of baud rates and determining baud rate priorities in the value information; communicating baud rates with different values with the target input-output channel in turn according to the baud rate priorities, and if bus data in the target input-output channel is obtained, determining the current baud rate as the target baud rate of the target input-output channel; the collecting of bus data from the target input-output channel further comprises: reading a vehicle identification code of a vehicle by using target diagnostic software to store the bus data based on the vehicle identification code.
2. The bus data acquisition method of claim 1, wherein, the determining of the target input-output channel with data comprises: obtaining all input-output channels and monitoring whether target signals exist in each input-output channel; if yes, determining that data exist in the input-output channel and taking the input-output channel as the target input-output channel.
3. The bus data acquisition method of claim 1, wherein, the collecting of bus data from the target input-output channel comprises: determining a preset collection time and collecting bus data from the target input-output channel within the collection time.
4. The bus data acquisition method of claim 1, wherein the collecting of bus data from the target input-output channel comprises: determining a preset number of channel collections and collecting bus data from a corresponding number of target input-output channels simultaneously based on the number of channel collections.
5. The bus data acquisition method according to any one of claims 1 to 4, characterized in that, after the collecting of bus data from the target input-output channel, further comprising: encrypting the bus data and storing the encrypted bus data to a local; uploading the bus data to a background server under a preset condition.
6. A bus data acquisition device, characterized by Applied to a CAN analyzer, comprising: a channel determination module for determining a target input-output channel with data; a baud rate determination module for determining a target baud rate of the target input-output channel; a data collection module for collecting bus data from the target input-output channel at the target baud rate; the baud rate determination module specifically comprises: a priority determination unit for obtaining all value information of baud rates and determining baud rate priorities in the value information; a communication unit for communicating baud rates with different values with the target input-output channel in turn according to the baud rate priorities, and if bus data in the target input-output channel is obtained, determining the current baud rate as the target baud rate of the target input-output channel; the data collection module further comprises: a vehicle identification code reading unit for reading a vehicle identification code of a vehicle by using target diagnostic software to store the bus data based on the vehicle identification code.
7. An electronic device, comprising: comprising: a memory for saving a computer program; a processor for executing the computer program to realize steps of the bus data collection method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, A computer program product for storing a computer program; wherein the computer program, when executed by a processor, implements the steps of the bus data acquisition method according to any one of claims 1 to 5.
Citation Information
Patent Citations
WiFi module baud rate configuring method and system and WiFi module
CN108966251A
Baud rate acquiring method and device
CN109656172A