CN117880327A - Vehicle-computer network interface method and device for interaction between vehicle end and cloud end - Google Patents
Vehicle-computer network interface method and device for interaction between vehicle end and cloud end Download PDFInfo
- Publication number
- CN117880327A CN117880327A CN202410108562.1A CN202410108562A CN117880327A CN 117880327 A CN117880327 A CN 117880327A CN 202410108562 A CN202410108562 A CN 202410108562A CN 117880327 A CN117880327 A CN 117880327A
- Authority
- CN
- China
- Prior art keywords
- interface
- service
- vehicle
- class
- credential
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 230000003993 interaction Effects 0.000 title claims abstract description 37
- 230000008569 process Effects 0.000 claims abstract description 24
- 101000666901 Oxyuranus scutellatus scutellatus Kunitz-type serine protease inhibitor taicotoxin Proteins 0.000 claims abstract description 16
- 238000002360 preparation method Methods 0.000 claims description 10
- 230000002457 bidirectional effect Effects 0.000 claims description 9
- 238000004891 communication Methods 0.000 claims description 8
- 230000004044 response Effects 0.000 claims description 6
- 238000013461 design Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 4
- 230000003068 static effect Effects 0.000 claims description 3
- 238000011161 development Methods 0.000 abstract description 12
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000004806 packaging method and process Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 8
- 238000005538 encapsulation Methods 0.000 description 7
- 230000002452 interceptive effect Effects 0.000 description 3
- 238000012946 outsourcing Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010438 heat treatment Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 239000000446 fuel Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000001012 protector Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2212/00—Encapsulation of packets
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a vehicle-computer network interface method for interaction between a vehicle end and a cloud, which comprises the following steps: providing a SDK packet of the TSP, namely a TSPI packet and a TSPS service process; the TSPI packet encapsulates network information required by TSPI and TSPS service processes; the TSPI and TSPService service processes interact information with the message pushing server through Aidl. The invention also discloses a vehicle-computer network interface device for interaction between the vehicle end and the cloud end. The invention improves the development efficiency and the stability of software operation, and can be widely applied to the vehicle-machine system technology.
Description
Technical Field
The invention relates to a vehicle-computer system technology, in particular to a vehicle-computer network interface method and device for interaction between a vehicle end and a cloud end.
Background
The intelligent cabin entertainment video-audio system gradually becomes a bright point of the whole vehicle, influences the purchasing decision of customers to a certain extent, and simultaneously is very important in rapid iteration along with the white heating of the vehicle market competition. On the other hand, in order to create its own features, vehicle enterprises have developed applications related to background servers, such as vehicle driving information, problem feedback, service purchase, brand cards, and the like. The current popular internet framework is in a form of retrofit+okhttp, but if different applications can not pay attention to cumbersome information such as retrofit+okhttp, server addresses, cloud interfaces, login identities and the like, more efforts are applied to processing of interaction logic, development speed is improved to a great extent, software stability is improved, and therefore further packaging is needed on the basis of retrofit+okhttp.
Disclosure of Invention
The invention aims to overcome the defects of the background technology, and provides a vehicle-computer network interface method and device for interaction between a vehicle end and a cloud end, so that a transparent application and a background server are used in an interaction manner, thereby improving the development efficiency and the stability of software operation.
The invention provides a vehicle-computer network interface method for interaction between a vehicle end and a cloud, which comprises the following steps: the service content: providing a SDK packet of the TSP, namely a TSPI packet and a TSPS service process; and (3) information packaging: the TSPI packet encapsulates network information required by TSPI and TSPS service processes; and (3) information interaction: the TSPI and TSPService service processes interact information with the message pushing server through Aidl.
In the above technical solution, the specific process of the information packaging step is as follows: tsfmanager class various interfaces: providing an interface for an external WindLink APP in a TSPMager class, wherein the TSPMager class is in a single-instance mode, and the interfaces in the TSPMager class are divided into three classes according to functions: initializing an interface, a public interface and a service interface; the initialization interface is the basis of a public interface and a service interface, namely, the initialization must be completed before the public interface or the service interface is used, and meanwhile, the initialization interface is an asynchronous interface and is responsible for informing each module of the preparation work of surfing the internet; the public interface part comprises a pushing interface and a credential interface, the pushing interface is responsible for receiving pushing information of the cloud, the credential interface comprises interfaces for setting credentials, acquiring credential validity period and detecting whether the credentials are invalid, and the setting credentials are only used by account application; the service interface uses https protocol to make bidirectional authentication with the message pushing server; initManager class function: the InitManager adopts a single-case mode design, interfaces an initialization interface and a public interface, and instantiates ParamManager, serviceManager, tokenManager, tspAidl; tsp service class function: the TSPService is divided into three modules, namely a parameter module, a pushing module and an account credential caching module, wherein the parameter module is used for acquiring various basic information required by surfing the internet; the push module establishes long connection with the MQTT server and receives instant messages from the MQTT server; the account credential cache module is used for storing account credentials and sharing the account credentials to each application, and effective data existing after logging in the account credential cache module is cleared after logging out or shutting down.
In the above technical solution, in the steps of the tspmanaager type interfaces in the information packaging step, the specific process of initializing the interfaces to notify each module to perform the preparation work of surfing the internet is as follows: the method comprises the steps of instantiating various objects of an InitManager class, a ParamManager class, a Tokenmannager class and a ServiceManager class, establishing inter-process communication with TSPS service through an AIDL channel, and acquiring information of a domain name, a device key value and a certificate chain.
In the above technical solution, in the tsfmanager various interfaces substep of the information encapsulation step, the specific process of initializing must be completed before using the common interface or the service interface is as follows: the TSPManager class provides a getInstance () function through which a user can obtain a TSPManager object instance, creating an InitManager class when the TSPManager constructs the getInstance () function.
In the above technical solution, in the steps of the various interfaces of tsfmanager class in the information packaging step, the specific contents of the service interface include: the service interface comprises a plurality of serial interfaces, and each serial interface comprises a plurality of functional interfaces.
In the above technical solution, in the steps of the various interfaces of tsfmanager class in the information packaging step, the specific contents of the service interface further include: each serial interface of the service interface adds corresponding authority, namely, account application needs to apply for the authority of the account serial interface to use the account serial interface, and the application mode is static application.
In the above technical solution, in the tsp manager-like various interfaces substep of the information encapsulation step, the specific process before the use of the public interface or the service interface after the initialization is completed is as follows: when other applications need to acquire the information of the interface credential TOKEN, only the interface setTokenListener () is needed to acquire the interface credential TOKEN, so that the sharing of the interface credential TOKEN is realized.
In the above technical solution, the specific contents of the InitManager class function sub-step of the information packaging step are as follows: tspAidl class enables cross-process communication; the ParamManager acquires the URL of the Internet, the key of the project and the MQTT message pushed by the cloud from the parameter module of the TSPService through Tspaidl; the Tokenmanager sets the interface credential TOKEN into the account credential cache module of TSPS service through TspAIL, and receives the updated interface credential TOKEN; the ServiceManager class is constructed by relying on an okhttp and retrofit framework, and two modes of bidirectional authentication and unidirectional authentication exist according to different ServiceManager classes of domain names, and the bidirectional authentication needs to acquire a certificate chain preset to a system through a KeyChain module; the ServiceManager class is provided with a signature filter, and the complete link is encrypted according to a contracted scheme, so that the request integrity and the security are ensured; the ServiceManager class has a cache function and caches the same interface service which has been instantiated, and the ServiceManager cache realizes a service module of the cloud interface; the modules are instantiations of json data of the cloud response.
In the above technical solution, in the tsp service function sub-step of the information encapsulation step, tsp service is responsible for interacting with the MQTT server and subscribing to a fixed topic, and monitoring a cloud push message through a function interface setpushmessagelist provided by the tsp manager, and when subscribing to an unfixed topic, invoking a subscore of the tsp manager.
The invention also provides a vehicle-computer network interface device for the interaction of the vehicle end and the cloud end, which is provided with a computer program, wherein the computer program can execute the vehicle-computer network interface method for the interaction of the vehicle end and the cloud end.
The vehicle-computer network interface method and device for interaction between the vehicle end and the cloud end have the following beneficial effects:
1. the network development access threshold is reduced, and the salary expense is reduced.
2. The interactive service between the application and the vehicle enterprise server is transparent, the application code is simpler, the coding efficiency is improved, and the software stability is improved.
3. If the outsourcing development mode is adopted, information leakage of manufacturer certificates, signature algorithms and the like can be effectively prevented.
Drawings
FIG. 1 is a schematic overall flow diagram of a vehicle-to-machine network interface method for vehicle-end and cloud interaction according to the present invention;
FIG. 2 is a schematic workflow diagram of an initializing interface in various interfaces of the TSPMnager class in the step of information encapsulation in the vehicle-to-vehicle network interface method for interaction of a vehicle end and a cloud end;
FIG. 3 is a schematic diagram of a workflow for acquiring and sharing interface credentials TOKEN in various interface sub-steps of TSPMnager class in an information encapsulation step in a vehicle-to-vehicle network interface method for vehicle-end and cloud interaction according to the present invention;
FIG. 4 is a schematic diagram of an interaction workflow between a TSPSService and an MQTT server in a TSPSService class function sub-step of an information encapsulation step in a vehicle-to-vehicle network interface method for interaction between a vehicle end and a cloud end;
FIG. 5 is a schematic structural diagram of a vehicle-to-vehicle network interface device for interaction between a vehicle end and a cloud end according to the present invention;
FIG. 6 is a schematic diagram of the overall operation flow of embodiment 1 of the vehicle-to-machine network interface method for vehicle-end interaction with cloud;
FIG. 7 is a workflow diagram of an application scenario of embodiment 2 of a vehicle-to-machine network interface method for vehicle-side and cloud interaction of the present invention;
fig. 8 is a schematic workflow diagram of a conventional processing method of an application scenario of embodiment 2 without using the vehicle-to-machine network interface method for interaction between a vehicle end and a cloud end of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, which should not be construed as limiting the invention.
The invention aims to solve the problem that a plurality of applications need to pay attention to a lot of complicated information when having interactive services with the background.
Referring to fig. 1, the vehicle-to-machine network interface method for interaction between a vehicle end and a cloud end of the invention comprises the following steps:
the service content: technical solution there is a need to provide an SDK package of a TSP (hereinafter, collectively referred to as TSP api) and a service process (TSP service);
and (3) information packaging: the SDK packet of the TSP encapsulates complex network information (an application end only needs to pay attention to an interface of the TSP manager class in the TSP API, which requests cloud service, and a response of the cloud can be directly obtained in a callback), and the specific process is as follows:
the tsprapi mainly includes functions of providing an interface to the outside (WindLink APP), transmitting interface credentials (TOKEN), packaging cloud interfaces, analyzing cloud responses, transmitting cloud push messages, and the like.
Tsfmanager class various interfaces: the externally provided interfaces are concentrated in a TSPMnager class, the class is designed into a single-case mode, and the interfaces in the TSPMnager class are divided into three classes according to functions: initializing an interface, a public interface and a service interface. The initialization interface is a basis of a public interface and a service interface, namely, the initialization must be completed before the public interface or the service interface is used, meanwhile, the initialization interface is an asynchronous interface and is mainly responsible for informing each module of the preparation work of surfing the internet, and the initialization interface mainly comprises the steps of instantiating various objects (InitManager, paramManager, tokenManager, serviceManager and the like), establishing inter-process communication with TSPS service through an AIDL channel (TspAIdl) and acquiring information such as domain names, equipment key values, certificate chains and the like; the public interface part mainly comprises a pushing interface and a credential interface, wherein the pushing interface is mainly responsible for receiving pushing information of the cloud and mainly relates to functions of code scanning login, commodity vehicle monitoring and the like; the credential serial interfaces comprise interfaces for setting credentials, acquiring credential validity period, detecting whether the credentials are invalid and the like, wherein the credential interfaces are only used by account application; the service interfaces are more and mainly comprise an account series interface, a vehicle center series interface, a content management series interface, a sentinel mode series interface, a three-party account series interface, a message center series interface, a flow mall series interface, an ejection mode series interface, a charging and heating reservation series interface and the like, wherein each service interface comprises a plurality of series interfaces, each series interface also comprises a plurality of functional interfaces, for example, the content management series interfaces comprise a secondary driving screen protector, a vehicle owner welfare, a sound of a vehicle owner, an operation popup window, a cloud album, a startup greeting and other functional interfaces, the ejection mode series interfaces comprise record uploading, record inquiring, frequency inquiring, record deleting, ranking inquiring and other functional interfaces, and the service interfaces use https protocol to carry out bidirectional authentication with a message pushing server.
In one or more embodiments, the TSPMager class provides a getInstance () function for the user that enables the user to obtain an instance of the TSPMager object, creating an IntManager class when the TSPMager constructs the getInstance () function. When the user wants to use the public interface and the service interface, the whole module needs to be initialized, namely the initialization interface is called, and the initialization flow is shown in fig. 2.
Whether the initialization is successful or not, the TSPMpipe informs the user of a specific result, and the user can perform next work according to the response result, except that the initialization failure informs the user of a specific reason of the failure together, so that the user can adjust in real time.
After the initialization is successful, the user can use the public interface and the service interface. According to the interface function classification, the service interface is divided into a plurality of serial interfaces, each serial interface is added with corresponding permission, namely account application needs to apply for account serial interface permission to use account serial interfaces, the application mode is static application, other modules are not recommended to apply for account serial interface permission, and other serial interfaces are similar.
The public interface or the service interface is only required to be logged in, the account caches the interface credential TOKEN to the tsp service process through the interface setglobalpacken () after the login is successful, and when other applications need to acquire the interface credential TOKEN information, only the interface settokenizer () is required to acquire the interface credential TOKEN, so that the interface credential TOKEN sharing is realized, as shown in fig. 3.
InitManager class function: the InitManager class adopts a single-case mode design, mainly interfaces an initialization interface and a public interface, and instantiates ParamManager, serviceManager, tokenManager, tspAidl, and the specific contents are as follows:
TspAidl class is an implementer of cross-process communication, and as the name implies, uses the aidl scheme; the ParamManager mainly acquires the URL of the Internet, the key of the project and the MQTT message pushed by the cloud from a pushing module of the TSPService through Tspaidl;
the main work of the Tokenmanager is to set a credential caching module (the function is mainly used by account application) to TSPS service through a Tspaidl interface credential TOKEN and receive an updated credential interface credential;
the ServiceManager class is a core class for realizing http/https communication, is constructed by relying on an okhttp and retrofit framework, has two modes of bidirectional authentication and unidirectional authentication according to different domain names, and the bidirectional authentication needs to acquire a certificate chain preset to a system through a KeyChain module; the ServiceManager class also realizes a signature filter, encrypts complete links (comprising url and interface parameters) according to a contracted scheme, ensures the integrity and the safety of the request, has a cache function, can cache the same interface service which has been instantiated, does not need repeated creation and improves the speed, wherein a service module is a specific cloud interface, and the ServiceManager is a service module which is a vehicle-end processing of a cloud interface; the modules are instantiations of json data of cloud response, and are convenient to transfer and apply.
Tsp service class function: the TSPS service is divided into three modules, namely a parameter module, a pushing module and an account credential cache module, wherein the parameter module is used for acquiring various basic information required by surfing the Internet, such as an https server domain name, an mqtt server domain name, a project Key and the like, and the basic information is stored in a system partition through an XML file; the pushing module is realized by an MQTT protocol, establishes long connection with an MQTT server and receives instant messages from the MQTT server; the account credential cache module is mainly used for storing account credentials and sharing the account credentials to each application, and the account credential cache module is cleared after logging in and logging out and also cleared after shutdown.
In one or more embodiments, TSP service is mainly responsible for interacting with the MQTT server and subscribing to some relatively fixed topics, such as VIN/IVI/TSP, i.e. without application focusing on push related development flows, it is only necessary to monitor cloud push messages directly through a functional interface setpushmessagelist provided by the TSP manager; when an application needs to subscribe to some non-fixed topics, only the subscore provided by the tspmnager needs to be called, and the specific implementation of the MQTT does not need to be concerned, and the specific implementation is shown in fig. 4.
And (3) information interaction: the service mainly interacts with the message pushing server, and the service and the message pushing server interact with each other through the aid.
Referring to fig. 5, the vehicle-to-machine network interface device for interaction between a vehicle end and a cloud end of the present invention includes the following parts:
service content unit: providing a SDK packet of the TSP, namely a TSPI packet and a TSPS service process;
an information packaging unit: the TSPI packet encapsulates network information required by TSPI and TSPS service processes;
information interaction unit: the TSPI and TSPService service processes interact information with the message pushing server through Aidl.
Example 1:
unlike cellular phones, driving information of automobiles is a content of interest to customers, and the data is usually stored in the cloud and is subjected to related processing (such as fuel consumption ranking and the like). After the encapsulation scheme of the invention is used, the application (generally, vehicle setting) corresponding to the vehicle end can obtain the required data only by calling an interface getECUDriver (). The interface calling mode is mTspManager.getECUDriver ("vin", mRestCallBack), the vin corresponds to the true unique identification code of the vehicle, mRestCallBack is a result callback through which the user can obtain the result. The RestCallback comprises two callback interfaces, success and failure, after data in a specified format are received from the cloud, the data are analyzed into corresponding objects ECUDriverInfo through a modules, the corresponding objects ECUDriverInfo are notified to a user through the interfaces, and if the user cannot be connected to the cloud, if connection time-out is caused by network abnormality, the corresponding objects are notified to the user through the interfaces failure, as shown in fig. 6. In the figure, whether the judgment data are correct or not is known from the obtained domain name information, so that the user is not required to care, and the research work of the user and a large amount of code quantity are reduced.
By comparison, it can be concluded that: the packaged interface can complete development faster without knowing any knowledge points such as network request, mutual authentication, certificate chain and the like.
Example 2
In addition to https short connection requests, long connections to mqtt are used in network communications. MQTT (Message Queuing Telemetry Transport, message queue telemetry transport) is a message protocol under the ISO standard (ISO/IEC PRF 20922) based on the publish/subscribe paradigm. The system works on the TCP/IP protocol family, is a publish/subscribe type message protocol designed for remote equipment with low hardware performance and under the condition of poor network condition, and is a client of mqtt in general.
After the encapsulated scheme is used, the vehicle-side application only needs to use two interfaces, namely a setPushMessageListener (used for receiving the message pushed by the server) and a subscreenbeTopic (used for subscribing the topic of interest of the application), and the information is shown in FIG. 7.
Referring to fig. 8, when unpackaged, each application at the vehicle end needs to learn and implement MQTT related knowledge by itself, including but not limited to the following:
(1) Acquiring a certificate;
(2) Setting a client configuration;
(3) Creating a client;
(4) Realizing connection;
(5) Registering a callback and subscribing to a theme;
(6) Exception handling, including network exceptions, ID collisions, and the like.
By comparing the fig. 6 with the fig. 7, the packaged structure is simple, the relevant knowledge points are transparent to the development, the admission threshold of network development is reduced, the development progress can be effectively accelerated, and meanwhile, certain information confidentiality such as manufacturer server domain name and interface, certificate, signature algorithm and the like can be realized for the manufacturer applying outsourcing.
The technical key points and the technical principle of the invention are as follows:
1. packaging retrofit, and transparentizing the service of the request vehicle enterprise server of the application;
2. the design scheme is implemented inside the TSP.
The technical scheme of the invention has the beneficial effects that:
1. the network development access threshold is reduced, and the salary expense is reduced.
2. The interactive service between the application and the vehicle enterprise server is transparent, the application code is simpler, the coding efficiency is improved, and the software stability is improved.
3. If the outsourcing development mode is adopted, information leakage of manufacturer certificates, signature algorithms and the like can be effectively prevented.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
What is not described in detail in this specification is prior art known to those skilled in the art.
Claims (10)
1. A vehicle-computer network interface method for interaction between a vehicle end and a cloud end is characterized by comprising the following steps: the method comprises the following steps:
providing a SDK packet of the TSP, namely a TSPI packet and a TSPS service process;
the TSPI packet encapsulates network information required by TSPI and TSPS service processes;
the TSPI and TSPService service processes interact information with the message pushing server through Aidl.
2. The vehicle-to-machine network interface method for vehicle-end interaction with the cloud as claimed in claim 1, wherein: the specific process of the tsapi packet for encapsulating the network information required by the tsapi and tsp service processes is as follows:
providing an interface for an external WindLink APP in a TSPMager class, wherein the TSPMager class is in a single-instance mode, and the interfaces in the TSPMager class are divided into three classes according to functions: initializing an interface, a public interface and a service interface; the initialization interface is the basis of a public interface and a service interface, namely, the initialization must be completed before the public interface or the service interface is used, and meanwhile, the initialization interface is an asynchronous interface and is responsible for informing each module of the preparation work of surfing the internet; the public interface part comprises a pushing interface and a credential interface, the pushing interface is responsible for receiving pushing information of the cloud, the credential interface comprises interfaces for setting credentials, acquiring credential validity period and detecting whether the credentials are invalid, and the setting credentials are only used by account application; the service interface uses https protocol to make bidirectional authentication with the message pushing server;
the InitManager adopts a single-case mode design, interfaces an initialization interface and a public interface, and instantiates ParamManager, serviceManager, tokenManager, tspAidl;
the TSPService is divided into three modules, namely a parameter module, a pushing module and an account credential caching module, wherein the parameter module is used for acquiring various basic information required by surfing the internet; the push module establishes long connection with the MQTT server and receives instant messages from the MQTT server; the account credential cache module is used for storing account credentials and sharing the account credentials to each application, and effective data existing after logging in the account credential cache module is cleared after logging out or shutting down.
3. The vehicle-to-machine network interface method for vehicle-end interaction with the cloud as claimed in claim 2, wherein: the external WindLink APP providing interface is arranged in a TSPMager class, the TSPMager class is in a single-instance mode, and the interfaces in the TSPMager class are divided into three classes according to functions: initializing an interface, a public interface and a service interface; the initialization interface is the basis of a public interface and a service interface, namely, the initialization must be completed before the public interface or the service interface is used, and meanwhile, the initialization interface is an asynchronous interface and is responsible for informing each module of the preparation work of surfing the internet; the public interface part comprises a pushing interface and a credential interface, the pushing interface is responsible for receiving pushing information of the cloud, the credential interface comprises interfaces for setting credentials, acquiring credential validity period and detecting whether the credentials are invalid, and the setting credentials are only used by account application; the service interface uses https protocol, and in the step of mutual authentication with the message pushing server, the initialization interface is responsible for informing each module of the preparation work of surfing the internet, and the specific process is as follows:
the method comprises the steps of instantiating various objects of an InitManager class, a ParamManager class, a Tokenmannager class and a ServiceManager class, establishing inter-process communication with TSPS service through an AIDL channel, and acquiring information of a domain name, a device key value and a certificate chain.
4. The vehicle-to-machine network interface method for vehicle-end interaction with the cloud as claimed in claim 3, wherein: the external WindLink APP providing interface is arranged in a TSPMager class, the TSPMager class is in a single-instance mode, and the interfaces in the TSPMager class are divided into three classes according to functions: initializing an interface, a public interface and a service interface; the initialization interface is the basis of a public interface and a service interface, namely, the initialization must be completed before the public interface or the service interface is used, and meanwhile, the initialization interface is an asynchronous interface and is responsible for informing each module of the preparation work of surfing the internet; the public interface part comprises a pushing interface and a credential interface, the pushing interface is responsible for receiving pushing information of the cloud, the credential interface comprises interfaces for setting credentials, acquiring credential validity period and detecting whether the credentials are invalid, and the setting credentials are only used by account application; in the step of mutual authentication between the service interface and the message pushing server by using https protocol, the specific process of initializing must be completed before using the public interface or the service interface is as follows:
the TSPManager class provides a getInstance () function through which a user can obtain a TSPManager object instance, creating an InitManager class when the TSPManager constructs the getInstance () function.
5. The vehicle-to-machine network interface method for vehicle-end interaction with the cloud as recited in claim 4, wherein: the external WindLink APP providing interface is arranged in a TSPMager class, the TSPMager class is in a single-instance mode, and the interfaces in the TSPMager class are divided into three classes according to functions: initializing an interface, a public interface and a service interface; the initialization interface is the basis of a public interface and a service interface, namely, the initialization must be completed before the public interface or the service interface is used, and meanwhile, the initialization interface is an asynchronous interface and is responsible for informing each module of the preparation work of surfing the internet; the public interface part comprises a pushing interface and a credential interface, the pushing interface is responsible for receiving pushing information of the cloud, the credential interface comprises interfaces for setting credentials, acquiring credential validity period and detecting whether the credentials are invalid, and the setting credentials are only used by account application; the service interface uses https protocol, and in the step of performing mutual authentication with the message pushing server, the specific content of the service interface comprises:
the service interface comprises a plurality of serial interfaces, and each serial interface comprises a plurality of functional interfaces.
6. The vehicle-to-machine network interface method for vehicle-end interaction with the cloud as recited in claim 5, wherein: the external WindLink APP providing interface is arranged in a TSPMager class, the TSPMager class is in a single-instance mode, and the interfaces in the TSPMager class are divided into three classes according to functions: initializing an interface, a public interface and a service interface; the initialization interface is the basis of a public interface and a service interface, namely, the initialization must be completed before the public interface or the service interface is used, and meanwhile, the initialization interface is an asynchronous interface and is responsible for informing each module of the preparation work of surfing the internet; the public interface part comprises a pushing interface and a credential interface, the pushing interface is responsible for receiving pushing information of the cloud, the credential interface comprises interfaces for setting credentials, acquiring credential validity period and detecting whether the credentials are invalid, and the setting credentials are only used by account application; the service interface uses https protocol, and in the step of performing mutual authentication with the message pushing server, the specific content of the service interface further comprises:
each serial interface of the service interface adds corresponding authority, namely, account application needs to apply for the authority of the account serial interface to use the account serial interface, and the application mode is static application.
7. The vehicle-to-machine network interface method for vehicle-end interaction with the cloud as recited in claim 6, wherein: the external WindLink APP providing interface is arranged in a TSPMager class, the TSPMager class is in a single-instance mode, and the interfaces in the TSPMager class are divided into three classes according to functions: initializing an interface, a public interface and a service interface; the initialization interface is the basis of a public interface and a service interface, namely, the initialization must be completed before the public interface or the service interface is used, and meanwhile, the initialization interface is an asynchronous interface and is responsible for informing each module of the preparation work of surfing the internet; the public interface part comprises a pushing interface and a credential interface, the pushing interface is responsible for receiving pushing information of the cloud, the credential interface comprises interfaces for setting credentials, acquiring credential validity period and detecting whether the credentials are invalid, and the setting credentials are only used by account application; the service interface uses https protocol, and in the step of mutual authentication with the message pushing server, the specific process before the initialization of the public interface or the service interface is finished is as follows:
when other applications need to acquire the information of the interface credential TOKEN, only the interface setTokenListener () is needed to acquire the interface credential TOKEN, so that the sharing of the interface credential TOKEN is realized.
8. The vehicle-to-machine network interface method for vehicle-end interaction with the cloud as recited in claim 7, wherein: the InitManager class adopts a single-case mode design, interfaces an initialization interface and a public interface, and the concrete contents of the step of instantiating ParamManager, serviceManager, tokenManager, tspAidl are as follows:
TspAidl class enables cross-process communication;
the ParamManager acquires the URL of the Internet, the key of the project and the MQTT message pushed by the cloud from the parameter module of the TSPService through Tspaidl;
the Tokenmanager sets the interface credential TOKEN into the account credential cache module of TSPS service through TspAIL, and receives the updated interface credential TOKEN;
the ServiceManager class is constructed by relying on an okhttp and retrofit framework, and two modes of bidirectional authentication and unidirectional authentication exist according to different ServiceManager classes of domain names, and the bidirectional authentication needs to acquire a certificate chain preset to a system through a KeyChain module; the ServiceManager class is provided with a signature filter, and the complete link is encrypted according to a contracted scheme, so that the request integrity and the security are ensured; the ServiceManager class has a cache function and caches the same interface service which has been instantiated, and the ServiceManager cache realizes a service module of the cloud interface; the modules are instantiations of json data of the cloud response.
9. The vehicle-to-machine network interface method for vehicle-end-to-cloud interaction of claim 8, wherein: the TSPService is divided into three modules, namely a parameter module, a pushing module and an account credential caching module, wherein the parameter module is used for acquiring various basic information required by surfing the internet; the push module establishes long connection with the MQTT server and receives instant messages from the MQTT server; the account credential caching module is used for storing account credentials and sharing the account credentials to each application, effective data existing after logging in the account credential caching module is removed after logging out or after shutdown, TSPService is responsible for interacting with the MQTT server and subscribing to fixed topic, a function interface setPushMessageListener provided by the TSPSManager monitors cloud pushing information, and when subscribing to non-fixed topic, subscore Topic of the TSPSManager is called.
10. A vehicle computer network interface device for vehicle end and cloud interaction, having a computer program, characterized in that: the computer program is capable of executing the vehicle-to-machine network interface method for vehicle-end interaction with the cloud as claimed in any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410108562.1A CN117880327A (en) | 2024-01-25 | 2024-01-25 | Vehicle-computer network interface method and device for interaction between vehicle end and cloud end |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410108562.1A CN117880327A (en) | 2024-01-25 | 2024-01-25 | Vehicle-computer network interface method and device for interaction between vehicle end and cloud end |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117880327A true CN117880327A (en) | 2024-04-12 |
Family
ID=90586684
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410108562.1A Pending CN117880327A (en) | 2024-01-25 | 2024-01-25 | Vehicle-computer network interface method and device for interaction between vehicle end and cloud end |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117880327A (en) |
-
2024
- 2024-01-25 CN CN202410108562.1A patent/CN117880327A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112714193B (en) | Community data processing system, method, device and equipment based on Internet of things platform | |
CN108306877B (en) | NODE JS-based user identity information verification method and device and storage medium | |
US9189649B2 (en) | Security model for workflows aggregating third party secure services | |
CN110445614B (en) | Certificate application method and device, terminal equipment, gateway equipment and server | |
CN110213217B (en) | Data access method, related device, gateway and data access system | |
CN111416867B (en) | Message processing method, server and computer storage medium between different devices | |
CN113765713A (en) | Data interaction method based on Internet of things equipment acquisition | |
US8868786B1 (en) | Apparatus, systems and methods for transformation services | |
US20150156183A1 (en) | System and method for filtering network communications | |
CN112527528A (en) | Data transmission method, device and storage medium based on message queue | |
US20070136471A1 (en) | Systems and methods for negotiating and enforcing access to network resources | |
CN104717647B (en) | Professional ability method for authenticating, equipment and system | |
CN111163052B (en) | Method, device, medium and electronic equipment for connecting Internet of things platform | |
US20180020057A1 (en) | Method and System for Connecting Heterogeneous Internet of Things Devices for Workflow Automation | |
CN113497723B (en) | Log processing method, log gateway and log processing system | |
US10908970B1 (en) | Data interface for secure analytic data system integration | |
CN109150800A (en) | Login access method, system and storage medium | |
CN110399578A (en) | Page access method and device | |
CN113254103A (en) | Application function implementation method and device and storage medium | |
CN105930249A (en) | Application monitoring method and apparatus | |
CN111600787B (en) | Information processing method, information processing apparatus, electronic device, and medium | |
CN108347471B (en) | Method, device and system for acquiring third-party user information | |
CN117880327A (en) | Vehicle-computer network interface method and device for interaction between vehicle end and cloud end | |
US20230048931A1 (en) | Split input and output remote access | |
US20070136472A1 (en) | Systems and methods for requesting protocol in a network using natural language messaging |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |