CN117971778A - File merging method, device, equipment and computer readable storage medium - Google Patents

File merging method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN117971778A
CN117971778A CN202311800092.7A CN202311800092A CN117971778A CN 117971778 A CN117971778 A CN 117971778A CN 202311800092 A CN202311800092 A CN 202311800092A CN 117971778 A CN117971778 A CN 117971778A
Authority
CN
China
Prior art keywords
file
information
merging
parameters
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311800092.7A
Other languages
Chinese (zh)
Inventor
郑珊珊
何烈炎
刘光达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Automobile Group Co Ltd
Original Assignee
Guangzhou Automobile Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Automobile Group Co Ltd filed Critical Guangzhou Automobile Group Co Ltd
Priority to CN202311800092.7A priority Critical patent/CN117971778A/en
Publication of CN117971778A publication Critical patent/CN117971778A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a file merging method, a device, equipment and a computer readable storage medium, wherein the file merging method comprises the following steps: determining a table text comprising newly added signal parameters to obtain a table file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes; converting the form file into a database file to obtain a first file; placing the first file and the second file in a folder where the merging tool is located, wherein the second file is a historical database file closest to the current time; analyzing the first file and the second file by utilizing a merging tool, and determining merging nodes needing to be merged; determining information to be combined corresponding to the combining node; and combining the information to be combined to obtain the target file. Therefore, incremental database file data update can be performed on the basis of the follow-up database file, information change and update can be performed according to actual requirements, and the working efficiency and the data update flexibility are improved.

Description

File merging method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for merging files.
Background
In the production phase of a car, it is often necessary to optimize and improve the performance of the car, so that relevant information changes are generated, including changes such as adding signal parameters, modifying information parameters, etc. The related art generally derives an electronic form recording information into a database file (DBC) by a conversion tool after the information update is completed, so as to be used and analyzed in the automobile network communication. However, the current conversion tool needs to re-export the whole electronic form every time the electronic form has new signal parameters, resulting in low file processing efficiency.
Content of the application
The embodiment of the application discloses a file merging method, a device, equipment and a computer readable storage medium, which are used for improving the file merging efficiency.
In a first aspect, an embodiment of the present application discloses a method for merging files, including:
Determining a table text comprising newly added signal parameters to obtain a table file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes;
converting the table file into a database file to obtain a first file;
placing the first file and the second file into a folder where a merging tool is located, wherein the second file is a historical database file closest to the current time;
Analyzing the first file and the second file by using the merging tool, and determining merging nodes needing to be merged;
determining information to be combined corresponding to the combining node;
And merging the information to be merged to obtain the target file.
In a second aspect, an embodiment of the present application discloses a file merging apparatus, including:
the first determining unit is used for determining a table text comprising newly added signal parameters to obtain a table file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes;
the conversion unit is used for converting the table file into a database file to obtain a first file;
the mobile unit is used for placing the first file and the second file into a folder where the merging tool is located, wherein the second file is a historical database file closest to the current time;
The analysis unit is used for analyzing the first file and the second file by utilizing the merging tool and determining merging nodes needing to be merged;
The second determining unit is used for determining information to be combined corresponding to the combining node;
And the merging unit is used for merging the information to be merged to obtain a target file.
As a possible implementation manner, the first determining unit is specifically configured to:
Displaying a form text template;
and determining the table text in response to the message parameters, the information parameters and the receiving nodes input by the user aiming at the table text template, and obtaining the table file.
As a possible implementation manner, the message parameters include a sending node, a message name, a message identifier, a message length, a message sending type and a message period.
As a possible implementation manner, the first determining unit is further configured to determine whether a data conflict exists between the first file and the second file;
the mobile unit is specifically configured to place the first file and the second file in a folder where the merge tool is located if the first file and the second file do not have data collision.
As a possible implementation manner, the merging unit is specifically configured to:
combining the information to be combined to obtain a third file;
Automatically testing the third file;
And if the third file passes the automatic test, determining the third file as a target file.
In a third aspect, an embodiment of the present application discloses a computer device, including a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program in the memory to perform the method disclosed in the first aspect.
In a fourth aspect, embodiments of the present application disclose a computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the method disclosed in the first aspect above.
In the embodiment of the application, the file merging method is applied to determining a form text comprising newly added signal parameters, so as to obtain a form file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes; converting the form file into a database file to obtain a first file; placing the first file and the second file in a folder where the merging tool is located, wherein the second file is a historical database file closest to the current time; analyzing the first file and the second file by utilizing a merging tool, and determining merging nodes needing to be merged; determining information to be combined corresponding to the combining node; and combining the information to be combined to obtain the target file. Therefore, incremental database file data update can be performed on the basis of the follow-up database file, information change and update can be performed according to actual requirements, and the working efficiency and the data update flexibility are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a file merging system according to an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating a first process of a file merging method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a file merging process according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a second flow chart of a document merging method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a document merging apparatus according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
The embodiment of the application provides a file merging method, device, equipment and a computer readable storage medium. The embodiment of the application will be described from the perspective of a file merging device, which can be integrated in a computer device, wherein the computer device can be a terminal device, and can be a terminal device carried on a file merging tool, namely a file merging terminal; in addition, the terminal device may be other types of devices, for example, the terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart wearable device, and the like; further, but not limited thereto.
For example, please refer to fig. 1, which is a schematic diagram of a scenario of a file merging system according to an embodiment of the present application. The scenario includes a terminal or a server.
Specifically, the terminal or the server may determine a table text including the newly added signal parameters to obtain a table file, and convert the table file into a database file to obtain a first file. The first file is used as a database file of the newly added signal parameters, and can be combined with the latest historical database file (second file) corresponding to the original information, namely, the first file and the second file are combined into a target file.
For a better understanding of the embodiments of the present application, the related art will be described first. The DBC is a database file describing the communication information of the serial communication protocol (Controller Area Network, CAN) between all the electronic nodes on the network.
The network refers to a communication network for transmitting data of an automobile, and different electronic nodes can be connected together to realize data transmission and communication.
The electronic nodes refer to various electronic control units in the automobile, such as an engine control unit, a brake control unit and the like, which receive and transmit data through a network so as to complete various functions and tasks.
The CAN information refers to data information transmitted in an automobile network, and is transmitted by adopting a Controller Area Network (CAN) protocol. The CAN information comprises message attribute information and information attribute information, wherein the message attribute information comprises a message name, a message ID, a message length, a message transmission type and a message period, and the information attribute information comprises an information name, an information description, an information start bit, an information occupation bit, an information transmission type, an information value description and the like.
The relationship among the network, the electronic node and the CAN information is: the electronic node transmits and communicates data through a network, and CAN information is used as a carrier of the data to be transmitted in the network. The electronic node realizes the interaction and control of data by sending and receiving CAN information.
The database file is only used for describing CAN communication, and usually one database file CAN only contain node information of one CAN network. Therefore, in the automotive electronics field, a plurality of database files are required in order to describe the network topology information of the entire vehicle.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
In the embodiments of the present application, description will be made in terms of a file merging apparatus, which may be integrated in a computer device such as a server in particular. Referring to fig. 2, fig. 2 is a schematic flow chart of a file merging method according to an embodiment of the present application, taking a server as an example, when a processor on the server executes a program corresponding to the file merging method, the specific flow of the file merging method is as follows:
101. and determining a table text comprising newly added signal parameters to obtain a table file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes.
The newly added signal parameters may refer to new information that needs to be added to an existing database file. Incremental updating of the database file can be realized through filling and integration of the newly added signal parameters, so that information can be changed and updated conveniently on the basis of the existing DBC.
Determining the form text including the newly added signal parameters refers to the newly added signal parameters filled in by the user for the form text. And filling the information into corresponding positions and fields in the form text according to the newly added signal parameters input by the user to form a form file comprising the newly added signal parameters. This form file will contain the newly added signal parameters entered by the user and will preserve the format and style of the original form text template.
In some embodiments, the newly added information may be filled in according to the already defined text template of the form, and step 101 may include:
(101.1) displaying a form text template;
(101.2) in response to the message parameters, the information parameters and the receiving nodes input by the user aiming at the table text template, determining the table text comprising the newly added signal parameters, and obtaining the table file.
In the field of automotive electronics, the newly added signal parameters may include message parameters, information parameters, and receiving nodes of the newly added signal parameters. The message parameters may include a sending node, a message name, a message identification (Identity document, ID), a message length, a message sending type, a message period, etc. The information parameters may include information names, information descriptions, information start bits, information occupation bits, information physical maximum and minimum values, information default values, information invalid values, information precision, information offset, information units, information transmission types, information value descriptions, and the like. The type of message transmission depends on the requirements of communication and the network topology, and can be divided into the following types: 1. unicast (Unicast): unicast refers to the transmission of a message from a sender to a particular receiver. 2. Broadcast (Broadcast): broadcast refers to the transmission of a message from a sender to all devices in the network, all devices in the network being able to receive and process the message. 3. Multicast (Multicast): multicasting is a communication scheme between unicast and broadcast. It allows the sender to send a message to a specific multicast group, and only devices subscribed to this multicast group can receive and process the message. 4. Anycast (Anycast): anycast is a communication way to send a message to one of a set of devices. The message period refers to a time interval during which messages are continuously sent at the sending end, and the length of the message period depends on the requirements of the communication system. The information description refers to information describing characteristics, attributes and meanings of the information in detail. The information start bit is a special bit for synchronizing and identifying the start of data transmission. The information start bit is a part of a data frame, located at the start of data transmission. The information occupied bits refer to some extra bits or time inserted between data bits in order to provide a sufficient time interval between a transmitting end and a receiving end during transmission of a data frame to ensure reliable transmission and correct parsing of the data. The information physical maximum and minimum values are the maximum and minimum physical values that the information can reach. For example, in analog information, the physical maximum and minimum values of voltage information may be expressed as ranges of positive and negative voltages. The information default value is a preset value of the information when there is no explicit value. For example, a default value for a switch message may be an off state (0) unless additional information is received to change its state. The information invalid value is a specific value representing an information invalid or unknown state. Information accuracy is the accuracy or resolution of information measurement. It means that small changes in the physical quantity of information can be effectively detected. An information offset is an offset of an information value relative to a reference point or zero point, which can be used to adjust the information value to better suit a particular application within a certain range. The information unit is a physical unit of an information value for describing a dimension represented by the information. For example, the temperature information may be in degrees celsius (°c) or degrees fahrenheit (°f). The information transmission type refers to a transmission mode of information in communication, such as unicast, broadcast, multicast, and the like, as described above. An information value description is a description of the information, meaning, or purpose that the information value conveys.
According to the newly added signal parameters input by the user, the message parameters, the information parameters and the receiving nodes of the newly added signal parameters are filled in the form text, and then an updated form file is generated. Specifically, a predefined form text template is displayed for the user, and the user can fill in the message parameters of the newly added signal parameters, such as a sending node, a message name, a message identifier, a message length, a message sending type, a message period and the like, according to the predefined form text template; then, continuously filling information parameters of the newly added signal parameters, such as information names, information descriptions, information start bits, information occupation bits, information physical maximum and minimum values, information default values, information invalid values, information precision, information offset, information units, information transmission types, information value descriptions and the like; and finally, continuously filling the receiving node of the newly-added signal parameters, checking the CAN channel for transmitting information, and obtaining a form file of the newly-added signal parameters after the completion of the parameter filling of the newly-added signal parameters.
For example, assuming that a user needs to add a new message called "vehicle speed information" to an existing vehicle control system, the user can fill out parameters of the message at corresponding positions of the form text. Firstly, a user may fill in a message parameter of information, such as a message name, a message identifier, a message length, a message transmission type, a message period, and the like. Secondly, the user can fill in information parameters of the information, such as information name of "vehicle speed information", information description of "real-time speed of current vehicle", information start bit of 0, information occupation bit of 8, physical maximum and minimum value of 0-200, default value of 0, information invalid value of 255, etc. It should be noted that, the user needs to fill in the relevant values of the message parameters according to the actual situation. After the user fills out the parameters of one newly-added signal parameter, the newly-built form text can be continuously filled out with the parameters of other newly-added signal parameters until all the parameters of the newly-added signal parameter are filled out. And finally, filling each receiving node with the newly added signal parameters by a user, checking the CAN channel for transmitting information, and generating a form file containing the newly added signal parameters.
By the method, the user can fill the parameters of the newly added signal parameters in the form text conveniently, and an updated form file is generated. The table file can be used for subsequent work, such as generating a corresponding database file or performing other related processing, and recording and saving of the newly added signal parameters by the user can be realized.
102. And converting the table file into a database file to obtain a first file.
The database file and the table file are in two different file formats, and in the field of automobile electronics, the database file is in a CAN network database file format and is used for storing attribute information of automobile network messages and information.
In the first aspect, the table file can be used as source data of a database file, and information and data in the table file are converted into a format of the database file through a specific tool and a specific method, so that importing and exchanging of the data are realized.
In a second aspect, when information in the vehicle network changes, a corresponding database file needs to be updated. The updated complete database file can be obtained by exporting the change information in the table file into an incremental database file and then combining the incremental database file with the original database file.
In a third aspect, the form file may import data in a database file for data analysis and processing to aid in understanding and fault diagnosis of the vehicle network. In general, database files and table files are common data file formats, take on different roles and functions in the automotive electronics field, are associated with each other, and are commonly applied to development, testing and maintenance processes of a vehicle network.
The first file is a database file obtained after the table file is converted, and the purpose of converting the table file into the database file (first file) is to facilitate an automobile engineer to quickly and accurately define and manage attribute information of automobile network messages and information in the network database development process.
By converting the table file into the first file in the database file format, engineers can more conveniently view and edit the database content, thereby improving the working efficiency and reducing the error rate. In addition, the database file can also be directly used for generating information analysis codes, so that the information analysis codes are convenient to use in actual development. The conversion of the form file into the database file has important application value in the field of automotive electronics.
103. And placing the first file and the second file in a folder where the merging tool is located, wherein the second file is a historical database file closest to the current time.
Specifically, the table file is converted into a first file, namely, after the newly added signal parameters in the table text are exported as database files, a second file, namely, a historical database file closest to the current time is prepared, and the second file is the database file corresponding to the original information. In order to realize the merging of database files, the first file and the second file can be put into a folder where a merging tool is located. The two files generally contain information of newly added signal parameters or follow-up information parameters in the automobile production process, so that the two files can be combined more conveniently later.
It should be noted that, in actual use, the database file merging operation may be performed periodically according to specific requirements, so as to ensure the latest and stability of the system. For example, it is assumed that a certain automobile manufacturer needs to update a database file used before mass production of a new vehicle model. First, they fill in the newly added signal parameters of the new vehicle model in the form text and export the newly added signal parameters as a first file, namely a database file of the newly added signal parameters. Then they acquire the latest version of the history database file that was previously used, i.e. the second file, and then subsequently merge to generate the latest file, which is finally used in the mass production stage. Therefore, the enterprise can update the database file more flexibly, and development efficiency and product quality are improved.
After the first file and the second file are placed in the folder where the merging tool is located, the merging tool can be utilized to merge the first file and the second file in the folder, and the target file is obtained. The target file may refer to a new file obtained by combining the first file and the second file. The target file can enable the user to more conveniently check and edit the database content, improve the working efficiency and reduce the error rate. Specifically, the merging tool integrates the information in the two files into a target file according to the preset logic. And finally, obtaining a target file, wherein the target file is a result processed by the merging tool. The target file contains all information in the first file and the second file, and can be used as the latest database file.
Referring to fig. 3, a first file (delta database file) and a second file (edge database file) may be merged using a merge DBC tool to generate a target file. Therefore, the first file and the second file can be effectively combined into the latest target file. Compared with the traditional mode of exporting the whole database file again, the method can save time and labor cost and ensure the accuracy of data.
For example, it is assumed that a new sensor information needs to be added in the electronic control unit of a car. The relevant information (such as message parameters, information parameters, receiving nodes and the like) of the newly added signal parameters is added into the table text first and converted into a first file in a database file format. And placing the first file and the second file of the information to be used in a folder where the merging tool is located. After the first file and the second file are processed by the merging tool to generate the target file, it may be found that fine adjustment is needed to be performed on the corresponding information parameters in the first file. Therefore, the first file can be correspondingly modified, and the modified first file and the modified second file are combined again by using the combining tool, so that the final target file is obtained. The target file contains the information newly added and modified in the two files.
Further, the specific process of merging the first file and the second file in the folder by using the merging tool to obtain the target file may refer to steps 104-106, as follows:
104. and analyzing the first file and the second file by utilizing a merging tool, and determining merging nodes needing to be merged.
In this process, the merging tool analyzes the data contents in the first file and the second file, and compares whether there is data content to be merged between them, that is, whether the data contents in the corresponding nodes in the first file and the second file are completely consistent, if the data contents in a certain node are not completely consistent, the node is determined to be the merging node to be merged in the first file and the second file. If the data content in a certain node is completely consistent, the node is a merging node which does not need to be merged in the first file and the second file.
Illustratively, assume that the first file is A.dbc and the second file is B.dbc. The merging tool first analyzes message parameters in a.dbc and b.dbc, such as information of a sending node, a message name, a message identifier, a message length, a message sending type, a message period and the like. The merge tool then compares and determines which nodes need to be merged. For example, assume that one message parameter in a.dbc is ({ send node 1, message 1, identification 1, length 1, type 1, period 1 }) and one message parameter in b.dbc is ({ send node 2, message 2, identification 2, length 2, type 2, period 2 }). After parsing and comparison, the merging tool finds that the two message parameters are different because the sending node, the message name, the message identifier and the like are inconsistent. According to the judgment of the tool, the two message parameters belong to the merging nodes which need to be merged, so that the two message parameters can be merged into a final target file. Compared with the traditional method for merging all nodes in the first file and the second file, time and labor cost can be saved, and meanwhile, the accuracy of data is guaranteed.
105. And determining information to be combined corresponding to the combining node.
The information to be combined corresponding to the combining node can be a message parameter, an information parameter and a receiving node in the form text of the newly added signal parameter. The function of determining the information to be combined corresponding to the combining node is to combine the information to be combined to obtain the target file. This step is one of the key steps in merging database files, and by determining the merging node, the signal information that needs to be merged can be determined to be merged into the target file.
106. And combining the information to be combined to obtain the target file.
Combining the information to be combined to obtain the target file means that the information to be combined is combined according to a certain rule and method in the file combining process, and a target file is generated. Assuming that two database files a and B are present, it is necessary to merge the two database files into one object file C. The information to be combined can be data, text, characters and the like in the file. In the file merging process, after the file A and the file B are placed in a folder where a merging tool is located and merging nodes needing to be merged are determined, merging information corresponding to the merging nodes needing to be merged is merged, and a target file C is obtained. Illustratively, the second file a has a set of data: [1, 2,3, 4, 5], there is a set of data in the first file B: [6, 7, 8, 9, 10]. The rule of merging may be to merge the data in the second file a and the first file B in order. After the second file A and the first file B are analyzed, the merging nodes which need to be merged are determined to be '6', '7', '8', '9', '10', and the merging nodes are merged to obtain a target file C: [1, 2,3, 4, 5,6, 7, 8, 9, 10]. It should be noted that, the merging method may be adjusted according to specific requirements, for example, the data in the second file a and the first file B may be taken out one by one, merged according to a certain sequence, and put into the target file C.
In some embodiments, after the information to be combined is combined, an automated test may be performed again, so as to ensure the accuracy of the target file. Step 106 "merging the information to be merged to obtain the target file" may include:
(106.1) combining the information to be combined to obtain a third file;
(106.2) performing automated testing on the third file;
(106.3) if the third file passes the automated test, determining the third file as the target file.
The third file may refer to a database file for which the first file and the second file have not been automatically tested after being combined.
Automated testing refers to the process of testing and validating database files by writing automated test scripts or programs. Such a test method can automatically perform various database operations such as inserting, updating, querying and deleting data, and can verify the correctness, consistency and performance of the database. The automatic test can improve the test efficiency, reduce human errors, and repeatedly execute the same test cases in the test process so as to ensure the stability and reliability of the database file.
To ensure that the merging process does not introduce errors or data collisions. Only after the automated test passes, it is confirmed that the combined third file can work normally and remains consistent with the original file. And the third file is automatically tested, so that the reliability and stability of the combined file can be improved, and the quality and accuracy of the target file are ensured.
Specifically, the test content may include verifying parameters of the information, testing a transmission type of the message, and the like. If the third file passes the automatic test, the third file is determined to be the target file, otherwise, correction or re-test is needed. By the method, an automatic file merging and testing process can be realized. The application scene of the method comprises that in the automobile production process, when the database file used for testing needs to be updated, the original database file and the database file with newly added signal parameters can be combined into an updated complete database file through a combining tool. By automated testing, the accuracy and integrity of the target file can be ensured.
For example, it is assumed that in a certain automobile production line, in order to add a new vehicle function, certain modification and adjustment are required to existing electronic control information of the vehicle. Firstly, the engineer fills the modified information into the form text, and uses a merging tool to merge the original database file and the database file of the newly added signal parameters to obtain an updated complete database file. And then, verifying the updated database file by an automatic test tool to ensure that the information parameters are correct, the message sending type is accurate, and the like. If the test passes, the updated database file is used as the target file. Therefore, the whole updating process is more convenient and efficient, and the development and production efficiency of the automobile electronic system are improved. Therefore, after the first file and the second file are combined into the third file, the method for determining the target file through the automatic test can realize the automation of file combination and test, and improves the production efficiency and quality.
By the mode, newly-added and modified information in the automobile electronic field becomes more convenient and efficient, the whole database file does not need to be exported again each time, the newly-added and modified information is integrated with the existing database file through the merging tool, time and workload are saved, and the latest information is ensured to be applied to an automobile electronic control system.
For the convenience of understanding the embodiments of the present application, the description may be given in a specific application scenario. Taking an application scenario of the file merging process as an example, the flow of the file merging scenario example is specifically as follows:
The message parameters, the information parameters and the receiving nodes of the newly added signal parameters can be filled in according to a predefined form file template, so that the form file of the newly added signal parameters is obtained. The message parameters comprise information such as a sending node, a message name, a message ID and the like, and the information parameters comprise information such as an information name, an information start bit, an information occupation bit, an information physical maximum and minimum value and the like. And importing the table file into a table file-database file tool, and selecting a database file (a first file) of which the node corresponding to the newly added signal parameter derives the increment. The incremental database file is placed in the same folder as the original database file (second file). And opening the DBC merging tool, namely naming the original database file as an A file, and naming the database file derived from the newly added signal parameters as a B file. And selecting the folder in which the file A and the file B are located in the merging tool, and clicking a merging button. The merge tool can automatically generate the latest complete database file (target file), which can be named all. Thus, incremental database file updating can be realized on the basis of using the original database file. The method not only can solve the problem that the whole database file needs to be exported again when the original tool is updated each time, but also can combine the newly added information with the original database file, thereby ensuring the generation of the latest and complete database file. The working efficiency is improved, and the accuracy of the database file is ensured.
By implementing any one or combination of the embodiments of the present application, an application scenario of a file merging process may be implemented.
As can be seen from the above, the present solution may fill the newly added signal parameters into a preset table text to obtain a table file, and convert the table file into a first file in a database file format, and further combine the first file with a second file to be used to obtain a target file containing the original information and the newly added signal parameters; therefore, the whole database file does not need to be exported again each time, so that the information is added and modified more conveniently and efficiently, and the time and the workload are saved.
Referring to fig. 4, fig. 4 is a second flow chart of a file merging method according to an embodiment of the present application, where the specific flow of the file merging method is as follows:
201. And determining a table text comprising newly added signal parameters to obtain a table file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes.
The specific content of step 201 may refer to the content of step 101.
202. And converting the table file into a database file to obtain a first file.
The specific content of step 202 may refer to the content of step 102.
203. It is determined whether a data conflict exists between the first file and the second file.
204. If the first file and the second file have no data conflict, the first file and the second file are placed in a folder where the merging tool is located.
In order to ensure the accuracy and the integrity of the combined target file, whether the first file and the second file have data conflict or not can be determined, and if the first file and the second file have data conflict, the combined target file may have errors or missing data.
Specifically, the first file and the second file may be compared and analyzed to detect whether a data conflict exists. In one aspect, the information data in the first file may be compared with the information data in the second file to check if there is a case where the parameter values of the same information in the two files are inconsistent. For example, whether the start bit, the occupied bit, the physical maximum and minimum value, the sending node, and other parameters of the information are consistent. On the other hand, the message data in the first file and the second file can be compared, and whether the message parameters are consistent or not can be detected. For example, whether the sending node, the message name, the message identifier, the message length, etc. of the message are the same. If any parameter values are found to be inconsistent, these conflicts can be flagged for subsequent processing. If the first file and the second file do not have data conflict, the first file and the second file are placed in a folder where the merge tool is located, and the specific method can refer to step 103. If the first file and the second file have data conflict, different processing modes can be adopted according to the conflict situation. One common approach is to manually compare conflicting parameter values and select them according to the actual situation to determine the final target file. It should be noted that the data collision detection tool may be independent or may be incorporated into the file merge tool.
By the method, the information parameter values in the finally generated target file can be ensured to be correct and consistent, and the problem of data collision is avoided. It should be noted that, whether the first file and the second file have the data conflict or not may be determined by comparing and analyzing through an independent data conflict detection tool, or may be combined with a DBC merging tool to perform comparing and analyzing. According to the specific analysis result, which information or message parameters are combined into the target file can be selected to ensure that the finally generated database file is accurate.
205. And analyzing the first file and the second file by utilizing a merging tool, and determining merging nodes needing to be merged.
206. And determining information to be combined corresponding to the combining node.
207. And combining the information to be combined to obtain the target file.
For a detailed description of steps 205-207 reference may be made to the description of steps 104-106.
Through the application scene example, the following effects can be achieved: on one hand, according to the scheme of the application, incremental database file data updating can be performed on the basis of the along database file, so that the whole database file is prevented from being exported again each time, and a great amount of time and labor cost are saved. On the other hand, the scheme of the application only needs to export the newly added information into the incremental database file, and uses the DBC merging tool to merge the newly added database file and the original database file into the latest complete database file, thereby simplifying the operation flow and reducing the complexity of the operation. On the other hand, the scheme of the application can change and update the information parameters according to the actual demands, has higher flexibility and facilitates the follow-up function verification and maintenance work. Therefore, the method has the beneficial effects of improving the working efficiency, simplifying the operation flow, improving the data updating flexibility and the like.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a document merging device according to an embodiment of the application. Wherein the file merging means may be integrated in the server. As shown in fig. 5, the file merging apparatus may include:
a first determining unit 301, configured to determine a table text including newly added signal parameters, to obtain a table file, where the newly added signal parameters include a message parameter, an information parameter, and a receiving node;
a conversion unit 302, configured to convert the table file into a database file, to obtain a first file;
A mobile unit 303, configured to put a first file and a second file in a folder where the merge tool is located, where the second file is a historical database file closest to the current time;
The parsing unit 304 is configured to parse the first file and the second file by using a merging tool, and determine a merging node that needs to be merged;
a second determining unit 305, configured to determine information to be combined corresponding to the combining node;
And the merging unit 306 is configured to merge the information to be merged to obtain the target file.
In some embodiments, the first determining unit 301 is specifically configured to:
Displaying a form text template;
and determining the table text in response to the message parameters, the information parameters and the receiving nodes input by the user aiming at the table text template, and obtaining the table file.
In some embodiments, the message parameters include a sending node, a message name, a message identification, a message length, a message sending type, and a message period.
In some embodiments, the first determining unit 301 is further configured to determine whether there is a data conflict between the first file and the second file;
the mobile unit 303 is specifically configured to put the first file and the second file into a folder where the merge tool is located if the first file and the second file do not have data collision.
In some embodiments, the merging unit 306 is specifically configured to:
Combining the information to be combined to obtain a third file;
Carrying out automatic test on the third file;
and if the third file passes the automatic test, determining the third file as the target file.
From the above, the embodiment of the application can update incremental database file data on the basis of using the database file, and can also change and update information according to actual requirements, thereby improving the working efficiency and the data updating flexibility.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
The embodiment of the application also discloses a computer device, as shown in fig. 6, which shows a schematic structural diagram of the computer device according to the embodiment of the application, specifically:
The computer device may include one or more processors 401 of a processing core, memory 402 of one or more computer readable storage media, a power supply 403, and an input unit 404, among other components. Those skilled in the art will appreciate that the computer device structure shown in FIG. 6 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components. Wherein:
The processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the computer device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and file combinations by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to disclose access to the memory 402 by the processor 401.
The computer device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of charge, discharge, and power consumption management may be performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 404, which input unit 404 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball information input in connection with user settings and function control.
Although not shown, the computer device may further include a display unit or the like, which is not described herein. The computer device is a first computer device, and specifically in this embodiment, the processor 401 in the computer device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions as follows:
Determining a table text comprising newly added signal parameters to obtain a table file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes; converting the form file into a database file to obtain a first file; placing the first file and the second file in a folder where the merging tool is located, wherein the second file is a historical database file closest to the current time; analyzing the first file and the second file by utilizing a merging tool, and determining merging nodes needing to be merged; determining information to be combined corresponding to the combining node; and combining the information to be combined to obtain the target file.
The specific implementation of each operation may be referred to the previous embodiments, and will not be described herein.
From the above, the embodiment of the application can directly update incremental database file data on the basis of the along database file, and can also change and update information according to actual requirements, thereby improving the working efficiency and the data updating flexibility.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application discloses a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any of the file merging methods disclosed in the embodiments of the present application. For example, the instructions may perform the steps of:
Determining a table text comprising newly added signal parameters to obtain a table file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes; converting the form file into a database file to obtain a first file; placing the first file and the second file in a folder where the merging tool is located, wherein the second file is a historical database file closest to the current time; analyzing the first file and the second file by utilizing a merging tool, and determining merging nodes needing to be merged; determining information to be combined corresponding to the combining node; and combining the information to be combined to obtain the target file.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The application also discloses a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the file merging method disclosed in the various alternative implementations of the above embodiments.
Because the instructions stored in the computer readable storage medium can execute the steps in any of the file merging methods disclosed in the embodiments of the present application, the beneficial effects that any of the file merging methods disclosed in the embodiments of the present application can be achieved, and detailed descriptions of the previous embodiments are omitted herein.
The above describes in detail a file merging method, apparatus, computer device and computer readable storage medium disclosed in the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the above description of the embodiments is only for helping to understand the method and core ideas of the present application; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the ideas of the present application, the present description should not be construed as limiting the present application in summary.

Claims (10)

1. The file merging method is applied to a server and is characterized by comprising the following steps of:
Determining a table text comprising newly added signal parameters to obtain a table file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes;
converting the table file into a database file to obtain a first file;
placing the first file and the second file into a folder where a merging tool is located, wherein the second file is a historical database file closest to the current time;
Analyzing the first file and the second file by using the merging tool, and determining merging nodes needing to be merged;
determining information to be combined corresponding to the combining node;
And merging the information to be merged to obtain the target file.
2. The method of claim 1, wherein the determining the table text including the newly added signal parameters, the obtaining the table file includes:
Displaying a form text template;
and determining the table text in response to the message parameters, the information parameters and the receiving nodes input by the user aiming at the table text template, and obtaining the table file.
3. The method of claim 2, wherein the message parameters include a sending node, a message name, a message identification, a message length, a message sending type, and a message period.
4. The method as recited in claim 1, further comprising:
determining whether a data conflict exists between the first file and the second file;
The step of placing the first file and the second file in a folder where a merging tool is located includes:
And if the first file and the second file have no data conflict, putting the first file and the second file into a folder where a merging tool is located.
5. The method according to any one of claims 1-4, wherein the merging the information to be merged to obtain the target file includes:
combining the information to be combined to obtain a third file;
Automatically testing the third file;
And if the third file passes the automatic test, determining the third file as a target file.
6. A document merge device, comprising:
the first determining unit is used for determining a table text comprising newly added signal parameters to obtain a table file, wherein the newly added signal parameters comprise message parameters, information parameters and receiving nodes;
the conversion unit is used for converting the table file into a database file to obtain a first file;
the mobile unit is used for placing the first file and the second file into a folder where the merging tool is located, wherein the second file is a historical database file closest to the current time;
The analysis unit is used for analyzing the first file and the second file by utilizing the merging tool and determining merging nodes needing to be merged;
The second determining unit is used for determining information to be combined corresponding to the combining node;
And the merging unit is used for merging the information to be merged to obtain a target file.
7. The apparatus according to claim 6, wherein the first determining unit is specifically configured to:
Displaying a form text template;
and determining the table text in response to the message parameters, the information parameters and the receiving nodes input by the user aiming at the table text template, and obtaining the table file.
8. The apparatus of claim 6, wherein the first determining unit is further configured to determine whether a data conflict exists between the first file and the second file;
the mobile unit is specifically configured to place the first file and the second file in a folder where the merge tool is located if the first file and the second file do not have data collision.
9. A computer device comprising a processor and a memory, the memory storing a computer program, the processor being configured to execute the computer program in the memory to perform the steps of the file merging method of any one of claims 1 to 5.
10. A computer readable storage medium, characterized in that it is computer readable and stores a plurality of instructions adapted to be loaded by a processor for performing the steps in the file merging method according to any of claims 1 to 5.
CN202311800092.7A 2023-12-25 2023-12-25 File merging method, device, equipment and computer readable storage medium Pending CN117971778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311800092.7A CN117971778A (en) 2023-12-25 2023-12-25 File merging method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311800092.7A CN117971778A (en) 2023-12-25 2023-12-25 File merging method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117971778A true CN117971778A (en) 2024-05-03

Family

ID=90862143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311800092.7A Pending CN117971778A (en) 2023-12-25 2023-12-25 File merging method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117971778A (en)

Similar Documents

Publication Publication Date Title
CN102637214B (en) Method and system for synchronizing general data among database services
CN111817938B (en) Method, system and storage medium for compiling automobile CAN communication matrix
JP2023525393A (en) Method and apparatus for updating gateway resources and IOT control platform
CN113612654B (en) Vehicle-mounted gateway function test method based on database
CN107179971B (en) Automatic coding method and system for CAN bus fault processing
CN112100078B (en) Method, device and equipment for generating interface test case
CN102866944A (en) Pressure testing system and method
CN110198327B (en) Data transmission method and related equipment
CN112347047A (en) Vehicle data file generation method and device
CN115277882A (en) CAN message database establishing method and device, vehicle-mounted electronic equipment and storage medium
CN114282519A (en) CAN data analysis method and device
CN114460925B (en) Automatic test method for CAN interface HIL of electric automobile controller
CN112965912B (en) Interface test case generation method and device and electronic equipment
CN109327354B (en) Method, device and test system for generating signal forwarding test case
CN117971778A (en) File merging method, device, equipment and computer readable storage medium
CN116991468A (en) Configuration file generation method, device, equipment and storage medium
CN116521602A (en) Bus data transmission method and device and storage medium
US8051048B2 (en) System and method for automated transfer and evaluation of the quality of mass data of a technical process or a technical project
CN114968196A (en) Development platform architecture based on CODESYS software
CN114827967A (en) Software updating method, Bluetooth device and storage medium
CN109857811B (en) Block chain data management method and device
CN112559470A (en) File format conversion method and device, storage medium and electronic equipment
CN110413518A (en) The generation method and generating means and computer readable storage medium of control object library
CN108197346B (en) Communication model synchronization method for main and standby heterogeneous systems based on open message bus
CN111327465B (en) Intelligent distributed feeder automation terminal node configuration method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination