CN114385161A - Method for switching navigation SDK during operation and architecture thereof - Google Patents

Method for switching navigation SDK during operation and architecture thereof Download PDF

Info

Publication number
CN114385161A
CN114385161A CN202210081287.XA CN202210081287A CN114385161A CN 114385161 A CN114385161 A CN 114385161A CN 202210081287 A CN202210081287 A CN 202210081287A CN 114385161 A CN114385161 A CN 114385161A
Authority
CN
China
Prior art keywords
navigation
sdks
layer
sdk
application
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
Application number
CN202210081287.XA
Other languages
Chinese (zh)
Inventor
冯柯
张英鹏
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202210081287.XA priority Critical patent/CN114385161A/en
Publication of CN114385161A publication Critical patent/CN114385161A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a method for switching navigation SDKs during operation and a framework thereof, comprising S1, introducing a plurality of different navigation SDKs in navigation application; s2, providing a plurality of service interfaces corresponding to the navigation SDK through an adaptation layer, and respectively realizing the service interfaces; s4, adopting an abstract factory mode to expose the adaptation layer to the application layer; s4, completing initialization of each navigation SDK, switching among the navigation SDKs and calling required services through operation of an application layer; and S5, destroying the historical temporary resources after the switching between different navigation SDKs is completed. By introducing a plurality of navigation SDKs with different navigation capabilities into the navigation application and erecting the navigation SDKs by an abstract factory method, the navigation application can be dynamically switched during operation without cold start, the waiting time of a user is reduced, and the operation experience of the user is improved.

Description

Method for switching navigation SDK during operation and architecture thereof
Technical Field
The invention belongs to the technical field of automobile safety, and particularly relates to a method for switching navigation SDK during operation and a framework thereof.
Background
At present, vehicle navigation applications based on an android system are mainly based on different SDKs (software development kit) for differential customization. Meanwhile, in the actual use process of vehicle navigation, due to the fact that different users have different use habits or the difference exists between searchable contents in different SDKs (for example, the desired contents cannot be searched in the A-type SDKs), the situation that the user needs to switch the SDKs at any time can be generated.
In the prior art, switching is usually performed based on a cold start mode of an application (a user selects to switch different SDKs, and the whole application is restarted). This approach results in an excessively long start-up time for each switch, which can lead to unacceptable splitting of the user's operation.
Disclosure of Invention
In order to solve the problems, the invention provides a method and a framework for switching navigation SDKs during running, which reduce the waiting time of a user and improve the operation experience of the user by switching the SDKs in a dynamic mode.
In order to solve the technical problem, the technical scheme adopted by the invention is as follows: a method for switching navigation SDKs during operation comprises the following steps,
s1, introducing a plurality of different navigation SDKs into the navigation application;
s2, providing a plurality of service interfaces corresponding to the navigation SDK through an adaptation layer, and respectively realizing the service interfaces;
s4, adopting an abstract factory mode to expose the adaptation layer to the application layer;
s4, completing initialization of each navigation SDK, switching among the navigation SDKs and calling required services through operation of an application layer;
and S5, destroying the historical temporary resources after the switching between different navigation SDKs is completed.
As optimization, the adaptation layer comprises an adaptation interface layer and an implementation layer; and the realization layer is used for realizing the navigation related capability interface.
And as optimization, the abstract factory mode comprises an abstract factory interface layer and a plurality of factory classes corresponding to the navigation SDK, wherein the abstract factory interface layer defines a navigation service capability interface which can be provided by the navigation application, and the factory classes are used for realizing the service capability interface.
As optimization, the operation of the application layer comprises a click operation or a voice operation.
As an optimization, the initialization of the navigation SDK includes initialization of a single SDK and simultaneous initialization of multiple SDKs.
And as optimization, switching between the navigation SDKs sends a navigation SDK switching signal through popup selection or voice selection of an application layer, the navigation application judges whether to switch the navigation SDKs or not according to the signal, and if the navigation SDKs can be switched, the switching action is executed.
And as optimization, when the navigation SDKs are switched, initiating a main graph service request by a factory class corresponding to the target navigation SDK, acquiring and returning the views, loading and displaying the main graph to the corresponding view after the application layer acquires the return result, and destroying the historical temporary resources of the previous navigation SDK after the switching is finished.
Based on the above method, the present invention also provides a framework for implementing the above method, comprising,
a plurality of navigation SDKs with different navigation capabilities for providing different navigation services;
the adaptive interface layer is a navigation capability interface which is abstracted by navigation application and corresponds to each navigation SDK, and is used for exchanging data with each navigation SDK;
the realization layer comprises a plurality of realization units based on adapter interfaces, which respectively correspond to the navigation capabilities of the navigation SDKs and are used for realizing the navigation capability interfaces so as to unify the external data exchange and navigation capability calling parameters of the realization layer;
an abstract factory interface layer for defining a service capability interface of the navigation application;
the plurality of factory classes provide different service capabilities corresponding to the navigation capabilities of the navigation SDKs and are used for realizing the service capability interfaces;
and the application layer is used for displaying the view of the navigation application and initializing the navigation SDK of the navigation application, switching among the navigation SDKs and invoking the operation of the required service capability by the user.
Compared with the prior art, the invention has the following advantages:
according to the invention, a plurality of navigation SDKs with different navigation capabilities are introduced into the navigation application, and the units such as the adaptation interface layer, the realization layer, the abstract factory interface layer and the factory class are erected by the abstract factory method, so that a user can operate through the uniformly defined application layer, the required service or service is called from different navigation SDKs by the abstract factory method, and the navigation SDKs can be dynamically switched during operation without cold start, thereby reducing the waiting time of the user and improving the operation experience of the user.
Drawings
FIG. 1 is an architectural diagram of the present invention;
fig. 2 is a schematic view of the working process of the present invention.
Detailed Description
The invention will be further explained with reference to the drawings and the embodiments.
Example (b): with reference to figures 1-2 of the drawings,
a method for switching navigation SDKs during operation comprises the following steps,
s1, introducing a plurality of different navigation SDKs in the navigation application. Such as BL SDK corresponding to a high-end map, BaiDu SDK corresponding to a Baidu map, and other SDK corresponding to other navigations, each having different navigation capabilities, thereby being capable of providing different service capabilities.
S2, providing a plurality of service interfaces corresponding to the navigation SDK through an adaptation layer, and respectively realizing the service interfaces.
The adaptation layer comprises an adaptation interface layer and an implementation layer; and the realization layer is used for realizing the navigation related capability interface. For example, services such as searching, path calculation, guidance and the like are respectively abstracted into different interfaces, and the interfaces are respectively realized through a realization layer. Thereby ensuring that the calling method and the transfer parameter are uniform and unchangeable for the interface layer of the navigation application.
S4, adopting an abstract factory mode to expose the adaptation layer to the application layer;
the abstract factory mode comprises an abstract factory interface layer and a plurality of factory classes corresponding to the navigation SDK, wherein the abstract factory interface layer defines a navigation service capability interface which can be provided by a navigation application, and the factory classes are used for realizing the service capability interface.
S4, completing initialization of each navigation SDK, switching among the navigation SDKs and calling required services through operation of an application layer;
and S5, destroying the historical temporary resources after the switching between different navigation SDKs is completed.
Based on the above method, the present invention also provides a framework for implementing the above method, comprising,
a plurality of navigation SDKs with different navigation capabilities for providing different navigation services;
the adaptive interface layer is a navigation capability interface which is abstracted by navigation application and corresponds to each navigation SDK, and is used for exchanging data with each navigation SDK;
the realization layer comprises a plurality of realization units based on adapter interfaces, which respectively correspond to the navigation capabilities of the navigation SDKs and are used for realizing the navigation capability interfaces so as to unify the external data exchange and navigation capability calling parameters of the realization layer;
an abstract factory interface layer for defining a service capability interface of the navigation application;
the plurality of factory classes provide different service capabilities corresponding to the navigation capabilities of the navigation SDKs and are used for realizing the service capability interfaces;
and the application layer is used for displaying the view of the navigation application and initializing the navigation SDK of the navigation application, switching among the navigation SDKs and invoking the operation of the required service capability by the user.
In implementation, as shown in fig. 1, an adaptive interface layer (adapter API) is abstracted based on the self-navigation application, and defines all navigation-related capability interfaces (interfaces) of each navigation SDK.
In the implementation layer (instance), it is the specific implementation of the corresponding adaptation interface layer, and the implementation is performed based on different navigation SDKs, and after the implementation, the navigation capabilities of the different SDKs are already encapsulated in the respective implementation layers. For example, a high-end BL SDK is based on an implementation of the Adapter API, defined as BL Adapter API implementation.
For example, the search correlation interface is defined as searchserviceadaptapter api, and based on this, for the grand BL SDK, a set of blsearchserviceapadater api is separately implemented and SearchService navigation correlation capability of the BL SDK is encapsulated in the blsearchserviceadaptapter api.
A method for defining a series of related service capabilities in an Abstract Factory Interface (Abstract Factory Interface) layer. Which is used to constrain the service capabilities offered by the plant, such as search services, routing services, guidance services, etc.
BL Factory, Baidu Factory, other Factory are multiple Factory classes for the concrete implementation of Abstract Factory Interface, and each has a corresponding Adapter API instance. For example, BL Factory holds the BL Adapter API instance.
A set of view operation layers which are irrelevant to the SDK are provided in an Application User Interface (Application User Interface). The data definition required by the layer is self-defined, and the unification of a User Interface (UI) is realized.
After the operation is realized, the Application User Interface (Application layer) can acquire the needed navigation SDK service through the abstract factory mode and call up the needed service Interface.
The method for switching the SDK during the operation of the whole navigation application is described below with reference to the architecture.
And starting the navigation application through screen click operation of the navigation application or other operations such as voice and the like.
And the navigation application selects an initialization mode of the navigation SDK according to the description of the local configuration file in the starting process. Including initializing a single SDK, multiple SDKs are initialized simultaneously. The method mainly influences the response time of subsequent SDK switching, and the simultaneous initialization of starting multiple SDKs can increase the system performance overhead, but can reduce the time consumption for switching the SDKs.
And the user sends out a signal for switching the SDK through screen popup selection or other operations such as voice and the like.
And the navigation application judges whether to switch the SDK according to the signal, and if the SDK can be switched, the navigation application initiates the action of switching the SDK. The concrete method is performed by the abstract factory method in fig. 1. For example, when the gold SDK is switched to the hundredth SDK, a request for the main graph service is initiated by BaiDu Factory, and the view is acquired and returned. And after the application layer obtains the return result, loading the main graph to the corresponding View layer View for displaying. According to different initialization modes, if single module initialization is adopted, the target switching SDK needs to be initialized independently, and if multi-SDK initialization is adopted, the corresponding factory class is directly adopted to obtain the corresponding service.
And at the UI layer, the application reloads and displays the initialized map.
And after the switching is completed, the destruction of the previous SDK temporary resource is completed in background silence.
The whole process does not need to quit restarting by application, and good operation and use experience can be brought to a user.
According to the invention, a plurality of navigation SDKs with different navigation capabilities are introduced into the navigation application, and the units such as the adaptation interface layer, the realization layer, the abstract factory interface layer and the factory class are erected by the abstract factory method, so that a user can operate through the uniformly defined application layer, the required service or service is called from different navigation SDKs by the abstract factory method, and the navigation SDKs can be dynamically switched during operation without cold start, thereby reducing the waiting time of the user and improving the operation experience of the user.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention and not for limiting the technical solutions, and those skilled in the art should understand that modifications or equivalent substitutions can be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all that should be covered by the claims of the present invention.

Claims (8)

1. A method for switching navigation SDKs during operation is characterized by comprising the following steps,
s1, introducing a plurality of different navigation SDKs into the navigation application;
s2, providing a plurality of service interfaces corresponding to the navigation SDK through an adaptation layer, and respectively realizing the service interfaces;
s4, adopting an abstract factory mode to expose the adaptation layer to the application layer;
s4, completing initialization of each navigation SDK, switching among the navigation SDKs and calling required services through operation of an application layer;
and S5, destroying the historical temporary resources after the switching between different navigation SDKs is completed.
2. The safety method for preventing mistaken stepping of the vehicle according to claim 1, wherein the adaptation layer comprises an adaptation interface layer and an implementation layer; and the realization layer is used for realizing the navigation related capability interface.
3. The method as claimed in claim 1, wherein the abstract factory pattern comprises an abstract factory interface layer and a plurality of factory classes corresponding to the navigation SDK, wherein the abstract factory interface layer defines a navigation service capability interface that can be provided by the navigation application, and the factory classes are used for implementing the service capability interface.
4. The method as claimed in claim 1, wherein the operation of the application layer includes a click operation or a voice operation.
5. The method as claimed in claim 1, wherein the initialization of the navigation SDK includes initialization of a single SDK and initialization of multiple SDKs simultaneously.
6. The safety method for preventing mistaken stepping on a vehicle according to claim 1, wherein switching between the navigation SDKs is performed through pop-up window selection or voice selection of an application layer, a navigation SDK switching signal is sent, the navigation application judges whether to switch the navigation SDKs according to the signal, and if the switching is possible, the switching operation is performed.
7. The safety method for preventing mistaken stepping on the vehicle as claimed in claim 3, wherein when the navigation SDKs are switched, a factory class corresponding to the target navigation SDK initiates a main graph service request, obtains and returns a view, the application layer loads and displays the main graph after obtaining the return result, and after the switching is completed, historical temporary resources of the previous navigation SDK are destroyed.
8. Architecture for a runtime switched navigation SDK, comprising,
a plurality of navigation SDKs with different navigation capabilities for providing different navigation services;
the adaptive interface layer is a navigation capability interface which is abstracted by navigation application and corresponds to each navigation SDK, and is used for exchanging data with each navigation SDK;
the realization layer comprises a plurality of realization units based on adapter interfaces, which respectively correspond to the navigation capabilities of the navigation SDKs and are used for realizing the navigation capability interfaces so as to unify the external data exchange and navigation capability calling parameters of the realization layer;
an abstract factory interface layer for defining a service capability interface of the navigation application;
the plurality of factory classes provide different service capabilities corresponding to the navigation capabilities of the navigation SDKs and are used for realizing the service capability interfaces;
and the application layer is used for displaying the view of the navigation application and initializing the navigation SDK of the navigation application, switching among the navigation SDKs and invoking the operation of the required service capability by the user.
CN202210081287.XA 2022-01-24 2022-01-24 Method for switching navigation SDK during operation and architecture thereof Pending CN114385161A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210081287.XA CN114385161A (en) 2022-01-24 2022-01-24 Method for switching navigation SDK during operation and architecture thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210081287.XA CN114385161A (en) 2022-01-24 2022-01-24 Method for switching navigation SDK during operation and architecture thereof

Publications (1)

Publication Number Publication Date
CN114385161A true CN114385161A (en) 2022-04-22

Family

ID=81203826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210081287.XA Pending CN114385161A (en) 2022-01-24 2022-01-24 Method for switching navigation SDK during operation and architecture thereof

Country Status (1)

Country Link
CN (1) CN114385161A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102323883A (en) * 2011-09-05 2012-01-18 广东东纳软件科技有限公司 Navigation vehicle information management system based on Android system
CN102735246A (en) * 2012-07-13 2012-10-17 深圳市浩科电子有限公司 Multi-map navigation system and navigation method of multi-map navigation system
CN107818010A (en) * 2016-09-08 2018-03-20 北京嘀嘀无限科技发展有限公司 The method and apparatus switched between different maps
CN108280199A (en) * 2018-01-29 2018-07-13 成都西加云杉科技有限公司 Map Switch method and device
CN112258886A (en) * 2020-10-09 2021-01-22 北京百度网讯科技有限公司 Navigation method, navigation device, electronic equipment and storage medium
CN113407284A (en) * 2021-06-25 2021-09-17 远光软件股份有限公司 Navigation interface generation method and device, storage medium and electronic equipment
CN113485680A (en) * 2021-06-30 2021-10-08 重庆长安汽车股份有限公司 APP (application) component control system and method based on vehicle-mounted system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102323883A (en) * 2011-09-05 2012-01-18 广东东纳软件科技有限公司 Navigation vehicle information management system based on Android system
CN102735246A (en) * 2012-07-13 2012-10-17 深圳市浩科电子有限公司 Multi-map navigation system and navigation method of multi-map navigation system
CN107818010A (en) * 2016-09-08 2018-03-20 北京嘀嘀无限科技发展有限公司 The method and apparatus switched between different maps
CN108280199A (en) * 2018-01-29 2018-07-13 成都西加云杉科技有限公司 Map Switch method and device
CN112258886A (en) * 2020-10-09 2021-01-22 北京百度网讯科技有限公司 Navigation method, navigation device, electronic equipment and storage medium
CN113407284A (en) * 2021-06-25 2021-09-17 远光软件股份有限公司 Navigation interface generation method and device, storage medium and electronic equipment
CN113485680A (en) * 2021-06-30 2021-10-08 重庆长安汽车股份有限公司 APP (application) component control system and method based on vehicle-mounted system

Similar Documents

Publication Publication Date Title
US7877091B2 (en) Method and system for executing a container managed application on a processing device
US6832238B1 (en) Local transaction management
KR20060048929A (en) Active content wizard execution with improved conspicuity
CN111625293B (en) Terminal dual system based on linux kernel and hardware access management method thereof
US20060155546A1 (en) Method and system for controlling input modalities in a multimodal dialog system
CN105549958A (en) Embedded system starting method and intelligent terminal
US6504914B1 (en) Method for dialog control of voice-operated information and call information services incorporating computer-supported telephony
KR20010042008A (en) An apparatus, method and computer program product for client/server computing with client selectable location of transaction objects
CN110674205B (en) Single table query method, device, terminal and readable storage medium
RU2216052C2 (en) Automatic speech recognition
CN114385161A (en) Method for switching navigation SDK during operation and architecture thereof
JP2001056767A (en) Method for cleaning up internal state by using transaction service synchronous interface
EP1020087B1 (en) Services using call independent building blocks
CN116302448A (en) Task scheduling method and system
JPH0721004A (en) Method and apparatus for levitation of object in user interface
CN112579258A (en) Virtual machine management method, device, equipment and storage medium
US20050091400A1 (en) View routing in user interface applications
KR20070040015A (en) Apparatus and method for application booting in the mobile communication terminal
CN114138507B (en) Python program service method, device and computer readable storage medium
US20060161618A1 (en) Abstract mechanism for constructing commands for the command pattern
US11579859B2 (en) Dynamic invocation of partner product exit routine in an active information management system
CN116127035B (en) Dialogue method, training method and training device for dialogue model
CN113254145B (en) Human-computer-object fusion application operation supporting method based on micro-service architecture
CN114228745B (en) Driving system module control method, device, equipment, medium, product and vehicle
WO2023216857A1 (en) Multi-agent chatbot with multi-intent recognition

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