Form file processing method and device, computer equipment and storage medium

By obtaining the data types of information fields in the table file for cleaning and conversion, the inefficiency problem of importing the excel matrix file into the canoe tool is solved, automatic repair is achieved, and data processing efficiency and accuracy are improved.

CN119312779APending Publication Date: 2025-01-14CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411222514.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

When importing excel matrix files into the canoe tool, the existing technology encounters problems such as empty columns, empty rows, and inconsistent data types, resulting in low data processing efficiency and users need to actively search and modify.

Method used

By obtaining the data types of each information field in the table file, performing data cleaning, converting it to a DBC file, and running it in the canoe tool; when running an error, obtaining the error recognition results for repair, realizing automatic repair.

Benefits of technology

It improves the efficiency of data processing, reduces the steps of user manual modification, and improves the processing accuracy of table files and the ability to automatically repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312779A_ABST
    Figure CN119312779A_ABST
Patent Text Reader

Abstract

The invention relates to a form file processing method and device, computer equipment and a computer readable storage medium. The method comprises the steps of obtaining a to-be-processed form file used for recording communication matrix data, and obtaining data types corresponding to information fields in the form file; based on the data type, performing data cleaning processing on the communication matrix data contained in each information field to obtain a cleaned form file; converting the cleaned form file into a DBC file, inputting the DBC file into a canoe tool, running the DBC file through the canoe tool, and obtaining a running result of the DBC file; under the condition that the running result represents that the DBC file runs wrongly, an error recognition result of the DBC file is obtained, and the DBC file is repaired based on the error recognition result. By adopting the method, active repair of the form file can be realized, and a user does not need to actively search and modify the form file, so that the data processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a table file processing method, apparatus, computer equipment, computer-readable storage medium and computer program product. Background Art

[0002] With the development of computer technology, a technology has emerged that can run table files that record communication matrix data, namely Excel matrix files. By converting the Excel matrix file that records communication matrix data into a DBC file, and then importing the DBC file into the canoe tool, the canoe tool can execute the DBC file to run the communication signal.

[0003] In traditional technology, when an Excel matrix file is imported into the canoe tool for automatic execution, if there is a problem with the Excel matrix file, such as empty columns, empty rows, inconsistent data types in the same column, etc., the user is required to actively find and modify it. Therefore, in the existing table file processing method, the data processing efficiency is low. Summary of the invention

[0004] Based on this, it is necessary to provide a table file processing method, device, computer equipment, computer-readable storage medium and computer program product that can improve data processing efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a table file processing method, comprising:

[0006] Obtain a table file to be processed for recording communication matrix data, and obtain the data types corresponding to each information field in the table file;

[0007] Based on the data type, the communication matrix data contained in each of the information fields is cleansed to obtain a cleaned table file;

[0008] Convert the cleaned table file into a DBC file, input the DBC file into a canoe tool, run the DBC file through the canoe tool, and obtain the running result of the DBC file;

[0009] In the case where the operation result indicates that the DBC file has an operation error, an error recognition result of the DBC file is obtained, and a repair process is performed on the DBC file based on the error recognition result.

[0010] In one of the embodiments, based on the data type, data cleaning is performed on the communication matrix data contained in each of the information fields to obtain a cleaned table file, including: obtaining a current information field, and a data type of each communication matrix data contained in the current information field; the current information field is any information field in the table file; when the data type of any communication matrix data contained in the current information field does not match the data type of the current information field, the data type of the communication matrix data is converted into the data type of the current information field to obtain a table file after the data type conversion is completed; obtaining defective data in the table file after the data type conversion is completed, backfilling the defective data to obtain a table file after the backfilling processing; formatting each communication matrix data contained in the table file after the backfilling processing to obtain the cleaned table file.

[0011] In one of the embodiments, when the defective data is a single communication matrix data with defects, the backfilling processing of the defective data includes: obtaining a target information field corresponding to the defective data; obtaining a backfilling rule matching the target information field, and obtaining a data value corresponding to the defective data according to the backfilling rule; and backfilling the defective data according to the data value corresponding to the defective data.

[0012] In one of the embodiments, obtaining the data value corresponding to the defective data according to the backfill rule includes: when the backfill rule is the first backfill rule, obtaining the data value of the communication matrix data other than the defective data in the target information field; obtaining the data value corresponding to the defective data according to the data value of the communication matrix data other than the defective data; when the backfill rule is the second backfill rule, obtaining the first associated information field associated with the target information field, and obtaining the data value of the communication matrix data associated with the defective data in the first associated information field; and obtaining the data value corresponding to the defective data using the data value of the communication matrix data associated with the defective data in the first associated information field.

[0013] In one of the embodiments, when the defective data is a missing information field, the backfilling processing of the defective data includes: obtaining a second associated information field associated with the missing information field, and each communication matrix data contained in the second associated information field; obtaining the data value of each communication matrix data contained in the missing information field according to the data value of each communication matrix data contained in the second associated information field, and backfilling the data value of each communication matrix data contained in the missing information field.

[0014] In one of the embodiments, obtaining the data types corresponding to each information field in the table file includes: obtaining a pre-set dictionary; the dictionary records the correspondence between multiple information fields and data types; when the data type corresponding to the current information field is stored in the dictionary, the data type corresponding to the current information field stored in the dictionary is used as the data type corresponding to the current information field; the current information field is any information field in the table file; when the data type corresponding to the current information field is not stored in the dictionary, counting the number of data types of the communication matrix data contained in the current information field, and using the data type with the largest number as the data type corresponding to the current information field.

[0015] In one of the embodiments, each information field in the table file corresponds to a different table column in the table file; before obtaining the data type corresponding to each information field in the table file, it also includes: obtaining the header information of each table column in the table file; using the header information of each table column as each information field contained in the table file.

[0016] In one of the embodiments, the error recognition result is stored via an execution log of the DBC file; the repairing of the DBC file based on the error recognition result comprises: when pre-set keyword information is matched in the execution log, obtaining a repair method matching the keyword information from a pre-built database, and repairing the DBC file using the repair method matching the keyword information; when the pre-set keyword information is not matched in the execution log, obtaining error prompt information of the DBC file from the execution log; and repairing the DBC file using the error prompt information.

[0017] In one of the embodiments, the repairing the DBC file by using the error prompt information includes: when the repair method associated with the error prompt information is stored in the database, repairing the DBC file by using the repair method associated with the error prompt information; when the repair method associated with the error prompt information is not stored in the database, or when the DBC file still runs incorrectly after repairing the DBC file by using the repair method associated with the error prompt information, displaying the error prompt information; the error prompt information is used to instruct the user to repair the DBC file.

[0018] In a second aspect, the present application also provides a table file processing device, comprising:

[0019] A data type acquisition module is used to acquire a table file to be processed for recording communication matrix data, and to acquire the data types corresponding to each information field in the table file;

[0020] A table file cleaning module, used for performing data cleaning processing on the communication matrix data contained in each of the information fields based on the data type, to obtain a cleaned table file;

[0021] A DBC file running module, used for converting the cleaned table file into a DBC file, inputting the DBC file into a canoe tool, running the DBC file through the canoe tool, and obtaining the running result of the DBC file;

[0022] The DBC file repair module is used to obtain an error recognition result of the DBC file when the operation result indicates an operation error of the DBC file, and repair the DBC file based on the error recognition result.

[0023] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the embodiments of the first aspect when executing the computer program.

[0024] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect.

[0025] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect.

[0026] The above-mentioned table file processing method, device, computer equipment, computer-readable storage medium and computer program product obtain a table file to be processed for recording communication matrix data, and obtain the data type corresponding to each information field in the table file; based on the data type, the communication matrix data contained in each information field is cleaned to obtain a cleaned table file; the cleaned table file is converted into a DBC file, and the DBC file is input into a canoe tool, the DBC file is run through the canoe tool, and the operation result of the DBC file is obtained; when the operation result indicates that the DBC file has an operation error, the error recognition result of the DBC file is obtained, and the DBC file is repaired based on the error recognition result. The present application obtains the data type of each information field in the table file when processing the table file recording the communication matrix data, and then performs data cleaning based on the data type. After cleaning, the data is converted into a DBC file and input into the canoe tool for running. After obtaining the running result, if it is characterized by an operation error of the DBC file, the error recognition result of the DBC file can also be obtained and repaired. In this way, the communication matrix data in the table file can be cleaned before conversion to the DBC file, and the DBC file can be repaired based on the error recognition result when the DBC file runs incorrectly. In this way, active repair of the table file is achieved without the need for the user to actively search and modify it, thereby improving the efficiency of data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0028] FIG1 is a schematic diagram of a flow chart of a table file processing method in one embodiment;

[0029] FIG2 is a schematic diagram of a process for obtaining a cleaned table file in one embodiment;

[0030] FIG3 is a schematic diagram of a process of backfilling defective data in one embodiment;

[0031] FIG4 is a schematic diagram of a process for obtaining data types corresponding to each information field in one embodiment;

[0032] FIG5 is a schematic diagram of a process of repairing a DBC file in one embodiment;

[0033] FIG6 is a logic diagram of a program for converting byte streams of Excel to read data in one embodiment;

[0034] FIG7 is a block diagram of a table file processing device in one embodiment;

[0035] FIG. 8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0037] In one embodiment, as shown in FIG1 , a table file processing method is provided. This embodiment is illustrated by applying the method to a terminal. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0038] Step S101, obtaining a table file to be processed for recording communication matrix data, and obtaining the data types corresponding to each information field in the table file.

[0039] The table file refers to an Excel table file used to store communication matrix data, and the information field refers to the different data fields used to describe the communication data. For example, the communication matrix data can be a certain signal, then the information field can be the message ID corresponding to the signal, the name of the signal, and the description information of the signal, etc. The data type corresponding to each information field refers to the data type of the communication matrix data in each information field. For example, the information field can be a column in the table file, then the data type of the information field is the data type of a column of data in the table.

[0040] Specifically, after obtaining the table file that records the communication matrix data to be processed, the terminal can also obtain the data type corresponding to each information field in the table file.

[0041] Step S102, based on the data type, data cleaning is performed on the communication matrix data contained in each information field to obtain a cleaned table file.

[0042] The cleaned table file refers to the table file obtained after the communication matrix data is cleaned. The data cleaning method includes backfilling the defective data, such as correcting the erroneous data and supplementing the blank data, etc. In this embodiment, the communication matrix data contained in each information field can be cleaned based on the data type corresponding to each information field. For example, if one of the communication matrix data of an information field is missing, then when supplementing the blank data, the supplemented blank data also needs to meet the data type of the information field. Similarly, if one of the communication matrix data of an information field is erroneous data, then when correcting the erroneous data, the corrected data also needs to meet the data type of the information field.

[0043] Specifically, after obtaining the data types corresponding to each information field in the table file, the terminal can clean the communication matrix data contained in each information field based on the data types corresponding to each information field, thereby obtaining a cleaned table file.

[0044] Step S103, converting the cleaned table file into a DBC file, inputting the DBC file into a canoe tool, running the DBC file through the canoe tool, and obtaining the running result of the DBC file.

[0045] DBC file refers to Database for CAN file, which is a file used to describe the data format in the CAN network, and the canoe tool is a tool designed for developing, testing and analyzing the communication system of a single ECU and the entire ECU network. This tool can run DBC files to facilitate users to understand and parse the communication data in the CAN network for vehicle development, debugging and diagnosis.

[0046] Specifically, after obtaining the table file that records the communication matrix data after cleaning, the terminal can convert the table file into a DBC file format, input the DBC file into the canoe tool, and run the DBC file through the canoe tool to obtain the running result of the DBC file.

[0047] Step S104: when the operation result indicates that the DBC file is in error, an error recognition result of the DBC file is obtained, and the DBC file is repaired based on the error recognition result.

[0048] If there are errors in the DBC file, then the running results of the DBC file may also be erroneous. In this case, the terminal can also obtain the error recognition results of the DBC file, and repair the DBC file according to the error recognition results. For example, the error recognition result may be that the signal length of a certain signal is invalid. In this way, the terminal can correct the signal length of the signal, such as increasing the signal length or reducing the signal length, etc., and the DBC file can be repaired in this way.

[0049] In the above table file processing method, a table file for recording communication matrix data to be processed is obtained, and the data types corresponding to each information field in the table file are obtained; based on the data type, data cleaning processing is performed on the communication matrix data contained in each information field to obtain a cleaned table file; the cleaned table file is converted into a DBC file, and the DBC file is input into a canoe tool, and the DBC file is run through the canoe tool to obtain the running result of the DBC file; when the running result indicates that the DBC file has a running error, the error recognition result of the DBC file is obtained, and the DBC file is repaired based on the error recognition result. The present application obtains the data type of each information field in the table file when processing the table file recording the communication matrix data, and then performs data cleaning based on the data type. After cleaning, the data is converted into a DBC file and input into the canoe tool for running. After obtaining the running result, if it is characterized by an operation error of the DBC file, the error recognition result of the DBC file can also be obtained and repaired. In this way, the communication matrix data in the table file can be cleaned before conversion to the DBC file, and the DBC file can be repaired based on the error recognition result when the DBC file runs incorrectly. In this way, active repair of the table file is achieved without the need for the user to actively search and modify it, thereby improving the efficiency of data processing.

[0050] In one embodiment, as shown in FIG. 2 , step S102 may further include:

[0051] Step S201, obtaining the current information field and the data type of each communication matrix data contained in the current information field; the current information field is any information field in the table file;

[0052] Step S202, when the data type of any communication matrix data contained in the current information field does not match the data type of the current information field, the data type of the communication matrix data is converted into the data type of the current information field to obtain a table file after the data type conversion is completed.

[0053] The current information field refers to any one of the multiple information fields contained in the table file. In this embodiment, since the communication matrix data contained in the original table file may be erroneous, the data type of the communication matrix data contained in a certain information field may be different from the data type of the current information field. In this case, the terminal needs to convert the data type of the communication matrix data into the data type of the current information field to obtain the table file after the data type conversion is completed.

[0054] For example, the data type of an information field is a string type. If one of the communication matrix data contained in the information field is an integer type, the communication matrix data needs to be converted into a string. In this way, the data type of the communication matrix data contained in each information field in the table file can be unified, thereby obtaining a table file after the data type conversion is completed.

[0055] Step S203, obtaining defective data in the table file after the data type conversion is completed, backfilling the defective data, and obtaining a table file after the backfilling.

[0056] The defective data refers to the defective communication matrix data in the table file after the data type conversion is completed. The defective data can be erroneous data with errors or missing blank data. After the terminal completes the unification of the data type of the communication matrix data contained in each information field, it can also identify the defective data in the table file, thereby obtaining the table file after backfill processing.

[0057] Step S204, formatting the communication matrix data contained in the backfilled table file to obtain a cleaned table file.

[0058] After completing the backfill processing of the table file, the terminal can further format the communication matrix data contained in the backfilled table file to obtain the final cleaned table file.

[0059] In this embodiment, after obtaining the table file, the terminal can also perform data cleaning processing on the table file, wherein the cleaning process can include unifying the data type of the communication matrix data of the same information field, backfilling defective data, and formatting the communication matrix data, etc. In this way, automatic repair of the table file data can be achieved, thereby improving the accuracy of the table file.

[0060] Furthermore, in the case where the defective data is a single communication matrix data having a defect, as shown in FIG3 , step S203 may further include:

[0061] Step S301, obtaining the target information field corresponding to the defect data.

[0062] The target information field refers to the information field corresponding to the defective data. In this embodiment, the defective data may be a single communication matrix data defect. For example, if the communication matrix data in a cell in the table file is wrong, or if there is a blank cell in the table file, it can be indicated that the defective data is a single communication matrix data defect. At this time, if the defective data is a single communication matrix data defect, the terminal can determine the information field corresponding to the defective data as the target information field.

[0063] Step S302, obtaining a backfill rule that matches the target information field, and obtaining a data value corresponding to the defective data according to the backfill rule.

[0064] The backfill rule refers to the rule used to backfill defective data, and the backfill rule can be matched with the target information field. In this embodiment, the terminal can pre-store the matching relationship between various information fields and the corresponding backfill rules, so that after obtaining the target information field, the data value corresponding to the defective data can be obtained based on the backfill rule that matches the target information field.

[0065] Step S303: backfill the defective data using the data value corresponding to the defective data.

[0066] After obtaining the data value corresponding to the defective data, the data value can be backfilled. For example, when the defective data is identified, the cell information corresponding to the defective data can be recorded. The cell information can be the row and column information in the table file. After obtaining the data value, the terminal can fill the data value into the cell represented by the above cell information to complete the backfilling of the defective data.

[0067] In this embodiment, if the defective data refers to defects in a single communication matrix data, the terminal can obtain the data value of the defective data based on the backfill rule of the target information field corresponding to the defective data to achieve backfilling. In this way, the efficiency of correcting defective communication matrix data can be improved.

[0068] Furthermore, step S302 may further include: when the backfill rule is the first backfill rule, obtaining the data value of the communication matrix data other than the defective data in the target information field; obtaining the data value corresponding to the defective data based on the data value of the communication matrix data other than the defective data; when the backfill rule is the second backfill rule, obtaining the first associated information field associated with the target information field, and obtaining the data value of the communication matrix data associated with the defective data in the first associated information field; using the data value of the communication matrix data associated with the defective data in the first associated information field, obtaining the data value corresponding to the defective data.

[0069] In this embodiment, there are two backfill rules, namely the first backfill rule and the second backfill rule, wherein the first backfill rule refers to the rule of backfilling defective data using other communication matrix data in the same information field, and the second backfill rule refers to the rule of backfilling defective data using other information fields associated with the target information field, that is, the communication matrix data associated with the defective data in the first associated information field.

[0070] Specifically, if the backfill rule is the first backfill rule, the terminal can obtain the communication matrix data other than the defective data in the target information field, and use the data value of the communication matrix data other than the defective data to obtain the data value corresponding to the defective data. For example, if the target information field is the message ID field, the corresponding backfill rule can be the first backfill rule, then the terminal can use other message IDs in the message ID field to obtain the message ID as the defective data, that is, all message IDs in the message ID field can be sorted, and the value range of each ID can be traversed to calculate the missing message ID value and backfill.

[0071] If the backfill rule is the second backfill rule, the terminal can first determine the first associated information field associated with the target information field, and then use the data value of the communication matrix data associated with the defective data in the first associated information field, which can be the data value of the communication matrix data with the same number of rows as the defective data in the first associated information field, to calculate the data value corresponding to the defective data. For example, if the target information field is the precision field, the corresponding backfill rule can be the second backfill rule, then the terminal can use the first associated information field associated with the precision field, which can be the start bit field, the length field, and the offset field, etc., and use the data value of the communication matrix data associated with the defective data in the above fields, that is, the data value of the same number of rows as the defective data in the above fields, to obtain the data value corresponding to the defective data.

[0072] In this embodiment, the backfill rules may include a first backfill rule and a second backfill rule. If it is the first backfill rule, the data value of the defective data can be calculated using the data value of the communication matrix data other than the defective data in the target information field. If it is the second backfill rule, the data value of the defective data can be calculated using the data value of the communication matrix data associated with the defective data in the first associated information field. In this way, the backfill accuracy of the defective data can be improved.

[0073] In addition, in the case where the defective data is a missing information field, step S203 may further include: obtaining a second associated information field associated with the missing information field, and each communication matrix data contained in the second associated information field; obtaining the data value of each communication matrix data contained in the missing information field according to the data value of each communication matrix data contained in the second associated information field, and backfilling the data value of each communication matrix data contained in the missing information field.

[0074] In this embodiment, defective data may also refer to a lack of one of the information fields in the table file, and the second associated information field refers to other information fields associated with the missing information field. In this embodiment, the table file may be a table file that lacks a certain necessary information field, for example, all the information fields required for the table file may be defined in a preset dictionary, and then the information fields in the table file may be traversed to identify whether there is a missing information field. If so, the terminal may consider that the defective data refers to a missing information field in the table file.

[0075] In this case, the terminal can first determine the second associated information field associated with the missing information field, and each communication matrix data contained in the second associated information field, and then use the data value of each communication matrix data to obtain the data value of each communication matrix data contained in the missing information field, so as to backfill the above data value. For example, if the missing information field is the signal description information field, the terminal can obtain the data value of each communication matrix data contained in the missing information field by calling the Python third-party library Polyglot to translate the data value of each communication matrix data contained in the signal name field based on the second associated information field associated with it, which can be the signal name field.

[0076] In this embodiment, if the defective data refers to the missing of an information field in the table file, the terminal can obtain the data value of each communication matrix data contained in the missing information field through the data value of each communication matrix data contained in the second associated information field associated with the missing information field, and then backfill it. In this way, the backfilling of the missing information field is achieved, and the accuracy of the table file is further improved.

[0077] In one embodiment, as shown in FIG. 4 , step S101 may further include:

[0078] Step S401, obtaining a preset dictionary; the dictionary records the correspondence between various information fields and data types;

[0079] Step S402, when the data type corresponding to the current information field is stored in the dictionary, the data type corresponding to the current information field stored in the dictionary is used as the data type corresponding to the current information field; the current information field is any information field in the table file.

[0080] Among them, the pre-set dictionary can be a dictionary that records the correspondence between information fields and data types. Specifically, when the terminal identifies the data types corresponding to each information field in the table file, it can preferentially obtain the data types corresponding to the information fields in the above table file through the dictionary. For example, if the dictionary stores a data type corresponding to a current information field, the terminal can use the above data type stored in the dictionary as the data type corresponding to the current information field in the table file. For example, the dictionary can record that the data type corresponding to the information field of the message ID is a numerical type. Then, when the terminal identifies the information field of the message ID in the table file, it can determine that the data type of the information field is a numerical type based on the correspondence stored in the dictionary.

[0081] Step S403, when the data type corresponding to the current information field is not stored in the dictionary, the number of data types of the communication matrix data contained in the current information field is counted, and the data type with the largest number is used as the data type corresponding to the current information field.

[0082] If the data type corresponding to the current information field is not stored in the dictionary, the terminal can obtain the data type of the communication matrix data contained in the current information field, and count the number of each data type, so as to use the data type with the largest number as the data type corresponding to the current information field. For example, if a current information field contains 100 communication matrix data, of which 99 communication matrix data have a numeric data type and 1 communication matrix data has a string data type, then the terminal can set the numeric type as the data type corresponding to the current information field.

[0083] In this embodiment, when identifying the data type of the communication matrix data, if the above-mentioned corresponding relationship is stored in the dictionary, the data type corresponding to the current information field can be obtained through the dictionary. If the above-mentioned corresponding relationship is not stored in the dictionary, the data type corresponding to the current information field can be obtained by the number of data types of the communication matrix data contained in the current information field. In this way, the efficiency of data type acquisition can be improved.

[0084] In addition, each information field in the table file corresponds to a different table column in the table file; before step S101, it can also include: obtaining header information of each table column in the table file; and using the header information of each table column as each information field contained in the table file.

[0085] In this embodiment, each information field in the table file can be represented by different table columns in the table file, that is, one table column corresponds to one information field, and the header information is the information recorded in the first row of each table column. Specifically, after the terminal obtains the table file, it can also identify the header information corresponding to each table column in the table file, so as to use the header information of each table column as each information field contained in the table file.

[0086] In this embodiment, the terminal can obtain the information fields included in the table file by identifying the header information of each table column in the table file. In this way, the efficiency of obtaining the information fields included in the table file can be improved.

[0087] In one embodiment, the error recognition result is stored via an execution log of a DBC file; as shown in FIG5 , step S104 may further include:

[0088] Step S501, when the execution log matches the preset keyword information, a repair method matching the keyword information is obtained from a pre-built database, and the DBC file is repaired using the repair method matching the keyword information.

[0089] The execution log refers to the operation log generated after running the DBC file through the canoe tool, in which the error recognition result can be stored in the operation log, which can be the error type of the operation error, and the keyword information can be a keyword used to characterize the error type, such as error, exception, etc., that is, one of the error recognition results. After obtaining the execution log, the terminal can determine whether the execution log carries pre-set keyword information. If so, it can obtain the repair method that matches the keyword information from the pre-built database that stores the repair method corresponding to the keyword information, and then use the repair method that matches the keyword information to repair the DBC file.

[0090] Step S502, when the execution log does not match the preset keyword information, obtain the error prompt information of the DBC file from the execution log;

[0091] Step S503: repair the DBC file using the error prompt information.

[0092] Error prompt information is another type of prompt information used to characterize the error type, and can be used as an error identification result in addition to keyword information. In this embodiment, if the pre-set keyword information is not queried in the execution log, the error prompt information of the DBC file can be further obtained from the execution log, thereby using the error prompt information to implement the repair processing of the DBC file.

[0093] In this embodiment, the error identification result can also be characterized by the keyword information and error prompt information in the execution log of the DBC file, so that the DBC file can be repaired through the keyword information and error prompt information. Compared with repairing by manual methods, this repair method can improve the repair efficiency of the DBC file, thereby improving the efficiency of DBC file processing.

[0094] Furthermore, step S503 may further include: when a repair method associated with the error prompt information is stored in the database, repairing the DBC file using the repair method associated with the error prompt information; when a repair method associated with the error prompt information is not stored in the database, or when the DBC file still runs incorrectly after the DBC file is repaired using the repair method associated with the error prompt information, displaying the error prompt information; the error prompt information is used to instruct the user to repair the DBC file.

[0095] In this embodiment, in addition to storing the correspondence between different keywords and repair methods, the database may also store the correspondence between different error prompt information and repair methods. Specifically, if the database stores the repair method associated with the error prompt information, the DBC file can be repaired using the repair method. If the database does not store the repair method associated with the error prompt information, or if the DBC file still runs incorrectly after the DBC file is repaired using the repair method associated with the error prompt information, the terminal may display the error prompt information to enable the user to repair the DBC file. In this way, the efficiency of repair can be further improved while ensuring that the DBC file is successfully repaired.

[0096] In this embodiment, the DBC file can also be repaired by using the repair method associated with the error prompt information stored in the database. If the repair method associated with the error prompt information is not stored in the database, or the DBC file still runs incorrectly after the repair, the error prompt information can be displayed to instruct the user to perform the repair. In this way, the efficiency of the repair can be further improved while ensuring that the DBC file is repaired smoothly.

[0097] In one embodiment, a method for programmatically reading excel byte stream conversion is also provided, which can be implemented in the following way:

[0098] 1. The program logic may be shown in FIG6 and may include the following processes:

[0099] (1) Read the file through Python's commonly used third-party package for reading Excel;

[0100] (2) Use headers = df.columns.tolist() to read the file header;

[0101] (3) Judging by the header name, there are two scenarios: 1. Judging the data type of the column based on the header, such as the message name, which is generally a string (the header is a dictionary preset in the program, corresponding to the data type and common numerical values). 2. If the numerical type cannot be judged based on the header, loop through the values ​​of the column and judge through the type() and isinstance() functions. The basis is to count the numerical types of the column, and the type with the most statistics is used as the basis, and other numerical types are also converted to the most common types;

[0102] (4) Intelligent generation and backfilling of blank columns with blank values. 1. For blank cells, the program loops through the type of the column. Based on the type, if it is a string, extract the common keywords of the column and combine them to backfill (extract the common keywords in the form of strings and combine them together. When getting an empty cell, record the row and column subscripts of the cell and assign them to the blank cell according to the table below); if there is a regular pattern, such as the last digit is 001, 002, 004, loop to determine the missing values, and backfill the common parts plus the missing values ​​(missing values ​​are for numeric types. Get the values, sort them from large to small or from small to large, and then take the middle value between the two numbers. The backfilling method is the same as for blank cells). 2. For blank columns, determine the missing columns based on the dictionary. If it is textual content such as signal description, call the Python third-party library Polyglot offline translation based on the signal name and fill it back directly (when looping the header, record the column subscript, and assign the translated value to the cell corresponding to the row and column subscript according to the subscript of the row where the signal name of each row is located); if the important header of the signal name is blank, you can use the message name. Here you can set various rules that conform to the business process. Generally, the first one is to use the value before the first underscore of the message name as the beginning of the signal name. There can also be other usage scenarios of rules. The rules are set according to the business scenarios.

[0103] (5) Intelligent recognition error of importing dbc. The program calls canoe to import dbc files according to the server API provided by canoe. The log is used to record the log of canoe execution. The program sets keywords (error, exception, etc.) for matching. If a match is found, it is saved in the database, and the database is searched for the same error record to obtain the corresponding processing steps (for problems that have been processed, there will be corresponding processing steps in the program, and the program can directly call the corresponding processing step method). If there is no corresponding problem record in the database, there are two ways to handle it; the first one: the program will automatically try to shorten or lengthen the signal length according to the set error prompt (also saved in the database), such as invalid signal length, so that it can pass the verification (note: the error prompts saved in the database have corresponding execution program methods), with only one purpose, to pass the execution; the second one: after the program is processed, if there are still problems that cannot be verified, the user will be prompted to handle it by himself. The program will save the processing steps and error problems together in the database, and prompt the program developer to supplement the corresponding execution method of the error.

[0104] 2. Self-calculation and learning of the program: The program filters the Excel matrix signal data document. According to the logic of some fixed data in the program, for example, if the column is a string and an integer type appears, it must be converted into a string. Brush to check the problem data, empty columns and empty rows, such as when the message ID, message name, message content, message type and other fields are missing or do not exist, the program completes the data according to the set logic. For example, when the message ID does not exist, all message IDs are sorted, and the value range of each ID is traversed to calculate the missing message ID value and backfill it. The lack of other fields or values ​​is not so important, such as signal description. The program can automatically backfill the signal description according to the naming rules of the signal name. For values ​​such as start bit, length, precision, offset, etc., if one of the fields does not have a value, the program will calculate the value and backfill it into the corresponding cell in the table. And record the calculation logic of this time in the local data warehouse, which will serve as the logical basis for judgment for the same problem next time. After the program reads the Excel file stream, it will create a temporary sheet page to store the data parsed in the loop according to the header order of the template. After the data of this temporary sheet page is parsed by other calling logic, it will be deleted through the program command.

[0105] 3. Automatic import of canoe tool intelligent identification: After program screening and calculation backfilling, a dbc file is generated. The program will call the local canoe tool to automatically import the parsed dbc file, automatically execute, and verify the execution result. If there is an execution error, it will be intelligently processed according to the error information. The errors in executing dbc files are generally several common ones, which will be saved in the database. The error results of the execution are compared with the error result records saved in the database. The program can determine where the problem is and then repair it by itself. If the error of this execution is a record that does not exist in the database, the error result will be returned to the user for processing. The program records the error and the logic for solving the error so that there is a basis for the next execution.

[0106] The program provided by this embodiment can be used as a three-party library or jar package, can be integrated into the application, and is convenient for calling. And it can be operated locally, without configuring the local development environment, directly pop-up window input, pop-up window prompt, and the program is a lightweight program, only one main function entrance is required, and one-key execution and verification are truly realized, and the program can self-learn and automatically call the canoe tool to verify the conversion result. Therefore, the program can be integrated into other applications, and the bat package can also be used to realize localized calls, which is independent of the development environment, and one-key execution and verification excel files can also be used. The missing or wrong values ​​in the program intelligent calculation table can also be filled in, and the calculation logic can be recorded, and the result verification can be done through the automated calling tool, and errors and solutions can be recorded to achieve self-learning.

[0107] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0108] Based on the same inventive concept, the embodiment of the present application also provides a table file processing device for implementing the table file processing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more table file processing device embodiments provided below can refer to the limitations of the table file processing method above, and will not be repeated here.

[0109] In one embodiment, as shown in FIG. 7 , a table file processing device is provided, including: a data type acquisition module 701, a table file cleaning module 702, a DBC file running module 703 and a DBC file repairing module 704, wherein:

[0110] The data type acquisition module 701 is used to acquire a table file to be processed for recording communication matrix data, and acquire the data types corresponding to each information field in the table file;

[0111] A table file cleaning module 702 is used to perform data cleaning processing on the communication matrix data contained in each of the information fields based on the data type to obtain a cleaned table file;

[0112] A DBC file running module 703 is used to convert the cleaned table file into a DBC file, input the DBC file into a canoe tool, run the DBC file through the canoe tool, and obtain the running result of the DBC file;

[0113] The DBC file repair module 704 is used to obtain an error recognition result of the DBC file when the operation result indicates that the DBC file has an operation error, and to repair the DBC file based on the error recognition result.

[0114] In one embodiment, the table file cleaning module 702 is further used to obtain the current information field and the data type of each communication matrix data contained in the current information field; the current information field is any information field in the table file; when the data type of any communication matrix data contained in the current information field does not match the data type of the current information field, the data type of the communication matrix data is converted into the data type of the current information field to obtain a table file after the data type conversion is completed; obtain defective data in the table file after the data type conversion is completed, backfill the defective data to obtain the table file after the backfill processing; format the communication matrix data contained in the table file after the backfill processing to obtain the cleaned table file.

[0115] In one embodiment, when the defective data is a single communication matrix data with defects, the table file cleaning module 702 is further used to obtain the target information field corresponding to the defective data; obtain the backfill rule matching the target information field, and obtain the data value corresponding to the defective data according to the backfill rule; and backfill the defective data according to the data value corresponding to the defective data.

[0116] In one embodiment, the table file cleaning module 702 is further used to obtain the data value of the communication matrix data other than the defective data in the target information field when the backfill rule is the first backfill rule; obtain the data value corresponding to the defective data based on the data value of the communication matrix data other than the defective data; obtain the first associated information field associated with the target information field and obtain the data value of the communication matrix data associated with the defective data in the first associated information field when the backfill rule is the second backfill rule; and obtain the data value corresponding to the defective data using the data value of the communication matrix data associated with the defective data in the first associated information field.

[0117] In one embodiment, when the defective data is a missing information field, the table file cleaning module 702 is further used to obtain a second associated information field associated with the missing information field, and each communication matrix data contained in the second associated information field; according to the data value of each communication matrix data contained in the second associated information field, the data value of each communication matrix data contained in the missing information field is obtained, and the data value of each communication matrix data contained in the missing information field is backfilled.

[0118] In one embodiment, the data type acquisition module 701 is further used to obtain a pre-set dictionary; the dictionary records the correspondence between multiple information fields and data types; when the data type corresponding to the current information field is stored in the dictionary, the data type corresponding to the current information field stored in the dictionary is used as the data type corresponding to the current information field; the current information field is any information field in the table file; when the data type corresponding to the current information field is not stored in the dictionary, the number of data types of the communication matrix data contained in the current information field is counted, and the data type with the largest number is used as the data type corresponding to the current information field.

[0119] In one embodiment, each information field in the table file corresponds to a different table column in the table file; the data type acquisition module 701 is also used to obtain the header information of each table column in the table file; and the header information of each table column is used as each information field contained in the table file.

[0120] In one embodiment, the DBC file repair module 704 is further used to obtain a repair method matching the keyword information from a pre-built database when the execution log matches the pre-set keyword information, and use the repair method matching the keyword information to repair the DBC file; if the execution log does not match the pre-set keyword information, obtain error prompt information of the DBC file from the execution log; and use the error prompt information to repair the DBC file.

[0121] In one embodiment, the DBC file repair module 704 is further used to repair the DBC file using the repair method associated with the error prompt information when the database stores the repair method associated with the error prompt information; to display the error prompt information when the database does not store the repair method associated with the error prompt information, or when the DBC file still runs incorrectly after the DBC file is repaired using the repair method associated with the error prompt information; the error prompt information is used to instruct the user to repair the DBC file.

[0122] Each module in the above table file processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0123] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a table file processing method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0124] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0125] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0126] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0127] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0128] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0129] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0130] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0131] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A table file processing method, characterized in that: The method comprises: Obtain a table file to be processed for recording communication matrix data, and obtain the data types corresponding to each information field in the table file; Based on the data type, the communication matrix data contained in each of the information fields is cleansed to obtain a cleaned table file; Convert the cleaned table file into a DBC file, input the DBC file into a canoe tool, run the DBC file through the canoe tool, and obtain the running result of the DBC file; In the case where the operation result indicates that the DBC file has an operation error, an error recognition result of the DBC file is obtained, and a repair process is performed on the DBC file based on the error recognition result.

2. The method according to claim 1, characterized in that: Based on the data type, the communication matrix data contained in each information field is cleaned to obtain a cleaned table file, including: Acquire the current information field and the data type of each communication matrix data contained in the current information field; the current information field is any information field in the table file; In the case where the data type of any communication matrix data contained in the current information field does not match the data type of the current information field, the data type of the communication matrix data is converted into the data type of the current information field to obtain a table file after the data type conversion is completed; Acquire defective data in the table file after the data type conversion is completed, and backfill the defective data to obtain a table file after the backfill processing; The communication matrix data contained in the backfilled table file is formatted to obtain the cleaned table file.

3. The method according to claim 2, characterized in that In the case that the defective data is a single communication matrix data having defects, the backfilling process for the defective data includes: Obtaining a target information field corresponding to the defect data; Acquire a backfill rule that matches the target information field, and obtain a data value corresponding to the defective data according to the backfill rule; The defective data is backfilled using the data value corresponding to the defective data.

4. The method according to claim 3, characterized in that The obtaining the data value corresponding to the defective data according to the backfill rule includes: In the case where the backfill rule is the first backfill rule, obtaining data values ​​of the communication matrix data other than the defective data in the target information field; and obtaining data values ​​corresponding to the defective data according to the data values ​​of the communication matrix data other than the defective data; In the case where the backfill rule is the second backfill rule, a first associated information field associated with the target information field is obtained, and a data value of the communication matrix data associated with the defect data in the first associated information field is obtained; and a data value corresponding to the defect data is obtained by using the data value of the communication matrix data associated with the defect data in the first associated information field.

5. The method according to claim 2, characterized in that: In the case where the defective data is a missing information field, the backfilling process for the defective data includes: Acquire a second associated information field associated with the missing information field, and each communication matrix data contained in the second associated information field; According to the data value of each communication matrix data contained in the second associated information field, the data value of each communication matrix data contained in the missing information field is obtained, and the data value of each communication matrix data contained in the missing information field is backfilled.

6. The method according to any one of claims 1 to 5, characterized in that: The obtaining of the data types corresponding to the respective information fields in the table file includes: Obtaining a preset dictionary; the dictionary records the correspondence between multiple information fields and data types; In the case where the data type corresponding to the current information field is stored in the dictionary, the data type corresponding to the current information field stored in the dictionary is used as the data type corresponding to the current information field; the current information field is any information field in the table file; When the data type corresponding to the current information field is not stored in the dictionary, the number of data types of the communication matrix data contained in the current information field is counted, and the data type with the largest number is used as the data type corresponding to the current information field.

7. The method according to claim 6, characterized in that Each information field in the table file corresponds to a different table column in the table file; Before obtaining the data types corresponding to the information fields in the table file, the method further includes: Obtaining header information of each table column in the table file; The header information of each table column is used as each information field included in the table file.

8. A table file processing device, characterized in that: The device comprises: A data type acquisition module is used to acquire a table file to be processed for recording communication matrix data, and to acquire the data types corresponding to each information field in the table file; A table file cleaning module, used for performing data cleaning processing on the communication matrix data contained in each of the information fields based on the data type, to obtain a cleaned table file; A DBC file running module, used for converting the cleaned table file into a DBC file, inputting the DBC file into a canoe tool, running the DBC file through the canoe tool, and obtaining the running result of the DBC file; The DBC file repair module is used to obtain an error recognition result of the DBC file when the operation result indicates an operation error of the DBC file, and repair the DBC file based on the error recognition result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.