Method, device, server and system for displaying maps based on quick application cards
Implementing fast application card display maps through JavaScript solves the problem that the existing technology cannot display maps on cards, provides dynamic or static map display, and improves the convenience of user experience and information display.
Patent Information
- Application Number
- CN202311375373.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2043-10-20
AI Technical Summary
The recommended cards for existing electronic devices on the desktop or negative screen can only display static text information, and cannot display map-related functions, affecting the user experience.
Using JavaScript-based methods, dynamic or static map display is realized through fast application cards, and supports displaying map layers and recommendation services in the form of cards. Users can view location information through cards and enter the corresponding page to view details.
It provides users with more convenient services, improves the intuitiveness of information display and comprehensiveness of service recommendations, meets users' real-time needs for map information, and reduces the power consumption of map cards.
Smart Images

Figure CN117666993B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image display technology, and in particular to a method, electronic device, server, and communication system for displaying a map based on a quick application card. Background Art
[0002] In order to provide users with convenient information access, electronic devices use card recommendation functions to present information that users may need to view in the form of cards on the desktop or negative one screen of the electronic device. In this way, users do not need to subconsciously remind themselves that they need to enter certain software applications to view the required information in specific situations. For example, Figure 1 As shown in (a) and (b) in the figure, the electronic device presents the flight information in the form of a card. The user does not need to check the text message or enter the relevant application for subscribing to the air ticket to view the flight information. The user can directly view it on the desktop or the negative one screen.
[0003] However, currently, the cards recommended and displayed on the desktop or negative one screen of electronic devices can only display static text information and do not support the display of maps. In other words, it is currently impossible to display map-related functions on the cards, and it is impossible to provide more valuable services, which affects the user experience. Summary of the invention
[0004] The present application provides a method, electronic device, server and communication system for displaying maps based on quick application cards, which can display dynamic or static maps in a card format and present recommended services based on JavaScript, providing users with more convenient services.
[0005] In a first aspect, the present application provides a method for displaying a map based on a quick app card, which is applied to an electronic device, the method comprising: receiving a first operation of a user, the first operation being an operation for triggering the addition of a first quick app card to a target interface; in response to the first operation, verifying the first quick app card according to a card whitelist; in the case of passing the verification, sending a first request message to a server, the first request message being used to request the server to verify and configure the first quick app card; loading card configuration data corresponding to the first quick app card sent by the server based on a JavaScript thread, the card configuration data including a business type of the first quick app card, data of a map layer, and data of a function layer; rendering the first quick app card according to the data of the map layer and the data of the function layer, and displaying the first quick app card on a target interface, the first quick app card displaying a map layer and a function layer for displaying recommended services; obtaining map frame data of the first quick app card from the server at first intervals, and refreshing the map layer of the first quick app card according to the map frame data, the first time period being a map refresh time period determined according to the business type of the first quick app card.
[0006] Through the method for displaying maps based on quick app cards provided in an embodiment of the present application, when a user triggers the addition of a quick app card, the electronic device can present a small component in the form of a card on an interface such as a desktop or a negative one screen, supporting the display of map layers and functional layers for displaying recommended services. The refresh frequency of the map layer is different for different business types of quick app cards. The electronic device periodically obtains map frame data from the server side, and refreshes the map layer in the quick app card according to the map refresh frequency. The present application scheme is based on JavaScript to display dynamic or static maps in the form of cards and present recommended services. Users can quickly obtain location information by viewing the map in the card, and refer to the recommended service to decide to enter the corresponding page to view the details. The card display method provides users with more convenient services.
[0007] The card configuration data is an RPK package, which includes the name, icon and address of the first quick application card. The card whitelist contains the card package name and card permission information.
[0008] It should be noted that "displaying static maps" and "displaying dynamic maps" are relative terms. Static maps refer to maps with longer refresh intervals, while dynamic maps refer to maps with shorter refresh intervals. For example, the refresh interval of a static map is greater than 1 minute, while the refresh interval of a dynamic map is within the range of [5 seconds, 1 minute].
[0009] For example, for application scenarios such as taxi-hailing and surrounding services, dynamic maps are displayed in the form of cards, that is, dynamically refreshed and displayed; for application scenarios such as attractions, take-out, cinemas, and life services, static maps are displayed in the form of cards, that is, statically refreshed and displayed.
[0010] In some embodiments, the electronic device can control the switching of static / dynamic maps according to the card usage scenario.
[0011] In some embodiments, the electronic device may display the map card in a static map format by default to save energy.
[0012] In some embodiments, the electronic device can limit the frequent use of dynamic maps through a whitelist, which can prevent card abuse and avoid causing performance problems.
[0013] Among them, the first quick application card is also called a map card. The target interface is also called a host interface. Exemplarily, the target interface can be the interface of the quick service center, or the interface of the negative one screen, or the desktop interface, or the folding screen small screen interface, or the lock screen interface. Through the present application scheme, after adding the card to the desktop or the negative one screen, the user can quickly obtain the location information by viewing the map card on the desktop or the negative one screen interface, and refer to the recommended service to decide to enter the corresponding page to view the details, thereby providing users with more convenient services.
[0014] Through this application solution, electronic devices can intelligently display map card widgets through the quick application engine, making it convenient for users to view maps and various services. Users do not need to download and install applications, they can use them as soon as they click, and enjoy the performance experience of native applications.
[0015] In one possible implementation, different business types (also referred to as service types) may include: travel services, flight services, schedule services, travel services, and local life services. This is an illustrative example, and in actual implementation, business types may also be divided according to specific needs.
[0016] Exemplarily, the above service types may be:
[0017] (1) Travel services: scenic spots, tickets, toilets, and food;
[0018] (2) Flight services: flight orders, boarding passes, food and drinks;
[0019] (3) Calendar services: meeting schedule, taxi, online meeting, and phone calls;
[0020] (4) Travel services: hotel reservations, taxis, and reporting lost luggage;
[0021] (5) Local life services: movie tickets, ticket collection, parking, drinks.
[0022] In the application embodiment, the display form of the map card includes but is not limited to: (1) displaying the card on the interface of the quick service center; (2) displaying the card on the negative one screen; (3) displaying the card on the desktop; (4) displaying the card on the foldable screen; (5) displaying the card on the lock screen interface.
[0023] Through the embodiments of the present application, cards can be dynamically generated based on quick applications. It is only necessary to develop quick applications and integrate data extraction interfaces to generate corresponding quick application cards. The method of displaying maps based on quick application cards has the following beneficial effects: information display is more intuitive, service recommendations are more comprehensive, and relevance is more significant.
[0024] In some possible implementations of the first aspect, obtaining map frame data of the first quick app card from the server includes: determining a first map component according to a business type of the first quick app card; and calling a map application programming interface API through the first map component to obtain map frame data of the first quick app card from the server.
[0025] In some possible implementations of the first aspect, the first map component is a dynamic map component or a static map component, and a map refresh frequency corresponding to the dynamic map component is greater than a map refresh frequency corresponding to the static map component.
[0026] In some possible implementations of the first aspect, obtaining map frame data of the first quick app card from the server through the first map component includes: when the first map component is a dynamic map component, obtaining map frame data of the first quick app card from the server through the dynamic map component, the map frame data being a map in the form of a texture view.
[0027] It can be understood that the dynamic map component uses a map in the form of a texture view, which has a relatively high refresh rate and meets the user's needs for knowing real-time location changes through the map displayed on the card.
[0028] In some possible implementations of the first aspect, obtaining map frame data of the first quick app card from the server through the first map component includes: when the first map component is a static map component, obtaining map frame data of the first quick app card from the server through the static map component, the map frame data being a map screenshot in bitmap form.
[0029] It can be understood that the static map component uses a map screenshot in bitmap form, which has a low refresh rate, meets the basic needs of users to view the target location through the map displayed on the card, and can reduce device power consumption.
[0030] In an embodiment of the present application, the electronic device can display static / dynamic maps according to different scenarios to realize the intelligent display of map cards. For static maps, a map screenshot in the form of a bitmap can be used, which occupies less memory and CPU resources, can be used for map display, and refreshes once every preset time interval (such as 1 minute). For dynamic maps, a map view (MapView) or a texture view (GLtexture view) can be used, which occupies more memory and CPU resources, can be used for location display, and can be refreshed in real time, for example, every 5 seconds.
[0031] In some possible implementations of the first aspect, when the first quick app card is displayed on the target interface, the method further includes: in response to a first operation of the user on the first quick app card, identifying a user usage scenario; if the user usage scenario is a first preset scenario, determining a second duration corresponding to the first preset scenario according to a preset mapping relationship of a map refresh policy, the preset mapping relationship of the map refresh policy including a mapping relationship between user usage scenarios and map refresh durations; and refreshing a map layer displayed on the first quick app card every second duration.
[0032] In some possible implementations of the first aspect, when the first quick app card is displayed on the target interface, the method also includes: when the electronic device enters a preset geographic fence, identifying a user usage scenario; if the user usage scenario is a second preset scenario, determining a third time duration corresponding to the second preset scenario according to a preset mapping relationship of a map refresh strategy; and refreshing the map layer displaying the first quick app card every third time duration.
[0033] Exemplarily, the first preset scene is a dynamic operation scene such as taking a taxi, and the second duration is 2 seconds; the second preset scene is a static display scene such as scenic spots, take-out, cinemas, and life services, and the third duration is 2 minutes.
[0034] In some embodiments, it is possible to combine reservation orders and location-based services to determine the scene in which the user is located and obtain preset associated services corresponding to the scene in which the user is located, and recommend associated services to the user based on the user's behavior habits. Among them, the reservation order information can come from text messages and / or emails received by the electronic device. The electronic device can parse the received text messages and / or emails to obtain reservation order information. For example, the reservation order information can be scenic spot ticket reservation information, air ticket reservation information, train ticket reservation information, conference reservation information, hotel reservation information, and movie ticket purchase information. The electronic device can recommend associated services by displaying a map card, which may include a real-time location map corresponding to the scene in which the user is located and options for preset associated services.
[0035] The map card provided in the embodiment of the present application is implemented based on JavaScript, supports displaying maps in card format and presenting recommended services corresponding to user scenarios, and displays maps in different states for different application scenarios, providing users with more convenient services.
[0036] In some possible implementations of the first aspect, the function layer includes a recommended service control; the method further includes: receiving a second operation of the user on the recommended service control; in response to the second operation, displaying prompt information corresponding to the recommended service control on the map layer in the first quick app card; wherein the prompt information includes navigation route prompt information and / or location information of the target location.
[0037] In some possible implementations of the first aspect, the electronic device includes a quick application engine and a JavaScript interface. The loading of card configuration data corresponding to a first quick application card sent by a server based on a JavaScript thread includes: the quick application engine obtains the card configuration data corresponding to the first quick application card from the server; the quick application engine calls the JavaScript interface to send the card configuration data to a first map component; and the first map component loads the card configuration data based on the JavaScript thread.
[0038] The embodiment of the present application uses JavaScript to develop quick applications, dynamically generates map cards based on quick applications, and supports dynamic or static refreshing and displaying of map cards for different user scenarios, thereby reducing power consumption and expanding the usage scenarios of map cards.
[0039] In a second aspect, the present application provides a method for displaying a map based on a quick app card, which is applied to a server, and the method includes: calling a map card interface to generate an RPK package of a first quick app card; receiving a first request message sent by an electronic device, the first request message is used to request verification and configuration of the first quick app card; in response to the first request message, verifying and configuring the first quick app card, and then sending an RPK package to the electronic device, the RPK package including the business type of the first quick app card, map layer data, and function layer data; wherein the map layer data and the function layer data are used to render the first quick app card, so that the map layer and the function layer showing the recommended service are displayed in the first quick app card, and the business type is used to determine the map refresh time of the first quick app card; receiving a second request message sent by the electronic device every first time period, the second request message is used to request to obtain map frame data; in response to the second request message, sending the map frame data of the first quick app card to the electronic device, the map frame data is used to refresh the map layer of the first quick app card.
[0040] Through the method for displaying a map based on a quick application card provided by an embodiment of the present application, the server can call a map card interface to generate an RPK package of a first quick application card, and in response to a card addition request sent by an electronic device, the server sends the card configuration data of the first quick application card to the electronic device, so that the electronic device can present a small component in the form of a card on an interface such as a desktop or a negative screen, supporting the display of a map layer and a functional layer for displaying recommended services. The refresh frequency of the map layer is different for different business types of quick application cards. In response to a map frame data request sent by an electronic device, the server sends map frame data to the electronic device, so that the map layer in the first quick application card can be refreshed according to the map refresh frequency. The present application solution is based on JavaScript to implement the display of dynamic or static maps in a card manner and present recommended services. Users can quickly obtain location information by viewing the map in the card, and refer to the recommended service to decide to enter the corresponding page to view the details. The card display method provides users with more convenient services.
[0041] In some possible implementations of the second aspect, calling a map card interface to generate an RPK package for a first quick app card includes: obtaining a map card interface from a developer service platform (the map card interface includes a card business type, a positioning interface, and an operation button and a function interface); determining, based on the card business type and the positioning interface, whether the first quick app card uses a dynamic map component or a static map component; determining, based on the operation button and the function interface, a map refresh policy corresponding to the first quick app card; and packaging the determination results to obtain an RPK package for the first quick app card.
[0042] Through the above solution, the developer service platform provides a map card interface for the server, and the developer service platform sends map card data to the server through the map card interface.
[0043] In an embodiment of the present application, the developer service platform registers and applies for a map card with the server. The server generates a card whitelist based on the card package name and regularly synchronizes the card whitelist to the electronic device. The electronic device controls the call of the map API through the card whitelist.
[0044] In some embodiments, the developer service platform may apply to the server for the card type, and request the server to determine the card type according to the usage scenario.
[0045] In some embodiments, the developer service platform may apply for card permissions from the server, request the server to determine the card permissions based on the usage scenario, and add the card permission information to the card whitelist.
[0046] In some embodiments, the server may store a card whitelist. Exemplarily, the card whitelist contains card package names and card permission information.
[0047] In other embodiments, the server may send the card whitelist to the electronic device side.
[0048] In some possible implementations of the second aspect, the RPK package also includes the name and icon of the first quick app card and the address of the RPK package.
[0049] In some possible implementations of the second aspect, sending the map frame data of the first quick app card to the electronic device includes: when it is determined that the first quick app card adopts a dynamic map component, sending the map frame data of the first quick app card to the electronic device, wherein the map frame data is a map in the form of a texture view.
[0050] In some possible implementations of the second aspect, sending the map frame data of the first quick app card to the electronic device includes: when it is determined that the first quick app card uses a static map component, sending the map frame data of the first quick app card to the electronic device, where the map frame data is a map screenshot in bitmap form.
[0051] In a third aspect, the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory, wherein the processor is used to execute the computer program so that the electronic device implements the method described in the first aspect and any implementation method thereof.
[0052] In a fourth aspect, the present application provides a server, comprising a processor, a memory, and a computer program stored in the memory, wherein the processor is used to execute the computer program so that the electronic device implements the method described in the second aspect and any implementation method thereof.
[0053] In a fifth aspect, the present application provides a communication system, which includes the electronic device described in the third aspect and the server described in the fourth aspect.
[0054] In addition, the present application also provides a method for displaying a map based on a quick application card, the method comprising: in response to an operation of a user on an electronic device, creating a first scheduled item (the data of the first scheduled item includes item content and location information of a scheduled location); determining a first service type corresponding to the first scheduled item according to the item content; acquiring card interface data corresponding to the first service type (the card interface data includes information on a map refresh frequency and a first service function); acquiring a first map corresponding to the scheduled location;
[0055] Generate a first quick application card of a first service type according to the data of the first scheduled event, the first map, and the map interface data, and establish an association relationship between the first quick application card and the map refresh frequency; display the first quick application card on a display screen of the electronic device, wherein the first quick application card includes event content, the first map, and a control of the first service function;
[0056] When the electronic device meets the preset conditions, the map displayed in the first quick app card is refreshed to a second map according to the map refresh frequency, and the second map is a map corresponding to the location of the electronic device; wherein different service types of quick app cards are preset with different map refresh frequencies, and the quick app cards of different service types are refreshed according to different map refresh frequencies.
[0057] Through the method for displaying a map based on a quick application card provided in the embodiment of the present application, a quick application card of a recommended service type (i.e., the first service type corresponding to the first scheduled item) can be generated according to the location information of a reservation order (i.e., the first scheduled item) and a scheduled location. Through the quick application card, a map of the scheduled location and a recommended service related to the reservation order (i.e., the first service function) can be displayed to achieve personalized recommendations for users to view and select; and the map displayed by the quick application card can be controlled to refresh according to the corresponding map refresh frequency, and quick application cards of different service types refresh the map according to different map refresh frequencies. In this way, users can quickly obtain location information by viewing map cards on interfaces such as the desktop or the negative one screen, and refer to the recommended service to decide to enter the corresponding page to view details. Therefore, the present application can provide users with more convenient services in the form of displaying dynamic or static maps by cards.
[0058] In the present application scheme, the electronic device can generate and display the quick app card, or the server can generate the quick app card, and then the server sends the generated quick app card to the electronic device, and then the electronic device displays the quick app card. It should be noted that in the case where the quick app card is generated by the server, the developer can call a specific data interface to provide data to the server; then, the server uses the developer service platform to generate a map card based on the data, and automatically stores the map card in the database, and then the server can obtain a suitable map card from the database according to the request of the electronic device, and send the map card to the electronic device.
[0059] In one possible implementation, a quick app card of the same service type corresponds to multiple preset user scenarios, and different preset user scenarios correspond to different map refresh frequencies. In the case where the first quick app card is displayed on the display screen of the electronic device, the method further includes: identifying the current user scenario; if the current user scenario is a user scenario among multiple preset user scenarios, determining the map refresh frequency corresponding to the current user scenario; wherein the quick app cards of the same service type are refreshed at different map refresh frequencies in different preset user scenarios.
[0060] In a possible implementation, the plurality of preset user scenarios include a first user scenario and a second user scenario, the first user scenario corresponds to a first map refresh frequency, and the second user scenario corresponds to a second map refresh frequency. In this case, when the user scenario is identified as the first user scenario, the map displayed in the first quick app card is refreshed to the second map according to the first map refresh frequency; when the user scenario is identified as the second user scenario, the map displayed in the first quick app card is refreshed to the second map according to the second map refresh frequency.
[0061] For example, a schedule service map card displayed on the desktop of an electronic device, and a quick application card of this service type can be refreshed according to the first map refresh frequency. For another example, a local life service map card displayed on the desktop of an electronic device, and a quick application card of this service type can be refreshed according to the second map refresh frequency. The first map refresh frequency is higher than the second map refresh frequency. For example, the first map refresh frequency is: the refresh interval is greater than 1 minute. For example, the second map refresh frequency is: the refresh interval is within the range of [5 seconds, 1 minute].
[0062] In one possible implementation, after the first quick app card is displayed on the display screen of the electronic device, the method further includes: obtaining positioning information of the electronic device; and determining whether the distance between the location indicated by the positioning information of the electronic device and the predetermined location is within a preset distance range.
[0063] Among them, when the electronic device meets the preset conditions, the map displayed in the first quick application card is refreshed to the second map according to the map refresh frequency, including: when the distance between the location indicated by the positioning information of the electronic device and the predetermined location is within a preset distance range, the map displayed in the first quick application card is refreshed to the second map according to the map refresh frequency.
[0064] Through the present application scheme, when the positioning information of the electronic device meets the preset conditions, the electronic device can be triggered to refresh the map at an accurate time, providing users with more convenient map display services and improving user experience.
[0065] In a possible implementation, the data of the first scheduled event also includes information of the scheduled time. The method also includes: obtaining information of the system time of the electronic device; and determining whether the time difference between the scheduled time and the system time of the electronic device is less than a preset time.
[0066] Among them, when the electronic device meets the preset conditions, the map displayed in the first quick application card is refreshed to the second map according to the map refresh frequency, including: when the distance between the location indicated by the positioning information of the electronic device and the predetermined location is within a preset distance range, and the time difference between the predetermined time and the system time of the electronic device is less than a preset duration, the map displayed in the first quick application card is refreshed to the second map according to the map refresh frequency.
[0067] Through the present application scheme, when the positioning information and time information of the electronic device meet the preset conditions, the electronic device can be triggered to refresh the map at the right time, providing users with more convenient map display services and improving user experience.
[0068] In one possible implementation, the method further includes: displaying map navigation information on the second map, wherein the map navigation information includes at least one route from the location of the electronic device to the predetermined location, a recommended route, available transportation, and an estimated time taken by any transportation.
[0069] In a possible implementation, the method further includes: refreshing the map navigation information displayed on the second map according to a map refresh frequency.
[0070] Through the present application scheme, quick application cards can not only provide dynamic / static maps, but also provide real-time map navigation information. Users can quickly obtain location information by viewing map cards on interfaces such as the desktop or negative one screen, and refer to recommended services to decide to enter the corresponding page to view details. Therefore, the present application can provide users with more convenient services by displaying dynamic or static maps on cards.
[0071] In one possible implementation, after obtaining the first quick app card, the method further includes: obtaining a preset whitelist, which includes quick app cards that have been registered; when it is determined that the first quick app card is a card in the preset whitelist, calling a preset map interface to obtain a second map.
[0072] In a possible implementation, before displaying the first quick app card on the display screen of the electronic device, the method further includes: when determining that the first quick app card is a card in a preset whitelist, obtaining an application display permission corresponding to the first quick app card. The displaying of the first quick app card on the display screen of the electronic device includes: displaying the display content in the first quick app card according to the application display permission corresponding to the first quick app card.
[0073] In a sixth aspect, the present application provides a device for displaying a map based on a quick application card, the device comprising a unit for executing the method in the first aspect above. The device may correspond to executing the method described in the first aspect above, and the relevant description of the unit in the device can refer to the description of the first aspect above, which will not be repeated here for the sake of brevity.
[0074] The method described in the first aspect above can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, etc.
[0075] In a seventh aspect, the present application provides a computer-readable storage medium on which is stored a computer program (also referred to as instructions or codes) for implementing the method in the first aspect. For example, when the computer program is executed by a computer, the computer can execute the method in the first aspect.
[0076] In an eighth aspect, the present application provides a chip, comprising a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof. Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0077] In a ninth aspect, the present application provides a chip system, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof. Optionally, the chip system also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0078] In a tenth aspect, the present application provides a computer program product, which includes a computer program (also referred to as instructions or codes). When the computer program is executed by an electronic device, the electronic device implements the method in the first aspect.
[0079] It can be understood that the beneficial effects of the second to tenth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1A schematic diagram of an interface for displaying a quick application card on an electronic device provided in an embodiment of the present application;
[0081] Figure 2 A schematic diagram of a quick application card widget provided in an embodiment of the present application;
[0082] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0083] Figure 4 A schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0084] Figure 5 Schematic diagram of the process of displaying a map based on a quick application card provided in an embodiment of the present application Figure 1 ;
[0085] Figure 6 Schematic diagram of the process of displaying a map based on a quick application card provided in an embodiment of the present application Figure 2 ;
[0086] Figure 7 A schematic diagram of the functional modules on the electronic device side in the method for displaying a map based on a quick app card provided in an embodiment of the present application;
[0087] Figure 8 Schematic diagram of the process of displaying a map based on a quick application card provided in an embodiment of the present application Figure 3 ;
[0088] Fig. 9 Schematic diagram of the interactive timing of the method for displaying a map based on a quick application card provided in an embodiment of the present application Figure 1 ;
[0089] Fig.10 Schematic diagram of the interactive timing of the method for displaying a map based on a quick application card provided in an embodiment of the present application Figure 2 ;
[0090] Fig.11 Schematic diagram of the interactive timing of the method for displaying a map based on a quick application card provided in an embodiment of the present application Figure 3 ;
[0091] Fig.12 Schematic diagram of the process of displaying a map based on a quick application card provided in an embodiment of the present application Figure 4 ;
[0092] Fig.13 Schematic diagram of the process of displaying a map based on a quick application card provided in an embodiment of the present application Figure 5 ;
[0093] Fig.14A schematic diagram of adding services through YOYO suggestions in a method for displaying a map based on a quick app card provided in an embodiment of the present application;
[0094] Figures 15A to 15E A schematic diagram of a quick app card in a method for displaying a map based on a quick app card provided in an embodiment of the present application;
[0095] Figures 16A to 16B A schematic diagram of an interface for viewing a quick app card in a method for displaying a map based on a quick app card provided in an embodiment of the present application;
[0096] Figures 17A to 17E A schematic diagram of an interface for adding a quick app card in the method for displaying a map based on a quick app card provided in an embodiment of the present application. DETAILED DESCRIPTION
[0097] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, 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 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.
[0098] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of objects. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two, for example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.
[0099] In order to provide users with convenient information access, electronic devices use card recommendation functions to present information that users may need to view in the form of cards on the desktop or negative one screen of the electronic device. In this way, users do not need to subconsciously remind themselves that they need to enter certain software applications to view the required information in specific situations. For example, Figure 1 As shown in (a) and (b) in the figure, the electronic device presents the flight information in the form of a card. The user does not need to check the text message or enter the relevant application for subscribing to the air ticket to view the flight information. The user can directly view it on the desktop or the negative one screen.
[0100] Different operating systems have different processing strategies for card generation and display.
[0101] For example, for For electronic devices with operating systems, cards can be generated based on the JavaScript programming language and displayed on the screen. For example, flight information, train information, meeting information or schedule information can be presented through cards.
[0102] Among them, JavaScript, referred to as "JS", is a lightweight, interpreted or just-in-time compiled programming language with function priority. JavaScript is a dynamic scripting language based on prototype programming and multiple paradigms, and supports object-oriented, imperative, declarative, and functional programming paradigms. JavaScript can be widely used in devices such as servers, PCs, laptops, tablets, and smartphones. It is often used to add a variety of dynamic functions to web pages to provide users with a smoother and more beautiful browsing experience.
[0103] However, The cards implemented by JavaScript (JS cards for short) in the operating system's electronic devices do not support the display of maps. In other words, map cards are currently not available in smart services. This is because JS cards lack map components, which makes it impossible to display map-related functions on the cards, and it is impossible to provide more valuable services, affecting the user experience.
[0104] For example, for For electronic devices with operating systems, it is supported to display maps in the form of cards. Electronic devices can support setting card widgets on the desktop to display maps. However, The map cards provided by the operating system are not implemented based on JavaScript, but on native applications (applications, APPs). The map cards provided by the operating system have the following defects:
[0105] (1) The function of the map card depends on the map card APP and is limited in usage scenarios. If the map card APP is uninstalled, the card function will become invalid.
[0106] (2) These map cards are all dynamic map cards. Since the displayed maps are continuously updated, they consume a lot of energy.
[0107] From the above content, we can see that different operating systems have certain limitations in displaying map cards. In order to reduce power consumption and expand the usage scenarios of map cards, it is urgent to improve the development and display of map cards.
[0108] Based on this, the embodiment of the present application provides a method and electronic device for displaying maps based on quick application cards, which improves the user experience by improving the underlying system of the mobile phone. The embodiment of the present application uses JavaScript to develop quick applications, dynamically generates map cards based on quick applications, and supports dynamic or static refreshing and displaying of map cards for different user scenarios, thereby reducing power consumption and expanding the usage scenarios of map cards.
[0109] In order to better understand the embodiments of the present application, the embodiments of the present application are briefly described below:
[0110] Through the method for displaying a map based on a quick app card provided by an embodiment of the present application, through the method for displaying a map based on a quick app card provided by an embodiment of the present application, when a user triggers the addition of a quick app card, the electronic device can present a small component in the form of a card on an interface such as a desktop or a negative one screen, supporting the display of a map layer and a functional layer for displaying recommended services. The refresh frequency of the map layer is different for different business types of quick app cards. The electronic device periodically obtains map frame data from the server side, and refreshes the map layer in the quick app card according to the map refresh frequency. The present application scheme is based on JavaScript to implement the display of dynamic or static maps in the form of cards and present recommended services. Users can quickly obtain location information by viewing the map in the card, and refer to the recommended service to decide to enter the corresponding page to view the details. The card display method provides users with more convenient services.
[0111] Through the present application scheme, a quick application card of a recommended service type can also be generated according to the location information of the reservation order and the reservation location. The quick application card can display a map of the reservation location and recommended services related to the reservation order to achieve personalized recommendations for users to view and select; and the map displayed by the quick application card can be controlled to refresh according to the corresponding map refresh frequency, and quick application cards of different service types refresh the map according to different map refresh frequencies.
[0112] like Figure 2As shown in (a) and (b) in the figure, the embodiment of the present application can provide a widget in the form of a card on the desktop and negative one screen of the device. These map cards are implemented based on JavaScript, support displaying maps in the form of cards and presenting recommended services corresponding to user scenarios, and display maps in different states for different application scenarios. For example, for application scenarios such as taxis and surrounding services, dynamic maps are displayed in the form of cards, that is, dynamically refreshed; for application scenarios such as attractions, take-out, cinemas, and life services, static maps are displayed in the form of cards, that is, statically refreshed. In this way, users can quickly obtain location information by viewing map cards on interfaces such as the desktop and the negative one screen, and refer to the recommended services to decide to enter the corresponding page to view details.
[0113] Hereinafter, an electronic device to which the method for displaying a map based on a quick application card provided in an embodiment of the present application is applied will be described with reference to the accompanying drawings.
[0114] Exemplarily, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), a wearable device (such as a smart watch, a smart bracelet), and other devices with voice communication functions. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0115] Figure 3 The following is a schematic diagram showing the structure of an electronic device provided by an embodiment of the present application. Figure 3 The electronic device shown may be a mobile phone.
[0116] like Figure 3 As shown, the mobile phone may include: a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver (i.e., an earpiece) 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a button 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 395, etc.
[0117] Exemplarily, the sensor module may include sensors such as a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor. In an embodiment of the present application, the electronic device may detect whether the user's ear is close to the receiver through sensors such as a proximity light sensor (i.e., a light sensor) and a distance sensor. For example, the electronic device may detect whether there is an obstruction in front of the front panel (or screen) of the mobile phone, and the distance between the obstruction and the screen through a distance sensor to determine whether the current user's ear is close to the receiver.
[0118] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the mobile phone. In other embodiments, the mobile phone may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0119] The processor 310 may include one or more processing units, for example, the processor 310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0120] The processor 310 is used to: create a first scheduled event in response to an operation of a user on an electronic device (the data of the first scheduled event includes event content and location information of a scheduled location); determine a first service type corresponding to the first scheduled event according to the event content; obtain card interface data corresponding to the first service type (the card interface data includes information about a map refresh frequency and a first service function); obtain a first map corresponding to the scheduled location; generate a first quick application card of the first service type according to the data of the first scheduled event, the first map, and the map interface data, and establish an association relationship between the first quick application card and the map refresh frequency; display the first quick application card through a display screen of the electronic device, the first quick application card including event content, a first map, and a control of the first service function; when the electronic device meets a preset condition, refresh the map displayed in the first quick application card to a second map according to the map refresh frequency, the second map being a map corresponding to the location of the electronic device; wherein different map refresh frequencies are preset for quick application cards of different service types, and quick application cards of different service types are refreshed according to different map refresh frequencies.
[0121] The controller can be the nerve center and command center of the mobile phone. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0122] The processor 310 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory may store instructions or data that the processor 310 has just used or cyclically used. If the processor 310 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.
[0123] In some embodiments, the processor 310 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0124] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation on the mobile phone. In other embodiments, the mobile phone may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0125] The wireless communication function of the mobile phone can be realized through antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, modem processor and baseband processor.
[0126] The mobile phone can realize the display function through a GPU, a display screen 394, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 394 is used to display images, videos, etc.
[0127] In the embodiment of the present application, the entrance to the map card can be set in different interfaces of the display screen, which can be preset by the system or customized by the user. For example, the map card can be displayed on the desktop of the display screen, or on the negative first screen of the display screen, or on the quick service center of the display screen, or on the lock screen interface. For a folding screen electronic device with a small screen, the map card can be displayed on the small screen.
[0128] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone. The internal memory 321 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 310 executes various functional applications and data processing of the mobile phone by running the instructions stored in the internal memory 321. For example, in an embodiment of the present application, the processor 310 can execute instructions stored in the internal memory 321, and the internal memory 321 may include a program storage area and a data storage area.
[0129] The above is a specific description of the embodiment of the present application using the electronic device 100 as an example. It should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. The electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0130] In addition, an operating system is running on the above hardware. The operating system of the operating system layer can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system or Windows operating system, etc. Applications can be installed and run on the operating system.
[0131] The operating system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0132] Figure 4 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0133] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer (applications), application framework layer (application framework), Android runtime (AndroidRuntime) and system library, and kernel layer (kernel).
[0134] The application layer may include a series of application packages. For example, the application layer may include desktop APP, negative one screen APP, quick service center APP and other applications (applications may be referred to as applications for short), and the present application embodiment does not impose any restrictions on this.
[0135] In the embodiment of the present application, the application layer may also include a context awareness module, a business logic processing module, a business presentation module, etc. The context awareness module, the business logic processing module, and the business presentation module may be independent APPs, or may be integrated in different APPs, or may be integrated in the same APP, which is not limited in the present application.
[0136] Among them, the context awareness module, which runs permanently or in a low-power form, has the ability to perceive external facts or environments. The context awareness module can detect related events and obtain the status of events from other applications in the application layer or the application framework layer or the system layer or the kernel layer through the application programming interface (API), such as detecting Bluetooth connections, network connections, monitoring user text messages, custom timers, etc. In an embodiment of the present application, the main function of the context awareness module is to monitor whether there are scheduled orders. The context awareness module can also be used to obtain real-time geographic location information of electronic devices. The context awareness module can notify the business logic processing module of the monitored scheduled orders and real-time geographic location information.
[0137] The business logic processing module (e.g., computing engine) has business logic processing capabilities, and is used to perform data processing or logic judgment based on the scheduled orders and real-time geographic location information monitored by the context awareness module, as well as the preset logic algorithm, to determine the user's scene and the preset associated services corresponding to the user's scene. Then, based on the preset associated services corresponding to the user's scene and the user's behavior data, determine which services to recommend to the user. The specific judgment process will be described in detail below.
[0138] The service presentation module (such as YOYO Suggestion) is used to display a map card on the screen of the electronic device according to the instructions of the service logic processing module. The map card may include a real-time location map corresponding to the scene where the user is located and options for preset related services. The recommended services realized through the map card have more intuitive information display, more comprehensive service recommendations, and more significant relevance.
[0139] The application framework layer provides API and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 4 As shown, the application framework layer may include a window manager, a notification manager, a view system, a resource manager, etc., and the embodiments of the present application do not impose any restrictions on this.
[0140] The notification manager enables applications to display notification information in the status bar and can be used to convey notification-type messages. The window manager is used to manage window programs, such as window programs suggested by YOYO. The resource manager provides various resources for applications, such as localized strings, icons, pictures, maps, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, in an embodiment of the present application, the view system can be used to display a map card on the desktop.
[0141] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection. The system library can include multiple functional modules. For example: surface manager, media library, 3D graphics processing library (for example: openGL ES), 2D graphics engine (for example: SGL), etc. The surface manager is used to manage the display subsystem and provides the fusion of 2D layers and 3D layers for multiple applications.
[0142] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0143] For the convenience of explanation, the figure also shows a hardware layer that interacts with the above software structure. For example, the hardware layer may include a display screen.
[0144] It should be noted that although the embodiments of the present application are based on The system is used as an example, but the basic principles are also applicable to or Electronic devices with other operating systems.
[0145] The execution subject of the method for displaying a map based on a quick application card provided in the embodiment of the present application can be the above-mentioned electronic device, or it can be a functional module and / or functional entity in the electronic device that can implement the method for displaying a map based on a quick application card, and the present application scheme can be implemented in hardware and / or software, which can be determined according to actual use requirements, and the embodiment of the present application is not limited. Below, taking an electronic device as an example, the method for displaying a map based on a quick application card provided in the embodiment of the present application is exemplarily described in combination with the accompanying drawings.
[0146] The following will be combined with the accompanying drawings to illustrate the embodiments of the present application through the following multiple exemplary embodiments. The methods in the following embodiments can be implemented in an electronic device with the above hardware structure and software architecture. The hardware structure diagram of the electronic device can be as follows: Figure 3 As shown, the software structure diagram of the electronic device can be as follows Figure 4 For the sake of convenience, the embodiments of the present application are all based on electronic devices as shown in FIG. Figure 3 Take the mobile phone shown as an example.
[0147] The following describes a method for displaying a map based on a quick app card provided in an embodiment of the present application in conjunction with a specific embodiment.
[0148] First of all, it should be noted that in the present application scheme, a quick application card can be generated by a server, and then the server sends the generated quick application card to an electronic device, and then the electronic device displays the quick application card; of course, the electronic device can also generate a quick application card and display the quick application card. The following summarizes two implementation methods provided in the embodiments of the present application:
[0149] Implementation method 1
[0150] In implementation mode 1, a quick app card is generated by a server, and then the server sends the generated quick app card to an electronic device, and then the electronic device displays the quick app card.
[0151] Specifically, in response to the user's operation on the electronic device, a first scheduled item is created, and the data of the first scheduled item includes the item content and the location information of the scheduled location, and may also include the information of the scheduled time. The electronic device determines that the first scheduled item meets the scheduled order condition, and then the electronic device sends the data of the first scheduled item to the server.
[0152] The server may determine the first service type corresponding to the first scheduled event according to the event content. Then, the server may obtain card interface data corresponding to the first service type, the card interface data including information about the map refresh frequency and the first service function. Furthermore, the server may obtain a first map corresponding to the scheduled location.
[0153] Then, the server can generate a first quick application card of the first service type according to the data of the first predetermined event, the first map, and the map interface data, and establish a first association relationship between the first quick application card and the map refresh frequency. Then, the server sends the first quick application card and the first association relationship to the electronic device.
[0154] Then, the electronic device displays a first quick application card through a display screen, wherein the first quick application card includes event content, a first map, and a control of a first service function. When the electronic device meets a preset condition, the map displayed in the first quick application card is refreshed to a second map according to a map refresh frequency, wherein the second map is a map corresponding to the location of the electronic device.
[0155] Implementation method 2
[0156] In implementation mode 2, the electronic device generates a quick app card and displays the quick app card.
[0157] Specifically, in response to the user's operation on the electronic device, a first scheduled item is created, and the data of the first scheduled item includes the item content and the location information of the scheduled location, and may also include the information of the scheduled time. The electronic device may determine the first service type corresponding to the first scheduled item according to the item content. Then, the electronic device may obtain the card interface data corresponding to the first service type, and the card interface data includes the map refresh frequency and the information of the first service function. In addition, the electronic device may obtain the first map corresponding to the scheduled location.
[0158] Then, the electronic device can generate a first quick application card of the first service type according to the data of the first predetermined event, the first map, and the map interface data, and associate the first quick application card with the map refresh frequency. Then, the electronic device displays the first quick application card through the display screen, and the first quick application card includes event content, the first map, and a control of the first service function.
[0159] When the electronic device meets the preset conditions, the map displayed in the first quick application card is refreshed to a second map according to the map refresh frequency, and the second map is a map corresponding to the location of the electronic device.
[0160] In the above two implementations, the quick app card of the same service type can correspond to multiple preset user scenarios, and different preset user scenarios correspond to different map refresh frequencies. In the above case where the first quick app card is displayed on the display screen of the electronic device, the electronic device can identify the current user scenario; if the current user scenario is a user scenario among multiple preset user scenarios, the electronic device determines the map refresh frequency corresponding to the current user scenario; wherein the quick app card of the same service type is refreshed according to different map refresh frequencies in different preset user scenarios.
[0161] For example, a schedule service map card displayed on the desktop of an electronic device may be refreshed at a first map refresh rate for a quick application card of the service type. A local life service map card displayed on the desktop of an electronic device may be refreshed at a second map refresh rate for a quick application card of the service type.
[0162] The first map refresh frequency is higher than the second map refresh frequency. For example, the first map refresh frequency is: the refresh interval is greater than 1 minute. For example, the second map refresh frequency is: the refresh interval is within the range of [5 seconds, 1 minute].
[0163] It should be noted that the electronic device may use any of the following methods to determine whether the preset condition is met.
[0164] In a first approach, when the distance between the position indicated by the positioning information of the electronic device and the predetermined location is within a preset distance range, the electronic device determines that the preset condition is satisfied.
[0165] Method 2: When the distance between the position indicated by the positioning information of the electronic device and the predetermined location is within a preset distance range, and the time difference between the predetermined time and the system time of the electronic device is less than a preset duration, the electronic device determines that the preset condition is met.
[0166] For ease of explanation, the following is an exemplary explanation using the above-mentioned implementation method 1 (i.e., a server generates a quick app card, and then the server sends the generated quick app card to an electronic device, and then the electronic device displays the quick app card).
[0167] The improvement of the present application is mainly reflected in the two aspects of map card generation and display. First, the general implementation method of generating and displaying cards is introduced (technical solution 1). Figure 5 A schematic diagram of the card development process is shown.
[0168] S101, develop cards using JS language.
[0169] S102, putting the card on the developer service platform.
[0170] S103, sending the card to the electronic device.
[0171] S104, the electronic device displays the card.
[0172] Continue to refer Figure 5 , the following will introduce the implementation method of generating and displaying cards in this application (technical solution 2).
[0173] S201, the server calls the JS-based data interface to obtain data.
[0174] S202: The server dynamically generates a map card based on the acquired data.
[0175] S203: The server sends the map card to the electronic device.
[0176] S204, the electronic device intelligently displays a map card.
[0177] Here, combining Technical Solution 1 and Technical Solution 2, the improvements in the generation and display of map cards in this application solution are explained. Through this application solution, the developer calls a specific data interface to provide data to the server; then, the server uses the developer service platform to generate map cards based on the data and automatically stores the map cards in the database. Improvements in the display of map cards are reflected in the verification strategy, intelligent display strategy, and refresh control strategy. The specific strategies will be described in detail below.
[0178] Figure 6 A schematic diagram of a system architecture for generating and displaying map cards is shown.
[0179] like Figure 6 As shown, the system architecture provided by this application includes a developer service platform, a server and an electronic device. Among them, the developer service platform is a unified ecological entrance for developers, providing business development services for developers. Among them, the server includes a data processing module, a card generation module and a database.
[0180] On the developer service platform side, developers create map card interfaces based on the JS programming language.
[0181] Exemplarily, the map card interface created in this application includes the following four interfaces:
[0182] Interface 1: setType(): set type;
[0183] Interface 2: latitude(): defines longitude;
[0184] Interface 3: longitude(): defines latitude;
[0185] Interface 4: getOptrList(): operation buttons and actions.
[0186] On the server side, the data processing module can call the map card interface to obtain data for generating the map card. The data processing module filters, identifies, and processes the obtained data, and then stores the processed data in the database.
[0187] On the server side, the card generation module obtains the processed data from the database, and analyzes the data to determine the type of map card. This process is referred to as classification. In this application, the types of map cards are divided into dynamic map components and static map components. That is, according to the data used to generate the map card, it is determined whether to use a dynamic map component or a static map component, and whether to use a dynamic refresh method or a static refresh method. In one embodiment, the dynamic map component usually corresponds to the dynamic refresh method, and the static map component usually corresponds to the static refresh method.
[0188] It should be noted that here "dynamic" and "static" are relative, and the refresh interval corresponding to "dynamic" is shorter than the refresh interval corresponding to "static".
[0189] For example, for static map components, the refresh interval can be set to be greater than 1 minute. For dynamic map components, the refresh interval can be set within the range of [5 seconds, 1 minute].
[0190] It can be understood that the refresh rate corresponding to "dynamic" is greater than the refresh rate corresponding to "static".
[0191] For example, for dynamic application scenarios such as taxi-hailing and surrounding services, dynamic map components are displayed and the display is dynamically refreshed; for static application scenarios such as attractions, food delivery, cinemas, and life services, static map components are displayed and the display is statically refreshed.
[0192] On the server side, the card generation module analyzes the map card data and packages the analyzed map card data to obtain a quick application file, which has the suffix RPK and is therefore also called an RPK file or RPK package. Then, the card generation module sends the RPK package to the electronic device.
[0193] It should be noted that the RPK file is the execution file of the quick application. The interface drawing of the quick application is written in JS language, and the file generated by the project is the RPK file. The map card runs and is implemented with the RPK file as the carrier.
[0194] It can be understood that in the embodiment of the present application, the map card is a quick application card.
[0195] The RPK file contains the following quick app metadata:
[0196] (a) Application name: Name;
[0197] (b) Application icon: Icon;
[0198] (c) Storage address: Rpk URL (uniform resource locator).
[0199] On the electronic device side, the electronic device receives the RPK package sent by the server, and then the electronic device runs the RPK package to display and refresh the map card. Figure 6 A schematic diagram of a flight map card is shown. It should be noted that in actual implementation, it may also be a travel map card, a schedule map card, a travel map card, a local life map card, and other possible types of map cards, which are not limited in the embodiments of the present application.
[0200] Above through Figure 6 This section describes the system architecture for generating and displaying map cards, focusing on the process of generating map cards on the server side. Figure 7 A schematic diagram illustrating the interaction between a server and an electronic device to achieve intelligent display of map cards, focusing on the process of how the electronic device side intelligently displays map cards.
[0201] Developer service platform side
[0202] The developer service platform provides a map card interface for the server, and the developer service platform sends map card data to the server through the map card interface.
[0203] In an embodiment of the present application, the developer service platform registers and applies for a map card with the server. The server generates a card whitelist based on the card package name and regularly synchronizes the card whitelist to the electronic device. The electronic device controls the call of the map API through the card whitelist.
[0204] In some embodiments, the developer service platform may apply to the server for the card type, and request the server to determine the card type according to the usage scenario.
[0205] In some embodiments, the developer service platform may apply for card permissions from the server, request the server to determine the card permissions based on the usage scenario, and add the card permission information to the card whitelist.
[0206] Server side
[0207] The server obtains the map card data by calling the map card interface from the developer service platform, then filters and identifies the map card data, and then stores the processed map card data in the database.
[0208] Then, the card generation module on the server side obtains the processed map card data from the database, analyzes the processed map card data, determines the card type, card permissions, and card refresh strategy, and then generates a quick application RPK package based on the data analysis results.
[0209] The server may store the quick application RPK package in the database. The quick application RPK package includes quick application metadata for realizing displaying a map card on the screen of the electronic device, as well as the card type, card authority, and card refresh policy.
[0210] Among them, the type of card to be generated is a dynamic map card or a static map card.
[0211] For example, static map cards may be pre-defined for display scenarios such as scenic spots, takeaways, cinemas, and life services.
[0212] For example, dynamic map cards may be predefined for use in scenarios such as taxi-hailing and surrounding operations.
[0213] It should be noted that various scenarios and map card types corresponding to different scenarios are listed here by way of example. It can be understood that in actual implementation, it can also be applied to various other scenarios, and the map card types corresponding to the scenarios can be pre-defined, which is not limited in the embodiments of the present application.
[0214] In some embodiments, the card whitelist may be stored in a server.
[0215] In other embodiments, the server may send the card whitelist to the electronic device side.
[0216] Exemplarily, the card whitelist contains the card package name and card permission information.
[0217] Electronic equipment side
[0218] Figure 7 The figure shows the functional module diagram of the quick application card on the electronic device side. Figure 7 As shown, the functional modules include UI, scene entry and quick application engine.
[0219] Among them, the two forms of UI include independent application form in full screen mode and card form in embedded mode.
[0220] Take the embedded card form as an example, Fig.11As shown, the UI includes a page and a map card, and the map card can be embedded in the page. The page can include system pages such as the desktop and the negative one screen, and can also include application pages.
[0221] Scene entrances can include quick application center, negative one screen, lock screen, desktop, application market, browser, QR code, global search, etc. These scene entrances support adding map cards to facilitate user search and use.
[0222] The quick application engine can include a verification module, a map card intelligent display module, a refresh control module, a JS engine module, a policy synchronization module, and an RPK management module. Among them, the JS engine module is used for RPK package parsing, establishing a document object model (Document Object Model), node conversion, rendering, etc. The DOM model is used to optimize page rendering performance. The policy synchronization module can store card whitelists and configuration policies. The RPK management module is used to store RPK package files.
[0223] The quick application engine is used to add map cards to various scene entrances of electronic devices and display map cards in the UI interface.
[0224] Figure 8 The block diagram of the interaction between the electronic device, the server and the developer service platform provided in the embodiment of the present application is shown. Figure 8 As shown, the electronic device side includes a verification module, a map card intelligent display module, a refresh control module, a strategy synchronization module and a strategy learning module.
[0225] When the map card function is activated on the electronic device, the policy synchronization module can obtain user reservation orders and monitor user scenario information.
[0226] When the electronic device determines that the user scenario information satisfies the reservation order, the electronic device calls the JS API to obtain the quick application RPK package from the server.
[0227] Then the verification module of the electronic device verifies the quick application RPK package to determine the display authority and card type of the map card.
[0228] Then, the verification module sends the display permission and card type of the map card to the map card intelligent display module. The map card intelligent display module calls the map API to obtain map data.
[0229] Then, the map card intelligent display module determines the map card display strategy 1 according to the display authority and card type (dynamic map / static map) of the map card, map data and user scenario information. The map card display strategy 1 may include elements such as map card display content and / or display style.
[0230] Then, the map card intelligent display module displays the map card according to the determined map card display strategy 1.
[0231] Then, the refresh control module can determine the corresponding refresh control strategy based on the card type, user scenario information, and card whitelist, and use the refresh control strategy to refresh the display content of the map card.
[0232] In an embodiment of the present application, the electronic device can display static / dynamic maps according to different scenarios to achieve intelligent display of map cards.
[0233] For static maps, you can use a bitmap map screenshot, which takes up less memory and CPU resources and can be used for map display, refreshing every preset time interval (such as 1 minute).
[0234] For dynamic maps, you can use map view (MapView) or texture view (GLtexture view), which takes up more memory and CPU resources, can be used for location display, and can be refreshed in real time, for example, every 5 seconds.
[0235] In some embodiments, the electronic device can control the switching of static / dynamic maps according to the card usage scenario.
[0236] In some embodiments, the electronic device may display the map card in a static map format by default to save energy.
[0237] In some embodiments, the electronic device can limit the frequent use of dynamic maps through a whitelist, which can prevent card abuse and avoid causing performance problems.
[0238] In some embodiments, static map cards are used for display categories such as attractions, takeout, cinemas, and life services.
[0239] In some embodiments, dynamic map cards are used for operations such as hailing a taxi and surrounding areas.
[0240] In an embodiment of the present application, the policy synchronization module can obtain the card whitelist and send the card whitelist to the verification module, the map card intelligent display module and the refresh management module, so that these modules can complete card permission verification, card display and card refresh based on the card whitelist.
[0241] In the embodiment of the present application, the policy learning module can obtain the card whitelist and obtain the user's usage data of the map card. The policy learning module can learn the user's usage data of the map card, determine the user's usage habits, and then determine the map card display strategy 2 according to the user's usage habits.
[0242] The policy learning module may provide the map card display policy to the policy synchronization module, and then the policy synchronization module may provide the map card display policy 2 to the map card intelligent display module.
[0243] Then, the map card intelligent display module replaces the map card display strategy 1 with the map card display strategy 2, and displays the map card using the map card display strategy 2. The map card display strategy 2 may include elements such as map card display content and / or display style that are different from those of the map card display strategy 1.
[0244] Above through Figures 6 to 8 The following is a flow chart of the interaction between the server and the electronic device to generate and display the map card. Figures 9 to 11 Describes possible implementation methods for the interaction between a server and an electronic device to generate and display a map card.
[0245] First embodiment
[0246] Reference Fig. 9 As shown, the timing diagram includes the following steps S301-S324.
[0247] S301. The developer service platform sends the card package name that needs to be registered to the server.
[0248] The developer service platform sends a card registration application to the server, and the card registration application includes a card package name.
[0249] S302: The server adds the card package name of the registration application to the card whitelist and stores it in the database.
[0250] Among them, the card whitelist includes the card package name and card permissions.
[0251] Specific to this application scheme, the card whitelist includes the card package name and card permissions of the map card.
[0252] Among them, the map card is a small control that displays maps and service options in the form of a card on an electronic device.
[0253] The card permissions are used to limit the display content, display position and / or display size of the card.
[0254] S303: The server sends the card whitelist to the electronic device.
[0255] Among them, the policy synchronization module on the electronic device side receives the card whitelist for performing permission verification in the map card display scene.
[0256] The above explains the process of card registration and creating a card whitelist.
[0257] The following describes how the server calls the map card interface to obtain map card data and generates a quick application RPK file as a running file for implementing the map card.
[0258] S304: The developer service platform creates a map card interface.
[0259] Exemplarily, the map card interface created in this application may include the following four interfaces:
[0260] Interface 1: setType(): set type;
[0261] Interface 2: latitude(): defines longitude;
[0262] Interface 3: longitude(): defines latitude;
[0263] Interface 4: getOptrList(): operation buttons and actions.
[0264] S305: The server calls the map card interface to obtain map card data from the developer service platform.
[0265] S306: The server performs filtering, identification and other processing on the map card data.
[0266] S307: The server stores the processed map card data in a database.
[0267] S308. The server determines the card type according to the processed map card data: a dynamic map card or a static map card.
[0268] S309: The server obtains quick application metadata according to the processed map card data, and packages the quick application metadata and the card type into an RPK file.
[0269] The RPK file is the executable file of the quick app. The interface drawing of the quick app is written in JS language. The file generated by the project is the RPK file. The map card runs and is implemented with the RPK file as the carrier.
[0270] For example, the RPK file contains the following quick application metadata:
[0271] (a) Application name: Name;
[0272] (b) Application icon: Icon;
[0273] (c) Storage address: Rpk URL.
[0274] It should be noted that, in the embodiment of the present application, the RPK file also includes card types: dynamic map card or static map card.
[0275] Among them, dynamic map cards support dynamic update display, and static map cards support static update display.
[0276] For example, for dynamic application scenarios such as taxi-hailing and surrounding services, it is preset to display a dynamic map, which supports dynamic refresh display, for example, refreshing every 5 seconds.
[0277] Exemplarily, for static application scenarios such as scenic spots, takeaways, cinemas, and life services, it is preset to display a static map, and supports static refresh display, for example, refreshing every 1 minute.
[0278] In an embodiment of the present application, the server side includes a data processing module, a database, and a card generation module. The data processing module can call the map card interface to obtain map card data from the developer service platform, and the data processing module filters, identifies, and processes the map card data. Then, the processed map card data is stored in the database. The card generation module obtains the processed map card data from the database, and determines the card type based on the processed map card data: a dynamic map card or a static map card. Then, the card generation module obtains the quick application metadata based on the processed map card data, and packages the quick application metadata and the card type into a quick application RPK file, which is an application installation package, as a running file for implementing the map card. The RPK file can be stored in the database on the server side.
[0279] The above describes that the server side calls the map card interface to obtain map card data and generates a quick application RPK file as a running file for implementing the map card.
[0280] The following describes the process of the electronic device side obtaining the quick application RPK file from the server side and displaying the map card according to the quick application RPK file.
[0281] Among them, the electronic device includes a verification module, a map card intelligent display module, a refresh control module, a strategy synchronization module and a strategy learning module.
[0282] S310: The strategy learning module learns the user's behavior habits to obtain user behavior data.
[0283] For example, user behavior data may include user browsing / clicking / posting behaviors on websites and mobile apps.
[0284] For example, the user behavior data may be the time period, visit duration, and visit frequency of a user visiting a webpage.
[0285] Electronic devices can determine user behavior habits based on user behavior data, and thus provide or recommend targeted services to users. Electronic devices can recommend services to users by learning user behavior habits, eliminating the need for users to search for services themselves, thus improving user experience.
[0286] S311. The strategy learning module sends the user behavior data to the strategy synchronization module.
[0287] S312. The policy synchronization module obtains user behavior data, and obtains reservation order information and user scenario information.
[0288] In an embodiment of the present application, in response to the user's operation on the electronic device, a first scheduled event is created, and the data of the first scheduled event includes the event content and the location information of the scheduled place, and may also include information of the scheduled time.
[0289] In other words, the first scheduled item may include a scheduled order, which may be various planned items or consumption items that can be triggered by the user through the electronic device. The first scheduled item may also be referred to as scheduled order information. Exemplarily, the scheduled order information may indicate orders of different categories such as travel, flights, schedules, travel, and local life. The electronic device may recommend services to the user based on the scheduled order information to improve the user experience.
[0290] It should be noted that several possible forms of reservation orders are listed here by way of example. It is understandable that in actual implementation, the embodiments of the present application may also include other possible reservation orders and be applied to other possible user scenarios. For ease of understanding and description, the following examples are used for illustrative purposes, such as travel, flights, schedules, travel, and local life.
[0291] In an embodiment of the present application, the user scenario information includes geographic location information and time information of the electronic device.
[0292] Among them, electronic devices can obtain the geographical location information of electronic devices through location-based services (LBS). For example, various types of positioning technologies are used to obtain the current location of the positioning device, and then information resources and basic services are provided to the positioning device through the mobile Internet. Electronic devices can use positioning technology to determine their own spatial location, and electronic devices can obtain location-related resources and information through the mobile Internet. LBS services integrate a variety of information technologies such as mobile communications, the Internet, spatial positioning, location information, big data, etc., and use mobile Internet service platforms for data updates and interactions, so that electronic devices can obtain corresponding services through spatial positioning.
[0293] S313: The policy synchronization module determines whether the current user scenario information satisfies the predetermined order information.
[0294] S314. The policy synchronization module sends the card whitelist to the verification module, and notifies the verification module to obtain the RPK file of the map card.
[0295] S315. The verification module calls the JS API to obtain the RPK file of the map card from the server side.
[0296] S316: The verification module verifies the RPK file according to the card whitelist to determine the card type and card authority.
[0297] S317, the verification module sends the card type and card authority to the map card intelligent display module, the refresh management module, and the strategy synchronization module.
[0298] S318. The policy synchronization module sends user scenario information and user behavior data to the map card intelligent display module and refresh management and control module.
[0299] S319. The map card intelligent display module calls the map API to obtain map data.
[0300] It should be noted that the present application does not limit the execution order of S318 and S319.
[0301] S320. The map card intelligent display module determines the display content of the map card according to the card type, user scenario information, card authority, map data and user behavior data.
[0302] S321. The map card intelligent display module displays the determined display content of the map card.
[0303] In some embodiments, as the user scenario changes, the electronic device supports dynamic / static real-time switching of map cards.
[0304] In some embodiments, static map cards are used for display categories such as attractions, takeout, cinemas, and life services.
[0305] In some embodiments, dynamic map cards are used for operations such as hailing a taxi and surrounding areas.
[0306] In some embodiments, the electronic device may display the map card in a static map format by default to save energy.
[0307] In some embodiments, the electronic device can limit the frequent use of dynamic maps through a whitelist, which can prevent card abuse and avoid causing performance problems.
[0308] For example, the electronic device can display a map card on the negative first screen, or on the quick service center interface, or on the desktop, or on the lock screen interface, or on other interfaces of the electronic device, such as the electronic device can display a map card on a small screen of a folding screen. The display interface of the map card is not limited in the embodiments of the present application.
[0309] S322. The refresh control module determines the refresh strategy of the static / dynamic map card according to the card type, user scenario information and user behavior data.
[0310] In some embodiments, when the electronic device determines to use a static map card, the electronic device uses the refresh control policy corresponding to the static map card. When the electronic device determines to use a dynamic map card, the electronic device uses the refresh control policy corresponding to the dynamic map card. For example, the refresh control policy corresponding to the static map card is a refresh interval greater than 1 minute. For example, the refresh control policy corresponding to the dynamic map card is a refresh interval within a range of 5 seconds to 1 minute.
[0311] S323. The refresh management and control module sends the card refresh strategy to the map card intelligent display module.
[0312] S324. The map card intelligent display module refreshes the map card according to the card refresh strategy.
[0313] For example, for a static map card, the map information in the map card is refreshed every 1 minute.
[0314] For example, for a dynamic map card, the map information in the map card is refreshed every 5 seconds.
[0315] Second embodiment
[0316] Fig.10 The following is a schematic diagram showing the timing of the electronic device interacting with the server to display a map based on a quick application card in the second embodiment of the present application. Fig.10 As shown, the timing diagram of the interaction between the electronic device and the server includes the following steps S401-S419. Among them, the electronic device includes a card (Card), a quick application engine (QuickeEngine), a JSAPI, a map component (Map Widget) and a refresh control module. The server side includes a cloud API.
[0317] It should be noted that the map component may be a container, which may receive map data and control the rendering and refreshing of the UI according to the received map data. The map component may obtain the map data from a map provider.
[0318] It should also be noted that the solution adopted by this application is different from the solution of integrating map SDK (software development kit) in the relevant technology. The solution of integrating map SDK integrates and utilizes two engines: rendering engine and 2D engine, and uses Surfaceview component. This solution of integrating map SDK needs to involve two engines, which has certain limitations in actual implementation, and the card rendering and refresh speed is relatively low.
[0319] In the solution adopted by the present application, the map card includes multiple layers. For example, multiple function layers may include a map layer and a function layer, wherein the map layer includes map data, and the function layer includes various function icons or controls, such as scenic spot food icons or navigation routes. And the function layer may include one or more sublayers. The function layer may be presented on the map layer according to a preset transparency.
[0320] Among them, different business types correspond to different map cards, and different business types correspond to different refresh strategies.
[0321] Fig.10 S401 to S413 in FIG. 4 illustrate the process of card initialization when adding a card is triggered.
[0322] S401: The card receives an operation from a user to add the card to the desktop.
[0323] For example, the card is a certain type of card displayed in the interface of the quick app center, and the card supports displaying a map.
[0324] It should be noted that, here, adding a card to the desktop is taken as an example for illustrative description. In actual implementation, of course, the card can also be added to other host interfaces.
[0325] S402: In response to the user operation, the card sends a verification request to the JS API, where the verification request includes the card package name.
[0326] S403. JS API responds to the verification request and performs card verification according to the card whitelist.
[0327] Among them, the card whitelist includes the card package name and card permissions.
[0328] It should be noted that the process of performing card verification according to the card whitelist includes: when the card whitelist includes the card package name requested for verification, the JS API confirms that the card has passed the verification. In addition, the JS API can determine the card authority corresponding to the card package name based on the card whitelist and the card package name.
[0329] The role of the card authority is that after the electronic device adds the card to the desktop, the electronic device will display and refresh the card according to the card authority.
[0330] S404. The JS API sends a message for requesting card configuration to the quick application engine.
[0331] S405. The quick application engine on the electronic device side responds to the message for requesting to configure the card by sending a message for requesting to verify and configure the card to the cloud API on the server side.
[0332] S406. The cloud API on the server side responds to the message for requesting verification and configuration of the card, and completes the card verification and configuration.
[0333] S407: The cloud API on the server side returns the card configuration data to the quick application engine.
[0334] S408: The quick application engine receives the card configuration data and sends the card configuration data to the JS API.
[0335] S409. The JS API sends a message including card configuration data to the map component, so as to instruct the map component to display the map according to the card configuration data.
[0336] S410: The map component loads card configuration data, where the card configuration data includes the business type of the card.
[0337] The business type of a card is also referred to as a card type.
[0338] The map component can determine whether to use a dynamic map component or a static map component based on the business type of the card.
[0339] For example, when the business type of the card is travel service, flight service, schedule service or transportation service, a dynamic map component may be used, in which case a map in the form of a texture view may be used.
[0340] For example, when the business type of the card is a local life service, a static map component can be used, in which case a map screenshot in bitmap form can be used.
[0341] S411. The map component sends a message for requesting a refresh strategy to the refresh management and control module.
[0342] The message for requesting the refresh policy includes the service type of the card.
[0343] S412: The refresh management and control module determines a card refresh strategy corresponding to the business type of the card.
[0344] S413. The refresh management and control module sends the determined card refresh strategy to the map component.
[0345] Among them, the card refresh strategy corresponds to the interval length (denoted as T), that is, the card will be refreshed once every T time.
[0346] Fig.10 S414 to S419 in the figure illustrate the process of refreshing the card according to the card refresh strategy. In this process, the electronic device interacts with the server to obtain data for card display and refresh. The electronic device requests card frame data from the server once every T time period.
[0347] S414. The refresh control module of the electronic device sends a message for requesting the i-th frame data to the cloud API of the server.
[0348] S415. The cloud API of the server sends the i-th frame data to the refresh control module of the electronic device.
[0349] S416. The refresh control module renders a card according to the i-th frame data, where the card includes multiple layers.
[0350] Exemplarily, the i-th frame data includes data of a map layer and / or data of a function layer.
[0351] S417: After an interval of time T, the refresh control module sends the i+1th frame data to the refresh control module of the electronic device.
[0352] S418. The cloud API of the server sends the i+1th frame data to the refresh control module of the electronic device.
[0353] S419. The refresh control module refreshes at least one layer among the multiple layers of the card according to the (i+1)th frame data.
[0354] The above steps S417 to S419 are executed in a loop, and the electronic device refreshes each layer of the card at a certain interval.
[0355] According to the second embodiment, when the electronic device receives an operation triggered by the user to add a card to the desktop, the electronic device displays the card on the desktop and refreshes the card at a certain interval.
[0356] Third embodiment
[0357] In the third embodiment of the present application, as the user scenario changes, the refresh interval of the map card will change accordingly. For example, when the electronic device is in a taxi-hailing scenario, the electronic device can refresh the map at a shorter interval; for example, the map refresh interval is 2 seconds. When the electronic device enters an electronic fence such as an airport or a tourist attraction, the electronic device can switch the map refresh interval; for example, the map refresh interval is 2 minutes.
[0358] Fig.11 Another timing diagram of the electronic device interacting with the server to display a map based on a quick application card in the third embodiment of the present application is shown. Fig.11 As shown, the timing diagram of the electronic device interacting with the server includes the following steps S501-S516. Similarly, the electronic device includes a card, a quick application engine, a JS API, a map component, and a refresh control module. The server side includes a cloud API.
[0359] The following S501 to S508 illustrate the card refresh process in a user scenario.
[0360] S501. When the current user scenario is a first preset scenario (such as taking a taxi), the refresh management and control module determines a first refresh strategy corresponding to the first preset scenario.
[0361] For example, the first refresh strategy is: the map refresh interval is 2 seconds.
[0362] S502. The refresh control module sends a first refresh strategy to the map component, where the first refresh strategy corresponds to an interval duration T1.
[0363] S503: The map component sends a message to the cloud API of the server to request the i-th frame data.
[0364] S504: The map component receives the i-th frame data sent by the server.
[0365] S505: The map component renders a card according to the i-th frame data, where the card includes multiple layers.
[0366] S506. After an interval of time T1, the map component sends a message to the cloud API of the server to request the i+1th frame data.
[0367] S507. The map component receives the (i+1)th frame data sent by the server.
[0368] S508. The map component refreshes at least one layer of the card according to the (i+1)th frame data.
[0369] The above steps S506 to S508 are executed in a loop, and the electronic device refreshes each layer of the card according to the interval T1.
[0370] The following S509 to S516 illustrate the card refresh process after the user scene switches.
[0371] S509: When the current user scenario is a second preset scenario (such as a tourist attraction, takeaway, cinema, or life service), the refresh management and control module determines a second refresh strategy corresponding to the second preset scenario.
[0372] S510. The refresh control module sends a first refresh strategy to the map component, where the first refresh strategy corresponds to an interval duration T1.
[0373] For example, the first refresh strategy is: the map refresh interval is 2 minutes.
[0374] S511. The map component sends a message to the cloud API of the server to request the i-th frame data.
[0375] S512: The map component receives the i-th frame data sent by the server.
[0376] S513: The map component renders a card according to the i-th frame data, where the card includes multiple layers.
[0377] S514: After an interval of time T1, the map component sends a message to the cloud API of the server to request the (i+1)th frame of data.
[0378] S515. The map component receives the (i+1)th frame data sent by the server.
[0379] S516. The map component refreshes at least one layer of the card according to the (i+1)th frame data.
[0380] The above steps S514 to S516 are executed in a loop, and the electronic device refreshes each layer of the card according to the interval T2.
[0381] According to the third embodiment, when the electronic device identifies that the user scene is a preset scene, the electronic device refreshes the card according to the interval length corresponding to the preset scene. When the electronic device identifies that the user scene is switched, the electronic device refreshes the card according to the interval length corresponding to the switched scene.
[0382] In an embodiment of the present application, as the user scenario changes, the refresh interval duration of the map layer and / or function layer of the map card will change accordingly.
[0383] For example, when the electronic device is in a taxi-hailing scenario, the electronic device can set the refresh intervals for the map layer and the function layer, for example, the refresh interval for the map layer is 2 seconds, and the refresh interval for the function layer is 10 seconds.
[0384] For example, when an electronic device enters an electronic fence such as an airport or a tourist attraction, the electronic device can switch the refresh interval of the map layer and / or the function layer. For example, the refresh interval of the map layer is 2 seconds, and the refresh interval of the function layer is 30 seconds. For another example, the refresh interval of the map layer is 5 seconds, and the refresh interval of the function layer is 2 minutes.
[0385] The above describes the timing diagram of the server and the electronic device interacting to generate and display the map card. Fig.12 A process that describes how the server determines dynamic / static map cards.
[0386] like Fig.12 As shown, the server can define the type of card to be generated. Among them, the type of card to be generated is a dynamic map card or a static map card. For example, it can be pre-defined that scenic spots, takeaways, theaters, life services and other display scenes use static map cards. For example, it can be pre-defined that taxi-hailing, surrounding and other operation scenes use dynamic map cards.
[0387] The server can set the application permissions for map cards and generate a corresponding card whitelist.
[0388] The server may determine a refresh strategy for dynamic map cards and static map cards. For example, for static map cards, the map information in the map card may be refreshed every 1 minute. For example, for dynamic map cards, the map information in the map card may be refreshed every 5 seconds.
[0389] The server packages the card type, card permissions, card refresh policy, and quick app metadata to obtain a quick app RPK package. The map card runs and is implemented using the quick app RPK package as a carrier.
[0390] In the embodiment of the present application, the electronic device can intelligently display the map card widget through the quick application engine, so that the user can view the map and various services conveniently. The user does not need to download and install the application, and can enjoy the performance experience of the native application by clicking on it.
[0391] Fig.13 A schematic diagram of the process of generating and rendering a map card jointly implemented by the quick application engine and the host process provided in an embodiment of the present application is shown, from which the process of the quick application card from development to display and then to the host (such as the desktop and / or negative one screen, etc.) can be seen.
[0392] like Fig.13 As shown, on the cloud server side, the developer service platform uploads map card data to the cloud server through the map card interface.
[0393] On the electronic device side, the quick application engine loads the engine code into the host process to complete the card initialization.
[0394] Among them, the quick application engine is a quick application (RPK) execution environment pre-installed in the electronic device. It has complete quick application capabilities and can be used to verify the actual performance of RPK on the electronic device.
[0395] The host process refers to a series of processes of the host, such as UI thread, map card creation, node conversion, and drawing rendering. The host can be the quick service center, negative one screen, desktop, lock screen, or YOYO suggestion.
[0396] In the process of creating a map card, the electronic device starts the JS thread, which triggers the quick application engine to download the quick application RPK package from the cloud service and send the quick application RPK package to the JS thread to complete resource loading and use the V8 engine to build a DOM model. After the node conversion, it is drawn and rendered to obtain a map card.
[0397] Among them, the V8 engine is a JavaScript engine implementation.
[0398] In an embodiment of the present application, the quick application engine provides a map API, and all hosts can share JS map cards.
[0399] In an embodiment of the present application, when the host displays a JS map card, the map component can be dynamically loaded into the host process as needed.
[0400] Through this application solution, it is possible to combine reservation order information, user behavior data, and location-based services LBS to explicitly recommend related services required by "scenario-based intentions". In other words, this application can provide users with targeted related services for different scenarios such as travel, flights, schedules, travel, and local life.
[0401] Electronic devices can also transfer learning from user habits and accurately recommend services in unfamiliar places.
[0402] Among them, transfer learning is a machine learning method that refers to using the model developed for task A as the starting point and reusing it in the process of developing a model for task B. Since each user has different Internet habits, the distribution of large sample data is very inconsistent. Transfer learning can regard the behavioral data samples of all other people as source data and the behavioral data samples of the current user as target data. It first learns a general strategy from a wide range of mass group behavioral data, and then uses the behavioral data of the current user to make the strategy more refined to meet personalized needs.
[0403] In some embodiments, the user's scene can be determined in combination with reservation orders and location-based services, and preset associated services corresponding to the user's scene can be obtained, and associated services can be recommended to the user based on the user's behavior habits.
[0404] The reservation order information may come from a text message and / or an email received by the electronic device, etc. The electronic device may parse the received text message and / or email to obtain the reservation order information.
[0405] For example, reservation order information may be scenic spot ticket reservation information, air ticket reservation information, train ticket reservation information, conference reservation information, hotel reservation information, and movie ticket purchase information.
[0406] The electronic device may recommend associated services by displaying a map card, which may include a real-time location map corresponding to the scene where the user is located and options for preset associated services.
[0407] Exemplarily, the above-mentioned preset associated services may be the following services:
[0408] (1) Travel services: scenic spots, tickets, toilets, and food;
[0409] (2) Flight services: flight orders, boarding passes, food and drinks;
[0410] (3) Calendar services: meeting schedule, taxi, online meeting, and phone calls;
[0411] (4) Travel services: hotel reservations, taxis, and reporting lost luggage;
[0412] (5) Local life services: movie tickets, ticket collection, parking, drinks.
[0413] The method of displaying maps based on quick application cards has the following beneficial effects: information display is more intuitive, service recommendations are more comprehensive, and relevance is more significant.
[0414] In the application embodiment, the display form of the map card includes but is not limited to: (1) displaying the card on the interface of the quick service center; (2) displaying the card on the negative one screen; (3) displaying the card on the desktop; (4) displaying the card on the foldable screen; (5) displaying the card on the lock screen interface.
[0415] Through the embodiments of the present application, cards can be dynamically generated based on quick applications. It is only necessary to develop quick applications and integrate data extraction interfaces to generate corresponding quick application cards.
[0416] The above exemplifies various application scenarios of map cards and various display forms of map cards. The following is a more intuitive explanation of various application scenarios of map cards and various display forms of map cards through the user interface of an electronic device in conjunction with the accompanying drawings.
[0417] Fig.14 The following is a schematic diagram of the interface for setting YOYO suggestions. By setting YOYO suggestions, the electronic device can present corresponding quick application cards in the display bar of YOYO suggestions according to the scene and usage habits, and provide various services.
[0418] like Fig.14 As shown in (a) of FIG. 1 , the electronic device displays a desktop 41, and a setting application icon 42 is displayed on the desktop 41. When the user clicks the setting application icon 42, as shown in FIG. Fig.14 As shown in (b) of FIG. 1 , the electronic device switches from displaying the desktop 41 to displaying the setting interface 43 in response to the user operation, and the setting interface 43 displays a smart assistant option 44. When the user clicks the smart assistant option 44, as shown in FIG. Fig.14 As shown in (c) of FIG. 1 , the electronic device switches from displaying the setting interface 43 to displaying the smart assistant setting interface 45 in response to the user operation, and the smart assistant setting interface 45 displays the YOYO suggestion option 46. When the user clicks the YOYO suggestion option 46, as shown in FIG. Fig.14 As shown in (d), the electronic device switches from displaying the smart assistant interface 45 to displaying the YOYO suggestion setting interface 47 in response to the user operation. The services that YOYO suggestions can provide are displayed in the YOYO suggestion setting interface 47. The electronic device can recommend the APP or service that the user currently needs through YOYO suggestions based on the scene and usage habits. The service setting bar 48 shows the services that YOYO suggestions can provide, such as travel services, flight services, schedule services, travel services, local life services, etc. Each service option corresponds to a switch control 49. The user can trigger the electronic device to turn on or off the service by clicking the switch control of a service according to actual usage needs.
[0419] In some embodiments, the travel service, flight service, schedule service, transportation service, and local life service are all enabled by default in YOYO suggestions. When each service is enabled, the electronic device can recommend the currently needed APP or service to the user through YOYO suggestions according to the scenario and usage habits. For example, the electronic device can display a map card of the travel service category, a map card of the flight service category, a map card of the schedule service category, a map card of the transportation service category, or a map card of the local life service category in the YOYO suggestion column.
[0420] The following uses YOYO Suggestions as an example to illustrate the method for displaying a map based on a quick app card provided in an embodiment of the present application. The quick app card is displayed using YOYO Suggestions as the host.
[0421] Fig.15A A schematic diagram of a map card corresponding to a travel service is shown. In an embodiment of the present application, when the travel service recommended by YOYO is turned on, when the electronic device detects a travel order triggered by the user on the electronic device, the electronic device can generate a quick application card corresponding to the travel order, and display the quick application card corresponding to the travel order through YOYO suggestions.
[0422] It should be noted that in the present application scheme, the quick application card can not only display travel order information (such as scenic spot introduction), but also display the map of the travel location, ticket information, toilet-related information, and nearby food information. The quick application card can also provide navigation or taxi service entrance from the current location to the scenic spot, and the electronic device can dynamically update and display the map in the map card according to the real-time positioning information of the electronic device.
[0423] Fig. 15B A schematic diagram of a map card corresponding to a flight service is shown. In an embodiment of the present application, when the flight service recommended by YOYO is turned on, when the electronic device detects a flight order triggered by a user on the electronic device, the electronic device can generate a quick app card corresponding to the flight order, and display the quick app card corresponding to the flight order through YOYO suggestions.
[0424] It should be noted that in this application scheme, the quick application card can not only display flight order information (such as flight departure time, airport and terminal information), but also display the map of the corresponding airport, boarding pass information, nearby food and beverage information, and can also provide navigation or taxi service entrance from the current location to the airport through the quick application card. The electronic device can dynamically update and display the map in the map card according to the real-time positioning information of the electronic device.
[0425] Fig. 15CA schematic diagram of a map card corresponding to a schedule service is shown. In an embodiment of the present application, when the schedule service suggested by YOYO is turned on, when the electronic device detects a meeting schedule triggered by a user on the electronic device, the electronic device can generate a quick app card corresponding to the meeting schedule, and display the quick app card corresponding to the meeting schedule through YOYO suggestions.
[0426] It should be noted that in the present application scheme, the quick application card can not only display the meeting schedule information (such as the meeting time and location information), but also display the map of the meeting location, and can provide navigation or taxi services from the current location to the meeting location, online meeting entry, contact phone numbers and other entrances through the quick application card. The electronic device can dynamically update and display the map in the map card according to the real-time positioning information of the electronic device.
[0427] Fig.15D A schematic diagram of a map card corresponding to a travel service is shown. In an embodiment of the present application, when the travel service recommended by YOYO is turned on, when the electronic device detects a hotel order triggered by the user on the electronic device, the electronic device can generate a quick app card corresponding to the hotel order, and display the quick app card corresponding to the hotel order through YOYO suggestions.
[0428] It should be noted that in the present application scheme, the quick application card can not only display hotel order information (such as check-in time and address information), but also display a map of the location of the booked hotel, and provide navigation or taxi services from the current location to the location of the booked hotel, luggage loss reporting and other entrances. The electronic device can dynamically update and display the map in the map card according to the real-time positioning information of the electronic device.
[0429] Fig.15E A schematic diagram of a map card corresponding to a local life service is shown. In an embodiment of the present application, when the local life service suggested by YOYO is turned on, when the electronic device detects a movie ticket order triggered by the user on the electronic device, the electronic device can generate a quick app card corresponding to the movie ticket order, and display the quick app card corresponding to the movie ticket order through YOYO suggestion.
[0430] It should be noted that in the present application scheme, the quick application card can not only display movie ticket order information (such as the start time of the movie), but also display a map of the location of the movie theater, and provide taxi or navigation services, parking lots, luggage loss reporting and other entrances from the current location to the location of the movie theater through the map card. The electronic device can dynamically update and display the map in the map card according to the real-time positioning information of the electronic device.
[0431] Fig.16A FIG. 1 shows a schematic diagram of a user interaction interface for quickly viewing map cards through YOYO suggestions. Fig.16A As shown in (a) of FIG, when the electronic device displays the desktop, if the user wants to view the map card recommended by the electronic device based on the user's order and the current application scenario, the user can slide his finger along the direction indicated by the arrow on one side of the screen to trigger the electronic device to display the negative one screen. Fig.16A As shown in (b), the electronic device switches from displaying the desktop to displaying the negative one screen in response to the user operation, and the YOYO suggestion bar is displayed in the interface of the negative one screen.
[0432] In some embodiments, a flight service map card may be displayed in the YOYO suggestion column of the negative first screen. In other embodiments, a map card of other types other than flight service may be displayed in the YOYO suggestion column of the negative first screen. The map card displayed in the YOYO suggestion column of the negative first screen is a map card recommended in real time by the electronic device based on the user's order and the current application scenario. In addition, the electronic device may dynamically update and display the map in the map card based on the real-time positioning information of the electronic device.
[0433] Fig. 16B FIG. 2 shows another user interaction interface schematic diagram for quickly viewing map cards through YOYO suggestions. Fig. 16B As shown in (a) in the figure, the electronic device displays a desktop, and a weather clock card suggested by YOYO is displayed by default on the desktop.
[0434] In some embodiments, the electronic device automatically recommends a map card based on the user's order and the current application scenario, and switches the desktop display of the weather clock card to the display of the map card after a first time interval, and then switches the desktop display of the map card to the display of the weather clock card after a second time interval. In other words, the electronic device can switch back and forth between displaying the weather clock card and displaying the map card.
[0435] In other embodiments, the electronic device can switch between displaying a weather clock card and displaying a map card in response to a user operation. Specifically, if the user wants to view a map card recommended by the electronic device based on the user's order and the current application scenario, the user can slide a finger on the weather map card in the direction indicated by the arrow to trigger the electronic device to display the map card. Fig. 16B As shown in (b) of FIG. 1 , the electronic device switches the weather clock card displayed on the desktop to a YOYO suggestion bar in response to the user operation. The YOYO suggestion bar can be used to display a map card. Fig. 16B As shown in (c) in FIG. 1 , when the user slides his finger along the direction indicated by the arrow on the map card displayed in the YOYO suggestion bar on the desktop, as shown in FIG. Fig. 16BAs shown in (d), the electronic device switches the YOYO suggestion bar displayed on the desktop back to the weather clock card in response to the user operation.
[0436] In some embodiments, a flight service map card is displayed in the YOYO suggestion bar on the desktop.
[0437] In other embodiments, the YOYO suggestion bar on the desktop displays map cards of other categories besides the flight service category.
[0438] It should be noted that the map card displayed in the YOYO suggestion bar on the desktop is a map card recommended in real time by the electronic device based on the user's order and the current application scenario. In addition, the electronic device can dynamically update and display the map in the map card based on the real-time positioning information of the electronic device.
[0439] The above example of setting a map card through YOYO suggestions is used to exemplify the method for displaying a map based on a quick app card provided by the embodiment of the present application. The following example of adding a card through the quick service center is used to illustrate the method for displaying a map based on a quick app card provided by the embodiment of the present application.
[0440] Fig.17A The figure shows an interface diagram of finding a map card through the quick service center entrance and adding the map card to the negative one screen. Fig.17A As shown in (a) of FIG. 1 , the electronic device displays an interface of the negative one screen, and the interface of the negative one screen displays an entry control 51 of the quick service center. The electronic device receives the user's operation on the entry control 51. Fig.17A As shown in (b) of FIG. 1 , the electronic device jumps from the interface of the negative one screen to the quick service center interface in response to the user operation. The quick service center interface displays a map card bar and an "add to negative one screen" control 52. The electronic device receives the user's operation on the "add to negative one screen" control 52. Fig.17A As shown in (c), the electronic device jumps from the quick service center interface to the interface of the negative one screen in response to the user operation, and a map card bar is newly displayed in the interface of the negative one screen.
[0441] In the embodiment of the present application, at least one of the following cards can be displayed in the map card column: map cards such as travel services, flight services, schedule services, travel services, and local life services. The specific cards can be preset by the system or customized by the user.
[0442] It should be noted that the classification of map cards here is for illustrative purposes only. In actual implementation, map cards can also be divided into other possible forms according to other scenarios, which is not limited in the embodiments of the present application. For the sake of ease of explanation, map cards of various user scenario types such as travel services, flight services, schedule services, travel services, and local life services are used as examples for illustrative purposes.
[0443] After a map card is added to the interface of the negative one screen, if the electronic device does not detect a user order or a current application scenario, the electronic device may display default content in the map card bar.
[0444] If the electronic device detects a user order and a current application scenario, the electronic device recommends a map card of a specific user scenario type in real time according to the user order and the current application scenario, and displays the recommended map card in the map card bar.
[0445] For example, Fig.17A As shown in (d) in the figure, when the electronic device detects a flight order triggered by a user on the electronic device, the electronic device generates a quick application map card corresponding to the flight order, and displays a flight service map card in the map card column in the interface of the negative one screen. When the electronic device detects a flight order triggered by a user on the electronic device, the electronic device generates a quick application map card corresponding to the flight order, and recommends a flight service map card in the quick service center interface.
[0446] In the present application, flight service map cards can be used to display flight order information (such as flight departure time, airport and terminal information), as well as maps of the corresponding airports, boarding pass information, nearby food and drink information. Map cards can also be used to provide navigation or taxi service entrances from the current location to the airport.
[0447] In the present application solution, the electronic device can dynamically update and display the map in the map card according to the location change information of the electronic device. Quick application cards of different service types are refreshed at different map refresh frequencies.
[0448] It should be noted that the above map card is displayed on the negative one screen. Fig. 15B Describes an alternative way to display map cards, where the map card is hosted on the desktop.
[0449] Fig. 17B The following is a schematic diagram showing the interface of recommending map cards on the negative one screen and adding map cards to the desktop by the user. Fig. 17BAs shown in (a) of FIG. 1 , the electronic device displays an interface of the negative one screen, in which a map card and an “add” control 53 are displayed. The electronic device receives the user's operation on the “add” control 53. Fig. 17B As shown in (b) of FIG. 1 , the electronic device jumps from the interface of the negative one screen to the map card setting interface in response to the user operation. In the map card setting interface, multiple pages can be displayed alternately, and each page displays a type of map card thumbnail. Fig. 17B As shown in (b), (c), and (d) in FIG. 1 , the electronic device can alternately display the thumbnails of the map cards of each page. For example, the display of the local life service map card is switched to the display of the travel service map card, and then the display of the travel service map card is switched to the display of the schedule service map card.
[0450] like Fig. 17B As shown in (b) in FIG. 1 , the map card setting interface also displays an “add to negative one screen” control 54 , an “add to desktop” control 55 , and an “add to lock screen interface” control 56 .
[0451] like Fig. 17B As shown in (d) and (e), the electronic device receives the user's operation on the "Add to Desktop" control 55. In response to the user's operation, the electronic device jumps from the map card setting interface to the desktop and displays a new map card on the desktop.
[0452] like Fig. 17B As shown in (e) and (f) of FIG. 1 , the electronic device recommends a map card of a specific user scenario type in real time according to the user order and the current application scenario, and the electronic device updates and displays the map cards of different user scenario types. In other words, the electronic device can switch to display the map cards corresponding to different user scenarios as the user scenario changes.
[0453] like Fig. 17B As shown in (e), the electronic device displays a schedule service map card on the desktop, and the quick application card of this service type is refreshed according to the first map refresh frequency.
[0454] like Fig. 17B As shown in (f), the electronic device displays a local life service map card on the desktop, and the quick application card of this service type is refreshed according to the second map refresh frequency.
[0455] The first map refresh frequency is higher than the second map refresh frequency. For example, the first map refresh frequency is: the refresh interval is greater than 1 minute. The second map refresh frequency is: the refresh interval is within the range of [5 seconds, 1 minute].
[0456] Fig. 17CAnother interface schematic diagram showing a negative one screen of recommended map cards and a user adding a map card to the desktop.
[0457] in, Fig. 17C (a) to (d) are similar to Fig. 17B (a) to (d) in the above table differ in that: Fig. 17C In (e) to (f), when the electronic device recognizes a user scenario of a schedule service type, the electronic device displays a map card of the schedule service type on the desktop; when the electronic device recognizes a user scenario of a local life type, the electronic device adds a map card of the local life type to the desktop.
[0458] The above embodiments of the present application take YOYO suggestions, negative one screen, and desktop as examples to illustrate the method of displaying a map based on a quick application card provided by the embodiments of the present application. In actual implementation, the map card can also be displayed with other interfaces as the host.
[0459] For example, the following is combined with Fig.17D Another way to display a map card is described, in which the map card is displayed on the lock screen interface. Fig.17D A schematic diagram of the interface for displaying a map card in the lock screen interface is shown. Fig.17D As shown in (a) in FIG. 1 , a schedule service map card is displayed in the map card setting interface. In addition, an “add to lock screen” control 56 is displayed in the map card setting interface. Fig.17D As shown in (a) and (b) of FIG. 1 , the electronic device receives the user's operation on the "add to lock screen interface" control 56, and the electronic device adds the map card to the lock screen interface in response to the user's operation. After the electronic device locks the screen, the electronic device displays the lock screen interface and displays the added map card in the lock screen interface. In addition, the electronic device can dynamically update and display the map in the map card according to the real-time positioning information of the electronic device.
[0460] For example, the following is combined with Fig.17E Another map card display method is described, in which the map card is displayed on the small screen of a foldable screen electronic device. The electronic device can display the map card on the small screen when the screen is in a folded state. Fig.17E A schematic diagram of an interface for displaying a map card on a small screen of a foldable electronic device is shown. Fig.17E As shown in (a) of FIG. 1 , the electronic device is in an unfolded state, the large screen is in a lit state, and the small screen is in a dark state. Fig.17EAs shown in (b), the electronic device is in a folded state, the large screen is off, the small screen is on, and a map card can be displayed on the small screen. The electronic device can recommend map cards of specific user scenario types in real time based on the user's order and the current application scenario. In addition, the electronic device can dynamically update and display the map in the map card based on the real-time positioning information of the electronic device.
[0461] The method for displaying a map based on a quick app card provided in the embodiment of the present application has the following beneficial effects:
[0462] (1) No need to install APP, and the usage scenarios are not restricted;
[0463] (2) It can generate dynamic / static map cards according to the application scenario category, realize intelligent display and refresh of map cards, and has low energy consumption.
[0464] It should be noted that, in the embodiments of the present application, "greater than" can be replaced by "greater than or equal to", "less than or equal to" can be replaced by "less than", or "greater than or equal to" can be replaced by "greater than", and "less than" can be replaced by "less than or equal to".
[0465] The various embodiments described herein may be independent solutions or may be combined according to internal logic, and all of these solutions fall within the protection scope of this application.
[0466] The above mainly describes the solution provided by the embodiment of the present application from the perspective of method steps. It is understandable that, in order to achieve the above functions, the electronic device implementing the method includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should be aware that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of protection of the present application.
[0467] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other feasible division methods in actual implementation.
[0468] The present application also provides a chip, which is coupled to a memory and is used to read and execute computer programs or instructions stored in the memory to execute the methods in the above embodiments.
[0469] The present application also provides an electronic device, which includes a chip, and the chip is used to read and execute a computer program or instruction stored in a memory, so that the method in each embodiment is executed.
[0470] This embodiment also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method of displaying a map based on a quick application card in the above-mentioned embodiment.
[0471] This embodiment also provides a computer program product, in which a computer-readable storage medium stores program code. When the computer program product runs on a computer, the computer executes the above-mentioned related steps to implement the method for displaying a map based on a quick application card in the above-mentioned embodiment.
[0472] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the method of displaying a map based on a quick application card in the above-mentioned method embodiments.
[0473] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0474] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0475] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which 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 displaying a map based on a quick application card, applied to an electronic device, characterized in that: The method comprises: Display the first quick app card and the second quick app card; Identify user scenarios; When the user scenario is a first preset scenario, adopting a first refresh strategy corresponding to the first preset scenario, obtaining map data and refreshing the map layer in the first quick app card; When the user scenario is a second preset scenario, adopting a second refresh strategy corresponding to the second preset scenario, obtaining map data and refreshing the map layer in the second quick app card; Among them, the map refresh duration of the first refresh strategy is shorter than the map refresh duration of the second refresh strategy.
2. The method according to claim 1, characterized in that The first refresh strategy includes obtaining a map view MapView or a texture view GLtextureview and refreshing the map layer once every first time interval; The second refresh strategy includes obtaining a map screenshot in a bitmap format and refreshing the map layer once every second time interval; The first duration is shorter than the second duration.
3. The method according to claim 1 or 2, characterized in that: The first quick app card and the second quick app card are quick app cards of different business types; Among them, quick application cards of different business types have different map refresh strategies preset.
4. The method according to claim 1, characterized in that: The displaying the first quick app card includes: Receive a first operation of a user, where the first operation is an operation for triggering adding a first quick app card to a target interface; In response to the first operation, verifying the first quick app card according to a card whitelist; If the verification is successful, a first request message is sent to the server, where the first request message is used to request the server to verify and configure the first quick app card; Loading, based on a JavaScript thread, card configuration data corresponding to the first quick app card sent by the server, the card configuration data including a business type of the first quick app card, data of a map layer, and data of a function layer; The first quick app card is rendered according to the data of the map layer and the data of the function layer, and the first quick app card is displayed on the target interface, wherein the first quick app card displays a map layer and a function layer showing recommended services.
5. The method according to claim 1, characterized in that: The obtaining of map data comprises: Determine a first map component according to the business type of the first quick app card or the second quick app card; Calling a map application programming interface API through the first map component to obtain map frame data of the first quick app card or the second quick app card from a server; The first map component is a dynamic map component or a static map component, and a map refresh frequency corresponding to the dynamic map component is greater than a map refresh frequency corresponding to the static map component.
6. The method according to claim 5, characterized in that The calling a map API through the first map component to obtain map frame data of the first quick app card or the second quick app card from the server includes: In the case where the first map component is the dynamic map component, the map API is called by the dynamic map component to obtain map frame data of the first quick app card from the server, where the map frame data is a map in the form of a map view MapView or a texture view GLtexture view; In the case where the first map component is the static map component, the map API is called through the static map component to obtain map frame data of the second quick app card from the server, where the map frame data is a map screenshot in bitmap form.
7. The method according to claim 1, characterized in that The identifying user scenario includes: When the electronic device enters a preset geographic fence, the user scenario is identified.
8. The method according to claim 4, characterized in that The function layer includes a recommended service control; the method further includes: receiving a second operation of the user on the recommendation service control; In response to the second operation, displaying prompt information corresponding to the recommended service control on the map layer in the first quick app card; The prompt information includes navigation route prompt information and / or location information of the target location.
9. The method according to claim 4, characterized in that The electronic device includes a quick application engine and a JavaScript interface; The JavaScript thread-based loading of the card configuration data corresponding to the first quick app card sent by the server includes: The quick application engine obtains card configuration data corresponding to the first quick application card from the server; The quick application engine calls the JavaScript interface to send the card configuration data to the first map component; The first map component loads the card configuration data based on the JavaScript thread.
10. The method according to claim 4, characterized in that The card configuration data is an RPK package, and the RPK package includes the name and icon of the first quick application card and the address of the RPK package.
11. A method for displaying a map based on a quick application card, applied to a server, characterized in that: The method comprises: Call the map card interface to generate the first quick app card and the second quick app card; According to the mapping relationship between the business type of the quick app card and the map refresh policy, a first refresh policy is configured for the first quick app card and a second refresh policy is configured for the second quick app card; Among them, different business types of quick application cards have different map refresh strategies preset; The first quick app card and the second quick app card are quick app cards of different business types, and the map refresh duration of the first refresh strategy is shorter than the map refresh duration of the second refresh strategy.
12. The method according to claim 11, characterized in that The first refresh strategy includes obtaining a map view MapView or a texture view GLtextureview and refreshing the map layer once every first time interval; The second refresh strategy includes obtaining a map screenshot in a bitmap format and refreshing the map layer once every second time interval; The first duration is shorter than the second duration.
13. The method according to claim 11, characterized in that The method further comprises: Receiving a first request message sent by an electronic device, where the first request message is used to request verification and configuration of the first quick app card; In response to the first request message, the first quick app card is verified and configured, and then an RPK package of the first quick app card is sent to the electronic device, wherein the RPK package includes the business type, map layer data, and function layer data of the first quick app card; wherein the map layer data and the function layer data are used to render the first quick app card, so that the map layer and the function layer displaying the recommended service are displayed in the first quick app card, and the business type is used to determine the map refresh duration of the first quick app card.
14. The method according to any one of claims 11 to 13, characterized in that The calling of the map card interface to generate the first quick application card includes: Obtain the map card interface from the developer service platform, wherein the map card interface includes a card service type, a positioning interface, and an operation button and a function interface; Determining, according to the card service type and the positioning interface, whether the first quick application card adopts a dynamic map component or a static map component; Determine a map refresh strategy corresponding to the first quick app card according to the operation button and the function interface; The determination results are packaged to obtain the RPK package of the first quick application card.
15. The method according to claim 13, characterized in that The method further comprises: receiving a second request message sent by the electronic device, where the second request message is used to request to obtain map frame data of the first quick app card or the second quick app card; In response to the second request message, when it is determined that the first quick app card adopts a dynamic map component, sending map frame data of the first quick app card to the electronic device, where the map frame data is a map in the form of a map view MapView or a texture view GLtexture view; or, In response to the second request message, when it is determined that the second quick app card adopts a static map component, map frame data of the second quick app card is sent to the electronic device, where the map frame data is a map screenshot in a bitmap format.
16. An electronic device, characterized in that: The electronic device comprises a processor, a memory and a computer program stored in the memory, wherein the processor is configured to execute the computer program so that the electronic device implements the method according to any one of claims 1 to 10.
17. A server, characterized in that: The server comprises a processor, a memory and a computer program stored in the memory, wherein the processor is configured to execute the computer program so that the server implements the method according to any one of claims 11 to 15.
18. A communication system, characterized in that: Includes the electronic device as claimed in claim 16 and the server as claimed in claim 17.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on an electronic device or a server, enables the electronic device to execute the method as claimed in any one of claims 1 to 10, or the server to execute the method as claimed in any one of claims 11 to 15.
