Communication matrix acquisition method, device and equipment
By automating the signal requirement and communication matrix development process, the problems of low development efficiency and high error rate in existing technologies have been solved. It realizes automated checking of signal requirements and automated generation of communication matrices, thereby improving development efficiency and reducing error rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, the development process of CAN communication matrices relies on manual processing, resulting in low development efficiency and a high risk of errors.
The system employs automated methods for signal requirement checks, automatic signal entry into the database, and automatic generation of requirement documents. It also automates various stages of the communication matrix development process through a detection system, including automatic checks of the signal requirement table, management of the signal database, and consistency checks of the communication matrix.
It improves the development efficiency of communication matrices, reduces the error rate, and enables automated processing of signal requirements and automated generation of communication matrices.
Smart Images

Figure CN121644263A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive technology, specifically to a method, apparatus, and device for acquiring a communication matrix. Background Technology
[0002] Controller Area Network (CAN) bus communication is a serial communication protocol widely used in the automotive and industrial fields to achieve high-speed data transmission and communication between multiple nodes. The CAN Communication Matrix, as a core component of the CAN network, plays a crucial role in ensuring effective information interaction and sharing among the nodes in the network.
[0003] The CAN communication matrix is typically defined by the vehicle manufacturer, specifying the message information that each Electronic Control Unit (ECU) in the vehicle network needs to receive and send. Each ECU node follows this communication matrix to complete information exchange and sharing.
[0004] Currently, the development process of communication matrices is all done manually, which is time-consuming and prone to errors, resulting in low development efficiency. Summary of the Invention
[0005] In view of this, embodiments of this application provide a method, apparatus, and device for acquiring a communication matrix, which improves the development efficiency of communication matrices and reduces the error rate.
[0006] To address the above problems, the technical solutions provided in this application are as follows:
[0007] In a first aspect of this application, a method for obtaining a communication matrix is provided, the method comprising:
[0008] Obtain signal requirements and determine whether the attribute information corresponding to the signal requirements meets a first preset condition. The signal requirements include various attribute information of the required signal.
[0009] If each attribute information meets the first preset condition, determine whether the signal library includes the signal, wherein the signal library includes attribute information of existing signals;
[0010] If the signal library includes the signal and the attribute information in the signal requirement is consistent with the attribute information recorded in the signal library, a requirement file is generated based on the attribute information in the signal requirement and other attribute information corresponding to the signal in the signal library. The attribute information in the signal requirement does not include the other attribute information.
[0011] Obtain the communication matrix based on the aforementioned requirements document.
[0012] In a second aspect of this application, a communication matrix acquisition device is provided, the device comprising:
[0013] An acquisition unit is used to acquire signal requirements and determine whether the attribute information corresponding to the signal requirements meets a first preset condition. The signal requirements include various attribute information of the required signal.
[0014] The determining unit is configured to determine whether the signal library includes the signal if the attribute information meets the first preset condition, wherein the signal library includes attribute information of existing signals;
[0015] A generation unit is configured to generate a requirement file based on the attribute information in the signal requirement and other attribute information corresponding to the signal in the signal library, if the signal library includes the signal and the attribute information in the signal requirement is consistent with the attribute information recorded in the signal library, wherein the attribute information in the signal requirement does not include the other attribute information;
[0016] The acquisition unit is also used to acquire a communication matrix based on the requirement file.
[0017] In a third aspect of this application, an electronic device is provided, comprising: a processor and a memory;
[0018] The memory is used to store computer-readable instructions or computer programs;
[0019] The processor is configured to read the computer-readable instructions or the computer program to cause the electronic device to implement the method described in the first aspect.
[0020] In a fourth aspect of this application, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a device, cause the device to perform the method described in the first aspect.
[0021] In a fifth aspect of this application, a computer program product is provided that, when the computer program product is run on a computer, causes the computer to perform the method described in the first aspect.
[0022] Therefore, the embodiments of this application have the following beneficial effects:
[0023] In this application, when a communication matrix needs to be developed, signal requirements are obtained, including the attribute information of the required signals. It is then determined whether the attribute information corresponding to the signal requirements meets a first preset condition. If the first preset condition is met, it indicates that the attribute information of the requested signal is complete. Next, it is determined whether the signal is included in the signal library. If the signal is included, a requirement file is generated based on the attribute information corresponding to the signal requirements and the attribute information of the corresponding signal in the signal library. The communication matrix is then determined based on this requirement file. Therefore, this method can achieve automated signal requirement checking, automatic signal entry into the library, and automatic generation of requirement files, improving the development efficiency of the communication matrix and reducing the error rate. Attached Figure Description
[0024] Figure 1 A communication matrix framework diagram provided in an embodiment of this application;
[0025] Figure 2 A flowchart of a communication matrix acquisition method provided in an embodiment of this application;
[0026] Figure 3 This application provides a schematic diagram of signal storage in an embodiment;
[0027] Figure 4 This is a structural diagram of a communication matrix acquisition device provided in an embodiment of this application. Detailed Implementation
[0028] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0029] The development process for a communication matrix is typically as follows: 1. The component engineer requests signal requirements. 2. The network engineer adds the new signals to the MAX signal database. 3. The network engineer creates signals and configures transmit / receive relationships based on the signal requirements table, and packages and configures routing relationships for the new signals according to the MAX database, generating the communication matrix. 4. The network engineer performs a consistency check on the generated communication matrix. 5. The network engineer releases the generated communication matrix to the component engineer.
[0030] During the development of the aforementioned communication matrix, all files were transmitted via email, resulting in low efficiency. Furthermore, all processing was done manually, leading to time-consuming and error-prone tasks. The signal requirement forms submitted by component engineers were typically filled out manually or copied and pasted, making omissions and format / attribute mismatches highly likely. Similarly, when network engineers added the required signals to the MAX library, they used copy-paste operations, easily resulting in signal omissions or attribute mismatches. In the signal packaging and configuration stage, network engineers manually compared the signal requirements with the MAX library before filling in the relevant attributes into the communication matrix, again prone to omissions and errors. Finally, the generated communication matrix was manually checked for consistency by network engineers, which was susceptible to oversights.
[0031] Based on this, this application provides a method for obtaining a communication matrix. The checking of all files involved in generating the communication matrix is carried out automatically without manual processing, which not only improves development efficiency but also reduces the error rate.
[0032] For a better understanding of the overall implementation of this application, please refer to [link / reference]. Figure 1 The communication matrix acquisition framework diagram shown is as follows: Figure 1 As shown, firstly, the component engineer submits a signal requirement form through the inspection system, which then initiates an automated check of the form. If any issues are found, the form is automatically returned to the component engineer for resubmission; otherwise, it proceeds to the next step.
[0033] The detection system checks whether the required signal exists in the MAX library. If it does not exist, the required signal is added to the MAX library as a new signal, achieving automated signal entry into the library. If it exists, the system compares the attribute information in the signal requirement table with the attribute information recorded in the MAX library. If they do not match, the attribute information of the required signal is updated to the attribute information recorded in the MAX library.
[0034] Then, the detection system summarizes the attribute information in the signal requirement table and the attribute information of the signal recorded in the MAX library, and generates an importable packaged file (requirement file).
[0035] Network engineers develop the communication matrix based on the packaged files and import it into the testing system, which then performs a consistency check on the communication matrix. If problems are found in the communication matrix, the network engineer is notified to fix them and re-import for testing; if no problems are found, the communication matrix is released to the component engineer through the testing system.
[0036] It should be noted that before implementing this application, the aforementioned detection system can be built on a web page, and different access permissions can be assigned to different engineers. For example, component engineers have the permission to upload signal requirements and download communication matrices, while network engineers have the permission to download signal requirement tables, operate the MAX library, and upload communication matrices.
[0037] The communication matrix defines the relationships between signals, messages, and network nodes in tabular form, and typically includes the following aspects:
[0038] Network node: Each car controller acts as a network node, responsible for sending and receiving information.
[0039] Message: A controller sends out multiple frame messages, each frame being called a message. These messages are transmitted over the network, carrying specific data.
[0040] Signal description: This includes the signal's Chinese name, data type (e.g., Boolean, Unsigned, Signed), signal length (number of bits), byte order (Motorola or Intel format), starting byte position, and starting bit position.
[0041] Precision / Offset: Describes how a signal value is transformed into a physical signal value, calculated using the formula "True Physical Value = Signal Value * Precision + Offset".
[0042] Range: The range of signal values, and the unit of the signal values (e.g., m, km).
[0043] Signal value description: The meaning of the signal value, including initial value and invalid value, etc.
[0044] To facilitate understanding of the technical solution of this application, the following description will be provided in conjunction with the accompanying drawings and embodiments.
[0045] See Figure 2 The figure is a flowchart of a communication matrix acquisition method provided in an embodiment of this application, as shown below. Figure 2 As shown, the method includes:
[0046] S201: Obtain signal requirements and determine whether the attribute information corresponding to the signal requirements meets the first preset conditions.
[0047] In this implementation, the component engineer can upload a signal requirement table through the detection system. This table defines the attribute information corresponding to the required signals. After receiving the signal requirement table, the detection system automatically checks it. If any attribute information in the signal requirement table does not meet a first preset condition, it indicates that the signal requirement table is incorrect, and it is returned to the component engineer for modification and resubmission. If the signal requirement table meets the first preset condition, it indicates that the signal requirement table is correct, and the process proceeds to S202.
[0048] The signal requirements can be presented in the form of a table or other formats, such as images or PDFs, as long as the system can recognize them.
[0049] Among them, determining whether the various attribute information corresponding to the signal requirement meets the first preset condition includes one or more of the following:
[0050] 1. Determine if all attribute values for the signal requirements exist. That is, check if all attribute information in the signal requirements table is filled in, and verify that the entered information contains Chinese punctuation. If any fields are missing or contain Chinese punctuation, it indicates an error in the signal requirements table. The error can be quickly identified by displaying the erroneous attribute field name and signal name.
[0051] 2. Determine whether the signal name corresponding to the required signal conforms to the first specification. The first specification stipulates the required and / or prohibited content of the signal name. For example, the signal name cannot contain any special characters other than underscores, and cannot contain spaces. If any of these conditions are met, the signal name is determined to not conform to the first specification.
[0052] 3. Determine whether the expression of the required signal range conforms to the second specification. The second specification stipulates that the indicator parameters (x, y) of the signal range must be integers, and the signal range is represented by the logical value N, not the physical value E. If it does not conform to the above specification, the expression of the signal range is incorrect.
[0053] 4. Determine if the signal length, initial signal value, and signal range match. That is, determine if the initial signal value and signal range are within the defined range that the signal length can actually reach.
[0054] 5. Determine if the initial value of the signal is a preset base number. For example, if the preset base number is hexadecimal, check if the initial value of the signal is in the form of "0x integer". If it is not in this format, the format of the initial value of the signal is incorrect.
[0055] 6. Determine if the signal type and signal encoding match the required signal. There is a one-to-one correspondence between signal type and signal encoding; different signal types correspond to different signal encodings. For example, if the signal type is BLN (Boolean) format, the signal encoding must be 0x0 = false and 0x1 = true. If the signal type is ENM (Enumeration) format, the signal encoding must only contain enumeration type data and cannot contain formulas. If the signal type is UNM (Unsigned Type) format, the signal encoding must contain formula types. If these requirements are not met, a signal type and signal encoding mismatch error will be reported.
[0056] 7. Determine if the signal encoding format conforms to the third specification. The third specification defines the required and / or prohibited content of the signal encoding format. For example, an error will occur if the encoding contains special characters other than underscores, if each enumeration type in the encoding does not have a line break, or if each formula in the encoding does not include a range description.
[0057] S202: If each attribute information meets the first preset condition, determine whether the signal library includes the required signal.
[0058] In this embodiment, if each attribute information meets the first preset condition, it indicates that the signal requirement is correct, and then it is determined whether the required signal already exists in the signal library. The signal library is used to record existing signals and their attribute information.
[0059] Determining whether the required signal is included in the signal library can be achieved in the following ways:
[0060] The process involves obtaining the name of the desired signal and its corresponding target network segment; determining whether the signal exists on the target network segment in the signal database; and confirming that the desired signal exists in the signal database if it does. The target network segment includes both the transmitting and receiving network segments. In other words, it involves determining whether the desired signal exists on the target network segment recorded in the signal database.
[0061] After confirming that the required signal exists in the signal library, it is necessary to determine whether the relevant attribute information of the signal recorded in the signal library is consistent with the attribute information in the signal requirement. If they are consistent, it indicates that the signal requirement is correct. If they are inconsistent, the attribute values corresponding to the attribute information in the signal requirement can be updated to the corresponding attribute values in the signal library. For example, compare whether the signal range in the signal requirement is the same as the signal range recorded in the signal library, and whether the signal encoding format in the signal requirement is consistent with the signal encoding format recorded in the signal library.
[0062] It should be noted that, in addition to the various attribute information in the signal requirements, the attribute information recorded in the signal library for any signal may also include other attribute information, such as the frame name, frame identifier, and frame length corresponding to the signal.
[0063] Simultaneously, the detection system will notify the component engineer of the reassigned signal value. Once the component engineer confirms that it is correct, the process proceeds to the next step. If the component engineer deems the reassignment unreasonable, they can reject the request and submit an application to modify the signal library. After changing the signal attribute value in the signal library to the value required by the component engineer, the component engineer will resubmit the signal requirement form and repeat the above steps until the signal requirement form is confirmed to be correct.
[0064] If the required signal is not included in the signal library, it can be added. Specifically, the Protocol Data Unit (PDU) corresponding to the signal is retrieved from the signal requirements, and it is determined whether the PDU exists on the target network segment in the signal library. If it exists, the various attribute information of the signal is added to the PDU in the signal library, and a start bit is assigned to the signal. If it does not exist, the PDU is added to the signal library, and the attribute information of the signal is added to the PDU, and a start bit is assigned to the signal.
[0065] It should be noted that in practical applications, network nodes can communicate using either the CAN network segment or the CANFD network segment. When using the CAN network segment, since one PDU is allocated one frame, when a new PDU is added to the signal library, a new frame also needs to be added to the signal library to load the PDU and signals. The frame name of the new frame is determined according to the sending network segment and sending sequence number, and the frame identifier is determined according to the PDU's period. Specifically, the frame identifier is automatically assigned an unused ID within the corresponding ID range according to the PDU's period.
[0066] When communicating using the CAN FD network segment, since a frame can contain multiple PDUs, a search can be performed in the signal library first based on the sender and transmission period to determine if a matching frame exists. If a matching frame exists and the number of PDUs in that frame does not reach a preset threshold, the PDU is added to that frame. If multiple matching frames exist, the PDU is added to the frame containing the most PDUs that does not reach the preset threshold. For example, if the preset threshold is 5, and there are two matching frames, frame 1 containing 3 PDUs and frame 2 containing 4 PDUs, the newly created PDU is added to frame 2.
[0067] If no matching frame is found, a new frame is added to the signal library, and the newly created PDU and the required signal are loaded into this frame. The determination of the name and identifier of the new frame can be found in the relevant description above.
[0068] For example, Figure 3 The flowchart shown illustrates the automated signal entry process, which retrieves attribute information such as signal name and sending / receiving network segment from signal requirements; then iterates through the corresponding network segment in the MAX library to retrieve the signal name.
[0069] If the signal name is found in the MAX library, check the consistency between the attribute information in the signal requirements and the attribute information recorded in the MAX library.
[0070] If the signal name is not found in the MAX library, determine if the recommended PDU for the signal requirement exists in the MAX library. If the PDU exists, load the required signal into the existing PDUs in the MAX library and assign start bits to the signal according to the optimal arrangement logic.
[0071] If the PDU does not exist, check if a target frame exists in the MAX library. This target frame must have the same period as the required period for the signal and the sender must match the required sender. If the target frame exists, create a new PDU and add it to the target frame. If the target frame does not exist, create both the new PDU and the target frame.
[0072] When assigning start bits to signals, the optimal signal arrangement logic can be followed. Specifically, if the PDU has an 8-byte layout, the signals are arranged in big-endian format; if the signal length is less than 8 bits, it cannot span bytes; if the signal length is greater than 8 bits and needs to span bytes, one end of the signal must be placed at the single-byte port. Big-endian means that the most significant byte of data is stored at the lowest memory address, while the least significant byte is stored at the highest memory address.
[0073] S203: If the signal library includes the required signal and the attribute information in the signal requirement is consistent with the attribute information recorded in the signal library, or after a required signal is added to the signal library, a requirement file is generated based on the attribute information in the signal requirement and other attribute information corresponding to the required signal in the signal library.
[0074] After completing the signal requirement check and signal entry into the database, a requirement file will be generated based on the attribute information in the signal requirements and other attribute information corresponding to the signal in the signal database. This requirement file is used to determine the communication matrix, and the attribute information in the signal requirements does not include other attribute information obtained from the signal database.
[0075] Specifically, a first signal attribute is extracted from the signal requirement, and a second signal attribute is extracted from the signal library. These first and second signal attributes are then filled into a requirement template to generate a requirement file. In other words, the requirement file is generated by filling the requirement and valid information about the signal from the signal library into the requirement template. The first signal attribute includes the signal name, signal length, signal group, signal sender, and network segment to which the signal belongs. The second signal attribute includes the corresponding frame name, frame length, PDU container name, PDU container length, PDU name, PDU length, PDU period, and signal start bit.
[0076] S204: Obtain the communication matrix based on the requirements document.
[0077] S205: Perform consistency checks on the communication matrix based on signal requirements and the signal library.
[0078] S206: If the consistency check passes, publish the communication matrix.
[0079] After generating the requirements document, the network engineer can input it into the communication matrix development tool, which will automatically generate the communication matrix based on the requirements document. Then, the network engineer inputs the communication matrix into the detection system, which checks the consistency of the communication matrix based on the signal requirements and the signal library.
[0080] Specifically, the consistency of the communication matrix can be checked in the following ways:
[0081] One approach is to compare the signal attribute information carried in the communication matrix with the attribute information in the signal requirements and the attribute information of the signal recorded in the signal database one by one to determine whether the signal attribute information carried in the communication matrix is consistent with the attribute information corresponding to the above two.
[0082] Furthermore, after confirming the consistency of signal attribute information, a consistency check is performed on the interface information of the communication matrix according to a second preset condition. This includes checks on node parameters, network segment parameters, diagnostic parameters, network management parameters, and information security parameters. The second preset condition indicates the correct values for each of the checked field parameters.
[0083] Another approach, to reduce the amount of detection, is to utilize the difference information between communication matrices at different stages for comparison. Specifically, the difference information between the first and second communication matrices is determined. The first communication matrix is the latest communication matrix determined according to the requirements document, and the second communication matrix is the communication matrix of the previous version. A comparison is performed based on the difference information and a first signal attribute to obtain a first comparison result. The first signal attribute refers to the attribute information obtained from the signal requirements. A comparison is then performed based on the difference information and a second signal attribute to obtain a second comparison result. The second signal attribute refers to the signal-related attribute information obtained from the signal library.
[0084] In this embodiment, network engineers can import the newly developed communication matrix and the previous version of the communication matrix into the detection system. The detection system then parses the two communication matrices to obtain the signal attribute information and interface attribute information corresponding to each matrix. By comparing the attribute information corresponding to each of the two communication matrices, the differences between them (signal attribute differences and interface attribute differences) are obtained. This signal attribute difference information is then compared with the attribute information in the signal requirements to determine if the difference information is consistent with the requirements, obtaining a first comparison result. Finally, this signal attribute difference information is compared with the attribute information in the signal library to determine if the difference information is consistent with the signal library, obtaining a second comparison result.
[0085] If both the first and second comparison results are consistent, a consistency check is performed on the interface attribute differences based on the second preset condition. If the consistency check passes, the communication matrix is considered correct and is then published. If the consistency check fails, the reason for the failure is output so that network engineers can adjust the communication matrix accordingly. After adjustment, the matrix is re-uploaded to the detection system until it passes the consistency check, at which point the system releases the communication matrix to the component engineer.
[0086] Based on the above method embodiments, this application also provides a communication matrix acquisition device, which will be described below in conjunction with the embodiments.
[0087] See Figure 4 This figure is a structural diagram of a communication matrix acquisition device provided in an embodiment of this application, as shown below. Figure 4 As shown, the device 400 includes: an acquisition unit 401, a determination unit 402, and a generation unit 403.
[0088] The acquisition unit 401 is used to acquire signal requirements and determine whether the attribute information corresponding to the signal requirements meets the first preset conditions. The signal requirements include various attribute information of the required signal.
[0089] The determining unit 402 is used to determine whether the signal library includes the signal if the attribute information meets the first preset condition, wherein the signal library includes attribute information of existing signals;
[0090] The generation unit 403 is configured to generate a requirement file based on the attribute information in the signal requirement and other attribute information corresponding to the signal in the signal library if the signal library includes the signal and the attribute information in the signal requirement is consistent with the attribute information recorded in the signal library or after a required signal is added to the signal library. The attribute information in the signal requirement does not include the other attribute information.
[0091] The acquisition unit 401 is also used to acquire the communication matrix based on the requirement file.
[0092] In some implementations, the acquisition unit 401 is specifically used to determine whether the attribute values corresponding to each attribute information included in the signal requirement exist; determine whether the signal name corresponding to the signal conforms to a first specification; determine whether the expression form of the signal range conforms to a second specification; determine whether the length, initial value, and range of the signal match; determine whether the initial value of the signal is a preset base number; determine whether the signal type and signal encoding match; and determine whether the format of the signal encoding conforms to a third specification.
[0093] In some implementations, the determining unit 402 is specifically used to obtain the signal name of the signal and the target network segment corresponding to the signal, the target network segment including a transmitting network segment and a receiving network segment; determine whether the signal exists on the target network segment in the signal library; if it exists, determine that the signal library includes the signal.
[0094] In some implementations, if the signal does not exist on the target network segment in the signal library, the device further includes an adding unit and a creating unit before generating the requirements file;
[0095] The acquisition unit 401 is further configured to acquire the protocol data unit (PDU) corresponding to the signal from the signal requirements;
[0096] The adding unit is used to add the various attribute information of the signal to the PDU if the target network segment exists in the signal library;
[0097] The newly created unit is used to add the PDU to the signal library if the target network segment does not exist in the signal library, and to add the various attribute information of the signal to the PDU.
[0098] The determining unit 402 is also used to assign a start bit to the signal.
[0099] In some implementations, if the target network segment is a CAN network segment, after adding the PDU to the signal library and before allocating a start bit to the signal, the adding unit is also used to add a frame to the signal library, using the frame to load the PDU and the signal, the frame name of the frame is determined according to the sending network segment and the sending sequence number, and the frame identifier is determined according to the period of the PDU.
[0100] In some implementations, if the target network segment is a CAN FD network segment, after adding the PDU to the signal library and before allocating a start bit to the signal, the determining unit 402 is further configured to retrieve a matching frame in the signal library according to the sender and transmission period of the signal.
[0101] The adding unit is further configured to add the PDU to the frame if a matching frame exists and the number of PDUs included in the frame does not reach a preset threshold.
[0102] The newly created unit is also used to add a new frame to the signal library if no matching frame exists, and to load the PDU and the signal using the frame.
[0103] In some implementations, the generation unit 403 is specifically used to extract a first signal attribute from the signal requirement, the first signal attribute including one or more of the following: signal name, signal length, signal group to which the signal belongs, signal sender, and network segment to which the signal belongs; extract a second signal attribute from the signal library, the second signal attribute including one or more of the following: frame name, frame length, PDU container name, PDU container length, PDU name, PDU length, PDU period, and signal start bit; and fill the first signal attribute and the second signal attribute into the requirement template to generate a requirement file.
[0104] In some embodiments, the apparatus further includes a detection unit and a dissemination unit;
[0105] The detection unit is used to perform consistency detection on the communication matrix based on the signal requirements and the signal library.
[0106] The publishing unit is used to publish the communication matrix if the consistency detection passes.
[0107] In some implementations, the detection unit is specifically used to determine the difference information between a first communication matrix and a second communication matrix, wherein the first communication matrix is the latest communication matrix determined according to the requirements document, and the second communication matrix is the communication matrix of the previous version, and the difference information includes signal attribute difference information and interface attribute difference information; compare the signal attribute difference information with a first signal attribute to obtain a first comparison result, wherein the first signal attribute refers to attribute information obtained from the signal requirements; compare the signal attribute difference information with a second signal attribute to obtain a second comparison result, wherein the second signal attribute refers to attribute information related to the signal obtained from the signal library; if the first comparison result and the second comparison result are both consistent, perform consistency detection on the interface attribute difference information according to a second preset condition.
[0108] In some embodiments, the apparatus further includes: an updating unit;
[0109] The updating unit is used to update the attribute information in the signal requirement to the attribute information recorded in the signal database if the attribute information in the signal requirement is inconsistent with the attribute information recorded in the signal database.
[0110] It should be noted that the specific implementation of each unit in this embodiment can be found in the relevant descriptions in the above method embodiments.
[0111] This application provides a computer-readable storage medium, including instructions or a computer program, which, when run on a computer, causes the computer to execute the communication matrix acquisition method described above.
[0112] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0113] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0114] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0115] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0116] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A communication matrix acquisition method characterized by comprising: The method comprises: acquiring signal requirements and determining whether attribute information corresponding to the signal requirements meets a first preset condition, the signal requirements comprising respective attribute information of required signals; if the respective attribute information meets the first preset condition, determining whether a signal library comprises the signals, the signal library comprising attribute information of existing signals; if the signal library comprises the signals and the attribute information in the signal requirements is consistent with the attribute information recorded in the signal library or the signals are newly added in the signal library, generating a requirement file based on the attribute information in the signal requirements and other attribute information corresponding to the signals in the signal library, the attribute information in the signal requirements not comprising the other attribute information; acquiring a communication matrix based on the requirement file.
2. The method of claim 1, wherein, The determination of whether the respective attribute information corresponding to the signal requirements meets the first preset condition comprises one or more of the following: determining whether attribute values corresponding to the respective attribute information comprised in the signal requirements exist; determining whether a signal name corresponding to the signal meets a first specification; determining whether an expression form of a signal range of the signal meets a second specification; determining whether a length, a signal initial value and the signal range of the signal match; determining whether the initial value of the signal is a preset radix number; determining whether a signal type and a signal code of the signal match; determining whether a format of the signal code meets a third specification.
3. The method according to claim 1 or 2, characterized in that, The determination of whether the signal library comprises the signals comprises: acquiring a signal name of the signal and a target network segment corresponding to the signal, the target network segment comprising a sending network segment and a receiving network segment; determining whether the signal exists on the target network segment in the signal library; if the signal exists, determining that the signal library comprises the signal.
4. The method of claim 3, wherein, If the signal does not exist on the target network segment in the signal library, before generating the requirement file based on the attribute information in the signal requirements and the other attribute information corresponding to the signals in the signal library, the method further comprises: acquiring a protocol data unit (PDU) corresponding to the signal from the signal requirements; if the PDU exists on the target network segment in the signal library, adding the respective attribute information of the signal to the PDU; if the PDU does not exist on the target network segment in the signal library, newly adding the PDU in the signal library and adding the respective attribute information of the signal to the PDU; allocating a start bit for the signal.
5. The method of claim 4, wherein, If the target network segment is a CAN network segment, after newly adding the PDU in the signal library, before allocating the start bit for the signal, the method further comprises: newly adding a frame in the signal library, loading the PDU and the signal by using the frame, a frame name of the frame being determined according to the sending network segment and a sending serial number, and an identifier of the frame being determined according to a period of the PDU.
6. The method of claim 4, wherein, If the target network segment is a CAN FD network segment, after newly adding the PDU in the signal library, before allocating the start bit for the signal, the method further comprises: searching for a matching frame in the signal library according to a sender of the signal and a sending period of the signal; if there is a matched frame and the number of PDUs included in the frame does not reach a preset threshold, adding the PDU to the frame; if there is no matched frame, adding a frame to the signal library, and loading the PDU and the signal into the frame.
7. The method of claim 1, wherein, the generation of the requirement file based on each attribute information in the signal requirement and attribute information corresponding to the signal in the signal library comprises: extracting first signal attributes from the signal requirement, the first signal attributes comprising one or more of signal name, signal length, signal group, signal sender and network segment to which the signal belongs; extracting second signal attributes from the signal library, the second signal attributes comprising one or more of frame name, frame length, PDU container name, PDU container length, PDU name, PDU length, PDU period and signal start bit corresponding to the signal; filling the first signal attributes and the second signal attributes into a requirement template to generate the requirement file.
8. The method of claim 1, wherein, the method further comprises: performing consistency detection on the communication matrix based on the signal requirement and the signal library; if the consistency detection passes, publishing the communication matrix.
9. The method of claim 1, wherein, the consistency detection on the communication matrix based on the signal requirement and the signal library comprises: determining difference information between a first communication matrix and a second communication matrix, the first communication matrix being a latest communication matrix determined according to the requirement file, the second communication matrix being a previous version of the communication matrix, the difference information comprising signal attribute difference information and interface attribute difference information; comparing the signal attribute difference information with first signal attributes to obtain a first comparison result, the first signal attributes being attribute information obtained from the signal requirement; comparing the signal attribute difference information with second signal attributes to obtain a second comparison result, the second signal attributes being attribute information related to the signal obtained from the signal library; if the first comparison result and the second comparison result are consistent, performing consistency detection on the interface attribute difference information according to a second preset condition.
10. The method of claim 1, wherein, if the attribute information in the signal requirement is inconsistent with the attribute information recorded in the signal library, before the generation of the requirement file, the method further comprises: updating the attribute information in the signal requirement to the attribute information recorded in the signal library.
11. A communication matrix acquisition device, characterized by the apparatus comprises: an acquisition unit configured to acquire a signal requirement and determine whether attribute information corresponding to the signal requirement meets a first preset condition, the signal requirement comprising each attribute information of a required signal; a determination unit configured to, if the each attribute information meets the first preset condition, determine whether a signal library comprises the signal, the signal library comprising attribute information of an existing signal; a generation unit configured to, if the signal library comprises the signal and the attribute information in the signal requirement is consistent with attribute information recorded in the signal library, generate a requirement file based on the attribute information in the signal requirement and other attribute information corresponding to the signal in the signal library, the attribute information in the signal requirement not comprising the other attribute information. The acquisition unit is further configured to acquire a communication matrix based on the requirement file.
12. An electronic device, comprising: Comprise: A processor and a memory; The memory is configured to store computer readable instructions or computer programs; The processor is configured to read the computer readable instructions or the computer programs, so that the electronic device implements the method in any one of claims 1-10.