Test resource information adaptation method for heterogeneous architecture compatibility
By adopting a test resource information adaptation system compatible with heterogeneous architectures, the problem of repeated encapsulation of test resources in different architectures is solved, achieving efficient resource information adaptation and rapid integration of virtual test systems, thereby improving the efficiency of equipment performance evaluation.
Patent Information
- Application Number
- CN202311093833.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-08-28
AI Technical Summary
Existing methods for adapting test resource information require repeated encapsulation in different system architectures, resulting in low efficiency, inability to support equipment performance evaluation tasks, and a lack of standard model association rules and general service application development templates, which affects the rapid integration of virtual testing systems.
A test resource information adaptation system compatible with heterogeneous architectures is adopted, including a general resource service application template, a protocol encoding and decoding module, a data conversion module, and a data sending and receiving module. By defining standard model association rules and service application development templates, resource information adaptation and interaction are achieved.
It improves the efficiency of resource information adaptation, enables rapid integration of virtual testing systems and resource reuse, and reduces the cost of integrating virtual and physical collaborative testing systems for equipment.
Smart Images

Figure CN117130920B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of experimentation and testing, and specifically relates to a method for adapting test resource information. Background Technology
[0002] Resources are the collective term for physical equipment, facilities, simulators, hardware-in-the-loop (HIL) simulations, digital simulations, and software used to construct a virtual-physical collaborative testing system for equipment. They are the entities that truly generate various differentiated functions. To achieve equipment performance evaluation, it is necessary to effectively integrate various heterogeneous testing resources into a virtual-physical collaborative testing system composed of various technical architectures, achieving test resource information adaptation and thus forming system application capabilities. Because existing and newly built systems are used interchangeably, various heterogeneous architectures will persist for a long time. Existing test resource information adaptation methods require repeated encapsulation when using the same test resource in different architectures, which is time-consuming, labor-intensive, and inefficient, and cannot support equipment performance evaluation tasks.
[0003] To address the aforementioned issues, the field of experimentation and testing has recently proposed a resource information adaptation framework based on digital modeling and service-oriented encapsulation. This framework allows for the direct referencing of single-adaptation results across different system architectures, significantly reducing the cost of resource systematization and enabling resource reuse across different architectures. For example... Figure 1 As shown, the resource information adaptation framework based on digital modeling and service-oriented encapsulation divides resource information adaptation into two processes: resource digital modeling and resource service-oriented encapsulation.
[0004] Digital modeling is used to generate digital models of resources. These models consist of two parts: a resource interface description model and a resource digital mapping model. They can abstractly describe various characteristics of resources, such as operations, attributes, management, capabilities, maintenance status, and communication protocols. The goal of digital modeling is to establish standardized interfaces for test resources, enabling them to be directly referenced in different system architectures long-term after a single modeling effort, thereby significantly reducing the cost of integrating virtual and physical collaborative testing systems for equipment.
[0005] Service-oriented encapsulation is used to realize data interaction between the interface description model and the digital mapping model of resources. The encapsulation result exists in the form of resource service application software, which can run in the virtual and physical collaborative testing system, support resource manipulation and information interaction, and realize information adaptation of heterogeneous resources.
[0006] Figure 2This paper describes the process of resource information adaptation for heterogeneous architecture compatibility. In the digital modeling phase, referencing the test resource technical manual and interface protocols, a digital mapping model for resources is established based on the resource digital mapping meta-model. An interface description model for resources is established based on the equipment object model constructed using the object meta-model. In the service encapsulation phase, keywords describing the relationship between the resource digital mapping model and the interface description model are used to establish association rules between the interface description model and the digital mapping model. Based on the digital mapping model, the interface description model, and the association rules between them, resource service application software is developed using manual programming.
[0007] like Figure 2 As shown, a key step in resource information adaptation is to establish the association between the digital mapping model and the interface description model, and to build an association rule model; and then to develop service-oriented applications based on this. Existing resource information adaptation frameworks have not defined standard model association rules, nor do they possess universal service-oriented application development templates, which severely impacts the efficiency of resource information adaptation and hinders the rapid integration of virtual testing systems. Summary of the Invention
[0008] This invention addresses the problem that existing resource information adaptation frameworks lack standardized model association rules and general service application development templates, which severely impact resource information adaptation efficiency and hinder the rapid integration of virtual testing systems.
[0009] A method for adapting test resource information to heterogeneous architectures is disclosed. This method adapts test resource information based on a heterogeneous architecture-compatible test resource information adaptation system. The system includes a general resource service application template, and test resource information is adapted based on this template. The general resource service application template comprises a data conversion module, a protocol encoding / decoding module, and a data transmission / reception module.
[0010] Protocol encoding / decoding module: Used to load digital mapping model files, parse the communication protocol information in the files, decode the information from the test resources according to the communication protocol format, and encode the information sent to the test resources;
[0011] Data Conversion Module: Used to load association rule model files and convert received protocol data into object instance data of the virtual-real collaborative testing system based on the association rules between protocol elements and object attributes. It can also convert object instance data received from the virtual-real collaborative testing system into protocol data packets.
[0012] Data transceiver module: Used to load resource interface description files and use object model platform-related implementation code and middleware interface services or reflection memory transfer services to complete information exchange within the virtual-real collaborative testing system.
[0013] Furthermore, the test resource information adaptation system for heterogeneous architecture compatibility also includes a hardware access interface and a virtual-physical collaborative test system middleware interface / reflective memory RFM interface;
[0014] The hardware access interface is used to enable communication between test resources and external systems;
[0015] The virtual-real collaborative testing system middleware interface / reflective memory RFM interface is used to support middleware interaction services for non-real-time communication and reflective memory transfer services for real-time communication.
[0016] Furthermore, the process of adapting information from the virtual-physical collaborative testing system to test resources and from test resources to the virtual-physical collaborative testing system, which is compatible with heterogeneous architectures, is as follows:
[0017] The information adaptation process from the virtual-real collaborative testing system to test resources is based on receiving object instance data from the virtual-real collaborative testing system and converting it into test resource communication protocol data. The specific process includes the following steps:
[0018] (1.1) The data transceiver module receives object instance data from the virtual-real collaborative testing system by calling the virtual-real collaborative testing system middleware or the Reflective Memory RFM Access Interface API;
[0019] (1.2) The data conversion module uses the resource interface to describe the association rules of the mapping from the model to the resource digital mapping model and finds all communication protocols associated with the object instance;
[0020] (1.3) The data conversion module determines whether the current communication protocol is the last communication protocol associated with the object instance; if so, the encoding process ends; otherwise, step (1.4) continues.
[0021] (1.4) The protocol encoding and decoding module establishes a data buffer for the communication protocol and reserves memory space not less than the length of the communication protocol for the encoded data;
[0022] (1.5) The protocol encoding and decoding module copies the fixed frame header information in the communication protocol to the data buffer of the communication protocol;
[0023] (1.6) The data conversion module processes the elements in the communication protocol according to the element processing method in the communication protocol;
[0024] (1.7) The protocol encoding and decoding module copies the processed element information to the data buffer of the communication protocol;
[0025] (1.8) The data conversion module determines whether the currently processed element is the last element of the communication protocol; if so, it continues to execute step (1.9); otherwise, it proceeds to step (1.6).
[0026] (1.9) If the protocol encoding / decoding module determines whether the communication protocol has a frame end check function, proceed to step (1.11); otherwise, continue to step (1.10).
[0027] (1.10) The protocol encoding and decoding module calculates the frame end check information of the communication protocol and copies it to the data buffer of the communication protocol;
[0028] (1.11) The protocol encoding and decoding module calls the hardware access interface driver corresponding to the communication protocol and sends the encoded communication protocol data;
[0029] The information adaptation process from test resources to the virtual-physical collaborative testing system involves splitting the data from the test resources based on the resource communication protocol format and converting it into object instance data for the virtual-physical collaborative testing system. The specific process includes the following steps:
[0030] (2.1) The protocol encoding and decoding module receives communication protocol data from the test resources through the hardware access interface driver;
[0031] (2.2) The protocol encoding / decoding module describes the list of communication protocols in the model through the resource interface and performs the protocol matching process;
[0032] (2.3) The protocol encoding / decoding module determines whether the protocol matching is successful; if it fails, the process ends; otherwise, it continues to execute step (2.4).
[0033] (2.4) The data conversion module searches for all object instances associated with the communication protocol by mapping the resource digital mapping model to the resource interface description model according to the association rules.
[0034] (2.5) The data conversion module determines whether the current object instance is the last object instance associated with the communication protocol; if so, proceed to step (2.10); otherwise, continue to step (2.6).
[0035] (2.6) The data transceiver module establishes a data cache area for object instances to reserve sufficient memory space for decoding data;
[0036] (2.7) The data conversion module processes the attributes in the object instance according to the object instance attribute processing method in the communication protocol;
[0037] (2.8) The data transceiver module copies the processed object instance attribute information to the object instance's data buffer;
[0038] (2.9) The data conversion module determines whether the attribute of the object instance being processed is the last attribute of the object instance. If so, it continues to execute step (2.10); otherwise, it proceeds to step (2.7).
[0039] (2.10) The data transceiver module calls the virtual-real collaborative testing system middleware or the reflection memory RFM access interface API to send the decoded object instance data.
[0040] Furthermore, the association rules between the resource digital mapping model and the resource interface description model include the association rules for the mapping from the resource interface description model to the resource digital mapping model and the association rules for the mapping from the resource digital mapping model to the resource interface description model.
[0041] Each association rule in the association rules mapping from the resource interface description model to the resource digital mapping model describes all communication protocol information associated with an object instance; the association rule uses the object instance name as the primary key and contains a fixed-length information description field and a variable-length association relationship field; each object instance contains several attributes, and each attribute can be associated with an unlimited number of communication protocol elements;
[0042] The information description field describes the object model name to which the object instance belongs, the object instance data sending method, the object instance triggering element, the timed sending period, and the number of related relationships; among them, the object instance data sending method includes direct update, triggered update, and timed update, and the object instance triggering element specifies the triggering element set in the triggered update mode;
[0043] The association field contains N association rules, where N is determined by the number of associations in the information description field. Each association rule defines how a certain attribute in an object instance maps to a certain element in a communication protocol, including fields for matching method, attribute name, attribute data type, protocol name, element name, and element data type. The matching method specifies the way attributes are mapped to elements, including direct matching, variable value mapping, and enumerated type variable value mapping. The attribute name is the name of the object model attribute in this association, representing the source of information adaptation from the virtual-physical collaborative testing system to the test resources. The attribute data type is the data type of the object model attribute in this association. The protocol name is the name of the communication protocol in the digital mapping model. The element name is the name of the protocol data element in the association, representing the information adaptation target from the virtual-physical collaborative testing system to the test resources. The element data type describes the data type of the protocol data element.
[0044] During the information adaptation process from the virtual-real collaborative testing system to the test resources, after the data transceiver module receives data of a certain object instance from the virtual-real collaborative testing system, the data conversion module completes the conversion of the object instance data into communication protocol data by searching the above-mentioned association rules.
[0045] Each association rule in the association rules mapping from the resource digital mapping model to the resource interface description model describes all object instance information associated with a communication protocol; the association rule uses the communication protocol name as the primary key and contains a fixed-length information description field and a variable-length association relationship field; since each communication protocol contains several elements, each element can be associated with an unlimited number of object instance attributes;
[0046] The information description field describes the protocol data sending method, the timed sending period, the object instance triggering element, and the number of association relationships; among them, the protocol data sending method includes: direct update, triggered update, and timed update, and the protocol triggering element specifies the triggering element set in the triggered update mode;
[0047] The association field contains N association rules, where N is determined by the number of associations in the information description field. Each association rule defines how a certain element in the communication protocol is mapped to a certain attribute in an object instance, including the matching method, element name, element data type, object instance name, attribute name, and attribute data type fields. The matching method specifies the way elements are mapped to attributes, including direct matching, variable value mapping, and enumerated type variable value mapping. The element name is the name of the protocol data element in the association. The element data type describes the data type of the protocol data element. The object instance name describes the name of the object instance in this association. The attribute name is the name of the attribute of the object instance in this association. The attribute data type indicates the data type of the attribute of the object instance in this association.
[0048] During the information adaptation process from test resources to the virtual-physical collaborative testing system, after the data transceiver module receives a certain communication protocol data from the test resource, the data conversion module completes the conversion of the communication protocol data into object instance data by searching the aforementioned association rules.
[0049] Furthermore, in the association rules for mapping from the resource interface description model to the resource digital mapping model and the association rules for mapping from the resource digital mapping model to the resource interface description model, when the element data type and the "attribute data type" on the interface description model side are inconsistent, the "attribute data type" of the element data type and the "attribute data type" on the interface description model side can be converted to each other.
[0050] Furthermore, in the association rules for mapping from the resource interface description model to the resource digital mapping model and from the resource digital mapping model to the resource interface description model, when there are multiple triggering elements set in the trigger update mode specified by the object instance triggering element, the triggering elements are logically ANDed with each other.
[0051] Furthermore, in the association rules for mapping from the resource interface description model to the resource digital mapping model and from the resource digital mapping model to the resource interface description model, the attribute data type is either a basic data type or an enumeration type.
[0052] Furthermore, during the data transmission and reception process, the data transceiver module first needs to convert the object model TDL into an object model PSM in address offset format supported by the Reflective Memory Transfer Service and an object model PSM in C++ format supported by the Virtual-Real Collaborative Testing System Middleware. The process of converting the object model TDL into an object model PSM in address offset format supported by the Reflective Memory Transfer Service and an object model PSM in C++ format supported by the Virtual-Real Collaborative Testing System Middleware is implemented based on the mapping rules between the object model PIM and different types of PSM.
[0053] For the Object Model PSM, which supports address offset format in the Reflective Memory Transfer Service, the address length of each basic element in the Object Model TDL in reflective memory is designed as follows:
[0054]
[0055]
[0056] For the virtual-real collaborative testing system middleware that supports the C++ format object model PSM, a mapping rule for the object model TDL expression and the C++ expression is designed. The mapping relationship of basic data types in TDL and C++ is shown in the table below:
[0057] TDL Definition C++ definition short ::CORBA::Short unsigned short ::CORBA::UShort long ::CORBA::Long unsigned long ::CORBA::ULong long long ::CORBA::LongLong unsigned long long ::CORBA::ULongLong float ::CORBA::Float double ::CORBA::Double boolean ::CORBA::Boolean char ::CORBA::Char string char* octet ::CORBA::Octet void void
[0058] After converting the object model TDL to the object model PSM in address offset format supported by the Reflective Memory Transfer Service and the object model PSM in C++ format supported by the Virtual-Real Collaborative Testing System Middleware, the data sending and receiving process is implemented using the Virtual-Real Collaborative Testing System Middleware or the Reflective Memory Access Interface API.
[0059] Furthermore, the data transmission and reception process based on the virtual-real collaborative testing system middleware includes the following steps:
[0060] (1) A test resource creates a virtual-physical collaborative test system by using the system management service;
[0061] (2) Other test resources are added to the virtual-physical collaborative testing system by using the system management service;
[0062] (3) Test resources declare publishing / subscription relationships by using the declaration management service; if test resources wish to filter the subscribed information, they filter the subscribed information by using the data distribution management service;
[0063] (4) A test resource starts a time synchronization service by using the time management service, and other test resources synchronize their time with it.
[0064] (5) Perform object-based data interaction. Test resources send messages and data stream files to other test resources by using the object management service. The specific processing includes the following steps:
[0065] (6) Test resources can query the current running status of the middleware by using other auxiliary management services;
[0066] (7) A test resource starts a time advancement service by using the time management service, and other test resources register time advancement requests and perform time advancement processing;
[0067] (8) If the virtual-real collaborative testing system has not finished running, the process of steps (5) to (7) can be repeated;
[0068] (9) When the system stops running, the test resources delete the registered object instances by using the object management service. Test resources that know that the object instance exists will remove the object instance.
[0069] (10) Test resources cancel the previous publication / subscription relationship by using the Declaration Management Service or Data Distribution Management Service;
[0070] (11) Test resources exit the virtual-physical collaborative testing system by using the system management service;
[0071] (12) The last test resource to exit the virtual-real collaborative test system is destroyed by using the system management service.
[0072] Furthermore, the process of performing object-based data interaction described in step (5) includes the following steps:
[0073] (a) Test resources that have been declared to publish a certain object class will discover the object instance by registering the object instance through the object management service.
[0074] (b) Test resources manage the ownership of a registered object instance by using the ownership management service;
[0075] (c) Test resources that own an instance of an object are subject to security management by using a security management service;
[0076] (d) Test resources that own an object instance send their current value through the update mechanism of the object management service, and test resources that order the object instance will receive their current value through the reflection mechanism of the object management service.
[0077] (e) Test resources that order an object instance use the remote method of the object instance by calling the remote service through the object management service. The test resource that owns the object instance will receive a callback that implements the remote service. After the callback is executed, the remote service called by the ordering end returns the call result.
[0078] Beneficial effects:
[0079] This invention proposes a test resource information adaptation method for heterogeneous architecture compatibility. By defining standard model association rules and universal service application development templates, it improves the efficiency of resource information adaptation and enables rapid integration of virtual test systems. Attached Figure Description
[0080] Figure 1 This is a schematic diagram of a resource information adaptation framework based on digital modeling and service-oriented encapsulation.
[0081] Figure 2 A schematic diagram illustrating the process of resource information adaptation.
[0082] Figure 3 This is a structural diagram of the template for general resource service applications.
[0083] Figure 4 This describes the information adaptation process from test resources to the virtual-physical collaborative testing system.
[0084] Figure 5 This describes the information adaptation process from the virtual-real collaborative testing system to the testing resources.
[0085] Figure 6 A diagram illustrating the information mapping process in resource-serving applications.
[0086] Figure 7 This is a flowchart of the data transmission and reception process for a virtual-real collaborative testing system middleware. Figure 8 This is a flowchart of the data transmission and reception process for a virtual-real collaborative testing system middleware. Detailed Implementation
[0087] This embodiment describes a test resource information adaptation system and method for heterogeneous architecture compatibility. The method achieves test resource information adaptation through the test resource information adaptation system for heterogeneous architecture compatibility. The test resource information adaptation system for heterogeneous architecture compatibility includes a general resource service application template, a hardware access interface, and a virtual-physical collaborative testing system middleware interface / reflective memory RFM interface, etc. The system adapts test resource information based on the general resource service application template.
[0088] First, establish a general resource service application template, such as Figure 3 As shown, the general resource service application template includes a data conversion module, a protocol encoding / decoding module, and a data sending / receiving module.
[0089] (1) Protocol encoding and decoding module: used to load digital mapping model files, parse the communication protocol information in the files, decode the information from the test resources according to the communication protocol format, and encode the information sent to the test resources.
[0090] (2) Data conversion module: It is used to load the association rule model file and convert the received protocol data into object instance data of the virtual-real collaborative testing system according to the association rules between protocol elements and object attributes. It can also convert the object instance data received from the virtual-real collaborative testing system into protocol data packets.
[0091] (3) Data transceiver module: used to load resource interface description files, and use object model platform related implementation code and middleware interface services (in weak real-time scenarios) or reflection memory transfer services (in strong real-time scenarios) to complete information interaction within the virtual-real collaborative testing system.
[0092] (4) Hardware access interface: The hardware interface for testing resources to communicate with the outside world, including 1553B, RS422, RS485, RS232, CAN, Ethernet and other forms.
[0093] (5) Virtual-Real Collaborative Testing System Middleware Interface / Reflective Memory RFM Interface: Two interface forms for information transmission services of the virtual-real collaborative testing system, corresponding to middleware interaction services that support non-real-time communication and reflective memory transmission services that support real-time communication.
[0094] The working relationships of each module are as follows: Figure 4 As shown.
[0095] For functions that require special logic processing, the general resource service application template provides application code writing capabilities, supporting the secondary development of resource service applications.
[0096] (I) Information adaptation process from virtual-real collaborative testing system to testing resources:
[0097] The information adaptation process from the virtual-real collaborative testing system to test resources is as follows: Figure 5 The diagram illustrates the process of receiving object instance data from the virtual-physical collaborative testing system and converting it into test resource communication protocol data. The specific details are as follows:
[0098] (1.1) The data transceiver module receives object instance data from the virtual-real collaborative testing system by calling the virtual-real collaborative testing system middleware or the Reflective Memory RFM Access Interface API;
[0099] (1.2) The data conversion module describes the association rules of the resource interface description model to the resource digital mapping model and finds all communication protocols associated with the object instance (an object instance may be associated with multiple communication protocols);
[0100] (1.3) The data conversion module determines whether the current communication protocol is the last communication protocol associated with the object instance; if so, the encoding process ends; otherwise, step (1.4) continues.
[0101] (1.4) The protocol encoding and decoding module establishes a data buffer for the communication protocol and reserves memory space not less than the length of the communication protocol for the encoded data;
[0102] (1.5) The protocol encoding and decoding module copies the fixed frame header information in the communication protocol to the data buffer of the communication protocol;
[0103] (1.6) The data conversion module processes the elements in the communication protocol according to the element processing methods in the communication protocol (element processing methods include: bit parsing, physical value, BCD code and user-defined functions);
[0104] (1.7) The protocol encoding and decoding module copies the processed element information to the data buffer of the communication protocol;
[0105] (1.8) The data conversion module determines whether the currently processed element is the last element of the communication protocol; if so, it continues to execute step (1.9); otherwise, it proceeds to step (1.6).
[0106] (1.9) If the protocol encoding / decoding module determines whether the communication protocol has a frame end check function, proceed to step (1.11); otherwise, continue to step (1.10).
[0107] (1.10) The protocol encoding and decoding module calculates the frame end check information of the communication protocol and copies it to the data buffer of the communication protocol;
[0108] (1.11) The protocol encoding and decoding module calls the hardware access interface driver corresponding to the communication protocol and sends the encoded communication protocol data.
[0109] (II) Information Adaptation Process from Test Resources to Virtual-Real Collaborative Testing System
[0110] The information adaptation process from test resources to the virtual-physical collaborative testing system is as follows: Figure 6 The diagram illustrates the process of splitting data from test resources according to the resource communication protocol format and converting it into virtual-physical collaborative test system object instance data. The specific details are as follows:
[0111] (2.1) The protocol encoding and decoding module receives communication protocol data from the test resources through the hardware access interface driver;
[0112] (2.2) The protocol encoding / decoding module describes the list of communication protocols in the model through the resource interface and performs the protocol matching process;
[0113] (2.3) The protocol encoding / decoding module determines whether the protocol matching is successful; if it fails, the process ends; otherwise, it continues to execute step (2.4).
[0114] (2.4) The data conversion module uses the association rules of the resource digital mapping model to the resource interface description model to find all object instances associated with the communication protocol (one communication protocol may be associated with multiple object instances);
[0115] (2.5) The data conversion module determines whether the current object instance is the last object instance associated with the communication protocol; if so, proceed to step (2.10); otherwise, continue to step (2.6).
[0116] (2.6) The data transceiver module establishes a data cache area for object instances to reserve sufficient memory space for decoding data;
[0117] (2.7) The data conversion module processes the attributes in the object instance according to the object instance attribute processing method in the communication protocol (the object instance attribute processing method includes: bit resolution, physical value, BCD code and user-defined function);
[0118] (2.8) The data transceiver module copies the processed object instance attribute information to the object instance's data buffer;
[0119] (2.9) The data conversion module determines whether the attribute of the object instance being processed is the last attribute of the object instance. If so, it continues to execute step (2.10); otherwise, it proceeds to step (2.7).
[0120] (2.10) The data transceiver module calls the virtual-real collaborative testing system middleware or the reflection memory RFM access interface API to send the decoded object instance data.
[0121] This invention can not only achieve the adaptation of information from the virtual-real collaborative testing system to the test resources and the adaptation of information from the test resources to the virtual-real collaborative testing system, but also achieve bidirectional simultaneous adaptation of the two processes.
[0122] (III) Association Rules between Resource Digital Mapping Model and Resource Interface Description Model
[0123] To achieve the mapping of resources from the physical domain to the digital domain, it is necessary to establish association rules between the resource digital mapping model and the resource interface description model (specifically, the association rules between the communication protocol in the resource digital mapping model and the object model in the resource interface description model), and their relationship is as follows: Figure 7 As shown, it specifically includes the association rules for mapping from the resource interface description model to the resource digital mapping model and the association rules for mapping from the resource digital mapping model to the resource interface description model.
[0124] (1) Association rules for mapping from the resource interface description model to the resource digital mapping model
[0125] Table 1. Association Rules for Mapping from Resource Interface Description Model to Resource Digital Mapping Model
[0126]
[0127]
[0128] The association rules for mapping from the resource interface description model to the resource digital mapping model are shown in Table 1. Each association rule describes all communication protocol information associated with an object instance. This association rule uses the object instance name as the primary key and includes a fixed-length information description field and a variable-length association relationship field. Since each object instance contains several attributes, and each attribute can be associated with an unlimited number of communication protocol elements, the association relationship in each association rule is 1:N (N is a natural number).
[0129] The information description field describes the object model name to which the object instance belongs, the object instance data sending method, the object instance triggering element, the timed sending period, and the number of associations (N). Among them, the object instance data sending method includes direct update, triggered update, and timed update. The object instance triggering element specifies the triggering element set in the triggered update mode. There can be multiple triggering elements, which are logically ANDed with each other.
[0130] The association field contains N association rules, where N is determined by the number of associations in the information description field. Each association rule defines how a certain attribute in an object instance maps to a certain element in a communication protocol, including fields such as matching method, attribute name, attribute data type, protocol name, element name, and element data type. The matching method specifies the way attributes are mapped to elements, including direct matching, variable mapping, and enumeration type variable mapping. The attribute name is the name of the object model attribute in this association, representing the source of information adaptation from the virtual-physical collaborative testing system to the test resources. The attribute data type is the data type of the object model attribute in this association; it can be a basic data type or an enumeration type, but cannot be a user-defined complex data type. The protocol name is the name of the communication protocol in the digital mapping model. The element name is the name of the protocol data element in the association, representing the information adaptation target from the virtual-physical collaborative testing system to the test resources. The element data type describes the data type of the protocol data element; it can be consistent with or different from the "attribute data type" in the interface description model, and the two should be convertible to each other.
[0131] During the information adaptation process from the virtual-real collaborative testing system to the test resources, after the data transceiver module receives data of a certain object instance from the virtual-real collaborative testing system, the data conversion module completes the conversion of the object instance data into communication protocol data by searching the aforementioned association rules.
[0132] (2) Association rules for mapping from the resource digital mapping model to the resource interface description model
[0133] Table 2 Association Rules for Mapping Resource Digital Mapping Model to Resource Interface Description Model
[0134]
[0135] The association rules for mapping the resource digital mapping model to the resource interface description model are shown in Table 2. Each association rule describes all object instance information associated with a communication protocol. The association rule uses the communication protocol name as the primary key and includes a fixed-length information description field and a variable-length association relationship field. Since each communication protocol contains several elements, and each element can be associated with an unlimited number of object instance attributes, the association relationship in each association rule is 1:M (where M is a natural number).
[0136] The information description field describes the protocol data transmission method, the timed transmission period, the object instance triggering element, and the number of association relationships (M). Among them, the protocol data transmission method includes: direct update, triggered update, and timed update. The protocol triggering element specifies the triggering element set in the triggered update mode. There can be multiple triggering elements, which are logically ANDed with each other.
[0137] The association field contains N association rules, where N is determined by the number of associations in the information description field. Each association rule defines how a certain element in the communication protocol is mapped to a certain attribute in an object instance, including fields such as matching method, element name, element data type, object instance name, attribute name, and attribute data type. The matching method specifies the way elements are mapped to attributes, including direct matching, variable mapping, and enumeration type variable mapping; the element name is the name of the protocol data element in the association; the element data type describes the data type of the protocol data element, which can be consistent with or different from the "attribute data type" in the interface description model, and the two should be able to be converted to each other; the object instance name describes the name of the object instance in this association; the attribute name is the name of the attribute of the object instance in this association; the attribute data type indicates the data type of the attribute of the object instance in this association, which can be a basic data type or an enumeration type, but cannot be a user-defined complex data type.
[0138] During the information adaptation process from test resources to the virtual-physical collaborative testing system, after the data transceiver module receives a certain communication protocol data from the test resource, the data conversion module completes the conversion of the communication protocol data into object instance data by searching the aforementioned association rules.
[0139] (iv) Data transmission and reception process of the data transmission and reception module:
[0140] Since the object model PIM is described using platform-independent TDL, it needs to be converted into a platform-dependent physical implementation PSM to realize the data transmission and reception process. Therefore, it is necessary to design mapping rules from TDL to various languages. Furthermore, the information transmission services of the virtual-physical collaborative testing system include two types: middleware interaction services supporting non-real-time communication and reflection memory transfer services supporting real-time communication. Therefore, it is also necessary to design mapping rules between the object model PIM and these two different types of PSM.
[0141] The Reflective Memory Transfer Service supports the Object Model PSM in address offset format. Therefore, it is necessary to design the address length of each basic element in the Object Model TDL in the reflective memory, as shown in Table 3.
[0142] Table 3. Data lengths of different TDL basic elements in the Reflective Memory Transfer Service
[0143]
[0144]
[0145] The virtual-real collaborative testing system middleware supports the C++ format object model PSM. Therefore, it is necessary to design the mapping rules between the object model TDL expression and the C++ expression. The mapping relationship of basic data types in TDL and C++ is shown in Table 4.
[0146] Table 4 Mapping of Basic Data Types
[0147] TDL Definition C++ definition short ::CORBA::Short unsigned short ::CORBA::UShort long ::CORBA::Long unsigned long ::CORBA::ULong long long ::CORBA::LongLong unsigned long long ::CORBA::ULongLong float ::CORBA::Float double ::CORBA::Double boolean ::CORBA::Boolean char ::CORBA::Char string char* octet ::CORBA::Octet void void
[0148] After converting the object model TDL to the object model PSM in address offset format supported by the Reflective Memory Transfer Service and the object model PSM in C++ format supported by the Virtual-Real Collaborative Testing System Middleware, the data sending and receiving process can be implemented using the Virtual-Real Collaborative Testing System Middleware or the Reflective Memory Access Interface API.
[0149] The data transmission and reception process based on the middleware of the virtual-real collaborative testing system is as follows: Figure 8 As shown, the specific process is as follows:
[0150] (1) A test resource can create a virtual-physical collaborative test system by using the system management service;
[0151] (2) Other test resources can be added to the virtual-physical collaborative testing system by using the system management service;
[0152] (3) Test resources can declare publishing / subscription relationships by using the declaration management service; if test resources wish to filter the subscribed information, they can filter the subscribed information by using the data distribution management service;
[0153] (4) A test resource can start a time synchronization service by using the time management service, and other test resources can synchronize their time with it.
[0154] (5) Perform object-based data interaction. Test resources send messages and data stream files to other test resources by using the object management service. The specific processing includes the following steps:
[0155] (5-1) Object-based data interaction:
[0156] (a) Test resources that have declared that they publish an object class can register object instances using the object management service, and test resources that have declared that they order the object class or object instance will discover the object instance;
[0157] (b) Test resources can manage the ownership of a registered object instance by using the ownership management service;
[0158] (c) Test resources that own an instance of an object can be securely managed by using a security management service;
[0159] (d) Test resources that own an object instance can send their current value through the update mechanism of the object management service, and test resources that order the object instance will receive their current value through the reflection mechanism of the object management service.
[0160] (e) Test resources that order an object instance use the remote method of the object instance by calling the remote service through the object management service. The test resources that own the object instance will receive a callback that implements the remote service. After the callback is executed, the remote service call on the ordering end returns the call result.
[0161] (5-2) Test resources can send messages to other test resources by using the object management service;
[0162] (5-3) Test resources can send data stream files to other test resources by using the object management service;
[0163] (6) Test resources can query the current running status of the middleware by using other auxiliary management services;
[0164] (7) A test resource can start a time advancement service by using the time management service, and other test resources can register time advancement requests and perform time advancement processing;
[0165] (8) If the virtual-real collaborative testing system has not finished running, the process of steps (5) to (7) can be repeated;
[0166] (9) When the system stops running, test resources can delete registered object instances by using the object management service. Test resources that know that an object instance exists will remove the object instance.
[0167] (10) Test resources can cancel the previous publication / subscription relationship by using the Declaration Management Service or Data Distribution Management Service;
[0168] (11) Test resources can exit the virtual-physical collaborative testing system by using the system management service;
[0169] (12) The last test resource to exit the virtual-real collaborative test system can be destroyed by using the system management service.
[0170] The data transmission and reception process based on the reflection memory access interface can be implemented by directly calling the reflection memory board driver, which will not be elaborated here.
[0171] The above examples of the present invention are merely illustrative of the computational model and process of the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A test resource information adaptation method for heterogeneous architecture compatibility, characterized in that, This test resource information adaptation system, designed for heterogeneous architecture compatibility, adapts information from the virtual-physical collaborative testing system to test resources and vice versa. The adaptation process from the virtual-physical collaborative testing system to test resources involves receiving object instance data from the virtual-physical collaborative testing system and converting it into test resource communication protocol data. The specific steps include: (1.1) The data transceiver module receives object instance data from the virtual-real collaborative testing system by calling the virtual-real collaborative testing system middleware or the Reflective Memory RFM Access Interface API; (1.2) The data conversion module uses the resource interface to describe the association rules of the mapping from the model to the resource digital mapping model and finds all communication protocols associated with the object instance; (1.3) The data conversion module determines whether the current communication protocol is the last communication protocol associated with the object instance; if so, the encoding process ends; otherwise, step (1.4) continues. (1.4) The protocol encoding and decoding module establishes a data buffer for the communication protocol, reserving memory space no less than the length of the communication protocol for the encoded data; (1.5) The protocol encoding / decoding module copies the fixed frame header information in the communication protocol to the data buffer of the communication protocol; (1.6) The data conversion module processes the elements in the communication protocol according to the element processing method in the communication protocol; (1.7) The protocol encoding / decoding module copies the processed element information to the data buffer of the communication protocol; (1.8) The data conversion module determines whether the element being processed is the last element of the communication protocol; if so, it continues to execute step (1.9); otherwise, it proceeds to step (1.6). (1.9) The protocol encoding and decoding module determines whether the communication protocol has a frame end check function. If yes, proceed to step (1.10); otherwise, proceed to step (1.11). (1.10) The protocol encoding and decoding module calculates the frame end check information of the communication protocol and copies it to the data buffer of the communication protocol; (1.11) The protocol encoding and decoding module calls the hardware access interface driver corresponding to the communication protocol and sends the encoded communication protocol data; The information adaptation process from test resources to the virtual-physical collaborative testing system involves splitting the data from the test resources based on the resource communication protocol format and converting it into object instance data for the virtual-physical collaborative testing system. The specific process includes the following steps: (2.1) The protocol encoding and decoding module receives communication protocol data from the test resources through the hardware access interface driver; (2.2) The protocol encoding / decoding module describes the list of communication protocols in the model through the resource interface and performs the protocol matching process; (2.3) The protocol encoding and decoding module determines whether the protocol matching is successful; if it fails, the process ends; otherwise, it continues to execute step (2.4). (2.4) The data conversion module searches for all object instances associated with the communication protocol by mapping the resource digital mapping model to the resource interface description model using the association rules. (2.5) The data conversion module determines whether the current object instance is the last object instance associated with the communication protocol; if so, proceed to step (2.10); otherwise, continue to step (2.6). (2.6) The data transceiver module establishes a data cache area for object instances to reserve sufficient memory space for decoding data; (2.7) The data conversion module processes the attributes in the object instance according to the object instance attribute processing method in the communication protocol; (2.8) The data transceiver module copies the processed object instance attribute information to the object instance's data buffer; (2.9) The data conversion module determines whether the attribute of the object instance being processed is the last attribute of the object instance. If so, it continues to execute step (2.10); otherwise, it goes to step (2.7). (2.10) The data transceiver module calls the virtual-real collaborative testing system middleware or the reflection memory RFM access interface API to send the decoded object instance data.
2. The test resource information adaptation method for heterogeneous architecture compatibility according to claim 1, characterized in that, The association rules between the resource digital mapping model and the resource interface description model include the association rules for mapping from the resource interface description model to the resource digital mapping model and the association rules for mapping from the resource digital mapping model to the resource interface description model. Each association rule in the association rules mapping from the resource interface description model to the resource digital mapping model describes all communication protocol information associated with an object instance; the association rule uses the object instance name as the primary key and contains a fixed-length information description field and a variable-length association relationship field; each object instance contains several attributes, and each attribute can be associated with an unlimited number of communication protocol elements; The information description field describes the object model name to which the object instance belongs, the object instance data sending method, the object instance triggering element, the timed sending period, and the number of related relationships; among them, the object instance data sending method includes direct update, triggered update, and timed update, and the object instance triggering element specifies the triggering element set in the triggered update mode; The association field contains N association rules, where N is determined by the number of associations in the information description field. Each association rule defines how a certain attribute in an object instance maps to a certain element in a communication protocol, including fields for matching method, attribute name, attribute data type, protocol name, element name, and element data type. The matching method specifies the way attributes are mapped to elements, including direct matching, variable value mapping, and enumerated type variable value mapping. The attribute name is the name of the object model attribute in this association, representing the source of information adaptation from the virtual-physical collaborative testing system to the test resources. The attribute data type is the data type of the object model attribute in this association. The protocol name is the name of the communication protocol in the digital mapping model. The element name is the name of the protocol data element in the association, representing the information adaptation target from the virtual-physical collaborative testing system to the test resources. The element data type describes the data type of the protocol data element. During the information adaptation process from the virtual-real collaborative testing system to the test resources, after the data transceiver module receives data of a certain object instance from the virtual-real collaborative testing system, the data conversion module completes the conversion of the object instance data into communication protocol data by searching the above-mentioned association rules. Each association rule in the association rules mapping from the resource digital mapping model to the resource interface description model describes all object instance information associated with a communication protocol; the association rule uses the communication protocol name as the primary key and contains a fixed-length information description field and a variable-length association relationship field; since each communication protocol contains several elements, each element can be associated with an unlimited number of object instance attributes; The information description field describes the protocol data sending method, the timed sending period, the object instance triggering element, and the number of association relationships; among them, the protocol data sending method includes: direct update, triggered update, and timed update, and the protocol triggering element specifies the triggering element set in the triggered update mode; The association field contains N association rules, where N is determined by the number of associations in the information description field. Each association rule defines how a certain element in the communication protocol is mapped to a certain attribute in an object instance, including the matching method, element name, element data type, object instance name, attribute name, and attribute data type fields. The matching method specifies the way elements are mapped to attributes, including direct matching, variable value mapping, and enumerated type variable value mapping. The element name is the name of the protocol data element in the association. The element data type describes the data type of the protocol data element. The object instance name describes the name of the object instance in this association. The attribute name is the name of the attribute of the object instance in this association. The attribute data type indicates the data type of the attribute of the object instance in this association. During the information adaptation process from test resources to the virtual-physical collaborative testing system, after the data transceiver module receives a certain communication protocol data from the test resource, the data conversion module completes the conversion of the communication protocol data into object instance data by searching the aforementioned association rules.
3. The test resource information adaptation method for heterogeneous architecture compatibility according to claim 2, characterized in that, In the association rules for mapping from the resource interface description model to the resource digital mapping model and from the resource digital mapping model to the resource interface description model, when the element data type and the "attribute data type" on the interface description model side are inconsistent, the element data type and the "attribute data type" on the interface description model side can be converted to each other.
4. The test resource information adaptation method for heterogeneous architecture compatibility according to claim 2, characterized in that, In the association rules for mapping from the resource interface description model to the resource digital mapping model and from the resource digital mapping model to the resource interface description model, when there are multiple triggering elements set in the trigger update mode specified by the object instance triggering element, the triggering elements are logically ANDed with each other.
5. The test resource information adaptation method for heterogeneous architecture compatibility according to claim 2, characterized in that, In the association rules for mapping from the resource interface description model to the resource digital mapping model and from the resource digital mapping model to the resource interface description model, the attribute data type is either a basic data type or an enumeration type.
6. The test resource information adaptation method for heterogeneous architecture compatibility according to claim 2, characterized in that, During the data transmission and reception process, the data transceiver module first needs to convert the object model TDL into an object model PSM in address offset format supported by the Reflective Memory Transfer Service and an object model PSM in C++ format supported by the Virtual-Real Collaborative Testing System Middleware. The process of converting the object model TDL into an object model PSM in address offset format supported by the Reflective Memory Transfer Service and an object model PSM in C++ format supported by the Virtual-Real Collaborative Testing System Middleware is implemented based on the mapping rules between the object model PIM and different types of PSM. For the Object Model PSM, which supports address offset format in the Reflective Memory Transfer Service, the address length of each basic element in the Object Model TDL in reflective memory is designed as follows: For the virtual-real collaborative testing system middleware that supports the C++ format object model PSM, a mapping rule between the object model TDL expression and the C++ expression is designed. The mapping relationship of basic data types in TDL and C++ is shown in the table below: After converting the object model TDL to the object model PSM in address offset format supported by the Reflective Memory Transfer Service and the object model PSM in C++ format supported by the Virtual-Real Collaborative Testing System Middleware, the data sending and receiving process is implemented using the Virtual-Real Collaborative Testing System Middleware or the Reflective Memory Access Interface API.
7. The test resource information adaptation method for heterogeneous architecture compatibility according to claim 6, characterized in that, The data transmission and reception process based on the middleware of the virtual-real collaborative testing system includes the following steps: (1) A certain test resource creates a virtual-physical collaborative test system by using the system management service; (2) Other test resources are added to the virtual-physical collaborative testing system through the use of system management services; (3) Test resources declare publishing / subscription relationships by using the declaration management service; if test resources wish to filter the subscribed information, they filter the subscribed information by using the data distribution management service; (4) A certain test resource starts a time synchronization service by using the time management service, and other test resources synchronize their time with it; (5) Perform object-based data interaction. Test resources send messages and data stream files to other test resources by using the object management service; (6) Test resources can query the current running status of the middleware by using other auxiliary management services; (7) A certain test resource starts a time advancement service by using the time management service, and other test resources register time advancement requests and perform time advancement processing; (8) If the virtual-real collaborative testing system has not finished running, the process of steps (5) to (7) can be repeated; (9) When the system stops running, the test resources delete the registered object instances by using the object management service. Test resources that know that the object instance exists will remove the object instance. (10) Test resources cancel the previously declared release / subscription relationship by using the Declaration Management Service or Data Distribution Management Service; (11) Test resources exit the virtual-physical collaborative testing system by using the system management service; (12) The last test resource to exit the virtual-real collaborative test system is destroyed by using the system management service.
8. The test resource information adaptation method for heterogeneous architecture compatibility according to claim 7, characterized in that, Step (5) describes the process of performing object-based data interaction, which includes the following steps: (a) Test resources that have been declared to publish a certain object class will discover the object instance by registering the object instance through the object management service. (b) Test resources manage the ownership of a registered object instance by using the ownership management service; (c) Test resources that own an instance of an object are subject to security management by using a security management service; (d) The test resource that owns an object instance sends its current value through the update mechanism of the object management service, and the test resource that ordered the object instance will receive its current value through the reflection mechanism of the object management service; (e) When a test resource that orders an object instance uses a remote method of the object instance by calling a remote service through the object management service, the test resource that owns the object instance will receive a callback that implements the remote service. After the callback is executed, the remote service called by the ordering end returns the call result.
Citation Information
Patent Citations
Service integration method for distributed heterogeneous resources
CN111435940A
Streamline digital management and control resource pushing method and device
CN115587903A
