Communication object construction method based on communication instance and related equipment

By obtaining service configuration information and building service configuration files in the AUTOSAR AP platform, and directly selecting matching communication instances from the configuration files to adapt to changes in the communication protocol, the inefficiency problem caused by hard coding between communication instances and protocols is solved, and communication is improved Efficiency and development efficiency.

CN119011385APending Publication Date: 2024-11-22NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410985089.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the AUTOSAR AP platform, when data communication is conducted based on communication instances, communication efficiency is inefficient because the relationship between the communication instance and the communication protocol is hard coded and strongly bound, resulting in the need to recode when replacing the communication protocol used by the communication service. Communication instance.

Method used

By obtaining the service configuration information of the target communication service, determine the communication instance ID in the service configuration file that matches the communication protocol class identifier, build a communication object, avoid rebuilding the communication instance to adapt to the target communication protocol, and directly select the corresponding communication instance from the configuration file .

Benefits of technology

Improves data communication efficiency based on communication instances, reduces the workload of code changes and redeployment, and improves development efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011385A_ABST
    Figure CN119011385A_ABST
Patent Text Reader

Abstract

The invention provides a communication object construction method based on a communication instance, and the acquisition of service configuration information can clarify a communication protocol class identifier which can be supported by a target communication service. A plurality of communication instances and communication protocol identifiers matched with the communication protocol class identifiers are stored in a service configuration file, and each communication protocol identifier is matched with the communication protocol class identifier of the target communication service, so that all the communication instances in the configuration file can support the target communication service to establish communication; when the communication protocol needs to be adjusted, the communication instance of which the communication protocol identifier is the same as the target communication protocol is directly selected from the configuration file, and a new communication instance does not need to be reconstructed to apply the target communication protocol; the communication protocol supported by the target communication service and the corresponding communication instance are preset in the service configuration file, and the corresponding communication instance does not need to be encoded in real time, so that the data communication efficiency based on the communication instance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication control technology, and in particular to a communication object construction method based on a communication instance and related equipment. Background Art

[0002] The main purpose of the AUTOSAR AP (Automotive Open System Architecture Automotive Application Platform) platform is to provide a standardized automotive software architecture designed to support the development, deployment and management of automotive electronic systems. The communication module in the AP platform can provide a variety of different communication services, and each communication service can use different communication protocols to complete the service. When determining the communication protocol to be used to provide communication services, it is necessary to immediately encode a communication instance that matches the communication protocol, and use this communication instance to build a communication object for communication. In this way, since the relationship between the communication instance and the communication protocol is hard-coded and strongly bound, when it is necessary to replace the communication protocol used by the communication service, the communication instance needs to be re-encoded to complete the communication, and the communication efficiency based on the communication instance is low.

[0003] Therefore, how to solve the problem of low communication efficiency when performing data communication based on communication instances has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0004] Based on the above problems, in order to solve the problem of low communication efficiency when data communication is performed based on communication instances, the present application provides a communication object construction method based on communication instances and related equipment.

[0005] The embodiments of the present application disclose the following technical solutions:

[0006] In a first aspect, the present application provides a method for constructing a communication object based on a communication instance, which is applied to an AP platform; the method comprises:

[0007] In response to a communication request, obtaining service configuration information of a target communication service; the service configuration information is used to indicate a service ID of the target communication service and a plurality of communication protocol class identifiers corresponding to the service ID; the communication request includes: a target communication protocol and the service ID of the target communication service;

[0008] Determine a service profile of the target communication service according to the service configuration information; the service profile includes: a plurality of communication instance IDs and communication protocol identifiers corresponding to the communication instance IDs; the communication protocol identifiers all match the communication protocol class identifier;

[0009] Based on the service configuration information, the service configuration file and the communication request, a communication object corresponding to the communication request is constructed.

[0010] Optionally, constructing a communication object corresponding to the communication request based on the service configuration information, the service configuration file, and the communication request specifically includes:

[0011] Determine communication object construction parameters according to the communication request, the service configuration information and the service configuration file; the communication object construction parameters include: the service ID, the communication instance ID and the communication protocol class identifier corresponding to the communication instance ID;

[0012] The object is constructed by using the communication object construction parameters to obtain the communication object corresponding to the communication request.

[0013] Optionally, determining the communication object construction parameters according to the communication request, the service configuration information, and the service configuration file specifically includes:

[0014] Determine a first communication protocol class identifier according to the target communication protocol; the first communication protocol class identifier matches the target communication protocol;

[0015] Determine the first communication protocol identifier through the first communication protocol class identifier; the first communication protocol identifier matches the first communication protocol class identifier;

[0016] The first communication protocol class identifier, the communication instance ID corresponding to the first communication protocol identifier, and the service ID corresponding to the first communication protocol class identifier are determined as the communication object construction parameters.

[0017] Optionally, after determining the service configuration file of the target communication service according to the service configuration information, the method further includes:

[0018] Obtaining an available protocol list; the available protocol list is used to indicate communication protocols that can be used in the AP platform;

[0019] Performing a file validity check on the service configuration file based on the available protocol list to determine whether there is a communication protocol in the service configuration file that does not match the available protocol list;

[0020] If the service profile contains a communication protocol that matches the available protocol list, it is determined that the service profile is abnormal.

[0021] Optionally, after constructing a communication object corresponding to the communication request based on the service configuration information, the service configuration file and the communication request, the method further includes:

[0022] Based on the preset service publishing interface and the communication object, determining a communication protocol calling interface corresponding to the communication object;

[0023] The target communication service is published through the target communication protocol according to the communication protocol calling interface corresponding to the communication object.

[0024] In a second aspect, the present application provides a communication object construction system based on a communication instance, which is applied to an AP platform, and the system includes:

[0025] A configuration information acquisition module, configured to acquire service configuration information of a target communication service in response to a communication request; the service configuration information is used to indicate a service ID of the target communication service and a plurality of communication protocol class identifiers corresponding to the service ID; the communication request includes: a target communication protocol and the service ID of the target communication service;

[0026] A configuration file determination module, configured to determine a service configuration file of the target communication service according to the service configuration information; the service configuration file comprises: a plurality of communication instance IDs and communication protocol identifiers corresponding to the communication instance IDs; the communication protocol identifiers all match the communication protocol class identifier;

[0027] The communication object construction module is used to construct a communication object corresponding to the communication request based on the service configuration information, the service configuration file and the communication request.

[0028] Optionally, the communication object construction module is used to:

[0029] Determine communication object construction parameters according to the communication request, the service configuration information and the service configuration file; the communication object construction parameters include: the service ID, the communication instance ID and the communication protocol class identifier corresponding to the communication instance ID;

[0030] The object is constructed by using the communication object construction parameters to obtain the communication object corresponding to the communication request.

[0031] Optionally, the communication object constructs a parameter module, specifically for:

[0032] Determine a first communication protocol class identifier according to the target communication protocol; the first communication protocol class identifier matches the target communication protocol;

[0033] Determine the first communication protocol identifier through the first communication protocol class identifier; the first communication protocol identifier matches the first communication protocol class identifier;

[0034] The first communication protocol class identifier, the communication instance ID corresponding to the first communication protocol identifier, and the service ID corresponding to the first communication protocol class identifier are determined as the communication object construction parameters.

[0035] In a third aspect, the present application provides an electronic device, the device comprising: a processor, a memory, and a system bus;

[0036] The processor and the memory are connected via the system bus;

[0037] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes the communication object construction method based on the communication instance.

[0038] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the communication object construction method based on a communication instance.

[0039] Compared with the prior art, the present application has the following beneficial effects: the present application provides a communication object construction method based on a communication instance and related equipment. The communication object construction method provided in the embodiment of the present application is applied to the AP platform. First, in response to a communication request, the service configuration information of the target communication service is obtained; the service configuration information is used to represent the service ID of the target communication service and multiple communication protocol class identifiers corresponding to the service ID; the communication request includes: the target communication protocol and the service ID of the target communication service; according to the service configuration information, the service profile of the target communication service is determined; the service profile includes: multiple communication instance IDs and communication protocol identifiers corresponding to the communication instance ID separately; the communication protocol identifiers all match the communication protocol class identifier; based on the service configuration information, the service profile and the communication request, a communication object corresponding to the communication request is constructed. In the above method, the acquisition of the service configuration information can indicate in advance the communication protocol class associated with the target communication service, thereby clarifying the communication protocol class identifiers that the target communication service can support. After that, the service configuration information is used to further determine the service configuration file of the target communication service. In the service configuration file, multiple communication instances and communication protocol identifiers matching the communication protocol class identifier are stored. Since each communication protocol identifier matches the communication protocol class identifier of the target communication service, all communication instances stored in the configuration file can support the target communication service to establish communication. In the process of constructing the communication object, when it is necessary to adjust the communication protocol adopted by the communication service, the communication instance whose communication protocol identifier is the same as the target communication protocol can be directly selected from the configuration file. There is no need to rebuild a new communication instance to apply the target communication protocol. The communication protocols and corresponding communication instances supported by the target communication service have been pre-set in the service configuration file. The communication protocol can be adjusted by directly selecting the corresponding communication instance from the service configuration file. There is no need to encode the corresponding communication instance in real time, thereby improving the efficiency of data communication based on communication instances. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 A schematic diagram of the relationship between a service ID, a communication instance and a communication protocol provided in an embodiment of the present application;

[0042] Figure 2A flowchart of a method for constructing a communication object based on a communication instance provided in an embodiment of the present application;

[0043] Figure 3 A flow chart of a communication object construction method provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of a process for determining communication object construction parameters provided in an embodiment of the present application;

[0045] Figure 5 A schematic diagram of a method flow for verifying the validity of a service configuration file provided in an embodiment of the present application;

[0046] Figure 6 A schematic diagram of the structure of a communication object construction system based on a communication instance provided in an embodiment of the present application;

[0047] Figure 7 A schematic diagram of a structure of an electronic device constructed based on a communication object of a communication instance provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] As mentioned above, the communication module in the AP platform can provide a variety of different communication services, and each communication service can use different communication protocols to complete the service. When determining the communication protocol to be used to provide the communication service, it is necessary to immediately encode the communication instance that matches the communication protocol, and use this communication instance to build a communication object for communication. In this way, since the relationship between the communication instance and the communication protocol is hard-coded and strongly bound, when it is necessary to replace the communication protocol used by the communication service, the communication instance needs to be re-encoded to complete the communication, and the communication efficiency based on the communication instance is low.

[0049] Therefore, how to solve the problem of low communication efficiency when performing data communication based on communication instances has become a technical problem that technical personnel in this field urgently need to solve.

[0050] In order to solve the above problems, the present application provides a communication object construction method based on communication instances and related equipment. The communication object construction method provided in the embodiment of the present application is applied to the AP platform. First, in response to a communication request, the service configuration information of the target communication service is obtained; the service configuration information is used to represent the service ID of the target communication service and multiple communication protocol class identifiers corresponding to the service ID; the communication request includes: the target communication protocol and the service ID of the target communication service; according to the service configuration information, the service profile of the target communication service is determined; the service profile includes: multiple communication instance IDs and communication protocol identifiers corresponding to the communication instance ID separately; the communication protocol identifiers all match the communication protocol class identifier; based on the service configuration information, the service configuration file and the communication request, a communication object corresponding to the communication request is constructed. In the above method, the acquisition of service configuration information can indicate in advance the communication protocol class associated with the target communication service, thereby clarifying the communication protocol class identifiers that the target communication service can support. After that, the service configuration information is used to further determine the service configuration file of the target communication service. In the service configuration file, multiple communication instances and communication protocol identifiers matching the communication protocol class identifier are stored. Since each communication protocol identifier matches the communication protocol class identifier of the target communication service, all communication instances stored in the configuration file can support the target communication service to establish communication. In the process of constructing the communication object, when it is necessary to adjust the communication protocol adopted by the communication service, the communication instance whose communication protocol identifier is the same as the target communication protocol can be directly selected from the configuration file. There is no need to rebuild a new communication instance to apply the target communication protocol. The communication protocols and corresponding communication instances supported by the target communication service have been pre-set in the service configuration file. The communication protocol can be adjusted by directly selecting the corresponding communication instance from the service configuration file. There is no need to encode the corresponding communication instance in real time, thereby improving the efficiency of data communication based on communication instances.

[0051] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] The communication module in the AP platform can provide a variety of communication services. For details, see Figure 1, this figure is a schematic diagram of the relationship between a service ID, a communication instance and a communication protocol provided in an embodiment of the present application. Among them, Service1 represents a communication service with ID 1, Instance1-Instance2 represents communication instances with instance IDs 1 and 2, and Someip, Dds, and Shm represent three different communication protocols. As can be seen from the figure, a spoof communication service corresponds to a variety of different communication instances. In a specific class of communication services, the communication service can generally support a variety of different communication protocols to complete the same communication service, and these diverse communication protocols are distributed in each communication instance, so that the completion of a communication service can be completed based on different communication protocols and communication instances.

[0053] Next, a communication object construction method based on a communication instance provided by an embodiment of the present application will be introduced in conjunction with specific embodiment drawings. Figure 2 , which is a flow chart of a method for constructing a communication object based on a communication instance provided in an embodiment of the present application, and specifically includes the following steps:

[0054] S101: In response to a communication request, obtain service configuration information of a target communication service; the service configuration information is used to represent a service ID of the target communication service and a plurality of communication protocol class identifiers corresponding to the service ID; the communication request includes: a target communication protocol and the service ID of the target communication service.

[0055] First, it is necessary to determine the target communication service to be provided through a communication request, and obtain the service ID of the target communication service and the communication protocol information corresponding to the attached figure ID. In order to characterize the usage method and protocol information of the communication protocol corresponding to a service ID, in the service configuration information of the target communication service, the communication protocol class identifier of the communication protocol is used as the information corresponding to the service ID to characterize the protocol information and usage methods of all communication protocols corresponding to the communication service.

[0056] Among them, the communication protocol class identifier can use a specific communication protocol class name. The communication protocol class name is different from the communication protocol name. The communication protocol class name is used to indicate the specific usage of the communication protocol. It is a collective name of the communication protocol usage method. Take class_someip and someip as examples. The class_someip communication protocol class name is used to create and manage objects of the someip communication protocol. In essence, class_someip is a programming element that encapsulates the specific implementation details of the someip protocol, and includes the initialization of the protocol, data sending and receiving functions. Through the communication protocol class name class_someip, you can create a communication instance of the someip communication protocol and use this communication instance for communication.

[0057] In actual application scenarios, the service configuration information of the target communication service is a code including the service ID and its corresponding communication protocol class identifier, and its specific format is: <service ID, communication protocol class name>. Set the communication protocol class name to class_someip, the service ID to service1, and the corresponding service configuration information code is<service1,class_someip> .

[0058] S102: Determine a service profile of the target communication service according to the service configuration information; the service profile includes: a plurality of communication instance IDs and communication protocol identifiers corresponding to the communication instance IDs individually; the communication protocol identifiers all match the communication protocol class identifiers.

[0059] After determining the service configuration information of the target communication service, determine the service configuration file of the target communication service based on the determined service configuration information. In the terminal of the upper computer to which the AP platform belongs, multiple communication instances are pre-stored, and each communication instance has a corresponding communication protocol name. The communication instance and its corresponding communication protocol name are stored in the form of a configuration file. The service configuration file includes instance IDs of multiple communication instances and communication protocol identifiers corresponding to their instance IDs. Taking instance1 as an example of instance ID, if instance1 can support two communication protocols, someip protocol and DDS, then in the service configuration file, the storage code for instance1 is<instance1,someip> and<instance1.DDS> In the configuration file, all communication protocol names corresponding to a communication instance are stored separately.

[0060] It can be understood that since all communication protocol class identifiers corresponding to the target communication service are stored in the service configuration information, the types of all communication protocols supported by the target communication service can be determined through the communication protocol class identifier stored in the configuration information, and the configuration file is determined based on this, so that the communication protocols corresponding to all communication instances in the configuration file are all types of communication protocols supported by the target communication service, that is, all communication protocol identifiers in the service configuration file match the communication protocol class identifier.

[0061] S103: Constructing a communication object corresponding to the communication request based on the service configuration information, the service configuration file and the communication request.

[0062] After completing the construction of service configuration information and service configuration files, the communication object can be constructed. The construction of the communication object requires three elements, namely, the service ID, the instance ID, and the communication protocol class identifier corresponding to the communication request. Therefore, the target communication protocol to be constructed is determined from the communication request, and the corresponding instance ID, the corresponding communication protocol class name, and the service ID are selected from the service configuration file based on the target communication protocol to construct the communication object.

[0063] It should be noted that in actual application scenarios, the service ID, instance ID, and the protocol class name corresponding to the service ID cannot all be written into the code of the service configuration information. If the three are bound and written into the code, it will lead to a strong binding of the three, which greatly reduces the flexibility and maintainability of the code. Every time the communication protocol changes, the code needs to be modified, reconfigured, and confirmed, which increases the workload of development and maintenance. By writing the protocol name into the configuration file instead of the code, dynamic protocol selection can be achieved. When the communication protocol needs to be changed, only the configuration file needs to be modified without modifying the code. This method avoids frequent code changes and redeployment, and improves development efficiency and communication efficiency based on communication instances.

[0064] For details, see Figure 3 A flow chart of a disclosed communication object construction method specifically includes the following steps:

[0065] S201: Determine communication object construction parameters according to the communication request, the service configuration information and the service configuration file; the communication object construction parameters include: the service ID, the communication instance ID and the communication protocol class identifier corresponding to the communication instance ID;

[0066] S202: construct an object using the communication object construction parameters to obtain the communication object corresponding to the communication request.

[0067] In the process of building a communication object, it is necessary to determine the target communication protocol through a specific communication request, and determine the same communication protocol in the service configuration file according to the target communication protocol, so as to determine the communication instance ID and service ID corresponding to the target communication protocol.

[0068] Among them, a communication request refers to an operation request for communication issued by a user or a host computer, which includes the communication protocol, communication object, and required communication service. Therefore, through the relevant information contained in the communication request, the service ID of the target communication service and the communication protocol to be adopted under this communication service can be confirmed, so that the corresponding communication object can be determined through the communication object construction parameters.

[0069] Next, the construction process of the communication object construction parameters will be specifically introduced in conjunction with the accompanying drawings of specific embodiments.

[0070] See also Figure 4 , which is a schematic diagram of a flow chart of determining communication object construction parameters provided in an embodiment of the present application, specifically comprising the following steps:

[0071] S301: Determine a first communication protocol class identifier according to the target communication protocol; the first communication protocol class identifier matches the target communication protocol;

[0072] In the process of determining the communication object construction parameters, first determine the communication protocol class identifier that matches the target communication protocol based on the target communication protocol in the communication request, and record it as the first communication protocol class identifier. For example, if the target communication protocol is someip, the first communication protocol class identifier is class_someip, and both belong to the somip protocol. The determination of the first communication protocol class identifier can effectively characterize the method of using the target communication protocol in the subsequent communication establishment process.

[0073] S302: Determine a first communication protocol identifier through the first communication protocol class identifier; the first communication protocol identifier matches the first communication protocol class identifier;

[0074] S303: Determine the first communication protocol class identifier, the communication instance ID corresponding to the first communication protocol identifier, and the service ID corresponding to the first communication protocol class identifier as the communication object construction parameters.

[0075] Further, the first communication protocol class identifier in the service configuration information is used to determine the first communication protocol identifier that matches it from the service configuration file. Similarly, class_someip is used as an example of the first communication protocol class identifier. When the first communication protocol class identifier is class_someip, the corresponding first communication protocol identifier is someip. Its first communication protocol identifier is only used as the name identifier of the communication protocol and does not include the specific content of the protocol.

[0076] Through the first communication protocol identifier, the communication instance corresponding to the first communication protocol identifier can be determined from the service configuration file. In this way, the service ID of the target communication service, the communication instance ID corresponding to the first communication protocol identifier, and the first communication protocol class identifier corresponding to the target communication protocol are obtained. The protocol usage method and operation method represented by the first communication protocol class identifier can effectively combine the above three information to generate communication object construction parameters.

[0077] Furthermore, in actual application scenarios, in the service configuration file, since the correspondence between each communication instance ID and the communication protocol identifier is pre-set data stored in the host computer. Therefore, sometimes it may happen that the communication protocol supported and used in the current AP platform does not support the communication protocol corresponding to the communication instance. At this time, it will cause errors in the service configuration file, thereby affecting the construction process of the communication object. Therefore, after determining the service configuration file of the target communication service according to the service configuration information of the target communication service, it is necessary to verify the validity of the service configuration file to prevent the problem that the communication protocol corresponding to the communication instance cannot be applied, resulting in the inability to generate a communication object.

[0078] For details, see Figure 5 , which is a schematic diagram of a method flow for checking the validity of a service configuration file provided in an embodiment of the present application, and specifically includes the following steps:

[0079] S401: Obtain an available protocol list; the available protocol list is used to indicate the communication protocols that can be used in the AP platform;

[0080] First, obtain the available protocol list of the current AP platform. The available protocol list is used to represent the set of communication protocols that can be recognized and operated in the AP platform. In the process of obtaining the available protocol list, the communication module in the AP platform can be initialized, so as to read the available communication protocols from the configuration file, database or other data storage location in the AP platform, so as to generate the available protocol list.

[0081] S402: Performing a file validity check on the service configuration file based on the available protocol list to determine whether there is a communication protocol in the service configuration file that does not match the available protocol list;

[0082] S403: If the service configuration file contains a communication protocol that matches the available protocol list, it is determined that the service configuration file is abnormal.

[0083] After obtaining the list of available protocols, the communication protocols corresponding to each communication instance ID in the service configuration file are checked for file validity based on the list of available protocols to determine whether there are any communication protocols in the service configuration file that are not in the list of available protocols. If there are any communication protocols in the service configuration file that are not in the list of available protocols, it indicates that the current AP platform cannot support the normal operation of all communication instances in the service configuration file. Therefore, it is determined that the service configuration file is abnormal, thereby preventing the incorrect construction of the communication object.

[0084] As an optional implementation, after obtaining the communication object, the following two steps are also included:

[0085] Step 1: Based on the preset service publishing interface and the communication object, determine the communication protocol calling interface corresponding to the communication object;

[0086] Step 2: Calling an interface according to the communication protocol corresponding to the communication object, and publishing the target communication service through the target communication protocol.

[0087] After the construction of the communication object is completed, the specific communication service can be published based on the communication object to respond to the communication request. Among them, it is necessary to pre-set the service publishing interface and communication object, determine the interface used to provide the target communication service in the bottom layer, and pass the communication instance in the communication object and the communication protocol identifier used through this interface to complete the publication of the target communication task.

[0088] Among them, the preset service publishing interface can be an offerservice interface, and the communication protocol calling interface determined by the offerservice interface can be a calling interface of each communication protocol, such as a SOMEIP protocol interface, a DDS protocol interface, and a shared memory communication interface. Among them, the SOMEIP protocol interface can include a SomeIpOfferService interface, a SomeIpEvent interface, and a SomeIpMethod interface, wherein the SomeIpOfferService interface is used to use the Someip protocol to publish and manage services, and the SomeIpEvent interface and the SomeIpMethod interface represent the interface for processing event transmission and the interface for processing method calls, respectively. By calling the corresponding communication protocol interface, the target communication service can be published by the target communication protocol, thereby realizing communication based on communication instances.

[0089] The embodiment of the present application provides a method for constructing a communication object based on a communication instance. The communication object construction method provided by the embodiment of the present application is applied to an AP platform. First, in response to a communication request, the service configuration information of the target communication service is obtained; the service configuration information is used to represent the service ID of the target communication service and multiple communication protocol class identifiers corresponding to the service ID; the communication request includes: the target communication protocol and the service ID of the target communication service; according to the service configuration information, the service profile of the target communication service is determined; the service profile includes: multiple communication instance IDs and communication protocol identifiers corresponding to the communication instance ID separately; the communication protocol identifiers all match the communication protocol class identifier; based on the service configuration information, the service profile and the communication request, a communication object corresponding to the communication request is constructed. In the above method, the acquisition of the service configuration information can indicate in advance the communication protocol class associated with the target communication service, thereby clarifying the communication protocol class identifiers that the target communication service can support. After that, the service configuration information is used to further determine the service configuration file of the target communication service. In the service configuration file, multiple communication instances and communication protocol identifiers matching the communication protocol class identifier are stored. Since each communication protocol identifier matches the communication protocol class identifier of the target communication service, all communication instances stored in the configuration file can support the target communication service to establish communication. In the process of constructing the communication object, when it is necessary to adjust the communication protocol adopted by the communication service, the communication instance whose communication protocol identifier is the same as the target communication protocol can be directly selected from the configuration file. There is no need to rebuild a new communication instance to apply the target communication protocol. The communication protocols and corresponding communication instances supported by the target communication service have been pre-set in the service configuration file. The communication protocol can be adjusted by directly selecting the corresponding communication instance from the service configuration file. There is no need to encode the corresponding communication instance in real time, thereby improving the efficiency of data communication based on communication instances.

[0090] A communication object construction system based on a communication instance provided in an embodiment of the present application is introduced below. The communication object construction system based on a communication instance described below and the communication object construction method based on a communication instance described above can refer to each other.

[0091] See also Figure 6 , which is a schematic diagram of the structure of a communication object construction system based on a communication instance provided in an embodiment of the present application, including the following modules:

[0092] The configuration information acquisition module 100 is used to obtain service configuration information of a target communication service in response to a communication request; the service configuration information is used to indicate a service ID of the target communication service and a plurality of communication protocol class identifiers corresponding to the service ID; the communication request includes: a target communication protocol and a service ID of the target communication service;

[0093] The configuration file determination module 200 is used to determine the service configuration file of the target communication service according to the service configuration information; the service configuration file includes: a plurality of communication instance IDs and communication protocol identifiers corresponding to the communication instance IDs; the communication protocol identifiers all match the communication protocol class identifier;

[0094] The communication object construction module 300 is used to construct a communication object corresponding to the communication request based on the service configuration information, the service configuration file and the communication request.

[0095] Optionally, the communication object construction module 300 is used to:

[0096] Determine communication object construction parameters according to the communication request, the service configuration information and the service configuration file; the communication object construction parameters include: the service ID, the communication instance ID and the communication protocol class identifier corresponding to the communication instance ID;

[0097] The object is constructed by using the communication object construction parameters to obtain the communication object corresponding to the communication request.

[0098] Optionally, the communication object construction parameter module 300 is specifically used to:

[0099] Determine a first communication protocol class identifier according to the target communication protocol; the first communication protocol class identifier matches the target communication protocol;

[0100] Determine the first communication protocol identifier through the first communication protocol class identifier; the first communication protocol identifier matches the first communication protocol class identifier;

[0101] The first communication protocol class identifier, the communication instance ID corresponding to the first communication protocol identifier, and the service ID corresponding to the first communication protocol class identifier are determined as the communication object construction parameters.

[0102] Optionally, the system further includes: a verification module; the verification module is specifically used to:

[0103] Obtaining an available protocol list; the available protocol list is used to indicate communication protocols that can be used in the AP platform;

[0104] Performing a file validity check on the service configuration file based on the available protocol list to determine whether there is a communication protocol in the service configuration file that does not match the available protocol list;

[0105] If the service profile contains a communication protocol that matches the available protocol list, it is determined that the service profile is abnormal.

[0106] Optionally, the system further includes: a service publishing module; the service publishing module is specifically used to:

[0107] Based on the preset service publishing interface and the communication object, determining a communication protocol calling interface corresponding to the communication object;

[0108] The target communication service is published through the target communication protocol according to the communication protocol calling interface corresponding to the communication object.

[0109] See also Figure 7 , which is a schematic diagram of a structure of an electronic device constructed based on a communication object of a communication instance provided by an embodiment of the present application, including:

[0110] A memory 11, used for storing computer programs;

[0111] The processor 12 is configured to implement the steps of the inertial measurement unit fault detection method described in any of the above method embodiments when executing the computer program.

[0112] In this embodiment, the device may be a vehicle-mounted computer, a PC (Personal Computer), or a terminal device such as a smart phone, a tablet computer, a PDA, a portable computer, etc. The device may include a memory 11 , a processor 12 , and a bus 13 .

[0113] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the device, such as a hard disk of the device. In other embodiments, the memory 11 can also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 11 can also include both an internal storage unit of the device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the device, such as program codes for executing fault prediction methods, etc., but can also be used to temporarily store data that has been output or is to be output. The processor 12 can be a central processing unit (CPU) in some embodiments.

[0114] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, and is used to run program codes or process data stored in the memory 11, such as program codes for executing a fault prediction method.

[0115] The bus 13 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0116] Furthermore, the device may also include a network interface 14, which may optionally include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the device and other electronic devices.

[0117] Optionally, the device may further include a user interface 15, which may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 15 may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the device and to display a visual user interface.

[0118] Figure 7 Only the device with components 11-15 is shown, and it can be understood by those skilled in the art that Figure 7 The structure shown does not constitute a limitation of the device, and may include fewer or more components than shown, or combine certain components, or arrange the components differently.

[0119] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for methods, systems, electronic devices and media, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The methods, systems, electronic devices and media described above are only schematic, in which the units described as separate components may or may not be physically separated, and the components prompted as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0120] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for constructing a communication object based on a communication instance, characterized in that: Applied to an AP platform; the method comprises: In response to a communication request, obtaining service configuration information of a target communication service; the service configuration information is used to indicate a service ID of the target communication service and a plurality of communication protocol class identifiers corresponding to the service ID; the communication request includes: a target communication protocol and the service ID of the target communication service; Determine a service profile of the target communication service according to the service configuration information; the service profile includes: a plurality of communication instance IDs and communication protocol identifiers corresponding to the communication instance IDs; the communication protocol identifiers all match the communication protocol class identifier; Based on the service configuration information, the service configuration file and the communication request, a communication object corresponding to the communication request is constructed.

2. The method according to claim 1, characterized in that The constructing a communication object corresponding to the communication request based on the service configuration information, the service configuration file and the communication request specifically includes: Determine communication object construction parameters according to the communication request, the service configuration information and the service configuration file; the communication object construction parameters include: the service ID, the communication instance ID and the communication protocol class identifier corresponding to the communication instance ID; The object is constructed by using the communication object construction parameters to obtain the communication object corresponding to the communication request.

3. The method according to claim 2, characterized in that The determining of the communication object construction parameters according to the communication request, the service configuration information and the service configuration file specifically includes: Determine a first communication protocol class identifier according to the target communication protocol; the first communication protocol class identifier matches the target communication protocol; Determine the first communication protocol identifier through the first communication protocol class identifier; the first communication protocol identifier matches the first communication protocol class identifier; The first communication protocol class identifier, the communication instance ID corresponding to the first communication protocol identifier, and the service ID corresponding to the first communication protocol class identifier are determined as the communication object construction parameters.

4. The method according to claim 1, characterized in that: After determining the service configuration file of the target communication service according to the service configuration information, the method further includes: Obtaining an available protocol list; the available protocol list is used to indicate communication protocols that can be used in the AP platform; Performing a file validity check on the service configuration file based on the available protocol list to determine whether there is a communication protocol in the service configuration file that does not match the available protocol list; If the service profile contains a communication protocol that matches the available protocol list, it is determined that the service profile is abnormal.

5. The method according to claim 1, characterized in that After constructing a communication object corresponding to the communication request based on the service configuration information, the service configuration file and the communication request, the method further includes: Based on the preset service publishing interface and the communication object, determining a communication protocol calling interface corresponding to the communication object; The target communication service is published through the target communication protocol according to the communication protocol calling interface corresponding to the communication object.

6. A communication object construction system based on communication instances, characterized in that: Applied in an AP platform, the system includes: A configuration information acquisition module, configured to acquire service configuration information of a target communication service in response to a communication request; the service configuration information is used to indicate a service ID of the target communication service and a plurality of communication protocol class identifiers corresponding to the service ID; the communication request includes: a target communication protocol and the service ID of the target communication service; A configuration file determination module, configured to determine a service configuration file of the target communication service according to the service configuration information; the service configuration file comprises: a plurality of communication instance IDs and communication protocol identifiers corresponding to the communication instance IDs; the communication protocol identifiers all match the communication protocol class identifier; The communication object construction module is used to construct a communication object corresponding to the communication request based on the service configuration information, the service configuration file and the communication request.

7. The system according to claim 6, characterized in that The communication object building module is used to: Determine communication object construction parameters according to the communication request, the service configuration information and the service configuration file; the communication object construction parameters include: the service ID, the communication instance ID and the communication protocol class identifier corresponding to the communication instance ID; The object is constructed by using the communication object construction parameters to obtain the communication object corresponding to the communication request.

8. The system according to claim 7, characterized in that The communication object constructs a parameter module, which is specifically used for: Determine a first communication protocol class identifier according to the target communication protocol; the first communication protocol class identifier matches the target communication protocol; Determine the first communication protocol identifier through the first communication protocol class identifier; the first communication protocol identifier matches the first communication protocol class identifier; The first communication protocol class identifier, the communication instance ID corresponding to the first communication protocol identifier, and the service ID corresponding to the first communication protocol class identifier are determined as the communication object construction parameters.

9. An electronic device, characterized in that: The device comprises: a processor, a memory and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, and the one or more programs include instructions, which, when executed by the processor, enable the processor to execute the communication object construction method based on the communication instance according to any one of claims 1-5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the communication object construction method based on the communication instance described in any one of claims 1 to 5 is implemented.