Widget display method, electronic equipment and storage medium

By obtaining and processing factual data, using the inference rule engine to determine the widget display priority, and constructing widget cards to display at a unified entrance, the problem of multiple widgets taking up space is solved and the user experience is improved.

CN118585092APending Publication Date: 2024-09-03NOTHING TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410702610.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the existing technology, the implementation of widgets is based on AOSP unified access, which results in multiple APP applications requiring multiple card display entrances, occupying a large amount of desktop space, and unused widgets will always occupy space, causing inconvenience to users.

Method used

By obtaining factual data, convert it into sentences to be inferred according to the preset semantic format, input them into the inference rule engine, set predefined rules to determine the intended events, determine the target widget business based on the display priority, and build widget cards on a unified card Shown in the display portal.

Benefits of technology

It realizes displaying widgets in the unified card display entrance, saving desktop space, avoiding unnecessary widgets from taking up space, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585092A
    Figure CN118585092A
Patent Text Reader

Abstract

The invention discloses a widget display method, electronic equipment and a storage medium. The widget display method comprises the following steps: acquiring fact data; converting the fact data into a to-be-reasoned statement according to a preset semantic format; inputting the to-be-inferred statement into an inference rule engine to obtain at least one intention event output by the inference rule engine; wherein a plurality of predefined rules for reasoning intentions are set in the reasoning rule engine; determining a target widget service according to the display priority of each intention event; and constructing a widget card based on the target widget service to display in the card display entrance. By utilizing the technical scheme of the invention, the widgets can be displayed in the unified card display entrance by judging the display opportunities of different widgets, so that the desktop space is saved, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the technical field of mobile devices. More specifically, the present application relates to a widget display method, an electronic device and a storage medium. Background Art

[0002] Widgets are common function quick operation controls or status display entrances of mobile phone applications APP. APP supports adding APP-exclusive widgets on the desktop. Widgets provide a way to quickly access application information or perform simple operations without opening the entire application. In the prior art, the implementation of widgets is based on unified access of AOSP (Android Open Source Project, Android Open Source Project). One widget corresponds to one APP application and the widget capability comes from the APP application, and one widget has an exclusive card display entrance on the desktop. If multiple APP applications need to display widgets on the desktop, multiple card display entrances are required, and widgets need to be added one by one for multiple APP applications. In this way, it is easy to cause multiple card display entrances to occupy a large amount of desktop space, and widgets that are not needed will always occupy desktop space, which has certain limitations and brings inconvenience to users.

[0003] In view of this, there is an urgent need to provide a widget display method, so as to display the widgets in a unified card display portal by judging the display timing of different widgets, thereby saving desktop space and improving the user experience. Summary of the invention

[0004] In order to at least solve one or more of the technical problems mentioned above, the present application proposes a widget display method, an electronic device and a storage medium in multiple aspects. The widget display method can display widgets in a unified card display portal by judging the display timing of different widgets, thereby saving desktop space and improving the user experience.

[0005] In a first aspect, the present application provides a widget display method, comprising: obtaining fact data; converting the fact data into a statement to be inferred according to a preset semantic format; inputting the statement to be inferred into an inference rule engine to obtain at least one intention event output by the inference rule engine; wherein a plurality of predefined rules for inferring intentions are set in the inference rule engine; determining a target widget service according to the display priority of each intention event; and constructing a widget card based on the target widget service for display in a card display portal.

[0006] In some embodiments, setting multiple predefined rules for reasoning intent in the inference rule engine includes: setting data fact ontology; setting ontology attributes and attribute value types according to the data fact ontology; setting predefined rules based on the data fact ontology, ontology attributes and attribute value types.

[0007] In some embodiments, converting the fact data into the statement to be inferred according to a preset semantic format includes: converting the fact data into the statement to be inferred according to a triple semantic format.

[0008] In some embodiments, inputting the statement to be inferred into the inference rule engine, and obtaining at least one intention event output by the inference rule engine includes: inputting the statement to be inferred into the fact database of the inference rule engine; in response to data change events in the fact database, matching the statement to be inferred with multiple predefined rules for rule triggering conditions, and determining at least one predefined rule that can meet all the rule triggering conditions; and running at least one predefined rule to trigger the generation of an intention event corresponding to each predefined rule, and obtaining at least one intention event.

[0009] In some embodiments, determining the target widget service according to the display priority of each intent event includes: determining a target intent event with the highest priority according to the display priority of each intent event; and determining the target widget service based on the target intent event.

[0010] In some embodiments, constructing a widget card based on the target widget service to display in the card display portal includes: creating widget card data based on the target widget service; and constructing a widget card based on the widget card data to display in the card display portal.

[0011] In some embodiments, creating widget card data based on the target widget service includes: constructing a card view and view data based on a predetermined interface of the operating system; and serializing the card view and view data to obtain the widget card data.

[0012] In some embodiments, constructing a widget card based on widget card data to display in a card display portal includes: performing a deserialization conversion process on the widget card data to obtain a widget view component; loading the widget view component into a widget card container to form a widget card to display in the card display portal.

[0013] In a second aspect, the present application provides an electronic device, comprising: a processor; and a memory, on which a program code for widget display is stored, and when the program code is executed by the processor, the electronic device implements the method as described above.

[0014] In a third aspect, the present application provides a non-transitory machine-readable storage medium on which a program code for widget display is stored. When the program code is executed by a processor, the method described above can be implemented.

[0015] The technical solution provided by this application may have the following beneficial effects:

[0016] The widget display method, electronic device and storage medium provided by the present application obtain fact data and then convert the fact data into a statement to be inferred according to a preset semantic format, thereby achieving a clear description of the user action. The statement to be inferred is then input into an inference rule engine to obtain at least one intention event output by the inference rule engine, wherein a plurality of predefined rules for inferring intentions are set in the inference rule engine, so that the intention corresponding to the user action can be effectively inferred.

[0017] Furthermore, the present application can determine the target widget service according to the display priority of each intent event, thereby realizing the judgment of the display timing of different widgets. Then, a widget card is constructed based on the target widget service to be displayed in the card display portal. Thus, the widget card can be displayed in a unified card display portal according to the user's intention, avoiding the problem of multiple card display portals occupying a large amount of desktop space, and avoiding the limitation that widgets that are not needed always occupy desktop space.

[0018] In general, the embodiments of the present application can display widgets in a unified card display portal by determining the display timing of different widgets, thereby saving desktop space and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0020] Figure 1 An exemplary flow chart showing a widget display method according to some embodiments of the present application is shown;

[0021] Figure 2 An exemplary flow chart showing a widget display method according to some other embodiments of the present application is shown;

[0022] Figure 3 An exemplary flow chart showing a widget display method according to some further embodiments of the present application is shown;

[0023] Figure 4 A schematic diagram of the structure of an electronic device shown in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. For the simplicity and clarity of the description, the figure marks may be repeated in the drawings to indicate corresponding or similar elements when deemed appropriate. In addition, the present application sets forth many specific details in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein may be practiced without these specific details. In other cases, well-known methods, processes, and components are not described in detail to avoid blurring the embodiments described herein. Moreover, the description should not be regarded as limiting the scope of the embodiments described herein. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0025] It should be understood that the possible terms "first" or "second" etc. in the claims, specifications and drawings disclosed in this application are used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of this application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0026] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this application specification and claims, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms. It should also be further understood that the term "and / or" used in this application specification and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0027] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0028] In the prior art, the implementation of widgets is based on unified access of AOSP (Android Open Source Project), one widget corresponds to one APP application and the widget capability comes from the APP application, and one widget has a card display entrance on the desktop. If multiple APP applications need to display widgets on the desktop, multiple card display entrances are required, and widgets need to be added one by one for multiple APP applications. This easily causes multiple card display entrances to occupy a large amount of desktop space, and widgets that are not needed will always occupy desktop space, which has certain limitations and brings inconvenience to users.

[0029] In view of this, there is an urgent need to provide a widget display method, so as to display the widgets in a unified card display portal by judging the display timing of different widgets, thereby saving desktop space and improving the user experience.

[0030] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.

[0031] In step S101, fact data is obtained. In an embodiment of the present application, the aforementioned fact data may include but is not limited to three types of data, wherein the first type of data is private data of the widget service. Taking the music player widget data as an example, the music player widget data may include but is not limited to the data of the action command of opening the music APP, the music playing status data, etc. This type of data is usually generated by the user and can be written into the inference rule engine through the exposure interface of the inference rule engine. The second type of data is device status data, such as time data, screen status data, Bluetooth start and stop data, WiFi start and stop data, and device power data, etc. This type of data is device system data, which can be written into the inference rule engine after monitoring and acquiring the device status through the device system interface. The third type of data is user habit data, such as user permanent location positioning data, user working time data, and the time interval of the user taking transportation, etc. To obtain the third type of data, it is necessary to collect the user's daily data and make a comprehensive judgment based on the user's daily data to obtain the training result. For example, the user's working time training can be calculated by the average time of the user going out every morning in the past half month, and the specific algorithm of the time of going out can be identified according to whether the user's mobile phone is in motion. For example, the ability to recommend users to listen to music can be inferred from the big data of users' recent daily actions of opening music apps to play music, the time period when users often listen to music, and the apps they use to listen to music, thereby inferring and predicting whether music can be recommended to users at the corresponding time.

[0032] In step S102, the fact data is converted into statements to be inferred according to a preset semantic format. In an embodiment of the present application, a third-party open source reasoning engine library can be accessed, such as Jena and EasyRule that support the Java language. Taking the Jena reasoning engine as an example, the Jena reasoning engine provides rich reasoning functions, supports rule-based reasoning, RDFS (Resource Description Framework) data reasoning, OWL (Web Ontology Language, a semantic web standard for establishing ontologies and describing knowledge) reasoning, etc., and provides the ability to expand and customize rules. The data fact ontology in the Jena reasoning engine is defined and saved in the subject-predicate-object triple semantic format. For example, the music player widget is playing music, which is expressed by a triple: MediaPlayerhasState playing. The OWL semantic format of the defined rule can be expressed as:

[0033] <rdf:typerdf:resource='ontology:MeidaPlayer' / >

[0034] <ontology:hasstate> playing< / ontology:hasstate>

[0035]

[0036] In other words, if the Jena reasoning engine is used as the reasoning rule engine, the preset semantic format can be determined as the subject-predicate-object triple semantic format, and the fact data needs to be converted into the sentence to be reasoned according to the subject-predicate-object triple semantic format.

[0037] In step S103, the statement to be inferred is input into the inference rule engine to obtain at least one intention event output by the inference rule engine. In the embodiment of the present application, it is necessary to set multiple predefined rules for inferring intentions in the inference rule engine. The aforementioned predefined rules are built-in rules prefabricated in advance depending on specific demand scenarios, and the predefined rules can be continuously added and updated as the device is used over time, so as to meet more demand scenarios.

[0038] Furthermore, after the reasoning statement is input into the reasoning rule engine, it can be conditionally matched with the predefined rules to trigger reasoning, and at least one intention event is generated after reasoning.

[0039] In step S104, the target widget service is determined according to the display priority of each intent event. In the embodiment of the present application, different display priorities can be defined for different intent events, and high-priority intent events take precedence over low-priority intent events, and intent events of the same priority can replace each other. Then, based on the determined high-priority intent event, a high-priority widget service, i.e., the target widget service, is triggered.

[0040] In step S105, a widget card is constructed based on the target widget service to be displayed in the card display portal. In the embodiment of the present application, there is only one card display portal to display the widget card, and the card display portal can be managed so that different widgets can be displayed in the same card display portal, and the display timing of different widget cards can be determined, thereby avoiding the limitation that unnecessary widget cards always occupy desktop space, and also avoiding the problem that multiple card display portals occupy a large amount of desktop space.

[0041] The present application obtains fact data and then converts the fact data into a statement to be inferred according to a preset semantic format, thereby achieving a clear description of the user's action. Then, the statement to be inferred is input into the inference rule engine to obtain at least one intention event output by the inference rule engine, wherein a plurality of predefined rules for inferring intentions are set in the inference rule engine, so that the intention corresponding to the user's action can be effectively inferred. Further, the present application can determine the target widget service according to the display priority of each intention event, thereby realizing the judgment of the display timing of different widgets. Then, a widget card is constructed based on the target widget service to be displayed in the card display entrance. Thus, the widget card can be displayed in a unified card display entrance according to the user's intention, avoiding the problem of multiple card display entrances occupying a large amount of desktop space, and avoiding the limitation that widgets that are not needed always occupy desktop space. In general, the embodiment of the present application can display widgets in a unified card display entrance by judging the display timing of different widgets, thereby saving desktop space and improving the user's experience.

[0042] In some embodiments, the Jena inference engine can be used to determine the target widget service. Figure 2 The process of determining the target widget service is described in detail. Figure 2 An exemplary flowchart showing a widget display method in some other embodiments of the present application is shown in FIG. Figure 2 , the widget display method shown in the embodiment of the present application may include:

[0043] In step S201, the fact data is converted into a sentence to be inferred according to the triple semantic format. The aforementioned triple semantic format is the subject-verb-object triple semantic format. For example, if the music player widget is playing music, it is represented by a triple: MediaPlayerhasState playing.

[0044] In step S202, the statement to be inferred is input into the inference rule engine to obtain at least one intention event output by the inference rule engine. In an embodiment of the present application, the setting process of the predefined rules can be specifically as follows: first, the data fact ontology can be set, and then the ontology attributes and attribute value types can be set according to the data fact ontology, and then the predefined rules can be set based on the data fact ontology (equivalent to the subject), ontology attributes (equivalent to the predicate) and attribute value types (the specific attribute value corresponding to the attribute value type is equivalent to the object). Exemplarily, for example, in the scenario where the music player is opened to trigger the display of the MediaPlayer widget, according to the OWl syntax, the data ontology and rules are defined as follows: the music player ontology (the current data fact ontology) is Mediaplayer, the music player attributes (the current ontology attributes) are appName, hasState and isConntected, the attribute value type corresponding to appName is String, the attribute value type corresponding to hasState is State, and the attribute value type corresponding to isConntected is Bool. The specific attribute values ​​corresponding to the attribute value type can be predefined. Exemplarily, for example, in the scenario where the XXX music player is opened to trigger the display of the MediaPlayer widget, the predefined rules can be set as follows:

[0045] [meidaplayer-rule:

[0046] / / Start playing the music player

[0047] (?MediaPlayer:appName'XXX music')(?MediaPlayer:hasState?PlayingState)

[0048] (?MediaPlayer:isConnected?'true')

[0049] ->publishIntent("intent.widget.SHOW_MEIDPLAYER",?playing)

[0050] / / Rule triggering, sending out the intent event to display the MeidaPlayer widget ]

[0052] Furthermore, the statement to be inferred is input into the fact database of the inference rule engine, and then in response to the data change event of the fact database, the statement to be inferred is matched with the rule trigger conditions of multiple predefined rules respectively, and at least one predefined rule that can meet the rule trigger conditions is determined, and then at least one predefined rule is respectively run to trigger the generation of the intent event corresponding to each predefined rule, and at least one intent event is obtained. Taking the above-mentioned opening XXX music player to trigger the display of MediaPlayer widget scene as an example for further explanation, when the content described by the statement to be inferred satisfies that the music player body is XXX music player, and XXX music player is playing, and XXX music player is in a connected state, the above-mentioned opening XXX music player to trigger the display of MediaPlayer widget scene is triggered to run the predefined rule corresponding to the operation, triggering the display of MeidaPlayer widget intent event "intent.widget.SHOW_MEIDPLAYER".

[0053] It is understandable that different data fact ontologies can be matched with different ontology attributes and attribute value types. For example, in the scenario where the battery status widget needs to be displayed in the card display entrance when the device is connected to a new Bluetooth device, the data fact ontology is phone, the ontology attributes are connectedBTCount and lastConnectedBTCount, the attribute value type corresponding to connectedBTCount is Int, and the attribute value type corresponding to lastConnectedBTCount is Int, then the predefined rules in this scenario can be set as:

[0054] [battery-rule:

[0055] (?phone:connectedBTCount?count)(?phone:lastConnectedBTCount?lastCount)

[0056] greaterThan(?count,?lastCount)

[0057] ->publishIntent("intent.widget.SHOW_BATTERY",?count)

[0058] / / Rule trigger, send out intent event to display battery status widget ]

[0060] For example, in a scenario where a calendar widget needs to be displayed in the card display portal when the date is a birthday or holiday, the data fact ontology is Calendar and DateEvent, the ontology attribute corresponding to Calendar is hasEvent, the attribute value type corresponding to hasEvent is DateEvent, and the ontology attributes corresponding to DateEvent are name, isSpecial, and time, the attribute value type corresponding to name is String, the attribute value type corresponding to isSpecial is Bool, and the attribute value type corresponding to time is String. The predefined rules in this scenario can be set as follows:

[0061] [Date-rule:

[0062] (?Date:hasEvent?dateEvent)(?dateEvent:isSpecial'true')

[0063] ->publishIntent("intent.widget.SHOW_Date",?name)

[0064] / / Rule triggering, sending an intent event to display the calendar widget ]

[0066] In practical applications, different ontology attributes and attribute value types need to be matched according to the data fact ontology based on the actual application situation. This application does not impose any restrictions in this regard.

[0067] In step S203, the target intent event with the highest priority is determined according to the display priority of each intent event. In the embodiment of the present application, the display priority granularity of each intent event can be defined as: the intent of displaying the screen duration widget is 1, the intent of displaying the battery status widget is 2, the intent of displaying the pedometer widget is 3, the intent of displaying the music player widget is 4, and the intent of displaying the compass widget is 5. It can be understood that the display priority granularity of each intent event can be set in various ways. In actual applications, the display priority granularity of each intent event needs to be set according to the actual application situation, and the present application does not impose any restrictions in this regard.

[0068] In step S204, the target widget service is determined based on the target intent event. The target widget service is mapped through the target intent event, so as to clarify the widget to be displayed, thereby realizing the judgment of the display timing of different widgets.

[0069] In some embodiments, the process of displaying the widget card in the card display portal can be further designed. Figure 3The process of displaying a widget card in a card display portal is described in detail. Figure 3 An exemplary flowchart showing a widget display method according to some other embodiments of the present application is shown. Figure 3 , the widget display method shown in the embodiment of the present application may include:

[0070] In step S301, widget card data is created based on the target widget service. In an embodiment of the present application, the card view view and view data may be first constructed based on the operating system predetermined interface api. The card view and view data may then be serialized, for example, json serialized, to obtain the widget card data (view json data).

[0071] In step S302, a widget card is constructed based on the widget card data to be displayed in the card display portal. In an embodiment of the present application, the widget card data may be subjected to a deserialization conversion process to obtain a widget view component. The widget view component may then be loaded into a widget card container to form a widget card to be displayed in the card display portal. This allows the user to break through the constraints of the AOSP widget framework and implement private customization of the creation, management, and display of widget cards.

[0072] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides an electronic device for executing a widget display method and corresponding embodiments.

[0073] Figure 4 FIG. 4 is a block diagram showing a hardware configuration of an electronic device 400 that can implement the widget display method of an embodiment of the present application. Figure 4 As shown, the electronic device 400 may include a processor 410 and a memory 420. Figure 4 In the electronic device 400, only the components related to this embodiment are shown. Therefore, it is obvious to those skilled in the art that the electronic device 400 may also include components related to this embodiment. Figure 4 The components shown in the figure are different from the common components. For example: fixed-point arithmetic units.

[0074] The electronic device 400 may correspond to a computing device having various processing functions, for example, a function for generating a neural network, training or learning a neural network, quantizing a floating-point neural network to a fixed-point neural network, or retraining a neural network. For example, the electronic device 400 may be implemented as various types of devices, such as a personal computer (PC), a server device, a mobile device, etc.

[0075] The processor 410 controls all functions of the electronic device 400. For example, the processor 410 controls all functions of the electronic device 400 by executing a program stored in the memory 420 on the electronic device 400. The processor 410 may be implemented by a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), an artificial intelligence processor chip (IPU), etc. provided in the electronic device 400. However, the present application is not limited thereto.

[0076] In some embodiments, the processor 410 may include an input / output (I / O) unit 411 and a computing unit 412. The I / O unit 411 may be used to receive various data, such as factual data. Exemplarily, the computing unit 412 may be used to convert the factual data received via the I / O unit 411 into a statement to be inferred according to a preset semantic format; then the statement to be inferred is input into the inference rule engine to obtain at least one intention event output by the inference rule engine; then the target widget service is determined according to the display priority of each intention event; then a widget card is constructed based on the target widget service to be displayed in the card display entrance. This widget card may be output by the I / O unit 411, for example. The output data may be provided to the memory 420 for reading and use by other devices (not shown), or may be directly provided to other devices for use.

[0077] The memory 420 is hardware for storing various data processed in the electronic device 400. For example, the memory 420 can store processed data and data to be processed in the electronic device 400. The memory 420 can store data sets involved in the process of the widget display method that has been processed or to be processed by the processor 410, such as factual data, etc. In addition, the memory 420 can store applications, drivers, etc. to be driven by the electronic device 400. For example: the memory 420 can store various programs related to the widget display method to be executed by the processor 410. The memory 420 can be a DRAM, but the present application is not limited thereto. The memory 420 may include at least one of a volatile memory or a non-volatile memory. The non-volatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a flash memory, a phase change RAM (PRAM), a magnetic RAM (MRAM), a resistive RAM (RRAM), a ferroelectric RAM (FRAM), etc. The volatile memory may include dynamic RAM (DRAM), static RAM (SRAM), synchronous DRAM (SDRAM), PRAM, MRAM, RRAM, ferroelectric RAM (FeRAM), etc. In an embodiment, the memory 420 may include at least one of a hard disk drive (HDD), a solid state drive (SSD), a high-density flash memory (CF), a secure digital (SD) card, a micro secure digital (Micro-SD) card, a mini secure digital (Mini-SD) card, an extreme digital (xD) card, caches, or a memory stick.

[0078] In summary, the specific functions implemented by the memory 420 and the processor 410 of the electronic device 400 provided in the implementation mode of this specification can be explained in comparison with the aforementioned implementation modes in this specification, and can achieve the technical effects of the aforementioned implementation modes, and will not be repeated here.

[0079] In this embodiment, the processor 410 can be implemented in any suitable manner. For example, the processor 410 can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc.

[0080] It should also be understood that any module, unit, component, server, computer, terminal or device that executes instructions exemplified herein may include or otherwise access computer-readable media, such as storage media, computer storage media or data storage devices (removable and / or non-removable) such as disks, optical disks or tapes. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules or other data.

[0081] Although multiple embodiments of the present application have been shown and described herein, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art can think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein can be adopted. The attached claims are intended to limit the scope of protection of the present application, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A widget display method, It is characterized in that include: Get factual data; Converting the fact data into sentences to be inferred according to a preset semantic format; Inputting the statement to be inferred into an inference rule engine to obtain at least one intention event output by the inference rule engine; wherein a plurality of predefined rules for inferring intentions are set in the inference rule engine; Determine the target widget service according to the display priority of each intent event; A widget card is constructed based on the target widget service to be displayed in a card display portal.

2. The widget display method according to claim 1, It is characterized in that The setting of a plurality of predefined rules for reasoning intent in the inference rule engine includes: Set up data fact ontology; Setting ontology attributes and attribute value types according to the data fact ontology; The predefined rules are set based on the data fact ontology, the ontology attributes and the attribute value type.

3. The widget display method according to claim 1, It is characterized in that The converting the fact data into a statement to be inferred according to a preset semantic format comprises: The fact data is converted into the sentence to be inferred according to the triple semantic format.

4. The widget display method according to claim 1, It is characterized in that The step of inputting the statement to be inferred into the inference rule engine to obtain at least one intention event output by the inference rule engine includes: Inputting the statement to be inferred into the fact database of the inference rule engine; In response to a data change event of the fact database, respectively matching the statement to be inferred with a plurality of predefined rules for rule triggering conditions, and determining at least one predefined rule that satisfies all the rule triggering conditions; The at least one predefined rule is respectively executed to trigger generation of an intention event corresponding to each predefined rule, thereby obtaining at least one intention event.

5. The widget display method according to claim 1, It is characterized in that The determining of the target widget service according to the display priority of each intent event includes: Determine the target intent event with the highest priority according to the display priority of each intent event; A target widget service is determined based on the target intent event.

6. The widget display method according to claim 1, It is characterized in that The constructing a widget card based on the target widget service to display it in a card display portal includes: Creating widget card data based on the target widget service; The widget card is constructed based on the widget card data to be displayed in the card display portal.

7. The widget display method according to claim 6, It is characterized in that The creating widget card data based on the target widget service includes: Build card views and view data based on the operating system's predefined interface; The card view and the view data are serialized to obtain the widget card data.

8. The widget display method according to claim 6, It is characterized in that The constructing the widget card based on the widget card data to display it in the card display portal comprises: Performing a deserialization conversion process on the widget card data to obtain a widget view component; The widget view component is loaded into a widget card container to form the widget card for display in the card display portal.

9. An electronic device, It is characterized in that include: processor; as well as A memory having program codes for widget display stored thereon, wherein when the program codes are executed by the processor, the electronic device implements the method according to any one of claims 1 to 8. 10 . A non-transitory machine-readable storage medium having stored thereon a program code for widget display, wherein when the program code is executed by a processor, the method according to claim 1 is implemented.