CN116755748B - Card updating method, electronic device, and computer-readable storage medium - Google Patents

Card updating method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN116755748B
CN116755748B CN202311034127.0A CN202311034127A CN116755748B CN 116755748 B CN116755748 B CN 116755748B CN 202311034127 A CN202311034127 A CN 202311034127A CN 116755748 B CN116755748 B CN 116755748B
Authority
CN
China
Prior art keywords
card
content
management service
application
hosting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311034127.0A
Other languages
Chinese (zh)
Other versions
CN116755748A (en
Inventor
杜兆喜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311034127.0A priority Critical patent/CN116755748B/en
Publication of CN116755748A publication Critical patent/CN116755748A/en
Application granted granted Critical
Publication of CN116755748B publication Critical patent/CN116755748B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a card updating method, electronic equipment and a computer readable storage medium, which comprise the following steps: the card management service acquires the hosting authority of the card; responding to a card update triggering event, and acquiring updated contents of the card from a server according to the hosting authority; and updating the card according to the updated content, so that the content of the card can be refreshed without starting a third party application. The hosting authority of the card is acquired through the card management service, the content of the card is updated based on the acquired hosting authority by utilizing the card management service, and the content of the card can be updated without starting a third party application program corresponding to the card, so that the occupation of performance in the card content updating process can be reduced as much as possible, the power consumption of electronic equipment is saved, and the popularization effect of the card is improved.

Description

Card updating method, electronic device, and computer-readable storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a card updating method, an electronic device, and a computer readable storage medium.
Background
The card is used as a shortcut service provided by an intelligent service assistant, more contents than the application program icons can be displayed, and a user can conveniently view more contents related to the application program by setting the card corresponding to the application program in a desktop or a negative screen. For example, a weather class card may display current weather information, a memo card may display to-do event information or memo event information, and the like.
However, at present, card refreshing is limited due to consideration of power consumption and performance of the electronic device, so that popularization effect of the card is affected.
Disclosure of Invention
The embodiment of the application provides a card updating method, electronic equipment and a storage medium, which can solve the problem of camera calling conflict of an eye movement service and an intelligent code recognition service.
In a first aspect, an embodiment of the present application provides a card updating method, including:
the card management service acquires the hosting authority of the card;
responding to a card update triggering event, and acquiring updated contents of the card from a server according to the hosting authority;
and updating the card according to the updating content.
Here, the card management service may be a separate background process, and can manage the card in the electronic device.
In this way, the contents of the card can be refreshed without launching the third party application. The hosting authority of the card is acquired through the card management service, the content of the card is updated based on the acquired hosting authority by utilizing the card management service, and the content of the card can be updated without starting a third party application program corresponding to the card, so that the occupation of performance in the card content updating process can be reduced as much as possible, the power consumption of electronic equipment is saved, and the popularization effect of the card is improved.
In one possible implementation, the obtaining, by the card management service, the escrow right of the card includes;
when creating a card, a host application accesses a layout configuration file of the card;
acquiring embedded parameters in a layout configuration file of the card;
and the host application determines a host address according to the embedded parameters and sends the host address to the card management service.
Therefore, the host application can obtain the hostile host address of the card when accessing the card layout configuration file in a pre-buried parameter mode, namely the address of the service provider corresponding to the content which needs to be updated by the card, and the host application can obtain the host authority of the card after sending the address to the card management service.
In one possible implementation, the host application obtains the address parameters set with the hosting tag by traversing the layout configuration file.
The hosting label is a tag, namely when the hosting application accesses an XML file of preViewlayout, a service provider address attached to the rear of the tag can be obtained after the tag is read, so that when the card management service detects a card update trigger event through providing the obtained service provider address to the card management service, the card management service can obtain the latest content of the card according to the service provider address, and the card management service can update the latest content of the card into the card in a broadcasting mode in a cross-process mode, thereby realizing the requirement of the latest content display required by popularization.
In one possible implementation manner, the responding to the card update triggering event, acquiring the update content of the card from the server according to the hosting authority, includes:
under the condition that the card management service detects the card updating trigger event, if the card management service has the hosting authority of the card corresponding to the card updating trigger event, updating the content of the card according to the quadruple data; wherein the quadruple data is generated by the host application when creating the card.
After creating the third party application card, the host application may forward the four-tuple data it obtains to the card management service, including the card ID (widgetId), layout ID (layoutId), and view ID (viewId), and the service provider address (escrow address). The card ID (widgetId) is a unique identifier of each card, the layout ID (layoutId) is an identifier of a layout scheme, and the same card may have multiple layout schemes, for example, a 2×2 layout, a 4*4 layout, and the like, and the view ID (viewId) is a view identifier of the content that needs to be updated. It will be appreciated that, since there may be multiple views of a card that need to be updated, the quadruple data acquired by the host application may be multiple sets of data, and after the host application creates the third party application card, the host application may acquire all the data of the card ID (widget ID), layout ID (layout ID) and view ID (view ID) from the appwideworstview, and may also acquire the service provider address of the card, and then transfer the quadruple data to the card management service.
In one possible implementation manner, the responding to the card update triggering event, acquiring the update content of the card from the server according to the hosting authority, includes:
under the condition that the card management service detects the card updating triggering event, if the card corresponding to the card updating triggering event is a risk card, updating the content of the card according to the quadruple data; wherein the quadruple data is generated by the host application when creating the card.
The risk card refers to a card that occupies excessive resources when updating content, that is, the card management service may identify a card that occupies more resources when updating content as a risk card, for example, a card that occupies a CPU/GPU that exceeds a preset threshold when updating a card is identified as a risk card, for example, a card that occupies a memory that exceeds a preset threshold when updating a card is identified as a risk card, and for example, a card that has a temperature rise value of the whole machine that exceeds a preset threshold when updating a card is identified as a risk card. In this way, the risk card can be managed using the card management service.
In one possible implementation manner, the method further includes:
triggering the card update triggering event when the card is in an exposed state; or,
Triggering the card update triggering event when the card update time is reached; or,
and triggering the card update triggering event when the card is in the exposed state and the card update time is reached.
The card in the exposed state in the embodiment of the application means that the card is visible to a user, for example, the card is placed on the negative screen, when the user slides the screen to the negative screen, the card is in the exposed state, and under the condition that the card is in the exposed state, a card update triggering event is triggered.
It should be noted that, the card may be in the exposed state in other cases, for example, the card is stacked in a card set, and when the card set displays the content of the card, the card is considered to be in the exposed state.
For the card in the promotion state, the mobile phone can set an updating period of the card aiming at the service, and under the condition that the updating period is reached, the card content updating time is considered to be reached, and at the moment, a card updating triggering event is triggered.
The card content update time may be the card content update time which is considered to be reached every time of starting, that is, every time of starting, so as to trigger a card update trigger event.
In one possible implementation manner, the responding to the card update triggering event, acquiring the update content of the card from the server according to the hosting authority, includes:
Determining a service provider address of a view of the content to be updated according to the hosting authority;
accessing the service provider address to obtain the updated content.
In one possible implementation, the method further includes:
and the card management service dynamically adjusts the updating logic of the card according to the content to be updated sent by the server.
Specifically, the content of the card can be refreshed according to the updated content issued by the server only when the card is in the exposed state.
In one possible implementation, the cards are arranged in a card set.
In one possible implementation, the method further includes:
and creating a preset number of initial cards in the card set, and loading the acquired updated content into the initial cards.
The initial states of the cards in the card set are promotion states, and the card set is independent of the starting of a third party, and management of all the cards is managed to a card management service. The card set can support continuous switching of N cards (N is an integer greater than 3) by only creating 3 cards.
The collection of cards may only preload the contents of the first and second cards, while the contents of the other cards are only loaded when the user slides to the card.
In one possible implementation, the card management service provides template data, the method further comprising:
the card management service updates the content of the native application card according to the template data.
The card management service may provide template data, such as step count data in the pedometer card, weather information in the weather card, system information (battery level, CPU occupancy, up-down data transmission rate, etc.) of the system management card, which is updated again without the need to launch a third party application.
In a second aspect, an embodiment of the present application provides an electronic device, including:
the permission acquisition module is used for acquiring the hosting permission of the card;
the content acquisition module is used for responding to the card update triggering event and acquiring the update content of the card from the server according to the hosting authority;
and the updating module is used for updating the card according to the updating content.
In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing a method according to any one of the first aspects described above when the computer program is executed by the processor.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which when executed by a processor performs a method as in any of the first aspects above.
In a fifth aspect, an embodiment of the present application provides a chip system, including a processor, the processor being coupled to a memory, the processor executing a computer program stored in the memory to implement a method as described in any one of the first aspects above. The chip system can be a single chip or a chip module composed of a plurality of chips.
In a sixth aspect, embodiments of the present application provide a computer program product for, when run on an electronic device, causing the electronic device to perform the method of any one of the first aspects described above.
It will be appreciated that the advantages of the second to sixth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
FIG. 1 is a schematic diagram of a display interface of a card-adding process electronic device in accordance with an embodiment of the present application;
FIG. 2 is a schematic diagram of a display interface of another card-adding process electronic device according to an embodiment of the application;
Fig. 3 shows a schematic hardware structure of the mobile phone 100;
fig. 4 shows a software architecture diagram of the mobile phone 100;
FIG. 5 is a display interface of a card in a negative one-screen of an electronic device according to an embodiment of the present application;
FIG. 6 illustrates a display interface of another card of the electronic device in accordance with an embodiment of the present application;
FIG. 7 is a schematic diagram of a card in various states in an embodiment of the application;
FIG. 8 is a schematic view of a scenario when creating a card according to an embodiment of the present application;
fig. 9 is a schematic view of a scenario of a card updating method according to an embodiment of the present application;
fig. 10 is a schematic view of a scenario in which a hosting authority is obtained in a card updating method according to an embodiment of the present application;
FIG. 11 is a schematic diagram of an implementation flow of a card update method according to an embodiment of the present application;
FIG. 12 is a schematic view of a card update method according to another embodiment of the present application;
FIG. 13 is a schematic view of a card update method according to another embodiment of the present application;
FIG. 14 is a schematic view of a card update method according to another embodiment of the present application;
FIG. 15 is a schematic view of a card update method according to another embodiment of the present application;
fig. 16 is a schematic structural diagram of a chip according to an embodiment of the present application.
Detailed Description
In embodiments of the present application, the words "first," "second," and the like are used to distinguish between identical or similar items that have substantially the same function and effect. For example, the first chip and the second chip are merely for distinguishing different chips, and the order of the different chips is not limited. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
In order to more clearly illustrate the technical scheme of the application, the concept related to the application is described as follows:
1) The card is an intelligent service capable of conveniently displaying Application (APP) information to a user, and the card can generally display content related to application related pushing and also display content of a certain service of the application.
Specifically, the card is mainly displayed on a desktop and a negative screen of the electronic device, and the content displayed on the card comes from data provided after the application program is started. The card may include pictures, text, links, etc. associated with the application.
In some embodiments, the card may also be used as an operation portal of an application program corresponding to the card, and the user may open an operation interface of the application program corresponding to the card by clicking, sliding, and so on the card, so that the user may operate the application program. For example, the application program corresponding to the news pushing card is APP1, and the user can open APP1 through the operation of the news pushing card, so that the display interface of the electronic device jumps to the operation interface of APP1, and thus the user can operate APP1 through the operation interface of APP1, for example, view the complete content of the pushed news, and the like.
It can be understood that the card can also be used as an operation portal of one or more services provided by the application program corresponding to the card, that is, the user can open the services provided by the application program corresponding to the card through the operation on the card, so that the electronic device can present an operation interface of the services provided by the application program. For example, the payment application program corresponding to the payment card provides the code scanning payment service, and when the user operates the payment card by clicking or the like, an interface corresponding to the code scanning payment service of the payment application program can be opened, so that the user can perform the code scanning payment operation through the interface of the code scanning payment service.
2) Third party applications, which are applications produced by third parties that require users to download and install in electronic devices.
3) The negative screen, also called "-1 screen", refers to a user interface displayed by the electronic device when the main screen of the electronic device slides to the right until the screen slides to the leftmost split screen. Shortcut service functions and messages can be placed in the negative screen. For example, a shortcut entry (payment code, weChat, etc.) of a certain page of the application program may be placed in the negative screen, for example, a shortcut entry (riding code service, life payment service, etc. for paying the application program) of a service of a certain application may be placed in the negative screen, and for example, card content of information such as the number of steps of exercise may be placed in the negative screen.
4) Host application refers to a position where the card is displayed, and specifically may include, but is not limited to, a desktop and the above-mentioned negative one-screen, that is, the desktop or the negative one-screen is used as the host application, and the card is displayed on the desktop or the negative one-screen. It will be appreciated that the hosting application may also be an application such as a smart service assistant, i.e. a card may be presented in the smart service assistant.
5) The card management service is a service capable of managing cards in a card set, and by the card management service, the escrow authority of the cards in the card set can be acquired, and the contents of the cards can be updated according to the escrow authority of the cards. In a specific application, the card management service may depend on a host application or may be an independent background service.
In an embodiment, the card management service may be used by a separate background service process when the card management service is used, and all cards may share a card management service, for example, a card in a negative screen, a card on a desktop, a third party application card, a quick application card (JS card), a native application card, etc., where the card management service may be used to host the card.
Along with the gradual complicacy of the intelligent degree of electronic equipment, can carry intelligent service assistant in electronic equipment to provide convenient high-efficient service for the user, intelligent service assistant can provide the user with the service through convenient entry, intelligent distribution's mode, brings convenient intelligent service for the user. The intelligent service assistant can provide the user with the content of interest of the user such as weather, information, entertainment, life and the like at the position of a negative screen, a desktop and the like, and can provide the service for the user in the form of a card so as to meet the high-frequency scene demands such as payment, bright code, information quick-viewing and the like of the user.
The card is used as a shortcut service provided by the intelligent service assistant, more contents than the APP icon can be displayed, and a user can conveniently see more contents related to the APP by setting the card corresponding to the application program in the desktop or the negative screen. For example, a weather class card may display current weather information, a memo card may display to-do event information or memo event information, and the like.
It should be noted that the card may also be applied to other scenes, for example, to a screen locking interface, which is not particularly limited in the present application.
Referring to fig. 1 for an example, fig. 1 shows a schematic diagram of a display interface of a card-adding process electronic device. As shown in fig. 1, (a) shows a display interface of a desktop of an electronic device, if a user wants to add a calendar card, the user may perform a operation of double-directional internal kneading on the desktop of the electronic device, and in response to the operation of double-directional internal kneading input by the user, the display interface of the electronic device may jump to an operation interface of a desktop setting as shown in fig. 1 (b), where the operation interface of the desktop setting may include a wallpaper control, a card service, a switching effect, and a desktop setting. The user jumps the display interface of the electronic device 100 to the operation interface of the card service as shown in (c) of fig. 1 by clicking the card service. The operation interface of the card service may include a search field (for a user to search for a corresponding card) and a card set. The user may select the calendar card, and after the user further clicks "add to desktop", the calendar card may be added to the desktop (as shown in fig. 1 (d)).
For a card (for example, a Widget card) corresponding to a third-party application program, the content of the card is generally provided by the third-party application program, that is, the content displayed by the card (the Widget card) corresponding to the third-party application program follows the third-party application program, so that the related content of the third-party application program or the related content of a certain service or services of the third-party application program can be intuitively displayed, and the content of the updated card is updated by the third-party application program, that is, when the content of the card is refreshed, the third-party application program corresponding to the card needs to be started, and after the latest content is acquired by the third-party application program, the content of the card is updated in a broadcasting mode.
Referring to fig. 2, for example, fig. 2 shows a schematic diagram of a display interface of another card-adding process electronic device. As shown in fig. 2, fig. 2 (a) shows a display interface of a desktop of the electronic device, in which a memo is displayed in the desktop), and if a user wants to add a card corresponding to the memo, after the user presses an icon of the memo for a long time, the display interface of the electronic device jumps to an operation interface of a card adding option shown in fig. 2 (b), and when the user selects to add the card to the desktop, that is, the user clicks a control added to the desktop, the electronic device adds the card corresponding to the memo to the desktop in response to a clicking operation of the user (as shown in fig. 2 (c).
It should be noted that the above manner of adding a card is merely an example, and the user may also add a card by other manners, for example, by performing setting (adding/deleting/changing a format/setting content) of a card through the smart service center, or by performing setting on a card by entering a card setting interface through a "more" option of a negative screen, which is not particularly limited in the present application.
With reference to the above manner of adding the card, the user may also select a card style and set the card content, which will not be described in detail in the present application.
The content of the third party application card (Widget card) is provided by the third party application program, when the content of the third party application card is refreshed, the third party application program needs to be started, the content of the third party application card (Widget card) corresponding to the third party application is updated by broadcasting and the like after the third party application program obtains the updated content, however, the starting of the third party application program can occupy the resources of the electronic device and can cause the electronic device to generate larger power consumption, and if the content of a plurality of cards is refreshed at the same time, a plurality of third party application programs can be started, so that more serious performance occupation and power consumption can be caused. And the performance and power consumption of electronic devices are important considerations in the use of electronic devices. Therefore, in general, in order to reduce performance occupation and save power consumption of the electronic device, the refreshing times of the card of the third party application program are limited, that is, the card of the third party application program is limited to be refreshed only 10 times per day; or setting a refreshing time interval, and refreshing the content of the card applied by the third party after the refreshing time interval is reached; for example: for cards provided by third party applications, it takes more than 30 minutes to refresh the contents of the card.
However, for cards with popularization requirements (namely popularization state cards), refreshing of card contents is limited, and the card contents can be certainly refreshed untimely, so that instantaneity of the card contents is influenced, and the popularization effect is influenced.
Based on the above problems, the embodiment of the application provides a card updating method and electronic equipment, which refresh the content of a card under the condition that a third party application is not started. The hosting authority of the card in the promotion state is obtained through the card management service, the content of the card is updated based on the obtained hosting authority by utilizing the card management service, the content of the card can be updated without starting a third party application program corresponding to the card, the occupation of performance in the card content updating process can be reduced as much as possible, the power consumption of electronic equipment is saved, and the promotion effect of the card is improved.
Before describing the method provided by the embodiment of the present application in detail, a main execution body related to the embodiment of the present application is briefly described.
The electronic device may also be called a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), or the like. The electronic device may be a mobile phone, a smart television, a wearable device, a tablet (Pad), a computer with wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self-driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), or the like. The embodiment of the application does not limit the specific technology and the specific equipment form adopted by the electronic equipment.
In order to better understand the embodiments of the present application, the following describes the structure of the electronic device according to the embodiments of the present application:
fig. 3 shows a schematic structural diagram of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriberidentification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processingunit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is illustrative, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrixorganic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot lightemitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, so that the electrical signal is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
Angular change data is collected based on the gyro sensor 180B. Angular data is collected based on the gyro sensor 180B.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The method can also be used for identifying the gesture of the electronic equipment, and is applied to application programs such as horizontal and vertical screen switching, pedometers and the like.
Acceleration change data is acquired based on the acceleration sensor 180E. The electronic device determines posture change information of the electronic device based on the acceleration change data acquired by the acceleration sensor 180E.
The electronic device determines the screen direction based on the angle data collected by the gyro sensor 180B.
The electronic device determines posture change information of the electronic device based on the angle change data acquired by the gyro sensor 180B. Or, the electronic device determines the posture change information of the electronic device based on the acceleration change data collected by the acceleration sensor 180E. Or, the electronic device determines the posture change information of the electronic device based on the angle change data collected by the gyro sensor 180B and the acceleration change data collected by the acceleration sensor 180E.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The proximity light sensor 180G collects proximity light data. The electronics determine proximity light information based on the proximity light data collected by the light sensor 180G.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
Ambient light sensor 180L collects ambient light data. The electronics determine ambient light information based on the ambient light data collected by ambient light sensor 180L.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, among others. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 4 is a software block diagram of the electronic device 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, namely an application layer, an application framework layer, a system layer and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 4, the application package may include applications such as cameras, calendars, phones, maps, phones, music, settings, mailboxes, videos, short messages, and the like.
In some embodiments, as shown in fig. 4, the application package of the application layer may further include a host application and a card module, where the host application may include a card set and a card management service, and the card management service may be used to manage cards in the card set, including displaying card contents in the card set, updating contents of the cards in the card set, and so on.
In some embodiments, the card set is used to place at least one card. For example, the card set may include a plurality of cards, and different cards may display contents corresponding to different applications, or different cards may display contents corresponding to different functions of the same application, where, of course, different cards may also display contents corresponding to different functions of different applications.
In some embodiments, the card management service is mainly configured to obtain a card hosting authority of the cards in the card set, and obtain the content to be updated of the cards at a card content refreshing time, and update the content of the cards by broadcasting or other manners.
In some embodiments, after the card managing service obtains the card hosting authority, the content to be updated of the card may be obtained from the cloud server by accessing a related link or the like.
For a specific working process of the card management service, please refer to the following contents of the card updating method embodiment.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 4, the application framework layer may include a window manager, a content provider, a resource manager, a view system, a notification manager, and the like.
The window manager is used for managing window programs. The window manager may obtain the display screen size, determine if there is a status bar, lock the screen, touch the screen, drag the screen, intercept the screen, etc.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout profiles, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
The system layer comprises a system library, an Android runtime (Android run) and a core library.
Android runtimes include core libraries and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
After the execution subject related to the embodiment of the present application is introduced, the application scenario related to the embodiment of the present application is briefly described next. Here, the electronic device is a mobile phone, and the host application is a negative screen.
For example, referring to fig. 5, the contents of the cards in the card set are shown on the negative one screen of the mobile phone, and the user may slide the screen of the mobile phone rightward until the screen is slid to the leftmost split screen, where the screen of the mobile phone displays the interface of the negative one screen (as shown in fig. 5), and the negative one screen displays the relevant contents of the cards 52 in the card set 51. In a specific application scenario, when a user slides a mobile phone screen to a leftmost split screen, the card set 51 may only display a certain card in the card set 51, or a plurality of cards, so that the user can directly view the displayed card, or can enter an operation interface of a third party application corresponding to the card by clicking the card, and the like. If the user wants to view other cards, the operations such as sliding left and right/sliding up and down on the interface of the card set 51 can be performed, so that the card set 51 displays the card content of other cards, and of course, the user can also click on the card set 51 to enter the management interface of the card set 51, at this time, the management interface of the card set can simultaneously view the content of multiple cards, and the user can view more cards by clicking the controls for viewing all the cards.
The above card set 51 may display the contents of a plurality of cards on the negative screen, as shown in fig. 5, or may display the contents of the cards 52 in an overlapping and exposing manner, as shown in fig. 6, so that the user may view the contents of the next card of the current card 52 by a gesture of flipping the cards.
In a specific application, when the negative screen displays the contents of the cards 51 in an overlapping and exposing mode, only 3 cards can be created, and then the card contents with different application degrees or different services are loaded through the 3 cards in turn, so that the card set 51 can display the card contents of a plurality of (more than 3) cards.
In a specific application, the third party application card may include the following aspects:
1) The preview state (preview layout) is a display state of the third party application card in the preview state, and may only include a card structure, that is, may only be a skeleton diagram or a preview diagram of the card. Of course, in order to display the effect, the card content in the preview state can also be displayed, that is, the card content is filled in the card framework, so that the display effect of the card in the preview state is closer to that of a real card. It will be appreciated that the cards in the preview state are from a layout configuration file (which may be an XML file in particular) defined in the preview state, and that loading of the cards in the preview state is without the need to launch a third party application, and that the cards in the preview state may be created and loaded from the configuration file of the cards.
The architecture of the card may include the type of the card, the card elements, the layout of each card element, and so on. By way of example, the types of cards described above may be 4*2 cards, 4*4 cards, etc., and the card elements include, but are not limited to, titles, pictures, text, etc., and the layout conditions may include, but are not limited to, the number of elements, the placement positions of the elements, etc. For example, the card in the preview state may be as shown in fig. 7 (a), that is, the card in the preview state may display only the skeleton diagram.
2) The final state (initial layout) is the final display state of the card, that is, the final state displays the real card content, and the content in the final state card is the content of the third party application which needs to be obtained truly. For example, as shown in fig. 7 (b), the final card may be that the real card adds corresponding content for each card element in the structure of the preview card, for example, adds title content in a title, adds text information to be promoted by a third party application in a text, and so on.
3) Abnormal state, i.e. the display state of the card when the card is abnormal, may not display the correct card content, and even only the skeleton diagram of the card.
In a specific application, metadata of a third party application card is defined in a third party application corresponding to the third party application card, and the metadata may include a layout configuration file and a service Provider (Provider) code. The layout information of the third party application card can be determined through the layout configuration file, and the card content is obtained through the Provider code.
When a user wants to create a card in a host, specifically, when cards are added in a card set, the above manner of adding cards may be performed, after the operation of adding cards by the above manner (for example, the manner shown in fig. 1 and 2), in response to the operation of adding cards by the user, a third party application may add a card corresponding to the third party application in the host application (i.e., a negative screen), or add a card corresponding to a certain service of the third party application. Specifically, as shown in fig. 8, in the case of receiving a card creation request, the third party application determines the preview state of the third party application card according to the layout configuration file, then accesses the corresponding service Provider (specifically, may access the corresponding server) through the Provider code to obtain real-time content in the third party application card, creates the content of the third party application card (i.e., changes the card from the preview state to the final state) in a broadcast manner after generating the load data of the remote view (RemoteViews), so that the real state of the third party application card is displayed in the negative screen, and the creation of the third party application card is completed.
When the third party application creates the card in the host application, the host application can identify the embedded parameters of the card and send the identified embedded parameters to the card management service, so that the card management service can obtain the hosting authority of the card of the third party application, and the content of the card of the third party application can be updated through the card management service.
In a specific application, the pre-embedded parameter may be set in the layout configuration file of the third party application card, and when the third party application provider develops the third party application card, the pre-embedded parameter is written into the layout configuration file of the third party application card (specifically, may be an XML file corresponding to the previewraout or the initialayout of the third party application card) through an advanced protocol with the third party application developer.
For example, referring to fig. 9, fig. 9 is a schematic view of a scenario of a card updating method according to an embodiment of the present application, as shown in fig. 9, a card set is set in a host application 91, where the card set may include a card 1 corresponding to an application program a (only the card set is shown in the drawing), a card 2 corresponding to an application program B, and a card 3 corresponding to an application program C. When the card 1 is created in the host application, the host application may access an XML file (layout configuration file) in the previewrayout of the application program a to obtain the embedded parameter 1, and then send the embedded parameter 1 to the card management service 92, where the card management service 92 may obtain, by using the embedded parameter 1, the content to be updated of the card 1 when detecting the card refresh trigger event of the card 1, and then broadcast the content to be updated of the card 1 by using a broadcast method. Similarly, the content update process of the cards 2 and 3 can also refer to the content update process of the card 1.
In a specific application, if the third party application card provided by the third party application program allows the card management service to host the card update service, a hosting tag can be set in the layout configuration file of the third party application card, and in addition, when the hosting application creates the third party application card, if the hosting tag is identified, the hosting application can acquire the embedded parameters.
In a specific application, the card updating method provided by the application can mainly aim at a card in a popularization state, and a user needs to select an application and then the card can be converted into a real card, so that when a third party application card is created, a host application can create the card in a preview state, and when the preview state card is created, an XML file of the previevelayout of the third party application card can be accessed, and corresponding embedded parameters can be obtained under the condition that an hosting label exists in the XML file of the previevelayout of the third party application card.
By way of example, assuming that the hosting tag is a tag, that is, when the hosting application accesses the XML file of previewraout, the service provider address attached to the tag can be obtained after the tag is read, so that when the obtained service provider address is provided to the card management service, the card management service can obtain the latest content of the card according to the service provider address under the condition that the card update trigger event is detected, and the card management service can update the latest content of the card into the card in a broadcasting manner in a cross-process manner, thereby realizing the requirement of the latest content display required by popularization. For example, when a (tag= "text:// www.hihonor.com/item_text") is embedded in the XML file of the previewrayout, the host application may obtain the address of the service provider corresponding to the text as follows: i/www.hihonor.com/pore_text. As another example, if a tag= "image:// www.hihonor.com/button") is embedded in the XML file of the previewrayout, the host application may obtain the address of the service provider corresponding to the image as// www.hihonor.com/button.
In a specific application, the host application may traverse the layout configuration file, and after reading the hosting label, the corresponding address parameter behind the hosting label may be obtained.
In a specific application, only the host application has authority to update the content of the card, and the card management service provided by the embodiment of the application can update the content of the card because the host application provides the card management service with the acquired service provider address.
In a specific application, the host application, after creating the third party application card, may forward the four tuple data it obtains to the card management service, where the four tuple data includes a card ID (widgetId), a layout ID (layoutId), and a view ID (viewId), and the service provider address (hosting address). The card ID (widgetId) is a unique identifier of each card, the layout ID (layoutId) is an identifier of a layout scheme, and the same card may have multiple layout schemes, for example, a 2×2 layout, a 4*4 layout, and the like, and the view ID (viewId) is a view identifier of the content that needs to be updated. It will be appreciated that, since there may be multiple views of a card that need to be updated, the quadruple data acquired by the host application may be multiple sets of data, and after the host application creates the third party application card, the host application may acquire all the data of the card ID (widget ID), layout ID (layout ID) and view ID (view ID) from the appwideworstview, and may also acquire the service provider address of the card, and then transfer the quadruple data to the card management service.
For example, referring to fig. 10, fig. 10 provides a schematic view of a scenario for acquiring a hosting authority in the card updating method provided by the embodiment of the present application. As shown in fig. 10, the host application (desktop) creates a card according to the XML file of the previewraout of the third party application, and after creating, the quadruple data of the card can be obtained, and then the quadruple data obtained by the creation is sent to the card management service, and after detecting the card update trigger event of the card, the card management service can pull the update content from the server.
The "at … …" in the embodiment of the present application may be an instant when a certain situation occurs, or may be a period of time after a certain situation occurs, which is not particularly limited.
The card updating method provided by the embodiment of the application is described below with specific implementation flow embodiments. Fig. 11 is a schematic implementation flow chart of a card updating method according to an embodiment of the present application. As shown in fig. 11, the method may include:
s1101, when the host application creates the card, acquiring the host address of the card.
In one possible implementation manner, the host application may create a card corresponding to the third party application program under the condition of installing the third party application program, may create a card of the third party application program during popularization of the third party application program, and may create a card of the third party application program according to a creation requirement of a user.
In a specific application, after the host application creates the card, the created card may be placed in a card set and managed by a card management service.
In a specific application, when the third party application program is developed, the host address can be pre-embedded in the layout configuration file of the third party application card in a pre-embedding parameter mode, so that the host application can obtain the host address by accessing the layout configuration file of the third party application card when the card is created.
In the embodiment of the present application, the host address is a service provider address corresponding to a view of the content to be updated by the third party application card, and one card may have multiple host addresses, that is, when one card has multiple views of the content to be updated, the host address acquired by the host application is an address of a service provider of each view of the content to be updated.
S1102, the host application forwards the host address to the card management service.
In a specific application, after the host application obtains the hosting address, the hosting address can be synchronized to the card management service, so that the card management service can obtain the address of the service provider corresponding to the view of the content of the card to be updated.
According to the description about the acquisition of the hosting authority by the card management service, the hosting application may synchronize the acquired quadruple data with the card management service, so that the card management service may determine, according to the quadruple data, the content of the card that needs to be updated, and the service provider address corresponding to the updated content.
S1103, responding to the card update trigger event, accessing a content server corresponding to the managed address by the card management service, and acquiring the update content of the card corresponding to the card update trigger event.
In some embodiments of the present application, the card update trigger event is triggered in the following cases:
case 1: the card is in an exposed state.
The card in the exposed state in the embodiment of the application means that the card is visible to a user, for example, the card is placed on the negative screen, when the user slides the screen to the negative screen, the card is in the exposed state, and under the condition that the card is in the exposed state, a card update triggering event is triggered.
It should be noted that, the card may be in the exposed state in other cases, for example, the card is stacked in a card set, and when the card set displays the content of the card, the card is considered to be in the exposed state.
Case 2: the card content update time is reached.
In a specific application, for a card in a promotion state, the mobile phone can set an update period of the card for a service, and when the update period is reached, the mobile phone considers that the card content update time is reached, and at the moment, a card update triggering event is triggered.
In a specific application, the card content update time may be each time the card is started, that is, each time the card content is started, the card content update time is considered to be reached, so as to trigger a card update triggering event.
Case 3: the card update time is reached and the card is in an exposed state.
Of course, in order to further reduce power consumption, the mobile phone may further determine whether the card is in an exposed state after the card update time is reached, or further determine whether the card update time is reached when the card is in an exposed state, and trigger the card update trigger event only when the card update time is reached and the card is in an exposed state.
In an embodiment of the present application, when the card management service detects the card update trigger event, it may further determine whether to execute the update operation, if it is determined that the update operation is executed, access a content server corresponding to the hosting address, and obtain the update content of the card corresponding to the card update trigger event, otherwise, ignore the card update trigger event.
In a specific application, whether the card management service needs to perform the update operation may be determined according to the following conditions:
condition 1: and whether the card management service has the hosting authority of the card corresponding to the card update triggering event or not.
Specifically, if the card management service does not have the hosting authority of the card corresponding to the card update triggering event, the card management service cannot update the card, so that it can be determined that the update operation is not performed at this time, and the content of the card is updated by switching to the original update flow (that is, the content of the card is updated by accessing the server through the third party application program).
If the card management service has the hosting authority of the card corresponding to the card update triggering event, that is, the card management service can access the hosting address corresponding to the card, the card update operation can be determined to be executed.
And 2, judging whether the card corresponding to the card updating triggering event is a risk card or not.
Specifically, if the card corresponding to the card update triggering event is a risk card, determining that the content of the card is updated by the card management service, and then determining to execute the update operation.
If the card corresponding to the update triggering event is not a risk card, the original update flow can be changed to update the card content (i.e. the card content is updated by accessing the server through the third party application program).
In a specific application, the risk card refers to a card that occupies too much resources when updating content, that is, the card management service may identify a card that occupies more resources when updating content as a risk card, for example, a card that occupies a CPU/GPU that exceeds a preset threshold when updating a card is identified as a risk card, or identify a card that occupies a memory that exceeds a preset threshold when updating a card as a risk card, for example, identify a card that has a rising value of a complete machine temperature that exceeds a preset threshold when updating a card as a risk card, which is not limited in this application.
It should be noted that, the condition 1 and the condition 2 may be independent conditions, or may be combined together to determine whether to execute the update operation, that is, the card management service may determine that the condition 1 is first determined, and if the card management service has the hosting authority of the card corresponding to the card update triggering event and the card is a risk card, then the update operation is determined to be executed.
In a specific application, the process of obtaining the updated content by the card management service may specifically be: and determining the service provider address of the view of each content to be updated according to the managed address in the quadruple data, accessing the servers corresponding to the service provider addresses corresponding to the view of each content to be updated one by one, and acquiring the updated contents in the servers one by one.
And S1104, broadcasting the acquired updated content by the card management service.
And S1105, after the card receives the broadcast, updating the card content according to the broadcast.
In a specific application, the card management service may create a remoteview broadcast refresh card after acquiring the updated content.
The remoteview broadcast can cross-process transmission content, so that the card can acquire the update content in the remoteview broadcast, and refresh the card in real time according to the acquired update content, namely, update the update content corresponding to each view into a corresponding position.
The above can be seen that the card updating method provided by the embodiment of the application can refresh the content of the card without starting the third party application. The hosting authority of the card is acquired through the card management service, the content of the card is updated based on the acquired hosting authority by utilizing the card management service, and the content of the card can be updated without starting a third party application program corresponding to the card, so that the occupation of performance in the card content updating process can be reduced as much as possible, the power consumption of electronic equipment is saved, and the popularization effect of the card is improved.
In an embodiment of the present application, the card management service may also manage the native application card, where the card management service may provide template data, such as step counting data in a card of the pedometer, weather information in a weather card, system information (battery power, CPU occupation, uplink and downlink data transmission rate, etc.) of the system management card, and updating of these template data does not need to start a third party application.
Illustratively, as shown in fig. 12, taking a pedometer as an example, after creating a step-counting card by a third party application, the host application may share the authority to access the pedometer to a card management service, so that the card management service may monitor the pedometer and update the content of the pedometer card.
In an embodiment of the present application, the card management service may further manage a risk card, that is, when the system identifies a certain card as a risk card, the risk card may be moved into the card set, and the risk card is updated and managed by the card management service.
For example, as shown in fig. 13, the card management service may acquire the hosting authorities of the high memory card and the high CPU card by adding the high memory card and the high CPU card to the card set, and may update the contents of the high memory card and the high CPU card by using the card management service when the updating is required.
It should be noted that, the identification of the risk card may refer to the content of step S1103, which is not described herein. Here, the triplet data in fig. 13 may include a card ID (widgetId), a layout ID (layoutId), and a view ID (viewId). Of course, the host application may also send the service provider address to the card management service, i.e., the host application may also send the card's quadruple data to the card management service for risk cards.
In an embodiment of the present application, the card management service may dynamically adjust the update logic of the card according to the update content issued by the server, and specifically, may refresh the content of the card according to the update content issued by the server only when the card is in an exposed state.
For example, as shown in fig. 14, the initial states of cards in the card set are promotion states, and all the cards are managed by the card management service independently of the start of a third party. The card set can support continuous switching of N cards (N is an integer greater than 3) by only creating 3 cards.
In a specific application, the card not displayed may be discarded using an LRU algorithm or the like.
In particular applications, the set of cards may only preload the contents of the first and second cards, while the contents of the other cards are only loaded when the user slides to the card.
In the case that the third party application program does not provide the third party card, the third party application program can declare the templates and parameters of the card in the Manifest file, so that the card management service can create the cards corresponding to the templates and parameters of the Manifest file, and the templates and parameters are provided by the card management service when the templates and parameters are provided, so that the card management service can update and manage the cards.
Illustratively, as shown in fig. 15, the card management service provides 3 templates, namely, a template a, a template B and a template C, respectively, and when the third party application declares that the card corresponding to the template a is used in its Manifest file, the card management service can create a corresponding card (e.g., the sports card in fig. 15) according to the template a.
Specifically, the card management service can create a corresponding card based on the Manifest file of the third party application by using the card architecture capability provided by the system, and the specific manner is not described herein.
The foregoing description of the solution provided by the embodiments of the present application has been mainly presented in terms of a method. To achieve the above functions, it includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the present application may be implemented in hardware or a combination of hardware and computer software, as the method steps of the examples described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
According to the embodiment of the application, the device of the card updating method can be divided into the functional modules according to the method example, for example, each functional module can be divided corresponding to each function, and two or more functions can be integrated into one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Fig. 16 is a schematic structural diagram of a chip according to an embodiment of the present application. As shown in fig. 16, the chip 160 includes one or more (including two) processors 1601, communication lines 1602, communication interfaces 1603, and a memory 1604.
In some implementations, the memory 1604 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
The methods described in the embodiments of the present application described above may be applied to the processor 1601 or implemented by the processor 1601. The processor 1601 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the method performed by the first device or the second device may be implemented by an integrated logic circuit of hardware in the processor 1601 or instructions in software form. The processor 1601 may be a general purpose processor (e.g., a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), an off-the-shelf programmable gate array (field-programmable gate array, FPGA) or other programmable logic device, discrete gates, transistor logic, or discrete hardware components, and the processor 1601 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application.
The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a state-of-the-art storage medium such as random access memory, read-only memory, programmable read-only memory, or charged erasable programmable memory (electrically erasable programmable read only memory, EEPROM). The storage medium is located in the memory 1604 and the processor 1601 reads information in the memory 1604 and performs the steps of the method described above in connection with its hardware.
The processor 1601, the memory 1604, and the communication interface 1603 may communicate with each other via a communication line 1602.
In the above embodiments, the instructions stored by the memory for execution by the processor may be implemented in the form of a computer program product. The computer program product may be written in the memory in advance, or may be downloaded in the form of software and installed in the memory.
Embodiments of the present application also provide a computer program product comprising one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL), or wireless (e.g., infrared, wireless, microwave, etc.), or semiconductor medium (e.g., solid state disk, SSD)) or the like.
The embodiment of the application also provides a computer readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer readable media can include computer storage media and communication media and can include any medium that can transfer a computer program from one place to another. The storage media may be any target media that is accessible by a computer.
As one possible design, the computer-readable medium may include compact disk read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disk memory; the computer readable medium may include disk storage or other disk storage devices. Moreover, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital versatile disc (digital versatile disc, DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
Combinations of the above should also be included within the scope of computer-readable media. The foregoing is merely illustrative embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about variations or substitutions within the technical scope of the present application, and the application should be covered. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (13)

1. The card updating method is characterized in that the card is a third party application card, and comprises the following steps:
the card management service obtains the hosting authority of the card according to the embedded parameters in the layout configuration file of the card; the embedded parameters are written in a layout file of a third party application card when the third party application provider develops the card; the embedded parameters comprise an hosting label, and a hosting address is attached to the hosting label; the hosting authority means that the card management service has the authority to access the hosting address;
the card management service obtains the hosting authority of the card according to the embedded parameters in the layout configuration file of the card, and the method comprises the following steps:
When the host application creates a preview state card of the card, the host application accesses a layout configuration file of the card;
the host application traverses the layout configuration file to obtain address parameters provided with the hosting labels;
the host application determines a hosting address according to the address parameter and sends the hosting address to the card management service so that the card management service has hosting authority of the card;
responding to a card update triggering event, and acquiring updated contents of the card from a server according to the hosting authority;
and updating the card according to the updating content.
2. The method of claim 1, wherein the obtaining updated content of the card from the server according to the hosting authority in response to the card update trigger event comprises:
under the condition that the card management service detects the card updating trigger event, if the card management service has the hosting authority of the card corresponding to the card updating trigger event, updating the content of the card according to the quadruple data; wherein the quadruple data is generated by the host application when creating the card.
3. The method of claim 1, wherein the obtaining updated content of the card from the server according to the hosting authority in response to the card update trigger event comprises:
Under the condition that the card management service detects the card updating triggering event, if the card corresponding to the card updating triggering event is a risk card, updating the content of the card according to the quadruple data; wherein the quadruple data is generated by the host application when creating the card.
4. The method according to claim 1, wherein the method further comprises:
triggering the card update triggering event when the card is in an exposed state; or,
triggering the card update triggering event when the card update time is reached; or,
and triggering the card update triggering event when the card is in the exposed state and the card update time is reached.
5. The method of claim 4, wherein the obtaining updated content of the card from the server according to the hosting authority in response to the card update trigger event comprises:
determining a service provider address of a view of the content to be updated according to the hosting authority;
accessing the service provider address to obtain the updated content.
6. The method according to claim 1, wherein the method further comprises:
And the card management service dynamically adjusts the updating logic of the card according to the content to be updated sent by the server.
7. The method of claim 1, wherein the cards are arranged in a card collection.
8. The method of claim 7, wherein the method further comprises:
and creating a preset number of initial cards in the card set, and loading the acquired updated content into the initial cards.
9. The method of any one of claims 1 to 8, wherein the card management service provides a card template, the method further comprising:
creating a card according to the card template declared by the third party application.
10. The method of any of claims 1 to 8, wherein the card management service provides template data, the method further comprising:
the card management service updates the content of the native application card according to the template data.
11. An electronic device comprising a processor and a memory, the processor and memory coupled, the memory for storing a computer program that, when executed by the processor, causes the electronic device to perform the steps of the method of any one of claims 1 to 10.
12. A computer readable storage medium, characterized in that the computer readable storage medium comprises a computer program which, when run on a computer, causes the computer to perform the steps of the method according to any one of claims 1 to 10.
13. A chip comprising a processor, the processor being coupled to a memory for storing computer program instructions that, when executed by the processor, cause the chip to perform the steps of the method of any of claims 1 to 10.
CN202311034127.0A 2023-08-17 2023-08-17 Card updating method, electronic device, and computer-readable storage medium Active CN116755748B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311034127.0A CN116755748B (en) 2023-08-17 2023-08-17 Card updating method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311034127.0A CN116755748B (en) 2023-08-17 2023-08-17 Card updating method, electronic device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN116755748A CN116755748A (en) 2023-09-15
CN116755748B true CN116755748B (en) 2023-12-12

Family

ID=87953634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311034127.0A Active CN116755748B (en) 2023-08-17 2023-08-17 Card updating method, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN116755748B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201530A (en) * 2016-07-15 2016-12-07 乐视控股(北京)有限公司 The screen display method of application card and device
WO2017063401A1 (en) * 2015-10-13 2017-04-20 乐视控股(北京)有限公司 Frame management method and device for interactive function card in smart television
CN109359117A (en) * 2018-08-13 2019-02-19 阿里巴巴集团控股有限公司 A kind of update method and device of card data
CN109684008A (en) * 2018-12-19 2019-04-26 Oppo广东移动通信有限公司 Card rendering method, device, terminal and computer readable storage medium
CN115185625A (en) * 2022-08-04 2022-10-14 中国平安财产保险股份有限公司 Self-recommendation type interface updating method based on configurable card and related equipment thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10409586B1 (en) * 2018-02-16 2019-09-10 Wipro Limited Method and system for developing and delivering an update on human machine interface (HMI) application

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017063401A1 (en) * 2015-10-13 2017-04-20 乐视控股(北京)有限公司 Frame management method and device for interactive function card in smart television
CN106201530A (en) * 2016-07-15 2016-12-07 乐视控股(北京)有限公司 The screen display method of application card and device
CN109359117A (en) * 2018-08-13 2019-02-19 阿里巴巴集团控股有限公司 A kind of update method and device of card data
CN109684008A (en) * 2018-12-19 2019-04-26 Oppo广东移动通信有限公司 Card rendering method, device, terminal and computer readable storage medium
CN115185625A (en) * 2022-08-04 2022-10-14 中国平安财产保险股份有限公司 Self-recommendation type interface updating method based on configurable card and related equipment thereof

Also Published As

Publication number Publication date
CN116755748A (en) 2023-09-15

Similar Documents

Publication Publication Date Title
US11861382B2 (en) Application starting method and apparatus, and electronic device
CN111543042B (en) Notification message processing method and electronic equipment
CN116009999A (en) Card sharing method, electronic equipment and communication system
WO2022052878A1 (en) Method for managing push message, and related apparatus
WO2024016564A1 (en) Two-dimensional code recognition method, electronic device, and storage medium
WO2021185352A1 (en) Version upgrade method and related apparatus
CN115017534A (en) File processing authority control method and device and storage medium
CN116755748B (en) Card updating method, electronic device, and computer-readable storage medium
CN113741994B (en) Keep-alive method of video application and electronic equipment
CN116382896B (en) Calling method of image processing algorithm, terminal equipment, medium and product
CN116672707B (en) Method and electronic device for generating game prediction frame
CN117690177B (en) Face focusing method, face focusing device, electronic equipment and storage medium
CN116744106B (en) Control method of camera application and terminal equipment
CN116688494B (en) Method and electronic device for generating game prediction frame
EP4336857A1 (en) Photographing method and related apparatus
CN113179362B (en) Electronic device and image display method thereof
CN115933952B (en) Touch sampling rate adjusting method and related device
CN114596819B (en) Brightness adjusting method and related device
CN116700819B (en) Method and device for starting camera hardware module and storage medium
CN116204093B (en) Page display method and electronic equipment
WO2024012398A1 (en) Message sharing method and related device
US20240273029A1 (en) Photographing method and related apparatus
CN114168115B (en) Communication system, application downloading method and device
WO2022227978A1 (en) Display method and related apparatus
WO2023160455A1 (en) Object deletion method and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant