Route configuration method and device, electronic equipment and storage medium
By automating the parsing of the communication matrix to obtain mapping information and constructing target mapping relationships, the problems of long processing time, error-proneness, and difficulty in maintenance of traditional manual configuration methods are solved, and efficient and accurate routing configuration in the AUTOSAR communication protocol stack is achieved.
Patent Information
- Application Number
- CN202511762952.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-02-10
AI Technical Summary
Traditional manual configuration methods are time-consuming, error-prone, and difficult to maintain in the AUTOSAR communication protocol stack. This is especially true in complex vehicle communication matrices where the number of signals and messages is large and there are many signals and messages with the same name, resulting in low configuration efficiency and poor accuracy.
By automatically parsing the preset communication matrix, obtaining signal and message routing mapping information, constructing target mapping relationships, and generating signal and message routing configuration information in the AUTOSAR configuration tool, the routing configuration process is automated.
It improves the efficiency and accuracy of routing configuration, reduces manual intervention, can quickly identify configuration omissions, and enhances the efficiency and maintainability of the development process.
Smart Images

Figure CN121509304A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle electronic and electrical architecture technology, and in particular to a routing configuration method, apparatus, electronic device and storage medium. Background Technology
[0002] As automotive electronic and electrical architectures evolve towards centralization, domain controllers have become the core of vehicle computing and control. Under this architecture, a large number of CAN (Controller Area Network) and LIN (Local Interconnect Network) bus signals, which were originally distributed across different Electronic Control Units (ECUs), are integrated into the domain controller for processing and forwarding. This results in an exponential increase in the complexity and workload of the underlying communication protocol stack, especially the signal and message routing configuration based on the AUTOSAR (Automotive Open System Architecture) standard.
[0003] In related technologies, during the AUTOSAR-based development process, the configuration of the communication protocol stack, especially when handling signal routing and PDU (Protocol Data Unit) routing, is generally done manually. This means developers need to manually parse the communication matrix document output by the system requirements, and based on the source-destination relationships defined therein, use the AUTOSAR configuration tool to find and configure the corresponding signal and message objects one by one at the communication layer (Com module) and the protocol data unit routing layer (PduR module) to establish the correct routing path. However, due to the large number of signals and messages in the vehicle communication matrix, and the existence of many signals and messages with the same name, the above method has significant drawbacks such as long processing time, high error rate, and difficulty in later maintenance, which urgently need to be addressed. Summary of the Invention
[0004] This application provides a routing configuration method, apparatus, electronic device, and storage medium to solve the problems of long processing time, error susceptibility, and difficulty in maintenance of traditional manual configuration methods, effectively improving routing configuration efficiency and significantly enhancing configuration accuracy.
[0005] To achieve the above objectives, a first aspect of this application proposes a routing configuration method, comprising the following steps: Based on the preset communication matrix, obtain signal routing mapping information and message routing mapping information; Based on the signal routing mapping information and the message routing mapping information, a target mapping relationship is constructed between preset communication matrix elements and preset protocol stack configuration elements; Based on the target mapping relationship, configuration information for signal routing is generated at the preset communication layer, and / or configuration information for message routing is generated at the preset message layer.
[0006] Based on the above technical means, by automatically scanning the routing relationships in the preset communication matrix and constructing the mapping relationship between the routing relationships scanned in the communication matrix and the configuration elements defined in the communication protocol stack of the configuration tool, the problems of long time consumption, easy error and difficulty in maintenance of the traditional manual configuration method are solved, effectively improving the efficiency of routing configuration and significantly improving the accuracy of configuration.
[0007] To achieve the above objectives, a second aspect of this application provides a routing configuration apparatus, comprising: The acquisition module is used to acquire signal routing mapping information and message routing mapping information based on a preset communication matrix. The construction module is used to construct a target mapping relationship between preset communication matrix elements and preset protocol stack configuration elements based on the signal routing mapping information and the message routing mapping information. The generation module is used to generate configuration information for signal routing at a preset communication layer and / or, based on the target mapping relationship, configuration information for message routing at a preset message layer.
[0008] Based on the above technical means, by automatically scanning the routing relationships in the preset communication matrix and constructing the mapping relationship between the routing relationships scanned in the communication matrix and the configuration elements defined in the communication protocol stack of the configuration tool, the problems of long time consumption, easy error and difficulty in maintenance of the traditional manual configuration method are solved, effectively improving the efficiency of routing configuration and significantly improving the accuracy of configuration.
[0009] To achieve the above objectives, a third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the routing configuration method as described in the above embodiments.
[0010] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the routing configuration method as described in the above embodiments.
[0011] To achieve the above objectives, a fifth aspect of this application provides a computer program product comprising a computer program that, when executed by a processor, is used to implement the routing configuration method as described in the above embodiments.
[0012] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0013] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of a routing configuration method provided according to an embodiment of this application; Figure 2 This is a schematic diagram of a routing information requirement scan according to an embodiment of this application; Figure 3 This is a schematic diagram illustrating the mapping relationship between communication matrix elements and protocol stack configuration elements according to an embodiment of this application; Figure 4 This is a flowchart of another routing configuration method provided according to an embodiment of this application; Figure 5 This is a block diagram of a routing configuration device provided according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0014] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0015] The routing configuration method, apparatus, electronic device, and storage medium proposed according to embodiments of this application will now be described with reference to the accompanying drawings. First, the routing configuration method proposed according to embodiments of this application will be described with reference to the accompanying drawings.
[0016] Figure 1 This is a flowchart of a routing configuration method according to an embodiment of this application.
[0017] like Figure 1 As shown, the routing configuration method includes the following steps: In step S101, signal routing mapping information and message routing mapping information are obtained based on a preset communication matrix.
[0018] Understandably, a pre-defined communication matrix refers to a standardized design document that defines all communication behaviors of the entire vehicle network. Specifically, it details how all ECUs exchange data via buses (such as CAN, LIN, Ethernet, etc.). This communication matrix is typically led by the OEM's system architecture team, and finalized after consultation and review with all ECU suppliers. The pre-defined communication matrix acts as a bridge between upper-level functional requirements and lower-level software implementations, ensuring that all participants (ECUs from different suppliers) can "speak the same language" based on the same set of rules, enabling collaborative operation of the entire vehicle.
[0019] Specifically, by traversing (scanning) the relevant entries in the pre-defined communication matrix using a file parser (such as an XML (eXtensible Markup Language) parser or an Excel reading interface), signal routing mapping information and message routing mapping information can be obtained, such as... Figure 2 As shown. The signal routing mapping information includes the source signal name (i.e., the identifier of the original signal to be routed), the destination signal name (i.e., the identifier of the target signal for routing (possibly the same name as the source)), the packet name to which the source signal belongs (i.e., the original packet containing the source signal), the packet name to which the destination signal belongs (i.e., the target packet containing the destination signal), the channel name to which the source signal resides (i.e., the network bus identifier of the source packet), and the channel name to which the destination signal resides (i.e., the network bus identifier of the destination packet). This information tuple collectively defines a complete signal routing path. Similarly, the packet routing mapping information includes the source packet name (i.e., the identifier of the original packet to be forwarded), the destination packet name (i.e., the identifier of the target packet for packet routing), the channel name to which the source packet resides (the network bus identifier of the source packet), and the channel name to which the destination packet resides (i.e., the network bus identifier of the destination packet). This information tuple collectively defines a complete packet routing path.
[0020] Therefore, by using automated parsing technology, the traditional method of manually reading communication matrix documents and manually identifying and recording routing relationships is replaced. The routing requirements implicit in the documents are transformed into clear and unambiguous structured data, laying a solid data foundation for subsequent fully automated configuration generation.
[0021] In step S102, based on signal routing mapping information and message routing mapping information, a target mapping relationship is constructed between preset communication matrix elements and preset protocol stack configuration elements.
[0022] Specifically, after obtaining the signal source mapping information and message routing mapping information, the AUTOSAR configuration tool can comprehensively search and organize the specific configuration parameters of each functional module of the communication protocol stack. This systematically establishes a target mapping relationship between preset communication matrix elements and preset protocol stack configuration elements. The preset communication matrix elements include source signals, destination signals, source messages, and destination messages. The preset protocol stack configuration elements include the defined Signal objects (i.e., the signal definition part in the configuration tool) and defined Pdu objects (i.e., the message definition part in the configuration tool) within the AUTOSAR configuration tool's communication protocol stack. This target mapping relationship accurately maps the preset communication matrix elements to the preset protocol stack configuration elements in the AUTOSAR configuration tool, providing clear guidance for subsequent automated configuration.
[0023] This mapping ensures that the routing requirements of each signal and message are accurately reflected in the protocol stack, avoiding configuration errors caused by human oversight or misunderstanding. Furthermore, this mapping supports dynamic adjustment; when the communication matrix changes, the relevant configuration parameters in the protocol stack can be quickly and synchronously updated, thereby improving the system's flexibility and adaptability.
[0024] The following details how to construct the target mapping relationship.
[0025] As one possible implementation, in some embodiments, a target mapping relationship between preset communication matrix elements and preset protocol stack configuration elements is constructed based on signal routing mapping information and message routing mapping information. This includes: determining a first type of signal routing relationship based on the destination signal name, the message name corresponding to the destination signal, and the channel name corresponding to the destination signal in the signal routing mapping information; and / or determining a second type of message routing relationship based on the destination message name and the channel name corresponding to the destination message in the message routing mapping information; searching for source Signal objects and destination Signal objects corresponding to the signal routing mapping information in the preset protocol stack configuration elements based on the first type and the signal routing mapping information, and obtaining a first mapping relationship based on the source Signal objects, destination Signal objects, and signal routing mapping information; and / or searching for source Pdu objects and destination Pdu objects corresponding to the message routing mapping information in the preset protocol stack configuration elements based on the second type and the message routing mapping information, and obtaining a second mapping relationship based on the source Pdu objects, destination Pdu objects, and message routing mapping information; and generating a target mapping relationship based on the first and second mapping relationships.
[0026] Specifically, such as Figure 3As shown, firstly, the type of routing relationship can be determined based on the signal routing mapping information and the message routing mapping information. For signal routing, the destination signal name (i.e., the target signal identifier of the signal routing), the message name corresponding to the destination signal (i.e., the target message where the destination signal resides), and the channel name corresponding to the destination signal (i.e., the network bus identifier where the destination message resides) in the signal routing mapping information can be used to check whether the same source signal corresponds to multiple different destination signals (e.g., one sent to the local App, and another sent to a message in CAN2). This determines the first type of signal routing relationship, namely, single-source to single-destination or single-source to multiple-destination. Similarly, for message routing, the destination message name (i.e., the target message identifier of the message routing) and the channel name corresponding to the destination message (i.e., the network bus identifier where the destination message resides) in the message routing mapping information can be used to check whether the same source message needs to be forwarded to multiple different destination channels (e.g., forwarded to both CAN2 and CAN3 simultaneously). This determines the second type of message routing relationship, namely, single-source to single-destination or single-source to multiple-destination.
[0027] Furthermore, after determining the type of routing relationship, a search can be performed in the AUTOSAR configuration project database based on the type of routing relationship, signal routing mapping information, and message routing mapping information. For signal routing, the source signal name, the name of the message to which the source signal belongs, and the name of the channel where the source signal is located can be used as composite query conditions to search the Signal definition list in the AUTOSAR configuration tool's COM module (Communication module, the core component of the communication service layer, whose main function is to provide a unified communication environment for vehicle control unit application software and realize the encapsulation and parsing functions of signals in I-PDU (Inter-Process Data Unit)) to find a unique source Signal object; using the destination signal name, the name of the message to which the destination signal belongs, and the name of the channel where the destination signal is located as composite query conditions, a search can also be performed in the COM module to find the destination Signal object (at least one). Based on the source Signal object, the destination Signal object, and the signal routing mapping information, the first mapping relationship can be obtained. This first mapping relationship is a structured data object that contains all the necessary information to find for a signal routing requirement: signal routing mapping information, routing type (first type), the source Signal object reference to which it is mapped, and one or more destination Signal object references to which it is mapped.
[0028] For message routing, the source message name and source message channel name can be used as composite query conditions to search the Pdu definition list in the CanIf module of the AUTOSAR configuration tool (CAN Interface module, which serves as a standardized interface between the underlying CAN driver and the upper communication service layer (such as PduR (Protocol Data Unit Router), CanNm (CAN Network Management), CanTp (CAN Transport Protocol) etc.)) to find a unique source Pdu object. Similarly, using the destination message name and destination message channel name as composite query conditions, a search can be performed in the CanIf module to find at least one destination Pdu object. Based on the source Pdu object, destination Pdu object, and message routing mapping information, a second mapping relationship can be obtained. This second mapping relationship is a structured data object containing all the necessary information for a message routing requirement: message routing mapping information, routing type (second type), the mapped source Pdu object reference, and the mapped one or more destination Pdu object references.
[0029] Finally, by aggregating all the first and second mapping relationships processed in this process into a unified list or set, the target mapping relationship can be obtained. This target mapping relationship contains all the inputs required for the subsequent configuration process: what to configure (requirements), how to configure (type), and which specific object to operate on (internal reference of the AUTOSAR configuration tool).
[0030] Therefore, the above method enables accurate classification and mapping of signal routing and message routing, ensuring the accuracy and completeness of routing configuration. Simultaneously, this method effectively reduces manual intervention, improves configuration efficiency, and provides a reliable data foundation for subsequent automated processing.
[0031] In step S103, based on the target mapping relationship, configuration information for signal routing is generated in the preset communication layer, and / or configuration information for message routing is generated in the preset message layer.
[0032] Specifically, after obtaining the target mapping relationship, the signal routing configuration information can be generated in the preset communication layer (i.e., the COM module) of the AUTOSAR configuration tool based on the target mapping relationship. At the same time, according to actual business needs, the message routing configuration information can be generated synchronously in the preset message layer (i.e., the PduR module) of the AUTOSAR configuration tool.
[0033] Next, we will explain in detail how to generate configuration information for signal routing at the preset communication layer and how to generate configuration information for message routing at the preset message layer.
[0034] As one possible implementation, in some embodiments, configuration information for signal routing is generated at a preset communication layer based on the target mapping relationship, and / or configuration information for message routing is generated at a preset message layer, including: adding first parent configuration information at the preset communication layer; constructing first sub-configuration information corresponding to the first parent configuration information based on the target mapping relationship and the source Signal object; and constructing at least one second sub-configuration information corresponding to the first parent configuration information based on the target mapping relationship and the destination Signal object; and / or adding second parent configuration information at the preset message layer; constructing third sub-configuration information corresponding to the second parent configuration information based on the target mapping relationship and the source Pdu object; and constructing at least one fourth sub-configuration information corresponding to the second parent configuration information based on the target mapping relationship and the destination Pdu object.
[0035] Specifically, after obtaining the target mapping relationship, specific configuration instructions can be generated based on these structured data objects (i.e., target mapping relationships). For signal routing, the configuration command will create a new ComGwMapping configuration item (i.e., the first parent configuration information, which specifies which signals need to be forwarded between different networks (such as CAN bus) and the mapping relationship of these signals in the source and destination networks) under the gateway configuration container of the preset communication layer. Each ComGwMapping configuration item corresponds to a set of signal routing relationships. Then, based on the destination mapping relationship and the source Signal object, a ComGwSrc sub-configuration item (i.e., the first sub-configuration information, which defines the source of the gateway signal and specifies the source I-PDU or source signal of the gateway signal) will be constructed under the ComGwMapping configuration item. This sub-item clarifies the source of the signal by referencing the source Signal object. Then, based on the destination mapping relationship and the destination Signal object, at least one ComGwDest sub-configuration item (i.e., the second sub-configuration information, which defines the forwarding destination of the gateway signal and specifies the destination I-PDU or destination signal of the gateway signal) will be constructed under the ComGwMapping configuration item. Each ComGwDest sub-configuration item clarifies a destination of the signal by referencing a destination Signal object. If the first type of signal routing relationship is single-source to single-destination, then only one ComGwDest sub-configuration item is constructed. If the first type is single-source to multiple destinations, then multiple ComGwDest sub-configuration items are constructed, each corresponding to a destination Signal object. Thus, this process completes the adaptation of one set of signal routing relationships. The configuration process for the next set of signal routing relationships is similar, and to avoid redundancy, it will not be elaborated here.
[0036] For message routing, the configuration command will create a new PduRRouting configuration item (i.e., the second parent configuration information, which is used to forward I-PDUs between different communication networks or protocol layers) in the PduRRoutingTable (the core configuration item of the PduR module, used to define the static routing path and attributes of I-PDUs) configuration container of the preset message layer. Each PduRRouting configuration item corresponds to a set of message routing relationships. Then, based on the destination mapping relationship and the source Pdu object, a PduRSrcPdu sub-configuration item (i.e., the third sub-configuration information, which is used to specify the source Pdu in the routing path) will be constructed under this PduRRouting configuration item. This sub-item clarifies the source of the message by referencing the source Pdu object (from the CanIf module). Then, based on the destination mapping relationship and the destination Pdu object, at least one PduRDestPdu sub-configuration item (i.e., the fourth sub-configuration information, which is used to specify the destination information of the PDU in the routing path) will be constructed under this PduRRouting configuration item. Each PduRDestPdu sub-configuration item clarifies a destination of the message by referencing a destination Pdu object. If the second type of packet routing relationship is single-source to single-destination, then only one PduRDestPdu sub-configuration item is constructed. If the second type is single-source to multiple destinations, then multiple PduRDestPdu sub-configuration items are constructed, each PduRDestPdu sub-configuration item corresponding to a destination Pdu object. Thus, this process completes the adaptation of a set of packet routing relationships. The configuration process for the next set of packet routing relationships is similar, and to avoid redundancy, it will not be elaborated here.
[0037] Thus, through the above process, the complete structure of the signal gateway in the COM module is automatically completed, ensuring that the signal can be correctly copied from one source to one or more destinations according to the requirements of the communication matrix; and the complete structure of the message routing table is built in the PduR module, directing the underlying communication driver to forward the entire message from the source bus to one or more bus entries. The entire routing configuration process is seamlessly integrated, thereby meeting the communication needs in complex vehicular network environments.
[0038] Furthermore, in some embodiments, before generating configuration information for signal routing at the preset communication layer and / or generating configuration information for message routing at the preset message layer based on the target mapping relationship, the method further includes: determining, based on the target mapping relationship, whether there exists a target communication matrix element in the preset communication matrix elements that has no corresponding relationship with any element in the preset protocol stack configuration elements; and if there exists a target communication matrix element in the preset communication matrix elements that has no corresponding relationship with any element in the preset protocol stack configuration elements, recording the routing relationship corresponding to the target communication matrix element and the name information of the target communication matrix element.
[0039] Understandably, in order to avoid interruptions in the entire automation process due to missing individual configurations, after obtaining the target mapping relationship, it is possible to automatically check whether the communication matrix requirements can all find the corresponding AUTOSAR configuration objects based on the target mapping relationship, thereby proactively discovering problems and recording them.
[0040] For example, based on the target mapping relationship, if a signal routing requirement (i.e., any set of corresponding source / destination signals in the preset communication matrix elements) successfully finds the corresponding source and destination Signal objects, then the requirement can be marked as "configurable" (the same applies to message routing requirements); if, after traversing the AUTOSAR project, at least one corresponding configuration information cannot be found for a routing requirement (including signal routing and message routing) in a preset communication matrix, then the requirement is determined as an "unmappable requirement," i.e., considered as a target communication matrix element. Based on the detected target communication matrix element, its corresponding routing relationship (i.e., what type of route it is (signal routing or message routing) and complete context information) and name information (i.e., specifically recording which "element" cannot be mapped, for example, message routing error: source message [EngineMsg] not found definition in channel [CAN1]; signal routing error: destination signal [Display_Light] not found definition in message [IC_Msg] channel [CAN2]). The information related to these recorded target communication matrix elements can usually be written to an error list file (such as CSV (Comma-Separated Values, a file format that stores tabular data in plain text) or Excel format) to facilitate developers in reviewing and locating problems.
[0041] Therefore, it is evident that in traditional manual configuration, missing a configuration item may not be discovered until integration testing, and troubleshooting is difficult. However, the above method can identify problems immediately during the configuration phase and generate clear error reports, directly pointing the problem to specific communication matrix entries and missing AUTOSAR objects. This can reduce the troubleshooting time from hours or even days to minutes, greatly improving the efficiency and maintainability of the entire development process.
[0042] Furthermore, in some embodiments, after generating configuration information for signal routing at a preset communication layer and / or generating configuration information for message routing at a preset message layer based on the target mapping relationship, the method further includes: scanning the configuration information for signal routing and the configuration information for message routing to obtain scanning results; identifying the configured signal routing mapping information and the configured message routing mapping information based on the scanning results; and comparing the configured signal routing mapping information and the configured message routing mapping information with the signal routing mapping information and the message routing mapping information, respectively, to generate routing relationship records that meet preset omission conditions.
[0043] Specifically, after configuration, the final configuration code (i.e., the configuration information of the signal routing of the preset communication layer and the configuration information of the message routing of the preset message layer) generated by the AUTOSAR configuration tool can be directly parsed to extract the actual configuration relationships, namely, the configured signal routing mapping information (a list of signal routes derived from the preset communication layer ComGwMapping; for example, if the tool scans and finds that ComSignal_A is mapped to ComSignal_B and ComSignal_C, it will record this as a configured signal route) and the configured message routes. Mapping information (a list of packet routes derived from the preset packet layer PduRRoutingPath); then, the complete signal routing mapping information (set A) obtained in step S101 is compared with the configured signal routing mapping information (set A'), and the complete packet routing mapping information (set B) obtained in step S101 is compared with the configured packet routing mapping information (set B'). Routing relationships that exist in set A but not set A', and routing relationships that exist in set B but not set B', are identified as those satisfying the preset omission condition. By exceeding and recording these routing relationships that satisfy the preset omission condition, all routing relationships that should have been configured but were not actually configured can be listed. For example, the preset communication matrix requires that signal S1 be routed to S2 and S3 (set A), but the tool scan finds that only the mapping from S1 to S2 (set A') has been generated in the configuration. In this case, the routing relationship from S1 to S3 will be identified as a routing relationship that meets the preset omission condition and will be recorded in the report.
[0044] Therefore, this method effectively identifies and records routing relationships missed during configuration, ensuring that signal and message transmission paths in the system meet the expected design requirements. It also helps developers quickly locate problems, reducing the risk of system failures or performance degradation due to configuration omissions, thus providing a more reliable guarantee for subsequent development work.
[0045] To facilitate those skilled in the art to further understand the routing configuration method proposed in the embodiments of this application, the following is combined with... Figure 4 To elaborate further.
[0046] like Figure 4 As shown, this routing configuration method may also include the following steps: Step S401, routing information requirement scan (i.e., obtaining signal routing mapping information and message routing mapping information).
[0047] Step S402, route configuration information scanning (i.e., constructing the target mapping relationship between preset communication matrix elements and preset protocol stack configuration elements).
[0048] Step S403: Determine if the routing information is incorrect (i.e., check if the communication matrix requirements can all find the corresponding AUTOSAR configuration object). If yes, proceed to step S404; otherwise, proceed to step S405.
[0049] Step S404, generating routing configuration information (i.e., generating signal routing configuration information at the preset communication layer, and / or generating message routing configuration information at the preset message layer).
[0050] Step S405, record the routing configuration error (i.e., record "unable to map requirement", target communication matrix element).
[0051] Step S406: Determine whether the route configuration has been generated. If yes, proceed to step S407; otherwise, proceed to step S403.
[0052] Step S407: Rescan the route configuration and record any missing information (i.e., record the route relationships that meet the preset missing conditions).
[0053] According to the routing configuration method proposed in this application, signal routing mapping information and message routing mapping information are obtained based on a preset communication matrix. Based on these information, a target mapping relationship can be constructed between preset communication matrix elements and preset protocol stack configuration elements. Based on this target mapping relationship, signal routing configuration information is generated at the preset communication layer, and / or message routing configuration information is generated at the preset message layer. Therefore, by automatically scanning the routing relationships in the preset communication matrix and constructing a mapping relationship between the scanning routing relationships and the configuration elements defined in the communication protocol stack of the configuration tool, the method solves the problems of long processing time, error susceptibility, and difficulty in maintenance inherent in traditional manual configuration methods, effectively improving routing configuration efficiency and significantly enhancing configuration accuracy.
[0054] Next, the routing configuration apparatus proposed according to the embodiments of this application is described with reference to the accompanying drawings.
[0055] Figure 5 This is a block diagram of a routing configuration apparatus according to an embodiment of this application.
[0056] like Figure 5 As shown, the routing configuration device 10 includes: an acquisition module 100, a construction module 200, and a generation module 300.
[0057] The acquisition module 100 is used to acquire signal routing mapping information and message routing mapping information based on a preset communication matrix. Module 200 is used to construct a target mapping relationship between preset communication matrix elements and preset protocol stack configuration elements based on signal routing mapping information and message routing mapping information. The generation module 300 is used to generate configuration information for signal routing in a preset communication layer and / or, configuration information for message routing in a preset message layer, based on the target mapping relationship.
[0058] Optionally, in some embodiments, the construction module 200 is specifically used for: Based on the destination signal name, the corresponding message name, and the corresponding channel name in the signal routing mapping information, determine the first type of signal routing relationship, and / or, based on the destination message name and the corresponding channel name in the message routing mapping information, determine the second type of message routing relationship; Based on the first type and signal routing mapping information, the source Signal object and destination Signal object corresponding to the signal routing mapping information are searched in the preset protocol stack configuration element, and the first mapping relationship is obtained according to the source Signal object, destination Signal object and signal routing mapping information; and / or, based on the second type and message routing mapping information, the source Pdu object and destination Pdu object corresponding to the message routing mapping information are searched in the preset protocol stack configuration element, and the second mapping relationship is obtained according to the source Pdu object, destination Pdu object and message routing mapping information. Based on the first and second mapping relationships, the target mapping relationship is generated.
[0059] Optionally, in some embodiments, the generation module 300 is specifically used for: Add first parent configuration information in the preset communication layer, construct first child configuration information corresponding to the first parent configuration information based on the target mapping relationship and the source Signal object, and construct at least one second child configuration information corresponding to the first parent configuration information based on the target mapping relationship and the destination Signal object. And / or, add a second parent configuration information to the preset message layer, construct a third child configuration information corresponding to the second parent configuration information based on the target mapping relationship and the source Pdu object, and construct at least one fourth child configuration information corresponding to the second parent configuration information based on the target mapping relationship and the destination Pdu object.
[0060] Optionally, in some embodiments, before generating configuration information for signal routing at a preset communication layer based on the target mapping relationship, and / or before generating configuration information for message routing at a preset message layer, the generation module 300 is further configured to: Based on the target mapping relationship, determine whether there is a target communication matrix element in the preset communication matrix elements that has no corresponding relationship with any element in the preset protocol stack configuration elements; If there is a target communication matrix element in the preset communication matrix elements that has no corresponding relationship with any element in the preset protocol stack configuration elements, record the routing relationship and the name information of the target communication matrix element.
[0061] Optionally, in some embodiments, after generating configuration information for signal routing at a preset communication layer based on the target mapping relationship, and / or generating configuration information for message routing at a preset message layer, the generation module 300 is further configured to: The scan results are obtained by scanning the configuration information of the signal routing and the message routing. Based on the scan results, the configured signal routing mapping information and the configured message routing mapping information are identified; The configured signal routing mapping information and the configured message routing mapping information are compared with the signal routing mapping information and message routing mapping information respectively, and routing relationship records that meet the preset omission conditions are generated.
[0062] It should be noted that the foregoing explanation of the routing configuration method embodiment also applies to the routing configuration device of this embodiment, and will not be repeated here.
[0063] The routing configuration apparatus proposed in this application obtains signal routing mapping information and message routing mapping information based on a preset communication matrix. Based on these information, it constructs a target mapping relationship between preset communication matrix elements and preset protocol stack configuration elements. Then, based on this target mapping relationship, it generates signal routing configuration information at a preset communication layer and / or message routing configuration information at a preset message layer. Thus, by automatically scanning the routing relationships in the preset communication matrix and constructing a mapping relationship between the scanned routing relationships and the configuration elements defined in the communication protocol stack of the configuration tool, it solves the problems of long processing time, error susceptibility, and difficulty in maintenance inherent in traditional manual configuration methods, effectively improving routing configuration efficiency and significantly enhancing configuration accuracy.
[0064] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.
[0065] When the processor 602 executes the program, it implements the routing configuration method provided in the above embodiments.
[0066] Furthermore, electronic devices also include: Communication interface 603 is used for communication between memory 601 and processor 602.
[0067] The memory 601 is used to store computer programs that can run on the processor 602.
[0068] The memory 601 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0069] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0070] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0071] The processor 602 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.
[0072] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the routing configuration method described above.
[0073] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the routing configuration method described above.
[0074] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0075] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0076] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A routing configuration method, characterized in that, Includes the following steps: Based on the preset communication matrix, obtain signal routing mapping information and message routing mapping information; Based on the signal routing mapping information and the message routing mapping information, a target mapping relationship is constructed between preset communication matrix elements and preset protocol stack configuration elements; Based on the target mapping relationship, configuration information for signal routing is generated at the preset communication layer, and / or configuration information for message routing is generated at the preset message layer.
2. The method according to claim 1, characterized in that, The step of constructing a target mapping relationship between preset communication matrix elements and preset protocol stack configuration elements based on the signal routing mapping information and the message routing mapping information includes: Based on the destination signal name, the message name corresponding to the destination signal, and the channel name corresponding to the destination signal in the signal routing mapping information, a first type of signal routing relationship is determined, and / or, based on the destination message name and the channel name corresponding to the destination message in the message routing mapping information, a second type of message routing relationship is determined; Based on the first type and the signal routing mapping information, the source Signal object and destination Signal object corresponding to the signal routing mapping information are searched in the preset protocol stack configuration element, and a first mapping relationship is obtained according to the source Signal object, the destination Signal object and the signal routing mapping information; and / or, based on the second type and the packet routing mapping information, the source Pdu object and destination Pdu object corresponding to the packet routing mapping information are searched in the preset protocol stack configuration element, and a second mapping relationship is obtained according to the source Pdu object, the destination Pdu object and the packet routing mapping information. The target mapping relationship is generated based on the first mapping relationship and the second mapping relationship.
3. The method according to claim 2, characterized in that, The configuration information for generating signal routing at a preset communication layer and / or for generating message routing at a preset message layer based on the target mapping relationship includes: First parent configuration information is added to the preset communication layer. Based on the target mapping relationship and the source Signal object, first child configuration information corresponding to the first parent configuration information is constructed. Based on the target mapping relationship and the destination Signal object, at least one second child configuration information corresponding to the first parent configuration information is constructed. And / or, add second parent configuration information to the preset message layer, construct third sub-configuration information corresponding to the second parent configuration information based on the target mapping relationship and the source Pdu object, and construct at least one fourth sub-configuration information corresponding to the second parent configuration information based on the target mapping relationship and the destination Pdu object.
4. The method according to claim 1, characterized in that, Before generating the signal routing configuration information at the preset communication layer based on the target mapping relationship, and / or before generating the message routing configuration information at the preset message layer, the method further includes: Based on the target mapping relationship, determine whether there is a target communication matrix element in the preset communication matrix elements that has no corresponding relationship with any element in the preset protocol stack configuration elements; If there is a target communication matrix element in the preset communication matrix elements that has no corresponding relationship with any element in the preset protocol stack configuration elements, record the routing relationship corresponding to the target communication matrix element and the name information of the target communication matrix element.
5. The method according to claim 1, characterized in that, After generating the signal routing configuration information at the preset communication layer based on the target mapping relationship, and / or after generating the message routing configuration information at the preset message layer, the method further includes: Scan the configuration information of the signal routing and the configuration information of the message routing to obtain the scan results; Based on the scan results, the configured signal routing mapping information and the configured message routing mapping information are identified; The configured signal routing mapping information and the configured message routing mapping information are compared with the signal routing mapping information and the message routing mapping information, respectively, to generate routing relationship records that meet the preset omission conditions.
6. A routing configuration device, characterized in that, include: The acquisition module is used to acquire signal routing mapping information and message routing mapping information based on a preset communication matrix. The construction module is used to construct a target mapping relationship between preset communication matrix elements and preset protocol stack configuration elements based on the signal routing mapping information and the message routing mapping information. The generation module is used to generate configuration information for signal routing at a preset communication layer and / or, based on the target mapping relationship, configuration information for message routing at a preset message layer.
7. The apparatus according to claim 6, characterized in that, The building module is specifically used for: Based on the destination signal name, the message name corresponding to the destination signal, and the channel name corresponding to the destination signal in the signal routing mapping information, a first type of signal routing relationship is determined, and / or, based on the destination message name and the channel name corresponding to the destination message in the message routing mapping information, a second type of message routing relationship is determined; Based on the first type and the signal routing mapping information, the source Signal object and destination Signal object corresponding to the signal routing mapping information are searched in the preset protocol stack configuration element, and a first mapping relationship is obtained according to the source Signal object, the destination Signal object and the signal routing mapping information; and / or, based on the second type and the packet routing mapping information, the source Pdu object and destination Pdu object corresponding to the packet routing mapping information are searched in the preset protocol stack configuration element, and a second mapping relationship is obtained according to the source Pdu object, the destination Pdu object and the packet routing mapping information. The target mapping relationship is generated based on the first mapping relationship and the second mapping relationship.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the routing configuration method as described in any one of claims 1-5.
9. A computer storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the routing configuration method as described in any one of claims 1-5.
10. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, is used to implement the routing configuration method according to any one of claims 1-5.
