CN117742846A - Method for adding service card, electronic device and computer readable storage medium - Google Patents

Method for adding service card, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN117742846A
CN117742846A CN202211118547.2A CN202211118547A CN117742846A CN 117742846 A CN117742846 A CN 117742846A CN 202211118547 A CN202211118547 A CN 202211118547A CN 117742846 A CN117742846 A CN 117742846A
Authority
CN
China
Prior art keywords
card
application
style
target service
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211118547.2A
Other languages
Chinese (zh)
Inventor
黄剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211118547.2A priority Critical patent/CN117742846A/en
Priority to PCT/CN2023/117002 priority patent/WO2024055875A1/en
Publication of CN117742846A publication Critical patent/CN117742846A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application is applicable to the technical field of terminals, and particularly relates to a method for adding a service card, electronic equipment and a computer readable storage medium. In the method, a card style interface in a first application can be displayed in the electronic equipment, and at least a first card style corresponding to a second application can be displayed in the card style interface. The electronic equipment can respond to the first preset operation of the user, acquire the first card content provided by the second application according to the first card style provided by the first application, generate the target service card corresponding to the second application according to the first card style and the first card content, and add the target service card to the target position in the electronic equipment, so that one or more card styles corresponding to each application are uniformly displayed through the card style interface in the first application, and the corresponding target service card is added for the second application based on the first preset operation of the user, thereby greatly facilitating the operation of adding the service card for the application by the user and improving the user experience.

Description

Method for adding service card, electronic device and computer readable storage medium
Technical Field
The application belongs to the technical field of terminals, and particularly relates to a method for adding a service card, electronic equipment and a computer readable storage medium.
Background
The service card is an interface display form of the service, and related information or operation of the application can be preposed on the card so as to achieve the purposes of directly reaching the service and reducing experience levels, and a user can intuitively and conveniently check the related information of the application or run a specific function in the application on the electronic equipment. When the function of the service card of an application needs to be used, a corresponding service card needs to be added to the application, for example, the corresponding service card is added to a desktop, or a screen is arranged on the desktop, or a service center is arranged on the desktop, and the like.
Currently, the manner of adding a corresponding service card to an application is generally: the application is found in the electronic equipment, the icon of the application is pressed for a long time, a function menu corresponding to the application is displayed in a display interface of the electronic equipment, the function menu can comprise a menu item of adding service cards, a user clicks the menu item of adding the service cards, and the service cards corresponding to the application can be added to a desktop, a negative screen, a service center or the like. For each application, the method for adding the service card for the application by pressing the icon of the application and clicking the menu item of the 'add service card' is complex and complex, has poor convenience and reduces the use experience of users.
Disclosure of Invention
The embodiment of the application provides a method for adding service cards, electronic equipment and a computer readable storage medium, which can solve the problems that in the prior art, the adding of the service cards is complicated and complex, the convenience is poor, and the use experience of a user is reduced.
In a first aspect, an embodiment of the present application provides a method for adding a service card, which is applied to an electronic device, where the method may include:
displaying a card style interface in a first application in the electronic equipment, wherein at least a first card style corresponding to at least a second application is displayed in the card style interface;
responding to a first preset operation of a user, and acquiring first card content provided by the second application according to the first card style provided by the first application, wherein the first card content comprises required information set by the first card style;
and generating a target service card corresponding to the second application according to the first card style and the first card content, and adding the target service card to a target position in the electronic equipment.
According to the method for adding the service card, the electronic device can display the card style interface in the first application in the display interface of the electronic device based on the appointed operation of the user, one or more card styles corresponding to each application are uniformly displayed through the card style interface in the first application, and corresponding target service cards can be added for one or more applications based on the card style selected by the user in the card style interface in the first application, so that the operation of adding the service card for the application by the user is greatly facilitated, and the use experience of the user can be effectively improved. In addition, each application has a plurality of card patterns, so that the card patterns of the service cards are greatly enriched, and the requirements of users can be met.
Optionally, the first application is a theme application or a card application. Wherein the card application may be an independent application from the theme application or the like. The card application can have a card style corresponding to each application, and the user can select and download a first card style corresponding to a second application which the user wants from the card styles corresponding to each application, so that the electronic device can add a target service card corresponding to the second application to a target position in the electronic device according to the downloaded first card style corresponding to the second application.
Optionally, the target location is one or more of a desktop, a negative one-screen, and a service center of the electronic device.
Illustratively, the first card style is obtained by the first application from a server having one or more card styles uploaded by at least one developer stored therein.
In the method for adding the service card provided by the implementation manner, the electronic device can acquire the first card style corresponding to the second application from the server through the first application, namely, one or more card styles corresponding to each application displayed in the card style interface can be designed and uploaded to the server by one or more developers, so that a plurality of card styles corresponding to each application can be displayed in the card style interface of the first application to enable a user to select and download the card styles, the number of the card styles corresponding to each application can be effectively enriched, and therefore the user can select a desired card style to add the service card according to the user's own needs to meet the user's needs.
In one possible implementation, the first application providing the first card style may include:
and responding to a second preset operation of the user, and downloading and storing the first card style by the first application.
The second preset operation is a touch operation or a long-press operation of the user on the first card style, or a download button corresponding to the first card style is displayed in the card style interface, and the second preset operation is a touch operation or a long-press operation of the user on the download button corresponding to the first card style.
Illustratively, after the first application downloads and stores the first card style, an add button corresponding to the first card style is displayed in the card style interface; the first preset operation is a touch operation or a long-press operation of the user on the adding button corresponding to the first card style.
In the method for adding the service card provided by the implementation manner, a user can select and download the first card style through the second preset operation, and can add the target service card corresponding to the second application to the desktop, the negative one-screen or the service center of the electronic device through the first preset operation, namely, the downloading and adding of the first card style can be independent, so that the user can download the card style and add the target service card according to actual needs, the flexibility of adding the target service card is ensured, and the user experience is improved.
In another possible implementation manner, the card style interface directly displays an add button corresponding to the first card style, and the first preset operation is a touch operation or a long-press operation of a user on the add button corresponding to the first card style.
In the method for adding the service cards provided by the implementation manner, a user can directly select and download the first card style through the first preset operation, and add the target service card corresponding to the second application to the desktop, the negative screen or the service center of the electronic device, so that the addition of the target service card can be realized through one operation, the efficiency of adding the target service card is ensured, and the user experience is improved.
Optionally, the first card style includes one or more of a shape, a size, a background, a content layout, a font, and a font size of the target service card when displayed in the target location of the electronic device.
It should be understood that a card style refers to a form of service card when presented in a desktop of an electronic device. The card style may include one or more of shape, size, background (e.g., background color and/or background image, etc.), content layout, font size, etc. The shape refers to a shape that the service card presents when displayed on a display interface of the electronic device, and may be any shape such as a rectangle or a circle. The size refers to the size that the service card presents when displayed in the display interface of the electronic device. The content layout refers to the arrangement of the content displayed in the service card. The fonts refer to the fonts of the text contents displayed in the service card, and can be any fonts such as regular script, song style, bold and the like. The font size refers to the size of the font of the text content displayed in the service card.
The obtaining, according to the first card style provided by the first application, the first card content provided by the second application includes:
and the first application acquires the first card content provided by the second application from the second application according to the first card style.
In the method for adding the service card provided by the implementation manner, the first card style corresponding to the second application and the first card content corresponding to the second application can be mutually independent, namely, the development design of the service card and the development design of the application can be independent, so that the card style corresponding to the application can be designed and obtained by developers other than the provider of the application, the provider of the application can not need to develop and design the service card, the development workload of the provider of the application can be greatly reduced, the variety of the card style corresponding to the application can be effectively increased, and more card styles can be provided for users to select, so that the requirements of the users are met.
Optionally, the class web development paradigm resource corresponding to the first card style includes a template file, a style file and a json file;
The template file is used for describing the layout structure of the page in the target service card and the event interacted with the user;
the style file is used for describing the style of the content displayed in the target service card;
and the json file is used for processing the page logic of the target service card and interacting with a user.
Optionally, the first application obtains, from the second application, first card content provided by the second application according to the first card style, including:
and the first application determines information required to be displayed by the target service card according to the template file corresponding to the first card style, and acquires first card content provided by the second application from the second application according to the information required to be displayed by the target service card.
Optionally, the json file stores default card content corresponding to the target service card, and after the information to be displayed according to the target service card is obtained from the second application, the method further includes:
when the fact that the corresponding first card content does not exist in the second application is determined according to the information required to be displayed by the target service card, acquiring the default card content from the json file according to the information required to be displayed by the target service card, and determining the default card content as the first card content.
In one possible implementation, the card style interface further includes a search box displayed therein, and the method further includes:
responding to first search content in the search box, acquiring a first card style corresponding to the second application, and displaying the first card style in the card style interface, wherein the first search content is used for searching the first card style corresponding to the second application;
or,
and responding to second search content in the search box, acquiring one or more card styles corresponding to the second application, and displaying one or more card styles corresponding to the second application in the card style interface, wherein the second search content is used for searching the card styles corresponding to the second application.
In the method for adding the service card provided by the implementation mode, the search box can be displayed in the card style interface, and the user can search the card style corresponding to the second application or search the first card style corresponding to the second application through the search box, so that the determination speed of the first card style can be effectively improved, and the user experience is improved.
Illustratively, after the adding the target service card to the target location in the electronic device, the method further comprises:
And acquiring updated second card content corresponding to the second application according to the first card style, and updating the target service card according to the second card content.
In a second aspect, an embodiment of the present application provides an adding device for a service card, where the adding device is applied to an electronic device, and the device may include:
the card style display module is used for displaying a card style interface in a first application, wherein at least a first card style corresponding to at least a second application is displayed in the card style interface;
the card content acquisition module is used for responding to a first preset operation of a user, acquiring first card content provided by the second application according to the first card style provided by the first application, wherein the first card content comprises required information set by the first card style;
and the service card adding module is used for generating a target service card corresponding to the second application according to the first card style and the first card content, and adding the target service card to a target position in the electronic equipment.
Optionally, the first application is a theme application or a card application.
Optionally, the target location is one or more of a desktop, a negative one-screen, and a service center of the electronic device.
Illustratively, the first card style is obtained by the first application from a server having one or more card styles uploaded by at least one developer stored therein.
In one possible implementation, the apparatus may further include:
and the card style downloading module is used for responding to a second preset operation of the user and downloading and storing the first card style.
The second preset operation is a touch operation or a long-press operation of the user on the first card style, or a download button corresponding to the first card style is displayed in the card style interface, and the second preset operation is a touch operation or a long-press operation of the user on the download button corresponding to the first card style.
Illustratively, after the first application downloads and stores the first card style, an add button corresponding to the first card style is displayed in the card style interface; the first preset operation is a touch operation or a long-press operation of the user on the adding button corresponding to the first card style.
In another possible implementation manner, the card style interface directly displays an add button corresponding to the first card style, and the first preset operation is a touch operation or a long-press operation of a user on the add button corresponding to the first card style.
Optionally, the first card style includes one or more of a shape, a size, a background, a content layout, a font, and a font size of the target service card when displayed in the target location of the electronic device.
The card content obtaining module is further configured to obtain, according to the first card style, first card content provided by the second application from the second application.
Optionally, the class web development paradigm resource corresponding to the first card style includes a template file, a style file and a json file;
the template file is used for describing the layout structure of the page in the target service card and the event interacted with the user;
the style file is used for describing the style of the content displayed in the target service card;
and the json file is used for processing the page logic of the target service card and interacting with a user.
Optionally, the card content obtaining module is further configured to determine information to be displayed on the target service card according to the template file corresponding to the first card style, and obtain, according to the information to be displayed on the target service card, first card content provided by the second application from the second application.
Optionally, default card content corresponding to the target service card is stored in the json file, and the device may further include:
and the default card content acquisition module is used for acquiring the default card content from the json file according to the information required to be displayed by the target service card when the corresponding first card content does not exist in the second application according to the information required to be displayed by the target service card, and determining the default card content as the first card content.
In one possible implementation manner, the card style interface further displays a search box, and the apparatus may further include:
the first card style searching module is used for responding to first searching content in the searching frame, acquiring a first card style corresponding to the second application, displaying the first card style in the card style interface, and searching the first card style corresponding to the second application by the first searching content;
or,
the second card style searching module is used for responding to second search content in the search box, acquiring one or more card styles corresponding to the second application, displaying one or more card styles corresponding to the second application in the card style interface, and searching the card styles corresponding to the second application by the second search content.
Illustratively, the apparatus may further include:
and the service card updating module is used for acquiring updated second card content corresponding to the second application according to the first card style and updating the target service card according to the second card content.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to cause the electronic device to implement the method for adding a service card according to any one of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, where the computer program when executed by a computer causes the computer to implement the method for adding a service card according to any one of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on an electronic device, causes the electronic device to perform the method of adding a service card according to any one of the first aspects above.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
FIG. 1 is a schematic illustration of a scenario in which a corresponding service card is added to an application;
fig. 2 is a schematic structural diagram of an electronic device to which the method for adding a service card according to the embodiment of the present application is applicable;
fig. 3 is a schematic diagram of a software architecture to which the method for adding a service card according to the embodiment of the present application is applicable;
fig. 4 and fig. 5 are schematic diagrams of an application scenario provided in an embodiment of the present application;
fig. 6 is a second application scenario schematic diagram provided in the embodiment of the present application;
fig. 7 is a frame diagram of an electronic device to which the method for adding a service card according to the embodiment of the present application is applicable;
FIG. 8 is a schematic flow chart of adding a target service card to a desktop of an electronic device provided by an embodiment of the present application;
fig. 9 is a flowchart of a method for adding a service card according to an embodiment of the present application.
Detailed Description
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Furthermore, references to "a plurality of" in the examples of this application should be interpreted as two or more.
The steps involved in the method for adding a service card provided in the embodiment of the present application are only examples, not all steps are necessarily performed, or not all the information or the content in the message are necessarily selected, and may be increased or decreased as needed in the use process. The same steps or messages having the same function in the embodiments of the present application may be referred to and used by reference between different embodiments.
The service scenario described in the embodiments of the present application is for more clearly describing the technical solution of the embodiments of the present application, and does not constitute a limitation to the technical solution provided in the embodiments of the present application, and as a person of ordinary skill in the art can know that, with the evolution of the network architecture and the appearance of a new service scenario, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
The service card is an interface display form of the service, and related information or operation of the application can be preposed on the card so as to achieve the purposes of directly reaching the service and reducing experience levels, and a user can intuitively and conveniently check the related information of the application or run a specific function in the application on the electronic equipment. When the function of the service card of an application needs to be used, a corresponding service card needs to be added to the application, for example, the corresponding service card is added to a desktop, or a screen is arranged on the desktop, or a service center is arranged on the desktop, and the like.
Referring to fig. 1, fig. 1 shows a schematic view of a scenario in which a corresponding service card is added to an application.
In some examples, when a corresponding service card needs to be added for an application, such as a camera application, the user needs to find the camera application in the electronic device and press the icon of the camera application long. As shown in fig. 1 (a), a user needs to find a camera application in the desktop of the electronic device and press an icon of the camera application in the desktop long. The desktop of the electronic device may further display an icon of a clock application, an icon of a calendar application, an icon of a gallery application, an icon of a memo application, an icon of a music application, an icon of a sports health application, an icon of a weather application, an icon of an address book application, an icon of a telephone application, an icon of a short message application, and the like.
As shown in (b) of fig. 1, when the electronic device detects a long press operation on the camera, a function menu 101 corresponding to the camera application may be displayed in a display interface of the electronic device. The function menu 101 may include a menu item of "add service card", and the function menu 101 may also include a menu item of "self-timer" and a menu item of "video", and so on. The user can click on a menu item of 'add service card', and add the service card corresponding to the camera application to a desktop, a negative screen, a service center, or the like.
For each application, the method for adding the service card for the application by pressing the icon of the application and clicking the menu item of the 'add service card' is complex and complex, has poor convenience and reduces the use experience of users. In addition, the added service card has a single style, and cannot meet the requirements of users.
In order to solve the above-mentioned problems, embodiments of the present application provide a method for adding a service card, an electronic device, and a computer readable storage medium, where when a user wants to add a corresponding service card to an application, the user may enter a card style interface in a first application (for example, a theme application) through a specified operation, and at least one or more card styles corresponding to a second application may be displayed in the card style interface. The user may select a corresponding card style (hereinafter referred to as a first card style) for a second application of the desired add-on service card in the card style interface, i.e., the user may select the first card style from one or more card styles corresponding to the second application. The electronic device may obtain a first card style provided by the first application in response to the first card style selected by the user. Then, the electronic device may acquire the card content provided by the second application (hereinafter may also be referred to as first card content corresponding to the second application) according to the first card style, generate a target service card corresponding to the second application according to the first card style and the first card content, and add the target service card to a desktop, a negative screen, a service center, or the like of the electronic device.
In other words, in the embodiment of the present application, the electronic device may display, on the display interface of the electronic device, a card style interface in the first application based on a specified operation of a user, and uniformly display, through the card style interface in the first application, one or more card styles corresponding to each application, and may add, on the basis of a card style selected by the user in the card style interface in the first application, a corresponding target service card for one or more applications, thereby greatly facilitating an operation of adding a service card for the application by the user, and effectively improving a user experience of the user. In addition, each application has a plurality of card patterns, so that the card patterns of the service cards are greatly enriched, and the requirements of users can be met.
The method for adding the service card can be applied to electronic equipment which supports the function of the service card and has a display screen, such as a mobile phone, a tablet personal computer, a notebook computer, wearable equipment, an intelligent large screen, vehicle-mounted equipment, a notebook computer, a netbook, a personal digital assistant (personal digital assistant, PDA), a desktop computer and the like, and the specific type of the electronic equipment is not limited.
The following first describes an electronic device according to an embodiment of the present application. Referring to fig. 2, fig. 2 shows a schematic structural diagram of the electronic device 100.
As shown in fig. 2, 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, an antenna 1, an antenna 2, a mobile communication module 140, a wireless communication module 150, a sensor module 160, a display 170, and the like. Among them, the sensor module 160 may include a pressure sensor 160A, a gyro sensor 160B, a magnetic sensor 160C, an acceleration sensor 160D, a touch sensor 160E, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present 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 processing unit, 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 can be called directly from the 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 circuit sound, 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.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 160E, etc., respectively, through an I2C bus interface. For example: the processor 110 may couple the touch sensor 160E through an I2C interface, such that the processor 110 communicates with the touch sensor 160E through an I2C bus interface to implement a touch function of the electronic device 100.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 150. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 150 through a UART interface to implement a bluetooth function.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as the display 170. The MIPI interface includes a display serial interface (display serial interface, DSI) and the like. In some embodiments, processor 110 and display 170 communicate via a DSI interface to implement the display functionality of electronic device 100.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. USB interface 130 may be used to transfer data between electronic device 100 and peripheral devices. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only 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 use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 140, the wireless communication module 150, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 140 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied on the electronic device 100. The mobile communication module 140 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 140 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 140 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 140 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 140 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor displays images or video via the display 170. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 140 or other functional module, independent of the processor 110.
The wireless communication module 150 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 150 may be one or more devices that integrate at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 150 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2.
In some embodiments, antenna 1 and mobile communication module 140 of electronic device 100 are coupled, and antenna 2 and wireless communication module 150 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 170, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 170 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 170 is used to display images, videos, and the like. The display 170 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), a flexible light-emitting diode (flex), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 170, 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 external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as an image playing function) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The pressure sensor 160A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 160A may be disposed on display 170. The pressure sensor 160A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. When a force is applied to the pressure sensor 160A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display 170, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 160A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 160A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 160B 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 160B. The gyro sensor 160B may be used for navigation, somatosensory game scenes.
The magnetic sensor 160C includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 160C. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 160C. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 160D 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 electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
The touch sensor 160E, also referred to as a "touch device". The touch sensor 160E may be disposed on the display 170, and the touch sensor 160E and the display 170 form a touch screen, which is also referred to as a "touch screen". The touch sensor 160E is used to detect a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 170. In other embodiments, the touch sensor 160D may also be disposed on the surface of the electronic device 100 at a different location than the display 170.
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. In this embodiment, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 3 is a software configuration 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, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
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. 3, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
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 telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, 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.
Android run time includes a core library 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 system library may include a plurality of functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (e.g., openGL ES), 2D graphics engine (e.g., SGL), converged routing management module, etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer at least comprises a display driver, an audio driver, a sensor driver, a Bluetooth driver, a USB driver, a WiFi driver and the like.
The method for adding the service card provided by the embodiment of the application will be described in detail below with reference to the accompanying drawings and specific application scenarios.
In this embodiment, when a user wants to add a corresponding service card to an application, the user may enter a card style interface in a first application (for example, a theme application) through a specified operation, and at least one or more card styles corresponding to a second application may be displayed in the card style interface in the theme application. The user can select a corresponding card style (i.e. a first card style) for a second application to which a service card is to be added in a card style interface in the theme application, i.e. the user can select the first card style corresponding to the second application from one or more card styles corresponding to the second application. The electronic device may obtain a first card style provided by the first application in response to the first card style selected by the user. Then, the electronic device can acquire the first card content provided by the second application according to the first card style, generate a target service card corresponding to the second application according to the first card style and the first card content, and add the target service card to a desktop or a negative screen or a service center of the electronic device.
It is understood that a card style refers to a form of service card when presented in a desktop of an electronic device. The card style may include one or more of shape, size, background (e.g., background color and/or background image, etc.), content layout, font size, etc. The shape refers to a shape that the service card presents when displayed on a display interface of the electronic device, and may be any shape such as a rectangle or a circle. The size refers to the size that the service card presents when displayed in the display interface of the electronic device. The content layout refers to the arrangement of the content displayed in the service card. The fonts refer to the fonts of the text contents displayed in the service card, and can be any fonts such as regular script, song style, bold and the like. The font size refers to the size of the font of the text content displayed in the service card.
It should be noted that the second application may be one or more of the applications providing the service card. The first card style corresponding to the second application may be one or more of the card styles corresponding to the second application. For each application providing the service card, the first application can have one or more card patterns corresponding to the application for the user to select to download and add the service card, so that the patterns of the service card can be greatly enriched, and the requirements of the user on the patterns of the service card are met. The details of the related content to which the corresponding one or more card styles are applied will be described in the following content, and specific reference may be made to the content described in the following description, which is not repeated here.
The method for adding the service card provided in the embodiment of the present application will be exemplarily described below taking adding the target service card to the desktop as an example. It will be appreciated that the principles of adding a target service card to a negative one-screen, and adding a target service card to a service center are similar to those of adding a target service card to a desktop, and specific reference may be made to the description related to adding a target service card to a desktop.
Optionally, the card style downloading and service card adding may provide functions for the first application, that is, the first application may provide a card style corresponding to each application, so that the user may download the card style and add the service card. The first application may be installed in the electronic device, and thus, the user may download the card style and add the service card through the first application installed in the electronic device. The electronic equipment can download the card style from the server corresponding to the first application through the first application, and can add the service card according to the downloaded card style. The server corresponding to the first application may be a server storing the content to be displayed in the first application, and the server corresponding to the first application may store relevant information of each card style.
For example, the first application providing for card style downloads and service card additions may be a theme application or the like. That is, the theme application may provide both a download function of the theme and a download function of the card style and an add function of adding a service card to the desktop. That is, the user can download the theme through the theme application, or can download the card style and add the service card through the theme application.
The first application providing the card style download and the service card addition may also be an independent application from the theme application or the like (hereinafter, the independent application may be referred to as a card application) by way of example. For example, the card application may have a card style corresponding to each application, and the user may select and download a first card style corresponding to a second application desired from the card styles corresponding to each application, so that the electronic device may add the target service card corresponding to the second application to the desktop of the electronic device according to the downloaded first card style corresponding to the second application.
The method for adding the service card provided in the embodiment of the present application will be exemplarily described below taking a first application providing a card style download and a service card addition as an example of a theme application. In addition, the specific content of the first application providing the card style download and service card addition as the independent card application may refer to the first application providing the card style download and service card addition as the relevant description in the theme application.
In one possible implementation, the user may open the subject application when the user wants to add a corresponding service card to the desktop of the electronic device for the second application. Then, the user can find the first card style corresponding to the second application in the theme application, and execute the downloading operation to download the first card style corresponding to the second application. That is, when the electronic device detects an opening operation of the theme application (for example, an operation of touching an icon of the theme application in the desktop), the electronic device may open the theme application, and at this time, one or more card styles corresponding to the application may be displayed in the theme application. Then, when the electronic device detects a downloading operation of the first card style (i.e., a card style corresponding to the second application), the electronic device may download the first card style corresponding to the second application in the theme application, for example, may download the first card style corresponding to the downloaded second application to the electronic device locally in the theme application.
After downloading the first card style corresponding to the second application to the local of the electronic device, the electronic device may respond to the adding operation of the first card style, obtain the first card content provided by the second application according to the first card style, generate the target service card corresponding to the second application according to the first card style and the first card content, and add the generated target service card to the desktop of the electronic device. That is, after downloading the first card style corresponding to the second application to the local electronic device, when the user wants to add the target service card of the first card style to the desktop of the electronic device for the second application, the user may perform a corresponding adding operation on the first card style, and when the electronic device detects the adding operation, the electronic device may add the target service card corresponding to the second application to the desktop of the electronic device according to the first card style.
Alternatively, the downloading operation may be a touch operation or a long-press operation on the first card style, or may be a touch operation or a long-press operation on a "download" button corresponding to the first card style. The long-press operation refers to that the time length of touching the first card style is longer than or equal to the preset time length. It should be appreciated that the preset duration may be specifically determined by a skilled person according to an actual scenario, which is not limited in any way in the embodiments of the present application. For example, the preset duration may be set to any one of 3 seconds or 5 seconds, etc. according to the actual scene.
Alternatively, the adding operation may be a touch operation or a long press operation on the downloaded first card style, or the like. That is, after downloading the first card style corresponding to the second application to the local of the electronic device, the user may touch or long press the downloaded first card style, and when the electronic device detects a touch operation or long press operation on the downloaded first card style, the user may determine that the user wants to add the target service card corresponding to the second application to the desktop of the electronic device according to the first card style. At this time, the electronic device may acquire the first card content provided by the second application according to the first card style, generate a target service card corresponding to the second application according to the first card style and the first card content corresponding to the second application, and add the generated target service card to a desktop of the electronic device.
Alternatively, the adding operation may be a touch operation or a long-press operation of an "add" button corresponding to the downloaded first card style. That is, after the first card style provided by the second application is downloaded to the local electronic device, the "add" button corresponding to the downloaded first card style may also be displayed in the theme application. When the user can touch or press the 'adding' button corresponding to the downloaded first card style for a long time, and the electronic device detects that the 'adding' button corresponding to the downloaded first card style is touched, the user can determine that the user wants to add the target service card corresponding to the second application to the desktop according to the first card style, at this time, the electronic device can acquire the first card content provided by the second application according to the first card style, and can generate the target service card corresponding to the second application according to the first card style and the first card content corresponding to the second application, and add the generated target service card to the desktop of the electronic device.
Referring to fig. 4 and fig. 5, fig. 4 and fig. 5 show a first application scenario schematic diagram provided in an embodiment of the present application. The application scenario is exemplified by an electronic device as a mobile phone.
In one example, as shown in (a) of fig. 4, icons of applications may be displayed in the desktop of the mobile phone, for example, there may be an icon of a theme application, an icon of a calendar application, an icon of a gallery application, an icon of a memo application, an icon of a music application, an icon of a sports health application, an icon of a weather application, an icon of an address book application, an icon of a telephone application, an icon of a short message application, and so on. When the user needs to add the target service card to the desktop of the mobile phone for the second application, the user can touch the icon of the theme application. When touch operation of icons of the theme application is detected, the mobile phone can open the theme application, and a home page of the theme application can be displayed in a display interface of the mobile phone.
For example, as shown in (b) of fig. 4, a home page of the theme application may be displayed with a function menu, and one or more menu items may be included in the function menu, for example, a menu item corresponding to "theme", a menu item corresponding to "service card", a menu item corresponding to "wallpaper", and a menu item corresponding to "font". Optionally, the home page of the theme application may display a theme interface by default, where the theme interface may display content such as activities corresponding to the theme, the theme recommended by the theme application (e.g., SS, RR, and WW), and a search box corresponding to the theme.
As shown in fig. 4 (c), when the menu item corresponding to the "service card" is triggered, for example, in the home page of the theme application, when the user clicks the menu item corresponding to the "service card", or slides to the left to the menu item corresponding to the "service card", that is, when the user clicks the "service card" in the home page of the theme application, or slides the screen to the "service card", the electronic device may control the theme application to jump to the card style interface, and at least the card style corresponding to the second application and the "download" button corresponding to each card style may be displayed in the card style interface. For example, as shown in (c) in fig. 4, a "download" button 4012 corresponding to the A1 card style 4011 and the A1 card style 4011 corresponding to the AA application, a "download" button 4014 corresponding to the A2 card style 4013 and the A2 card style 4013 corresponding to the AA application, a "download" button 4022 corresponding to the B1 card style 4021 and the B1 card style 4021 corresponding to the BB application, a "download" button 4024 corresponding to the B2 card style 4023 and the B2 card style 4023, a "download" button 4026 corresponding to the B3 card style 4025 and the B3 card style 4025, and so on may be displayed in the card style interface. The download button corresponding to the card style is used for downloading the card style to the local of the mobile phone.
The user can find the first card style corresponding to the second application in the card style interface, and download the first card style. It should be appreciated that the first card style corresponding to the second application is one of the card styles corresponding to the second application. For example, when the second application is an AA application and the first card style desired by the user is the A2 card style 4013, as shown in (c) of fig. 4, the user may touch the "download" button 4014 corresponding to the A2 card style 4013 to download the A2 card style. When the mobile phone detects that the "download" button 4014 corresponding to the A2 card style 4013 is touched, the A2 card style can be downloaded to the mobile phone locally in the theme application.
As shown in (d) of fig. 4, after the downloading of the A2 card style 4013 is completed, that is, after the mobile phone downloads the A2 card style 4013 to the mobile phone, the card style interface may display an "add" button 4015 corresponding to the A2 card style 4013, for example, the "download" button 4014 corresponding to the A2 card style may be switched to the "add" button 4015. The "add" button 4015 corresponding to the A2 card style is used for adding the target service card corresponding to the AA application to the desktop of the mobile phone according to the A2 card style 4013. That is, when the user wants to add the corresponding target service card to the desktop of the mobile phone for the AA application according to the downloaded A2 card style 4013, the user can touch the "add" button 4015 corresponding to the A2 card style 4013 in the card style interface. When the mobile phone detects that the "add" button 4015 corresponding to the A2 card style 4013 is touched, first card content corresponding to the AA application (i.e. data required to be displayed in the target service card in the second application) can be acquired according to the A2 card style 4013, a target service card corresponding to the AA application can be generated according to the A2 card style 4013 and the first card content corresponding to the AA application, and the generated target service card corresponding to the AA application can be added to the desktop of the mobile phone.
Or, a "view" button corresponding to the download style may be displayed in the card style interface of the theme application. After completing the downloading of the A2 card style 4013, when the user wants to add a corresponding target service card to the desktop of the mobile phone for the AA application according to the downloaded A2 card style 4013, the user can touch a "view" button corresponding to the downloaded style. When the mobile phone detects that the 'view' button corresponding to the download style is touched, the mobile phone can control the theme application to jump to the downloaded interface corresponding to the service card. The downloaded interface corresponding to the service card may display each first card style downloaded to the local mobile phone and an "add" button corresponding to each first card style, for example, an "add" button corresponding to the A2 card style 4013 may be displayed. The user may touch the "add" button corresponding to the A2 card style 4013 in the downloaded interface corresponding to the service card to add the target service card corresponding to the AA application to the desktop of the mobile phone. Namely, when detecting that the "add" button corresponding to the A2 card style 4013 in the downloaded interface is touched, the mobile phone can acquire the first card content corresponding to the AA application according to the A2 card style 4013, and can generate the target service card corresponding to the AA application according to the A2 card style 4013 and the first card content corresponding to the AA application, and add the generated target service card corresponding to the AA application to the desktop of the mobile phone.
In another example, when the mobile phone displays the home page of the theme application shown in (b) of fig. 4, when the menu item corresponding to the "service card" is triggered, for example, in the home page of the theme application, when the user clicks the menu item corresponding to the "service card" or slides to the left to the menu item corresponding to the "service card", as shown in (a) of fig. 5, the mobile phone may display the application interface in the display interface, and only the identification information of one or more applications may be displayed in the application interface. The identification information of the application may be identification information such as an icon and/or a name of the application, or may be other identification information. The user may touch the identification information of an application (i.e., the second application) to view one or more card styles corresponding to the second application, and download the first card style. For example, an icon and name of an AA application, an icon and name of a BB application, an icon and name of a CC application, an icon and name of a DD application, an icon and name of an EE application, an icon and name of an FF application, an icon and name of a GG application, an icon and name of an HH application, and the like may be displayed in the application interface.
When the user wants to download a first card style corresponding to a second application (e.g., AA application), the user may touch an icon or name of the AA application, etc. As shown in fig. 5 (b), when the mobile phone detects a touch operation on an icon or a name of an AA application, the mobile phone may control the theme application to jump to a card style interface of the AA application, and at this time, the card style interface of the AA application may display a card style corresponding to the AA application and a "download" button corresponding to each card style. For example, the AA application's card style interface may have displayed therein a "download" button 5012 corresponding to the A1 card style 5011 and the A1 card style 5011, a "download" button 5014 corresponding to the A2 card style 5013 and the A2 card style 5013, and a "download" button 5016 corresponding to the A3 card style 5015 and the A3 card style 5015, and so on.
When the user wants to download the first card style corresponding to the AA application, the user can touch a download button in a card style interface of the AA application to download the first card style. For example, when the first card style that the user wants to download is the A1 card style 5011, the user may touch the "download" button 5012 corresponding to the A1 card style 5011. Upon detecting that the "download" button 5012 corresponding to the A1 card style 5011 is touched, the phone can download the A1 card style 5011 to the phone locally. Subsequently, the mobile phone may add the target service card corresponding to the AA application to the desktop of the mobile phone according to the manner described in fig. 4. For example, as shown in (c) of fig. 5, after the downloading of the A1 card style 5011 is completed, that is, after the mobile phone downloads the A1 card style 5011 to the mobile phone locally, the card style interface of the AA application may display an "add" button 5017 corresponding to the A1 card style 5011, for example, the "download" button 5012 corresponding to the A1 card style may be switched to the "add" button 5017. When the user wants to add the corresponding target service card to the desktop of the mobile phone for the AA application according to the downloaded A1 card style 5011, the user can touch an "add" button 5017 corresponding to the A1 card style 5011 in the card style interface of the AA application. When the mobile phone detects that the "add" button 5017 corresponding to the A1 card style 5011 is touched, the mobile phone can acquire first card content corresponding to the AA application according to the A1 card style 5011, and can generate a target service card corresponding to the AA application according to the A1 card style 5011 and the first card content corresponding to the AA application, and add the generated target service card corresponding to the AA application to the desktop of the mobile phone.
As shown in (a) of fig. 5, a search box 502 may be provided in the card style interface, and a user may search for a second application that wants to add a target service card to the desktop of the mobile phone through the search box 502 in the card style interface. For example, when the user wants to add the target service card corresponding to the AA application to the desktop of the mobile phone, the user may input identification information such as the name and/or number of the AA application in the search box 502 of the card style interface. When the electronic device detects the identification information such as the name and/or the number input in the search box 502, one or more card styles corresponding to the AA application may be searched, and one or more card styles corresponding to the searched AA application may be displayed. Therefore, the user can select a first card style corresponding to the target service card which the user wants to add for the AA application from the displayed card styles.
As shown in (b) in fig. 5, a search box 502 may also be provided in a card style interface corresponding to each application, so that a user may search for a first card style that is desired to be added through the search box 502 in the card style interface corresponding to each application, and may download the searched first card style and add a target service card, so as to improve the determination speed of the first card style through the search box 502 and improve the user experience.
It should be noted that, in the embodiments of the present application, names of application interfaces, card style interfaces, etc. are only exemplary to be interpreted, and should not be construed as limiting the embodiments of the present application. In the embodiment of the application, a technician can determine a specific name according to an actual scene.
In another possible implementation manner, when the user wants to add the target service card for the second application to the desktop of the electronic device, the user may open the theme application, and may find the first card style corresponding to the second application that the user wants to add in the theme application, and perform an adding operation to add the target service card corresponding to the second application to the desktop of the electronic device. Namely, when the electronic device detects the adding operation of the first card style, the electronic device can download the first card style corresponding to the second application in the theme application, and can directly add the target service card corresponding to the second application to the desktop of the electronic device according to the first card style corresponding to the second application.
Alternatively, the adding operation may be a touch operation on an "add" button corresponding to the first card style, that is, the card style corresponding to each application and the "add" button corresponding to each card style may be displayed in the card style interface of the theme application. When the electronic device detects that the 'add' button corresponding to the first card style is touched, the electronic device can determine that the user wants to add the target service card corresponding to the second application to the desktop according to the first card style, at this time, the electronic device can download the first card style in the theme application, can directly obtain the first card content corresponding to the second application according to the first card style, can generate the target service card corresponding to the second application according to the first card style and the first card content corresponding to the second application, and can add the generated target service card to the desktop of the electronic device.
Referring to fig. 6, fig. 6 shows a second application scenario schematic diagram provided in the embodiment of the present application. The application scenario is exemplified by an electronic device as a mobile phone.
As shown in fig. 4 (a) and fig. 4 (b), the electronic device may control the theme application to jump to the card style interface corresponding to the service card based on the detected related operation.
In one example, as shown in fig. 6 (a), one or more application-specific card styles may be displayed in the card style interface, with an "add" button corresponding to each card style. For example, an "add" button 6012 corresponding to the AA application corresponding to the A1 card style 6011 and the A1 card style 6011, an "add" button 6014 corresponding to the AA application corresponding to the A2 card style 6013 and the A2 card style 6013, an "add" button 6022 corresponding to the BB application corresponding to the B1 card style 6021 and the B1 card style 6021, an "add" button 6024 corresponding to the BB application corresponding to the B2 card style 6023 and the B2 card style 6023, an "add" button 6026 corresponding to the BB application corresponding to the B3 card style 6025 and the B3 card style 6025, and the like may be displayed in the card style interface. The adding button corresponding to the card style is used for adding the target service card to the desktop of the mobile phone according to the card style.
The user can find the first card style corresponding to the second application in the card style interface, and can add the target service card of the first card style to the desktop of the mobile phone for the second application. For example, when the second application is an AA application and the first card style desired by the user is the A2 card style 6013, the user may touch the "add" button 6014 corresponding to the A2 card style 6013. When the mobile phone detects that the "add" button 6014 corresponding to the A2 card style 6013 is touched, the A2 card style can be downloaded to the mobile phone locally, and the first card content corresponding to the AA application can be directly obtained according to the A2 card style 6013. Then, the mobile phone can generate a target service card corresponding to the AA application according to the A2 card style 6013 and the first card content corresponding to the AA application, and add the generated target service card to the desktop of the mobile phone.
In another example, as shown in (b) of fig. 6, the electronic device may control the theme application to jump to an application interface corresponding to the service card based on the detected related operation, and the application interface may display identification information of one or more applications. The user may touch the identification information of the application to view one or more card styles corresponding to the application. For example, an icon and name of an AA application, an icon and name of a BB application, an icon and name of a CC application, an icon and name of a DD application, an icon and name of an EE application, an icon and name of an FF application, an icon and name of a GG application, an icon and name of an HH application, and the like may be displayed in the application interface.
When the user wants to add the target service card corresponding to the second application (for example, BB application) to the desktop of the mobile phone, as shown in (b) of fig. 6, the user may touch an icon or name of the BB application in the application interface. When the mobile phone detects touch operation on the icon or the name of the BB application, the theme application can be controlled to jump to the card style interface of the BB application, namely the card style interface of the BB application can be displayed in the display interface of the mobile phone. As shown in (c) of fig. 6, one or more card styles corresponding to the BB application and an "add" button corresponding to each card style may be displayed in the card style interface of the BB application. For example, there may be displayed an "add" button 6022 corresponding to the B1 card style 6021 and the B1 card style 6021 corresponding to the BB application, an "add" button 6024 corresponding to the B2 card style 6023 and the B2 card style 6023 corresponding to the BB application, an "add" button 6026 corresponding to the B3 card style 6025 and the B3 card style 6025, and the like.
The user can find the first card style desired by the user in the card style interface of the BB application, and can add the target service card of the first card style to the desktop of the mobile phone for the BB application. For example, when the first card style corresponding to the BB application desired by the user is the B2 card style 6023, as shown in (c) of fig. 6, the user may touch the "add" button 6024 corresponding to the B2 card style 6023 in the card style interface of the BB application. When the mobile phone detects that the "add" button 6024 corresponding to the B2 card style 6023 is touched, the B2 card style 6023 may be downloaded, and the first card content corresponding to the BB application may be acquired according to the B2 card style 6023. Then, the mobile phone can generate a target service card corresponding to the BB application according to the B2 card style 6023 and the first card content corresponding to the BB application, and add the generated target service card to the desktop of the mobile phone.
As shown in fig. 6 (a) and fig. 6 (b), a search box 602 may be further disposed in the card style interface or the application interface, so that a user may search for an application that wants to add a target service card to the desktop of the mobile phone through the search box 602, or search for a desired first card style, that is, the determination speed of the first card style may be effectively improved through the search box 602, thereby improving user experience. For example, when the user wants to add the target service card corresponding to the BB application to the desktop of the mobile phone, the user may input identification information such as the name and/or number of the BB application in the search box 602 of the application interface. When the electronic device detects the identification information such as the name and/or the number of the BB application input in the search box 602 of the application interface, one or more card styles corresponding to the BB application may be searched, and the one or more card styles corresponding to the searched BB application may be displayed. Thus, the user can select a first card style of the target service card that he wants to add for the BB application from the displayed card styles.
As shown in (c) in fig. 6, a search box 602 may also be disposed in a card style interface corresponding to each application, so that a user may search for a desired first card style through the search box 602 of the card style interface corresponding to each application, and may add a target service card to the desktop of the mobile phone according to the searched first card style, that is, the determination speed of the first card style may be effectively improved through the search box 602, thereby improving user experience.
The process of determining the card style corresponding to the application and the process of adding the target service card corresponding to the second application to the desktop of the electronic device according to the first card style corresponding to the second application will be described in detail below taking the first application providing the download of the card style and the addition of the service card as an example of the theme application. It should be appreciated that when the first application providing the card style download and service card addition is a separate card application, the determining process of the application corresponding to the card style and the process of adding the target service card corresponding to the second application to the desktop of the electronic device according to the first card style corresponding to the second application may refer to the relevant description when the first application providing the card style download and service card addition is the subject application.
In the embodiment of the application, for each application, the card style corresponding to the application can be designed by a developer (such as an ecological designer). Optionally, a developer may design one or more service cards corresponding to a certain application, that is, for each service card, one or more of the shape, size, background, content layout, font size, and the like of the service card may be custom designed, and then the designed service card may be converted into a web-like development paradigm resource that may be resolved by an availability cross-platform execution environment (availability-platform environment, ace), and the web-like development paradigm resource obtained by conversion may be placed in a market of the subject application, for example, uploaded to a server corresponding to the subject application. Among other things, the web-like development paradigm resource primarily describes a card style of a service card, i.e., one or more of a shape, a size, a background, a content layout, a font, and a font size of the service card. Therefore, for each service card, the ace can generate a visual card style corresponding to the service card according to the web-like development paradigm resource, and the generated card style can be displayed in the theme application for the user to select downloading. That is, for each application, the developer can self-define and design the card style of the service card corresponding to the application, and can convert the designed card style into the code which can be loaded and analyzed by the ace and upload the code to the theme application, so that the theme application can load and display the card style of the service card corresponding to each application by the ace.
It should be noted that, the embodiment of the application does not limit the specific manner of converting the service card into the web-like development paradigm resource that can be resolved by the ace, and can be determined by a developer according to actual needs. For example, the theme application may be configured with a theme tool that performs the transformation, so when a developer designs a service card corresponding to the application, the service card may be transformed into web-like development paradigm resources that can be parsed by the theme tool.
Illustratively, the web-like development paradigm resource mainly includes hml template files of hml ending, css style files of css ending, json files of json ending, and the like.
An hml template file at the end of hml describes the layout structure of the current page in the service card and the corresponding events that configure interactions with the user. For example, the layout structure of the current page in the service card corresponding to the weather application and the click (i.e., onclick) event of the user in the current page are described in the hml template file described below. The values of { property } and { temperature } are parameter fields generated by default according to the selected service card, and the values of { property } and { temperature } can be default values configured in json files or real data required to be displayed by the service card.
css style files, ending css, describing the style of content displayed in the service card, may be used to modify the background (e.g., background color and/or background image, etc.), shape, size, font size, etc. of the service card. For example, the following css style file describes the style of content displayed in a service card corresponding to a weather application:
json file at json end, processing page logic of service cards, and interacting with users. For example, the json file below describes page logic of a service card corresponding to a weather application and interactions with a user. Wherein, default values of parameters (namely { city } and { temperature } in the hml template file) are configured in the data, and the content in the action represents a corresponding event interacted with the click of the user.
When the electronic device determines that the first card content required to be displayed by the target service card does not exist in the second application when the target service card corresponding to the second application needs to be generated, the electronic device may acquire default card content (i.e., default values of parameters (such as { city } and { temperature } in the hml template file configured in the data) from the json file according to information required to be displayed by the target service card, and may determine the default card content as the first card content to generate the target service card corresponding to the second application.
Alternatively, a developer who designs a card style corresponding to an application may be a provider of the application, or may be another developer. In other words, in the embodiment of the application, the capability of developing the service card can be packaged and opened to a wide ecological designer, so that the ecological designer can design the card style of each service card corresponding to each application, and can convert the designed card style into a code which can be loaded and analyzed by ace and then upload the code to a server corresponding to the theme application, thereby enabling the theme application to display the card style in the theme application after the theme application can analyze the card style by ace for users to select, download and add. That is, according to the embodiment of the application, the development design of the service card and the development design of the application are independent, so that the card style corresponding to the application can be designed by developers other than the provider of the application, thereby enabling the provider of the application to dispense with the development and design of the service card, greatly reducing the development workload of the provider of the application, and effectively increasing the variety of the card style corresponding to the application, thereby providing more card styles for users to select, and meeting the demands of the users.
In this embodiment of the present application, the first card style corresponding to the second application and the first card content corresponding to the second application (i.e. the data to be displayed in the target service card) may be independent from each other. For example, the first card style corresponding to the second application may be provided by the theme application, that is, the electronic device may obtain the first card style corresponding to the second application in the theme application. And the first card content corresponding to the second application may be provided by the second application, that is, the electronic device may obtain the first card content corresponding to the second application from the second application.
It should be appreciated that the second application may be communicatively coupled to the subject application. Therefore, when the target service card corresponding to the second application needs to be generated, the electronic device can acquire the first card content corresponding to the second application from the second application through the theme application, and can generate the target service card corresponding to the second application according to the first card style corresponding to the second application and the first card content acquired from the second application.
For example, referring to fig. 7, fig. 7 shows a frame diagram of an electronic device to which the method for adding a service card according to the embodiment of the present application is applicable.
As shown in fig. 7, the electronic device may include a desktop, a card management service, and a theme application. The desktop is a host interface for displaying the target service cards, can control the display of the target service cards on the desktop, and can be provided with the functions of adding, deleting and updating the target service cards displayed in the desktop. The card management service is a proxy service for managing the target service card added to the desktop, and mainly manages the cache, the life cycle and the user of the target service card, and manages remote procedure call (remote procedure call, RPC) communication between the desktop where the target service card is located and the provider. The theme application serves as a provider of the target service card and provides content corresponding to the target service card, for example, the provided content can include a layout style of the target service card (such as a first card style corresponding to the target service card, namely, web development paradigm-like resources), data required to be displayed by the target service card, and the like.
The data (i.e., the first card content corresponding to the second application) required to be displayed by the target service card may be acquired from the second application by the theme application. For example, the subject application may obtain data from the second application that is to be displayed by the target service card based on the hml template file in the first card style. Optionally, after the theme application obtains the data required to be displayed by the target service card from the second application, the data may be encapsulated in FormBindingData. For example, when the second application is a weather application, that is, when adding the target service card to the desktop for the weather application, the theme application may obtain, from the weather application, data (including, for example, a location and a specific temperature) required to be displayed by the target service card corresponding to the weather application, where the location is assumed to be AAAA, and the temperature is 29 °. The subject application may then encapsulate the data corresponding to the weather application (i.e., location: AAAA, temperature: 29 ℃) in FormBindingData as follows:
ZSONObject data=new ZSONObject();
data.put(“city”,“AAAA”);
data.put(“temperrature”,“29°”);
FormBindingData bindingData=new FormBindingData(data);
Optionally, the card management service may include a dynamic card information management module, a card cache management module, a card lifecycle management module, a card user object management module, and a communication adaptation layer. The theme application may include a card provider instance management module and a communications adaptation layer. The desktop application may include a communication adaptation layer.
The dynamic card information management module is mainly used for managing dynamic data information of the target service card, for example, the dynamic card information management module can be used for managing data (namely, formBindingData) required to be displayed by the target service card, paths of web-like development paradigm resources and the like.
The card cache management module is mainly used for managing the cache of the related information of the target service card, for example, can be used for managing the cache of the related information such as the package name (pushname), the module name (modulenname), the card class name (abilityName), the card name (formName), the card size (dimension), the Identity (ID) of the target service card, the refresh period and the like corresponding to the target service card. It should be appreciated that the card ID is a unique identification of the target service card and may be a long type of data, such as 50729505840214114.
The card life cycle management module is mainly used for managing the life cycle of the target service card, for example, callback triggers and the like which can be used for managing the addition, deletion and update of the target service card.
The card user object management module is mainly used for managing a host interface of the target service card.
And the card provider instance management module is used for managing operations such as data inquiry of the card provider.
And the communication adaptation layer is used for managing IPC communication management among processes and is used for message interaction among the processes.
The following will exemplarily describe adding a target service card to a desktop of an electronic device according to an embodiment of the present application with reference to fig. 7. Referring to fig. 8, fig. 8 is a schematic flowchart of adding a target service card to a desktop of an electronic device according to an embodiment of the present application.
As shown in fig. 8, when the user needs to download the first card style corresponding to the second application, the user may touch a "download" button corresponding to the first card style corresponding to the second application in the theme application, at this time, the electronic device may detect that the "download" button corresponding to the first card style in the theme application is touched, and the electronic device may download the resource corresponding to the first card style (i.e., the web-like development paradigm resource) to the electronic device locally in the theme application. Then, the theme application in the electronic device may acquire data required for the target service card display from the second application, and may encapsulate the acquired data in FormBindingData. That is, the subject application may send a data acquisition request to the second application, and the second application may return the data to be displayed by the target service card to the subject application according to the data acquisition request.
When a user needs to add a target service card corresponding to a second application to a desktop of the electronic device according to a first card style corresponding to the second application, the user can touch an 'add' button corresponding to the first card style in the theme application, at this time, the electronic device can detect that the 'add' button corresponding to the first card style in the theme application is touched, and the theme application in the electronic device can call an interface for adding the card provided by the card management service to send related contents (such as a path including web-like development paradigm resources, formBindingdata, basic information of the target service card, and the like) of the target service card to be added to the card management service. The basic information of the target service card may include a package name, a module name, a card class name, a card name, and a card size (e.g., a card size of 2×2, 2×4 types) corresponding to the target service card.
After the card management service obtains the related content of the target service card sent by the theme application, the related content of the target service card can be cached, namely, the path of the web development paradigm resource, the FormBindingData, the basic information of the target service card and the like can be cached, and the card ID can be allocated to the target service card. Then, the card management service may send a request to add the target service card to the desktop and send the basic information of the target service card and the card ID to the desktop.
After receiving the request for adding the target service card sent by the card management service, the desktop can call back the interface for adding the target service card of the card management service, send the card ID and the basic information of the target service card to the card management service, and inquire the related content of the target service card. That is, the desktop may invoke the interface for adding the card to send a query request for related content to the card management service, where the query request may carry the card ID and basic information of the target service card.
After receiving the query request of the related content of the target service card sent by the desktop, the card management service can query the related content of the target service card (namely, the path of the web-like development paradigm resource, the formBindingdata and the basic information of the target service card) according to the card ID, and persist the basic information of the target service card. The card management service may then return the path of the web-like development paradigm resource and the FormBindingData to the desktop application.
After the desktop receives the path of the web-like development template resource returned by the card management service and the FormBindingData, the web-like development template resource corresponding to the target service card can be obtained according to the path of the web-like development template resource. The desktop may then generate a target service card from the web-like development paradigm resource and FormBindingData and display the target service card on the desktop of the electronic device. Alternatively, the desktop may send the path and FormBindingData of the web-like development paradigm resource to the ace. The ace can acquire the class web development paradigm resource corresponding to the target service card according to the path of the class web development paradigm resource, and render the target service card according to the class web development paradigm resource and the formBindingData. The ace may then send the rendered target service card to the desktop. The desktop may display the resulting target service card on the desktop of the electronic device.
It can be appreciated that, after adding the target service card corresponding to the second application to the desktop of the electronic device, the theme application can actively update the content of the target service card displayed on the desktop. For example, when the subject application determines that the data displayed by the target service card is updated, the subject application may send the updated data to the card management service. After the card management service obtains the updated data sent by the theme application, an update notification can be sent to the desktop. After receiving the update notification sent by the card management service, the desktop can acquire updated data from the card management service, and can update the content displayed by the target service card according to the updated data.
It should be noted that, the frame structure of the electronic device shown in fig. 7 and the method flow for adding the target service card to the desktop shown in fig. 8 are only exemplary to be interpreted, and should not be construed as limiting the embodiment of the present application, in the embodiment of the present application, a developer may correspondingly modify the frame structure of the electronic device and the method flow for adding the target service card to the desktop according to an actual scenario.
Based on the above embodiments, an exemplary description is given below of a method for adding a service card provided in the embodiments of the present application. The contents of the above embodiments are applicable to the present embodiment. Referring to fig. 9, fig. 9 is a flowchart illustrating a method for adding a service card according to an embodiment of the present disclosure. The method may be applied to the electronic device shown in fig. 2. As shown in fig. 9, the method may include:
S901, displaying a card style interface in a first application in the electronic equipment, wherein at least a first card style corresponding to at least a second application is displayed in the card style interface.
Where the card style refers to a form of the service card when presented in the desktop of the electronic device. The card style may include one or more of shape, size, background (e.g., background color and/or background image, etc.), content layout, font size, etc. The shape refers to a shape that the service card presents when displayed on a display interface of the electronic device, and may be any shape such as a rectangle or a circle. The size refers to the size that the service card presents when displayed in the display interface of the electronic device. The content layout refers to the arrangement of the content displayed in the service card. The fonts refer to the fonts of the text contents displayed in the service card, and can be any fonts such as regular script, song style, bold and the like. The font size refers to the size of the font of the text content displayed in the service card.
Alternatively, the electronic device may display a card style interface of the first application (e.g., the theme application) in a display interface of the electronic device in response to a related operation performed by the user. For example, when a user needs to make an addition of a service card, the user may touch an icon of a theme application in the desktop of the electronic device. At this time, the electronic device may open a home page of the theme application, and a function menu may be displayed in the home page of the theme application, and one or more menu items may be displayed in the function menu, for example, a menu item corresponding to "theme", a menu item corresponding to "wallpaper", a menu item corresponding to "service card", and the like may be displayed. The user may touch the menu item corresponding to the "service card" in the home page or slide to the menu item corresponding to the "service card". When the electronic equipment detects the touch operation or the sliding operation, a card style interface corresponding to the service card can be displayed in the theme application. The card style interface may display identification information of one or more applications, or may display card styles corresponding to one or more applications.
It should be understood that the above description of the acquisition of card styles and the addition of target service cards by the subject application is illustrative only and should not be construed as limiting the embodiments of the present application. In the embodiment of the application, the card style acquisition and the addition of the target service card can also be performed by other applications or independent card applications.
It should be noted that, the specific content of the card style may refer to the related content of the card style described above, and will not be described herein.
S902, responding to a first preset operation of a user, and acquiring first card content provided by a second application according to a first card style provided by the first application, wherein the first card content comprises required information set by the first card style.
It should be noted that, the specific content of the first card content provided by the second application obtained by the electronic device according to the first card style may refer to the foregoing description related to obtaining the first card content corresponding to the second application (i.e. the data required for displaying the target service card) according to the first card style, which is not described herein for brevity.
S903, generating a target service card corresponding to the second application according to the first card style and the first card content, and adding the target service card to a desktop of the electronic device.
The first preset operation may be a touch operation or a long-press operation of an "add" button corresponding to the first card style, and the electronic device may obtain the first card style according to the first preset operation, may directly obtain first card content corresponding to the second application according to the first card style, generate a target service card corresponding to the second application according to the first card style and the first card content corresponding to the second application, and add the target service card to a desktop of the electronic device.
For example, before acquiring the first card content provided by the second application according to the first card style, the electronic device may download and store the first card style corresponding to the second application in response to a second preset operation of the user, for example, may download and store the first card style corresponding to the second application by the first application. Alternatively, the second preset operation may be a touch operation or a long press operation on the first card style, or may be a touch operation or a long press operation on a "download" button corresponding to the first card style. The first preset operation may be an adding operation corresponding to the first card style. That is, the electronic device may obtain a first card style corresponding to the second application in response to a second preset operation on the first card style, after obtaining the first card style corresponding to the second application, the electronic device may obtain, in response to an add operation on the first card style, first card content corresponding to the second application according to the first card style, and may generate, in accordance with the first card style and the first card content corresponding to the second application, a target service card corresponding to the second application, and add the generated target service card to a desktop of the electronic device. That is, after the first card style corresponding to the second application is obtained, when the user wants to add the target service card of the first card style to the desktop of the electronic device for the second application, the user may perform a corresponding adding operation on the first card style, and when the electronic device detects the adding operation, the target service card corresponding to the second application may be added to the desktop of the electronic device according to the first card style.
Alternatively, the adding operation may be a touch operation or a long press operation on the acquired first card style, or the like. That is, after the first card style corresponding to the second application is obtained, the user may touch or press the downloaded first card style for a long time, and when the electronic device detects a touch operation or a long-press operation on the downloaded first card style, the user may determine that the user wants to add the target service card corresponding to the second application to the desktop of the electronic device according to the first card style. At this time, the electronic device may acquire the first card content corresponding to the second application according to the first card style, generate the target service card corresponding to the second application according to the first card style and the first card content corresponding to the second application, and add the generated target service card to the desktop of the electronic device.
Alternatively, the adding operation may be a touch operation or a long-press operation of an "add" button corresponding to the acquired first card style. That is, after the first card style corresponding to the second application is acquired, the "add" button corresponding to the acquired first card style may also be displayed in the theme application. When the user can touch or press the 'adding' button corresponding to the acquired first card style for a long time, and the electronic device detects that the 'adding' button corresponding to the acquired first card style is touched, the user can determine that the user wants to add the target service card corresponding to the second application to the desktop according to the first card style, at this time, the electronic device can acquire the first card content corresponding to the second application according to the first card style, generate the target service card corresponding to the second application according to the first card style and the first card content corresponding to the second application, and add the generated target service card to the desktop of the electronic device.
It should be noted that, the specific content of the electronic device generating the target service card corresponding to the second application and adding the target service card to the desktop of the electronic device according to the first card style and the first card content corresponding to the second application may refer to the related description shown in fig. 8 and will not be described herein.
Optionally, after adding the target service card to the target position in the electronic device, the electronic device may further obtain updated second card content provided by the second application according to the first card style, and update the target service card according to the second card content.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Corresponding to the method for adding the service card in the foregoing embodiment, the embodiment of the present application further provides a device for adding the service card, where each module of the device may correspond to each step of implementing the method for adding the service card.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides an electronic device, which comprises at least one memory, at least one processor and a computer program stored in the at least one memory and capable of running on the at least one processor, wherein the processor executes the computer program to enable the electronic device to realize the steps in any of the method embodiments. The structure of the electronic device may be as shown in fig. 2, for example.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program that, when executed by a computer, causes the computer to implement the steps of any of the various method embodiments described above.
Embodiments of the present application provide a computer program product for causing an electronic device to carry out the steps of any of the various method embodiments described above when the computer program product is run on the electronic device.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable storage medium may include at least: any entity or device capable of carrying computer program code to an apparatus/electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (random access memory, RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer-readable storage media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software 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.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (17)

1. A method for adding a service card, the method being applied to an electronic device, the method comprising:
displaying a card style interface in a first application in the electronic equipment, wherein at least a first card style corresponding to at least a second application is displayed in the card style interface;
Responding to a first preset operation of a user, and acquiring first card content provided by the second application according to the first card style provided by the first application, wherein the first card content comprises required information set by the first card style;
and generating a target service card corresponding to the second application according to the first card style and the first card content, and adding the target service card to a target position in the electronic equipment.
2. The method of claim 1, wherein the first application is a theme application or a card application.
3. The method of claim 1 or 2, wherein the target location is one or more of a desktop, a negative one-screen, and a service center of the electronic device.
4. A method according to any one of claims 1 to 3, wherein the first card style is obtained by the first application from a server in which one or more card styles uploaded by at least one developer are stored.
5. The method of any one of claims 1-4, wherein the first application providing the first card style comprises:
And responding to a second preset operation of the user, and downloading and storing the first card style by the first application.
6. The method of claim 5, wherein the second preset operation is a touch operation or a long press operation of the user on the first card style, or a download button corresponding to the first card style is displayed in the card style interface, and the second preset operation is a touch operation or a long press operation of the user on the download button corresponding to the first card style.
7. The method of claim 5 or 6, wherein after the first application downloads and stores the first card style, an add button corresponding to the first card style is displayed in the card style interface; the first preset operation is a touch operation or a long-press operation of the user on the adding button corresponding to the first card style.
8. The method according to any one of claims 1 to 4, wherein the card style interface directly displays an add button corresponding to the first card style, and the first preset operation is a touch operation or a long press operation of the add button corresponding to the first card style by a user.
9. The method of any one of claims 1 to 8, wherein the first card style includes one or more of a shape, a size, a background, a content layout, a font, and a font size of the target service card when displayed in a target location of the electronic device.
10. The method of any of claims 1 to 9, wherein the obtaining the first card content provided by the second application according to the first card style provided by the first application comprises:
and the first application acquires the first card content provided by the second application from the second application according to the first card style.
11. The method of claim 10, wherein the first card style comprises a template file, a style file, and a json file;
the template file is used for describing the layout structure of the page in the target service card and the event interacted with the user;
the style file is used for describing the style of the content displayed in the target service card;
and the json file is used for processing the page logic of the target service card and interacting with a user.
12. The method of claim 11, wherein the first application obtaining first card content provided by the second application from the second application according to the first card style comprises:
and the first application determines information required to be displayed by the target service card according to the template file corresponding to the first card style, and acquires first card content provided by the second application from the second application according to the information required to be displayed by the target service card.
13. The method according to claim 12, wherein default card content corresponding to the target service card is stored in the json file, and after the first card content provided by the second application is obtained from the second application according to the information required to be displayed by the target service card, the method further includes:
when the fact that the corresponding first card content does not exist in the second application is determined according to the information required to be displayed by the target service card, acquiring the default card content from the json file according to the information required to be displayed by the target service card, and determining the default card content as the first card content.
14. The method of any one of claims 1 to 13, wherein a search box is also displayed in the card style interface, the method further comprising:
responding to first search content in the search box, acquiring a first card style corresponding to the second application, and displaying the first card style in the card style interface, wherein the first search content is used for searching the first card style corresponding to the second application;
or,
and responding to second search content in the search box, acquiring one or more card styles corresponding to the second application, and displaying one or more card styles corresponding to the second application in the card style interface, wherein the second search content is used for searching the card styles corresponding to the second application.
15. The method of any of claims 1-14, wherein after the adding the target service card to a target location in the electronic device, the method further comprises:
and acquiring updated second card content corresponding to the second application according to the first card style, and updating the target service card according to the second card content.
16. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, causes the electronic device to implement the method of adding a service card according to any one of claims 1 to 15.
17. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer, causes the computer to implement the method of adding a service card according to any one of claims 1 to 15.
CN202211118547.2A 2022-09-14 2022-09-14 Method for adding service card, electronic device and computer readable storage medium Pending CN117742846A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211118547.2A CN117742846A (en) 2022-09-14 2022-09-14 Method for adding service card, electronic device and computer readable storage medium
PCT/CN2023/117002 WO2024055875A1 (en) 2022-09-14 2023-09-05 Method for adding service card, and electronic device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211118547.2A CN117742846A (en) 2022-09-14 2022-09-14 Method for adding service card, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117742846A true CN117742846A (en) 2024-03-22

Family

ID=90274215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211118547.2A Pending CN117742846A (en) 2022-09-14 2022-09-14 Method for adding service card, electronic device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN117742846A (en)
WO (1) WO2024055875A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6321244B1 (en) * 1997-12-04 2001-11-20 Siemens Corporate Research, Inc. Style specifications for systematically creating card-based hypermedia manuals
CN106210087A (en) * 2016-07-15 2016-12-07 乐视控股(北京)有限公司 The remote synchronization method and apparatus of application card
CN107391736B (en) * 2017-08-07 2020-11-20 玫瑰视界(北京)网络科技有限公司 Page display method and device
CN113761427A (en) * 2020-06-03 2021-12-07 华为技术有限公司 Method for generating card in self-adaptive mode, terminal device and server
CN113076163A (en) * 2021-04-16 2021-07-06 北京京东拓先科技有限公司 Card rendering method and device
CN115033331A (en) * 2022-06-28 2022-09-09 Oppo广东移动通信有限公司 Card display method and related product

Also Published As

Publication number Publication date
WO2024055875A1 (en) 2024-03-21

Similar Documents

Publication Publication Date Title
CN114911380B (en) Card display method, electronic device, and computer-readable storage medium
CN110597512B (en) Method for displaying user interface and electronic equipment
CN115623115B (en) Method, device, system and storage medium for creating application shortcut across devices
WO2022089207A1 (en) Cross-device application interaction method, electronic device, and server
EP4390690A1 (en) Notification processing method, chip, electronic device, and computer readable storage medium
CN112860445B (en) Method and terminal for sharing data between fast application and native application
WO2023005751A1 (en) Rendering method and electronic device
CN116010076A (en) Application running method and related equipment
CN112835495B (en) Method and device for opening application program and terminal equipment
WO2022121445A1 (en) Widget adding method, apparatus, and computer-readable storage medium
CN116483734B (en) Pile inserting method and system based on compiler and related electronic equipment
CN116136826B (en) Memory access method, chip, electronic device and computer readable storage medium
CN117290004A (en) Component preview method and electronic equipment
CN115734021A (en) Screen recording method, electronic equipment and computer readable storage medium
CN117742846A (en) Method for adding service card, electronic device and computer readable storage medium
CN116743908B (en) Wallpaper display method and related device
CN116204093B (en) Page display method and electronic equipment
CN117270720B (en) Page display method and electronic equipment
CN117724825B (en) Interface display method and electronic equipment
CN117130688B (en) Quick application card loading method, electronic equipment and storage medium
WO2023020339A1 (en) Interface display method and electronic device
CN117707453B (en) Method, equipment and storage medium for reading node information
WO2024099206A1 (en) Graphical interface processing method and apparatus
CN117472604A (en) Task continuing method, electronic equipment, program product and medium
CN116991532A (en) Virtual machine window display method, electronic equipment and system

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