DBC file generation method and device
Through automated DBC file generation methods and devices, DBC files are generated based on gateway forwarding tables, which solves the problems of low manual efficiency and poor file reliability in the prior art, and realizes efficient and accurate DBC file generation.
Patent Information
- Application Number
- CN202411997396.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, DBC files need to be produced manually based on the gateway forwarding test before the forwarding test of the vehicle gateway, which is inefficient and prone to file problems.
A DBC file generation method and device are provided, which determines the target file path and data conversion expectation mapping through user operations, reads the target file data in blocks using data flow methods, and converts it in multiple processes to finally generate a DBC file.
Improves the efficiency and accuracy of DBC file generation, reduces manual intervention, and enhances the reliability of files.
Smart Images

Figure CN120011309A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle information processing, and in particular to a DBC file generation method and device. Background Art
[0002] As the number of automobile functions increases and the configuration becomes more diverse, the number and functions of ECUs on the vehicle also increase, and the number of messages forwarded between ECUs through the vehicle gateway also increases. In order to ensure the normal forwarding function of the vehicle gateway, additional forwarding tests need to be performed on the vehicle gateway before the vehicle is offline. Before forwarding tests are performed on the vehicle gateway, corresponding DBC (Database CAN) files need to be created based on the gateway forwarding table.
[0003] DBC file is a standard format file used to describe the CAN communication protocol. DBC file is used in automobiles and can be used for communication between different ECUs. In related technologies, DBC files are mainly produced manually based on gateway forwarding tables, which is not only inefficient, but also easy to cause some problems in DBC files. Summary of the invention
[0004] In view of this, the present application provides a DBC file generation method and device, which can improve the conversion efficiency of generating DBC files and improve the reliability of DBC files.
[0005] In a first aspect, an embodiment of the present invention provides a method for generating a DBC file, comprising:
[0006] According to the user's first operation, determine the target file path;
[0007] According to the target file path, the target file data is read in blocks using a data stream method;
[0008] Determining a data conversion expected mapping according to a second operation of the user;
[0009] According to the data conversion expected mapping, the read target file data is converted to obtain a DBC file.
[0010] In some embodiments, determining the target file path according to the first operation of the user includes:
[0011] Displaying a front-end interactive interface, wherein the front-end interactive interface includes function options for selecting a target file;
[0012] In response to a first operation of the user on the function option, an access path of the gateway forwarding table selected by the first operation is determined as the target file path.
[0013] In some embodiments, the step of reading the target file data in blocks in a data stream manner according to the target file path includes:
[0014] Sending the target file path to the created data stream, and having the data stream read the target file data according to the target file path;
[0015] The target file data is read in blocks from the data stream until all the target file data is read.
[0016] In some embodiments, when reading a single target file data block from the data stream, the method further includes:
[0017] Read the last line of data of the previous target file data block from the buffer;
[0018] Merge the last line of data of the previous target file data block with the current target file data block read from the data stream;
[0019] The last row of data of the merged target file data block is stored in the buffer for merging with the next target file data block.
[0020] In some embodiments, determining the data conversion expected mapping according to the second operation of the user includes:
[0021] After the target file data is read, a front-end interactive interface is displayed, wherein the front-end interactive interface includes optional header fields and optional export network segments about the gateway forwarding table, wherein each optional export network segment corresponds to a DBC file;
[0022] In response to a second operation by a user on the optional header field and the optional derived network segment, the data conversion expected mapping is determined according to the field selected by the second operation.
[0023] In some embodiments, converting the read target file data according to the data conversion expected mapping to obtain a DBC file includes:
[0024] The read target file data is split, wherein the split target file data is converted in multiple processes; wherein each conversion process includes:
[0025] Perform error detection on the split current target file data;
[0026] If no error is detected in the split current target file data, the current target file data is converted into a message data structure;
[0027] According to the data conversion expectation mapping, the target file data of the message data structure is converted to obtain a DBC file;
[0028] If an error is detected in the split target file data, a problem list is returned.
[0029] In a second aspect, an embodiment of the present invention provides a DBC file generation device, including:
[0030] The front-end interaction module is used to determine the target file path according to the user's first operation;
[0031] A file reading and writing module is used to read the target file data in blocks using a data stream method according to the target file path;
[0032] The front-end interaction module is further used to determine the expected mapping of data conversion according to the second operation of the user;
[0033] The data conversion module is used to convert the read target file data according to the data conversion expected mapping to obtain a DBC file.
[0034] In some embodiments, the apparatus further comprises:
[0035] Data stream module, used to create data streams;
[0036] The file reading and writing module is specifically used to send the target file path to the created data stream, and the data stream reads the target file data according to the target file path; and reads the target file data in blocks from the data stream until all the target file data are read.
[0037] In some embodiments, the apparatus further comprises: a buffer module;
[0038] The buffer module is used to store the last line of data of the previous target file data block;
[0039] The file reading and writing module is specifically used to read the last line of data of the previous target file data block from the buffer module; merge the last line of data of the previous target file data block with the current target file data block read from the data stream; store the last line of data of the merged target file data block into the buffer module for merging with the next target file data block.
[0040] In some embodiments, the apparatus further comprises:
[0041] The data splitting module is used to split the read target file data to obtain a plurality of split data; wherein the plurality of split data are converted in a plurality of processes; wherein each conversion process includes:
[0042] An error detection module is used to perform error detection on the current split data; in response to errors detected in the current split data, a problem list is returned to the data split module, and the problem list is returned to the file reading and writing module through the data split module;
[0043] a structuring module, in response to the error detection module detecting no error in the current split data, converting the current split data into a message data structure;
[0044] The data conversion module is used to convert the data of the message data structure according to the data conversion expected mapping to obtain a conversion result, and the conversion result is returned to the file reading and writing module via the structuring module, the error detection module and the data splitting module;
[0045] The file reading and writing module is used to merge the conversion results and the question list. If the question list is empty, a DBC file is generated according to the conversion results; if the question list is not empty, the question list is displayed in the front-end interaction module.
[0046] In a third aspect, the present invention provides a DBC file generation device, comprising: a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the DBC file generation device executes the method described in the first aspect or any one of the first aspects.
[0047] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the method described in the first aspect or any one of the first aspects.
[0048] The method and device of the embodiment of the present invention can automatically convert and generate a DBC file based on a gateway forwarding table, thereby improving the generation efficiency and accuracy of the DBC file. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A flowchart of a DBC file generation method provided by an embodiment of the present invention;
[0050] Figure 2 A schematic diagram of the structure of a DBC file generation device provided by an embodiment of the present invention;
[0051] Figure 3 A flow chart for determining a target file path provided by an embodiment of the present invention;
[0052] Figure 4 A schematic diagram of selecting a target file in a front-end interactive interface provided by an embodiment of the present invention;
[0053] Figure 5 A flowchart of reading target file data provided by an embodiment of the present invention;
[0054] Figure 6 A flowchart of a user-defined data conversion expected mapping provided by an embodiment of the present invention;
[0055] Figure 7 An interface diagram of a user-defined data conversion expected mapping provided by an embodiment of the present invention;
[0056] Figure 8 A flowchart of converting target file data to generate a DBC file provided by an embodiment of the present invention;
[0057] Fig. 9 A flowchart of providing feedback of conversion results to a user provided by an embodiment of the present invention;
[0058] Fig.10 An interface diagram for downloading a DBC file provided by an embodiment of the present invention;
[0059] Fig.11 An interface diagram of a pop-up window showing a question provided by an embodiment of the present invention;
[0060] Fig.12 A structural schematic diagram of a DBC file generation device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0062] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0063] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0064] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0065] The embodiment of the present invention provides a DBC file generation tool, which can execute a DBC file generation method, can automatically convert and generate a DBC file based on a gateway forwarding table, and improve the generation efficiency and accuracy of the DBC file.
[0066] See also Figure 1 , is a flow chart of a DBC file generation method provided by an embodiment of the present invention. Figure 1 As shown, the processing steps of the method include:
[0067] 101. Determine a target file path according to a first operation of the user.
[0068] The DBC file generation tool may display a front-end interactive interface, which includes function options for selecting a target file. In response to a user's first operation on the function option, the access path of the gateway forwarding table selected by the first operation is determined as the target file path.
[0069] 102, according to the target file path, read the target file data in blocks using a data stream method.
[0070] In order to save memory overhead and improve data reading efficiency, the embodiment of the present invention adopts a data stream method to read the target file data in blocks. Specifically, the target file path can be sent to the created data stream, and the data stream reads the target file data according to the target file path, and then reads the target file data in blocks from the data stream until all the target file data is read.
[0071] In order to adapt to the streaming data reading method, the embodiment of the present invention adds buffer management to process data rows across memory blocks. Specifically, the data block currently read from the data stream is called the current target file data block. When reading the current target file data block from the data stream, the last line of data of the previous target file data block is also read from the buffer. The last line of data of the previous target file data block is merged with the current target file data block, and then the last line of data of the merged target file data block is stored in the buffer for merging with the next target file data block.
[0072] In an embodiment of the present invention, the last line of data of the previous target file data block is merged with the current target file data block, mainly merging the last line of data of the previous target file data block with the first line of data of the current target file data block. In this way, the situation in which one piece of data is split into two pieces of data due to data segmentation can be prevented.
[0073] In the embodiment of the present invention, after the merged data is obtained, each piece of data in the merged data is traversed, and redundant data is removed before storage. After the above operation is performed on each data block in the data stream, all target file data is obtained.
[0074] 103. Determine expected data conversion mapping according to a second operation of the user.
[0075] In the embodiment of the present invention, after all target file data are acquired, a front-end interactive interface is displayed. The front-end interactive interface includes optional header fields and optional export network segments about the forwarding table, and each optional export network segment generates a DBC file correspondingly. In response to the user's second operation on the header optional fields and the optional export network segments, the data conversion expected mapping is determined according to the fields selected by the second operation.
[0076] 104 , convert the read target file data according to the data conversion expected mapping to obtain a DBC file.
[0077] The conversion of the target file data to obtain a DBC file includes: splitting the read target file data to obtain a number of split data; wherein the several split data are converted in multiple processes; wherein each conversion process includes: error detection on the current split data; if no error is detected for the current split data, converting the current split data into a message data structure; according to the data conversion expected mapping, converting the data of the message data structure and returning the conversion result; if an error is detected for the current split data, returning a list of questions. After obtaining the conversion results and the list of questions for each split data, merge the conversion results and the list of questions, wherein if the list of questions is empty, generate a DBC file according to the conversion result; if the list of questions is not empty, display the list of questions.
[0078] The method of the embodiment of the present invention can automatically convert and generate a DBC file based on a gateway forwarding table, thereby improving the generation efficiency and accuracy of the DBC file.
[0079] Corresponding to the above-mentioned DBC file generation method, an embodiment of the present invention provides a DBC file generation device. Figure 2 As shown, the device includes: a front-end interaction module, a file reading and writing module and a data conversion module.
[0080] The front-end interaction module is used to determine the target file path according to the user's first operation.
[0081] The file reading and writing module is used to read the target file data in blocks using a data stream method according to the target file path.
[0082] The front-end interaction module is also used to determine the expected mapping of data conversion according to the user's second operation.
[0083] The data conversion module is used to convert the read target file data according to the data conversion expected mapping to obtain a DBC file.
[0084] The following will be combined Figure 3-Figure 11 The DBC file generation device of the embodiment of the present invention is described in detail. The DBC file generation device includes a front-end interaction module, a file reading and writing module, and a data conversion module, and further includes a data stream, a buffer, a data splitting module, an error detection module, a structuring module, and a data conversion module.
[0085] like Figure 3 As shown in the figure, the specific process of determining the target file path includes:
[0086] 201, the front-end interaction module displays a front-end interaction interface, which includes function options for selecting a target file.
[0087] 202, the user initiates the DBC file conversion process in the front-end interactive interface.
[0088] 203. The front-end interactive interface displays a file selection box.
[0089] 204 , the user selects a gateway forwarding table through the file selection box, and sends the access path of the gateway forwarding table as the target file path to the front-end interaction module.
[0090] 205. The front-end interaction module sends the target file path to the file reading and writing module.
[0091] like Figure 4 As shown, the user can jump to the interface for selecting the gateway forwarding table in the front-end interactive interface, and select the gateway forwarding table as the target file, and the access path of the target file is the target file path. The front-end interactive module sends the target file path to the file reading and writing module, and the file reading and writing module combines the data stream and the buffer to read the target file data.
[0092] like Figure 5 As shown, the file reading and writing module reads the target file data in blocks using a data stream method according to the target file path, including:
[0093] 301, after obtaining the target file path, the file reading and writing module sends the target file path to the data stream, and the data stream reads the target file data according to the target file path.
[0094] After the relevant data stream is created, the data stream is split into multiple target file data blocks, and each target file data block is transmitted to the file reading and writing module. The process of the file reading and writing module reading a single target file data block can be referred to in steps 302-306.
[0095] 302, the file reading and writing module reads a single target file data block.
[0096] 303, the file reading and writing module obtains the last line of data of the previous target file data block from the buffer.
[0097] 304, the file reading and writing module merges the current single target file data block with the last line of data of the previous target file data block.
[0098] 305, the file reading and writing module pops the last piece of data of the merged data into the buffer for caching in the buffer to prepare for reading the next target file data block.
[0099] In the related art, when reading data, the entire file content is usually directly written into the memory and then read, which results in a relatively large memory overhead. In order to solve this problem, the embodiment of the present invention adopts a data stream method to read the file when reading the target file, directly processes the data in the data stream, and only temporarily stores a certain piece of data in the memory each time it is read, which greatly reduces the memory overhead and improves the reading efficiency.
[0100] In order to adapt to the data streaming file reading method, the embodiment of the present invention also adds buffer management to process data rows across memory blocks. By setting the buffer, it is possible to prevent a data piece from being split into two pieces due to data segmentation.
[0101] 306, after obtaining the merged data, the file reading and writing module traverses each piece of data therein, removes redundant data, and then stores it.
[0102] In the embodiment of the present invention, after performing the above operations on each target file data block in the data stream, the file reading and writing module integrates all the stored data and sends the optional header in the data to the front-end interaction module for the user to customize the desired data conversion mapping. After completing the target file data reading, the life cycle of the data stream and buffer module ends.
[0103] like Figure 6 As shown, the user defines the expected data conversion mapping, including:
[0104] 401, the front-end interaction module displays the front-end interaction interface, which includes a table header selection box. Figure 7 As shown in the figure, the header selection box contains optional header fields and optional export network segments related to the forwarding table. Each optional export network segment corresponds to a DBC file. Figure 7 As shown, the optional fields of the header about the forwarding table in the header selection box include, for example: source network segment, identifier, cycle, sender light; the exported network segment includes, for example: T-CAN, P-CAN, C-CAN, A-CAN, B-CAN, E-CAN, etc.
[0105] 402. The front-end interaction module determines a target header according to the user's selection operation on the header selection box.
[0106] 403, the front-end interaction module sends the data conversion expected mapping to the file reading and writing module according to the target header.
[0107] 404, the file reading and writing module sends the target file data and the data conversion expected mapping to the data splitting module, so that subsequent modules can split and convert the target file data.
[0108] like Figure 8 As shown, the read target file data is converted to obtain a DBC file including:
[0109] 501, a data splitting module splits the target file data to obtain a plurality of split data.
[0110] 502, the data splitting module sends each split data to the error detection module.
[0111] In the embodiment of the present invention, a number of split data may be converted in parallel in multiple processes; wherein each conversion process is shown as steps 503-508.
[0112] 503, the error detection module performs error detection on the split data.
[0113] In step 503, the error detection module performs error detection on the split data. If an error is detected, no data conversion is performed and step 508 is executed; if no error is detected, the split data after error detection is sent to the structuring module, and steps 504-507 are executed.
[0114] 504, the structuring module converts the current split data into a message data structure.
[0115] 505, the structuring module sends the data converted into the message data structure to the data conversion module.
[0116] 506. The data conversion module converts the data of the message data structure.
[0117] 507, the conversion result is returned to the data splitting module via the structuring module and the error detection module.
[0118] 508. The error detection module returns a problem list to the data splitting module.
[0119] 509, the data splitting module merges the conversion results of each process with the problem list.
[0120] 510, the data splitting module returns the conversion result and the problem list to the file reading and writing module.
[0121] In order to improve conversion efficiency and adapt to large file processing, the embodiment of the present invention splits the target file data before converting the target file data, and performs multi-process conversion on each split data after the split, thereby improving the conversion efficiency.
[0122] According to the embodiment of the present invention, the split data is structured before being converted, which can increase the code reuse rate, robustness and reliability.
[0123] like Fig. 9 As shown, the file reading and writing module feeds back the conversion results to the user through the front-end interaction module, including:
[0124] If the list of questions fed back by the data splitting module to the file reading and writing module is empty, the file reading and writing module executes steps 601-603; if the list of questions fed back by the data splitting module to the file reading and writing module is not empty, the file reading and writing module executes step 604.
[0125] 601, the file reading and writing module writes each network segment data into a DBC file and packages it according to the data conversion expected mapping.
[0126] 602, the file reading and writing module returns the DBC file to the front-end interaction module.
[0127] 603, the front-end interaction module displays a DBC file download pop-up window for the user to download the DBC file.
[0128] 604, the file reading and writing module returns the question list to the front-end interaction module.
[0129] 605, the front-end interactive module displays a pop-up window of the question for the user to refer to for suggestions on correcting the gateway forwarding table.
[0130] like Fig.10 As shown, if the question list is empty, the front-end interactive module displays a DBC file download pop-up window for the user to download the DBC file.
[0131] like Fig.11 As shown, if the question list is not empty, the front-end interactive module displays a question pop-up window for the user to use as a reference for suggestions on correcting the gateway forwarding table.
[0132] It can be seen from the above analysis that the embodiment of the present invention combines buffer management with streaming data reading, which can greatly reduce memory overhead and adapt to large file processing.
[0133] The embodiments of the present invention support dynamic adjustment of data conversion mapping rules, thereby improving robustness under abnormal situations and format changes.
[0134] The embodiment of the present invention adopts a multi-process parallel conversion method, splits the target file data, and converts the data in parallel through multiple processes, thereby improving data conversion efficiency.
[0135] The embodiment of the present invention has an error detection function during the conversion process. If an error is detected during the data conversion process, the error information will be prompted.
[0136] Furthermore, the embodiment of the present invention also provides a DBC file generation device. Fig.12 As shown, the DBC file generating device 700 includes: a processor 701, a memory 702 and a communication unit 703. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the DBC file generating device shown in the figure does not constitute a limitation on the embodiment of the present application. It can be a bus structure or a star structure, and can also include more or less components than shown in the figure, or combine some components, or arrange the components differently.
[0137] The communication unit 703 is used to establish a communication channel so that the DBC file generation device can communicate with other devices, receive user data sent by other devices or send user data to other devices.
[0138] The processor 701 is the control center of the DBC file generation device. It uses various interfaces and lines to connect various parts of the entire device. It runs or executes software programs, instructions, and / or modules stored in the memory 702, and calls data stored in the memory to perform various functions of the DBC file generation device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 701 can include a central processing unit (CPU), a microcontroller unit (MCU), etc.
[0139] The memory 702 is used to store the execution instructions of the processor 701. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 702 are executed by the processor 701, the DBC file generation device 700 can execute the DBC file generation method in the embodiment of the present invention.
[0140] In a specific implementation, the present application also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all steps of the DBC file generation method provided by the present application. The storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0141] In a specific implementation, the present application also provides a computer program product, wherein the computer program product includes executable instructions, and when the executable instructions are executed on a computer, the computer executes part or all of the steps of the DBC file generation method provided by the present application.
[0142] The embodiment of the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable the computer to execute the DBC file generation method provided in the embodiment of the present application.
[0143] The above-mentioned non-temporary computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (Read Only Memory; hereinafter referred to as: ROM), an erasable programmable read-only memory (ErasableProgrammable Read Only Memory; hereinafter referred to as: EPROM) or flash memory, optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0144] Those skilled in the art can clearly understand that the technology in the embodiments of the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0145] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
Claims
1. A DBC file generation method, characterized in that: include: According to the user's first operation, determine the target file path; According to the target file path, the target file data is read in blocks using a data stream method; Determining a data conversion expected mapping according to a second operation of the user; According to the data conversion expected mapping, the read target file data is converted to obtain a DBC file.
2. The method according to claim 1, characterized in that: The step of determining the target file path according to the first operation of the user includes: Displaying a front-end interactive interface, wherein the front-end interactive interface includes function options for selecting a target file; In response to a first operation of the user on the function option, an access path of the gateway forwarding table selected by the first operation is determined as the target file path.
3. The method according to claim 1, characterized in that: The method of reading the target file data in blocks in a data stream manner according to the target file path includes: Sending the target file path to the created data stream, and having the data stream read the target file data according to the target file path; The target file data is read in blocks from the data stream until all the target file data is read.
4. The method according to claim 3, characterized in that When reading a single target file data block from the data stream, the method further includes: Read the last line of data of the previous target file data block from the buffer; Merge the last line of data of the previous target file data block with the current target file data block read from the data stream; The last row of data of the merged target file data block is stored in the buffer for merging with the next target file data block.
5. The method according to claim 1, characterized in that The step of determining the expected data conversion mapping according to the second operation of the user includes: After the target file data is read, a front-end interactive interface is displayed, wherein the front-end interactive interface includes optional header fields and optional export network segments about the gateway forwarding table, wherein each optional export network segment corresponds to a DBC file; In response to a second operation by a user on the optional header field and the optional derived network segment, the data conversion expected mapping is determined according to the field selected by the second operation.
6. The method according to claim 1, characterized in that The step of converting the read target file data according to the data conversion expected mapping to obtain a DBC file includes: The read target file data is split to obtain a plurality of split data; wherein the plurality of split data are converted in a plurality of processes; wherein each conversion process includes: Perform error detection on the current split data; If no error is detected in the current split data, the current split data is converted into a message data structure; according to the data conversion expected mapping, the data of the message data structure is converted, and the conversion result is returned; If an error is detected for the current split data, the problem list is returned; Merge each conversion result and question list. If the question list is empty, generate a DBC file based on the conversion result; if the question list is not empty, display the question list.
7. A DBC file generation device, characterized in that: include: The front-end interaction module is used to determine the target file path according to the user's first operation; A file reading and writing module is used to read the target file data in blocks using a data stream method according to the target file path; The front-end interaction module is further used to determine the expected mapping of data conversion according to the second operation of the user; The data conversion module is used to convert the read target file data according to the data conversion expected mapping to obtain a DBC file.
8. The device according to claim 7, characterized in that The device also includes: Data stream module, used to create data streams; The file reading and writing module is specifically used to send the target file path to the created data stream, and the data stream reads the target file data according to the target file path; and reads the target file data in blocks from the data stream until all the target file data are read.
9. The device according to claim 8, characterized in that The device further comprises: a buffer module; The buffer module is used to store the last line of data of the previous target file data block; The file reading and writing module is specifically used to read the last line of data of the previous target file data block from the buffer module; merge the last line of data of the previous target file data block with the current target file data block read from the data stream; store the last line of data of the merged target file data block into the buffer module for merging with the next target file data block.
10. The device according to claim 7, characterized in that The device also includes: The data splitting module is used to split the read target file data to obtain a plurality of split data; wherein the plurality of split data are converted in a plurality of processes; wherein each conversion process includes: An error detection module is used to perform error detection on the current split data; in response to errors detected in the current split data, a problem list is returned to the data split module, and the problem list is returned to the file reading and writing module through the data split module; a structuring module, in response to the error detection module detecting no error in the current split data, converting the current split data into a message data structure; The data conversion module is used to convert the data of the message data structure according to the data conversion expected mapping to obtain a conversion result, and the conversion result is returned to the file reading and writing module via the structuring module, the error detection module and the data splitting module; The file reading and writing module is used to merge the conversion results and the question list. If the question list is empty, a DBC file is generated according to the conversion results; if the question list is not empty, the question list is displayed in the front-end interaction module.
11. A DBC file generation device, characterized in that: include: A memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the DBC file generating device executes the method according to any one of claims 1 to 6.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.