Method, electronic device, and computer-readable storage medium for intent definition

CN122985173APending Publication Date: 2026-10-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510645734.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-04-27
Filing Date
2025-05-19
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

目前意图的接入需要通过意图配置文件来定义意图,开发者需要做大量的适配工作,来设计意图对应的执行函数,才能让应用接入意图框架,较为复杂

Benefits of technology

[0052]在本申请的第三方面至第六方面的技术方案的有益效果可以参考第一方面的技术方案的有益效果,此处不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985173A_ABST
    Figure CN122985173A_ABST
Patent Text Reader

Abstract

The application provides a method, an electronic device and a computer readable storage medium for defining an intent, and relates to the technical field of terminals. The method comprises the following steps: defining a plurality of intent parameters; defining a first function of an application as a first intent through an encoding field according to the plurality of intent parameters; in a compilation stage, generating an intent configuration file corresponding to the first intent based on the encoding field; wherein the encoding field can modify the behavior of a class and / or a function in the application, and the first function is an existing function in an application program of the electronic device. According to the embodiment of the application, the existing first function in the application program is defined as an intent through the encoding field. Without additionally writing an execution function or a configuration file of the intent, the complexity of accessing the intent framework can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese Patent Application No. 202510538861.3, filed on April 27, 2025, entitled “Intent-Defined Method”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminals, and more specifically to a method for defining intent, an electronic device, and a computer-readable storage medium. Background Technology

[0003] Intent-driven networking technology can address the challenges brought about by network technology evolution, rapid business development, and complex operation and maintenance management. Currently, intent integration requires defining intents through intent configuration files. Developers need to do a lot of adaptation work to design the corresponding execution functions for the intents in order to enable applications to integrate with the intent framework, which is quite complex. Summary of the Invention

[0004] This application provides a method for defining intent, an electronic device, and a computer-readable storage medium, which helps simplify the process of accessing an intent framework. The various aspects covered in this application are described below.

[0005] Firstly, a method for defining intent is provided. This method can be executed by an electronic device, by a module within the electronic device (e.g., a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the functions of the electronic device. The method for defining intent includes:

[0006] Define multiple intent parameters; based on the multiple intent parameters, define the first function of the application as a first intent through an encoding field; during the compilation phase, generate an intent configuration file corresponding to the first intent based on the encoding field; wherein, the encoding field can modify the behavior of the application's classes and / or functions, and the first function is an existing function in the application of the electronic device.

[0007] In this embodiment, the encoding field can modify the behavior of classes and / or functions, defining existing first functions in the application as intents. This eliminates the need to write additional execution functions and / or configuration files for intents, helping to reduce the complexity of integrating with intent frameworks.

[0008] In some possible implementations, the encoded field is a decorator, and defining multiple intent parameters includes: defining the multiple intent parameters through the decorator; defining the first function as the first intent through the encoded field includes: defining the first function as the first intent through the decorator.

[0009] Decorators decouple business logic from intent declaration and execution, resulting in clearer code organization. There's no need to write additional intent execution functions or configuration files.

[0010] In some possible implementations, the decorator is an intent decorator, and defining the plurality of intent parameters through the decorator includes: predefining information of a first parameter set through the intent decorator, wherein the first parameter set is a set of required parameters for the intent definition, and the first parameter set is a subset of the plurality of intent parameters.

[0011] The intent decorator predefines information for multiple parameters used in intent definition, eliminating the need for developers to define additional parameters. This helps standardize intent definition parameters and simplifies the integration process of standard intents.

[0012] In some possible implementations, the method further includes: predefining information of a second parameter set through the intent decorator, the second parameter set being optional parameters for intent definition, the second parameter set being another part of the plurality of intent parameters; the first intent belonging to a first type intent or a second type intent, the first type intent being an intent based on the first parameter set, and the second type intent being an intent based on both the first parameter set and the second parameter set.

[0013] The first type of intent is also called a standard intent, and the second type of intent is also called a custom intent. Intent decorators predefine the required parameters for standard intents and the optional parameters for custom intents. This allows developers to integrate standard intents and define custom intents through intent decorators. Integrating custom intents helps standardize parameter definitions, supports expansion to various scenarios, and meets flexible and diverse business needs.

[0014] In some possible implementations, if the first function is a Link jump, then defining multiple intent parameters through the decorator further includes: defining information of a third parameter set through the intent decorator; the third parameter set is a parameter set that matches the scenario type of the first function, and the third parameter set corresponding to the Link jump includes at least some or all of the parameters in the Uniform Resource Identifier and Parameter Alias ​​Mapping;

[0015] If the first function is to jump to a specified page, then defining multiple intent parameters through the decorator further includes: defining information of the third parameter set through the intent decorator; the third parameter set corresponding to jumping to the specified page includes at least some or all of the parameters in the page component bound to the page, the name of the page route, the identifier of the component navigation page, and the name of the component navigation subpage.

[0016] Configure the parameters of the third parameter set that match the scenario type of the first function. While adapting to the corresponding scenario requirements, it can reduce the number of predefined intent parameters of the intent decorator, that is, reduce the number of predefined parameters of the first and second parameter sets.

[0017] In some possible implementations, the first function is one of a plurality of functions already existing in the application, which includes at least some or all of the following functions: link navigation, navigation to a specified page, execution of a specified function, and card creation.

[0018] In some possible implementations, the method further includes:

[0019] An intent execution entry point is defined by a decorator, and the intent execution entry point is associated with at least one capability component; a second function is defined as a second intent by the intent execution entry point, and the second function is a new function or code added to the application.

[0020] By using the intent execution entry point, existing functions can be defined as intents, and new functions can also be defined as intents, which helps to improve the versatility of intent definitions.

[0021] In some possible implementations, before defining the second function as the second intent through the intent execution entry point, the method further includes: defining an intent entity through an intent decorator; wherein the intent entity is a predefined structured parameter, the intent entity includes parameters of a first parameter set, the first parameter set being mandatory parameters of the intent definition, and the first parameter set being a subset of the plurality of intent parameters.

[0022] By defining intent entities, logic and data can be decoupled, which helps reduce redundant management of key-value pairs of intent parameters.

[0023] In some possible implementations, the intent entity further includes parameters of a second parameter set, which are optional parameters of the intent definition. The second parameter set is another part of the plurality of intent parameters. The second intent belongs to a first type intent or a second type intent. The first type intent is an intent based on the first parameter set, and the second type intent is an intent based on both the first parameter set and the second parameter set.

[0024] It supports custom intent parameter definitions and intent entity definitions, and supports custom intents, which helps to standardize and generalize parameter definitions, and facilitates business switching and expansion.

[0025] In some possible implementations, defining the intent entity via an intent decorator includes defining the parameters of the intent entity based on the intent decorator and the JSON Schema.

[0026] Customizing intent parameter definitions and intent entity definitions through JSON Schema specifications helps to standardize and generalize parameter definitions.

[0027] In some possible implementations, the method further includes:

[0028] During the compilation phase, it is determined whether the second intent has an intent annotation; if an intent annotation exists and the second intent is a first type intent, the information of the first parameter set corresponding to the intent entity is obtained from the software development tool SDK; if an intent annotation exists and the second intent is a second type intent, the information of the first parameter set and the second parameter set corresponding to the second intent is obtained; if the parameters of the second intent match the parameters predefined at the intent execution entry point, the intent configuration file corresponding to the second intent is generated.

[0029] The intention configuration file generated by the annotation is obtained through compilation.

[0030] In some possible implementations, the method is applied to an Integrated Development Environment (IDE). This provides developers with an environment for program development.

[0031] Secondly, a method for intent management is provided. This method can be executed by an electronic device, by a module within the electronic device (e.g., a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the functions of the electronic device. This intent management method includes:

[0032] Obtain the intent execution parameters of the target intent to be executed; parse the target intent through an intent framework; and call the application corresponding to the parsed target intent according to the intent execution parameters; wherein the intent framework is part of the operating system, and the intent framework has registered intents defined according to the method described in the first aspect.

[0033] In this embodiment, intents that define existing functionalities in the application are registered in the intent framework using encoded fields. This eliminates the need to write additional execution functions or configuration files for the intents, thus reducing the complexity of integrating with the intent framework.

[0034] In some possible implementations, the step of parsing the target intent through an intent framework and invoking the application corresponding to the parsed target intent includes:

[0035] The target intent is determined to be a Link jump; when the target intent is a first type intent, information on the first parameter set and the third parameter set corresponding to the target intent is obtained, wherein the first type intent is an intent based on the first parameter set; when the target intent is a second type intent, information on the first parameter set, the second parameter set, and the third parameter set corresponding to the target intent is obtained, wherein the second type intent is an intent based on the first parameter set and the second parameter set; the Link application corresponding to the target intent is launched; the first parameter set includes a number of predefined required parameters, the second parameter set includes a number of predefined optional parameters, and the third parameter set is a set of parameters that match the scenario type of the target intent. The third parameter set corresponding to the Link jump includes at least some or all of the parameters in the Uniform Resource Identifier and Parameter Alias ​​Mapping.

[0036] Once the target intent to be executed is determined to be a Link jump, it is necessary to determine the type of the target intent, obtain the parameter information under that type, and accurately launch the Link application corresponding to the target intent based on the parameter information.

[0037] In some possible implementations, the step of parsing the target intent through an intent framework and invoking the application corresponding to the parsed target intent includes:

[0038] The target intent is determined to be to jump to a specified page; the page component containing the page is launched, and a window is created; the intent execution parameters of the target page and the target intent are set, and the homepage is loaded, wherein the target page is the page expected to jump to the specified page; if the intent is initiated, the page is jumped to the target page, the intent execution parameters are passed, and the page is displayed.

[0039] Once the target intent to be executed is to redirect to a specified page, it is necessary to determine whether the intent has been initiated. If it has, then redirect to the target page and pass the corresponding intent execution parameters so that the page can be displayed accurately according to the intent execution parameters.

[0040] In some possible implementations, the intent execution parameters of the target intent to be executed are obtained, including:

[0041] The system integration portal obtains the intent execution parameters of the target intent to be executed; the system integration portal integrates information on multiple intent parameters corresponding to the page components of the application.

[0042] The system integrates an entry point to collect intents, and all requests are submitted through a unified entry point, reducing cognitive load, lowering user complexity, and improving user experience.

[0043] In some possible implementations, before obtaining the intent execution parameters of the target intent to be executed, the method further includes: during the installation phase, registering the first intent to an intent framework or component management service based on the intent configuration file corresponding to the first intent; the first intent is an intent defined according to the method described in the first aspect.

[0044] When an intent is invoked, the intent framework can parse the intent and match the corresponding service path in order to execute the application corresponding to the intent.

[0045] Thirdly, an electronic device is provided. The electronic device includes: a processor and a memory, the processor being coupled to the memory, the memory being used to store a computer program (also referred to as code or instructions), the computer program being executed by the processor to cause the device to perform the methods of any of the above aspects or any possible implementations thereof.

[0046] In some possible implementations, the communication device also includes a memory coupled to the processor.

[0047] In some possible implementations, there are one or more processors, and / or one or more memories.

[0048] In some possible implementations, the memory can be integrated with the processor, or the memory can be set up separately from the processor.

[0049] Fourthly, a computer-readable storage medium is provided that stores a computer program (also referred to as code or instructions) that, when run on a computer, causes the computer to perform the methods of any of the above aspects or any possible implementations thereof.

[0050] Fifthly, a computer program product is provided, comprising: a computer program (also referred to as code or instructions) that, when run on a computer, causes the computer to perform the method in any of the above aspects or any possible implementations of any of the above aspects.

[0051] In a sixth aspect, a chip is provided, comprising: a processor and a memory, the memory for storing a computer program (also referred to as code or instructions), the processor for calling and running the computer program stored in the memory, such that a device or apparatus on which the chip is mounted performs the method of any of the above aspects or any possible implementation thereof.

[0052] The beneficial effects of the technical solutions in the third to sixth aspects of this application can be referred to the beneficial effects of the technical solutions in the first aspect, and will not be repeated here. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the structure of an electronic device applicable to this application.

[0054] Figure 2 It is a flowchart illustrating the intent definition and invocation provided by related technologies.

[0055] Figure 3 This is a schematic flowchart illustrating an embodiment of the intent definition method provided in this application.

[0056] Figure 4 It is an application Figure 3 A schematic diagram of a possible system framework for the method shown.

[0057] Figure 5 It is an application Figure 3 A schematic diagram of another possible system framework for the method shown.

[0058] Figure 6 This is a schematic flowchart of an embodiment of the intent management method provided in this application.

[0059] Figure 7 yes Figure 6 The diagram illustrates a possible intent framework for triggering a Link jump.

[0060] Figure 8 yes Figure 6 The diagram illustrates a possible intent framework for triggering a redirect to a specified page.

[0061] Figure 9 yes Figure 6 The diagram illustrates a possible intent framework for triggering the execution of a specified function.

[0062] Figure 10 yes Figure 6 The diagram illustrates a possible intent framework for triggering the card creation process.

[0063] Figure 11 yes Figure 3 The flowchart illustrates one possible implementation of the method shown.

[0064] Figure 12 yes Figure 3 A flowchart illustrating another possible implementation of the method shown.

[0065] Figure 13 yes Figure 6 The flowchart illustrates one possible implementation of the method shown.

[0066] Figure 14This is a schematic structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0067] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. To facilitate understanding of the embodiments of this application, the application scenarios involved in the embodiments of this application will be introduced first.

[0068] This application provides an electronic device for executing the method provided in this application. The electronic device can be a mobile phone, wearable device (e.g., smartwatch, smart bracelet, pedometer, smart glasses, etc.), in-vehicle device (e.g., car, bicycle, electric vehicle, airplane, ship, train, high-speed rail, etc.), augmented reality (AR) / virtual reality (VR) device, tablet computer, laptop computer, PDA, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), wireless terminal in industrial control, smart home device (e.g., refrigerator, television, air conditioner, electricity meter, etc.), smart robot, wireless terminal in self-driving, wireless terminal in smart grid, wireless terminal in smart city, wireless terminal in smart home, flying device (e.g., smart robot, hot air balloon, drone, airplane), etc. Alternatively, it can be other devices or apparatus capable of data transmission. This application does not limit the specific type of electronic device.

[0069] For example, Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 1As shown, the electronic device 100 may include some or all of the following modules: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0070] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more than Figure 1 This may involve more or fewer components, or combining certain components, or splitting certain components, or different component arrangements. Figure 1 The components shown can be implemented in hardware, software, or a combination of both.

[0071] Processor 110 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0072] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0073] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0074] The processor 110 and the display screen 194 can communicate through a display serial interface (DSI) to realize the display function of the electronic device 100.

[0075] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.

[0076] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Figure 1 The structures of antennas 1 and 2 shown are merely one example. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0077] Electronic device 100 can implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0078] The display screen 194 is used to display images, videos, etc. The display screen 194 may include a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or more display screens 194.

[0079] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0080] Pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. Touch sensor 180K is also called touch panel. Touch sensor 180K can be disposed on display screen 194, and touch sensor 180K and display screen 194 constitute a touch screen, also called touch screen.

[0081] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0082] intention

[0083] An intent is an expectation for service or network management, containing requirements, goals, and constraints, and is independent of system implementation. Intents typically represent the semantic goal of a user action, such as playing music or querying flight information; they usually include the execution of the action and the transfer of data. An intent object is the structured carrier of an intent. The App Intents framework allows developers to define intents and integrate them into system entry points such as Siri and Shortcuts. The InsightIntent framework, a related technology, also supports developers defining intents and integrating them into system entry points such as Xiaoyi and QuanSou. Both provide the ability to declare application functionality as intents and integrate them, making it easier and faster for users to discover and use application capabilities. These will be explained in detail below.

[0084] Integrating into the InsightIntent intent framework mainly involves the following process:

[0085] 1) Contextual communication: Define intents, corpora, and experience details. 2) Intent development: Add intent configuration files and intent invocation entry points, and bind the intent to an Ability, activity, or UIViewController component; this application uses Ability as an example, but is not limited to it. 3) Intent debugging. 4) Intent invocation: Intent invocation is triggered by the system integration entry point. The intent framework launches the corresponding Ability component according to different intent execution modes and executes the intent.

[0086] The following sections explain the key aspects, including intent definition, intent execution entry point, and Ability component binding.

[0087] Intent definition: Categorizing the user's natural language input into explicit semantic goals helps the system understand what action the user wants to perform, i.e., "what to do". Intent definitions can be explicitly declared through an intent configuration file (insight_intent.json) in JavaScript object notation (JSON) format. For example, the code for an intent definition might look like the following.

[0088]

[0089]

[0090] The defined intent parameters may include, for example, intent name, intent version, and UIAbility of the responding intent.

[0091] The intent execution entry point is used to map the identified intent to specific business logic or services, triggering the execution function, that is, triggering the actual action.

[0092] For example, the code for the intent execution entry point and the corresponding execution function can be as follows.

[0093]

[0094] Component Binding: The intent must be bound to an existing Ability component. The intent execution entry point and intent execution function need to be bound to an existing Ability component, such as UIAbility foreground or UIAbility background. Running the intent execution function requires first executing the Ability component's lifecycle. Taking UIAbility foreground mode as an example, executing the intent will first launch the UIAbility, and then execute the onExecuteInUIAbilityForegroundMode() callback between the existing lifecycle methods onWindowStageCreate() and onForeground().

[0095] like Figure 2 As shown, the system integration entry point (such as Xiaoyi) is responsible for collecting intents; the intent framework is responsible for parsing intents and deciding on service paths; application / meta services are used to execute intents, providing standardized capabilities for system scheduling. Application / meta services may include: intent configuration files (including intent name, Ability responding to the intent, intent execution mode, etc.), intent execution entry points, and Ability components bound to the intent. Among these, meta services are high-level services that coordinate or manage other services, typically not directly providing business functions but supporting the operation of underlying services.

[0096] As can be seen, intents need to be defined using JSON-formatted intent configuration files, and both the functional code and the configuration files need to be maintained. A separate intent execution entry point and intent execution function need to be implemented. Furthermore, the intent must be bound to an Ability component.

[0097] Developing AppIntents on iOS mainly includes: intent definition and parameter definition.

[0098] Intent definition: Inherited from the AppIntent base class, it needs to implement the performs() callback. For example, the code for an intent definition can be as follows.

[0099]

[0100]

[0101] This is typically a standard intent, and the parameters of a standard intent are predefined by the system. That is, a standard intent can use methods that utilize system-predefined intent parameters.

[0102] Parameter definition: Add (or configure) parameters for the intent. For example, the code for parameter definition can be as follows.

[0103] @Parameter(title:"Trail",description:"The trail to get informationon.")

[0104] var trail:TrailEntity

[0105] In iOS AppIntent, intent definitions require the use of perform functions. Intent parameters are defined by adding annotations to the parameters, and the supported range includes: basic types, arrays and collections, AppEnum and AppEntity, and other iOS system-defined parameters.

[0106] In summary, the relevant technologies require defining intents through JSON-formatted intent configuration files and corresponding intent execution functions, making the integration of intents into intent frameworks quite complex.

[0107] To address one or more of the aforementioned technical problems, this application proposes a method for defining intent, which helps simplify the process of accessing the intent framework. Figure 3 This is a flowchart illustrating an intent definition method provided in an embodiment of this application. Figure 3 The method of intent definition shown can be applied to electronic devices. It can also be executed by modules within the electronic device (e.g., processors, chips, or chip systems), or by logic modules or software capable of implementing all or part of the functions of the electronic device.

[0108] Optionally, the method in this application embodiment is applied to an integrated development environment (IDE). An IDE is an application that provides a program development environment, which generally includes tools such as code editors, compilers, debuggers, and graphical user interfaces, and can provide developers with an environment for developing intent-related programs.

[0109] The following is combined with Figure 3 The method for defining intent in the embodiments of this application will be described in detail. Figure 3 The method S300 for defining intent shown may mainly include steps S310 to S330, which are described in detail below.

[0110] In step S310, multiple intent parameters are defined.

[0111] Multiple intent parameters may include at least some or all of the following parameters: intent name, intent domain, intent version number, intent display name, and large model description of the intent.

[0112] Optionally, multiple intent parameters can be defined through the encoding field.

[0113] In step S320, based on multiple intent parameters, the first function of the application is defined as the first intent through an encoding field. Alternatively, the first function is converted into the first intent through an encoding field.

[0114] The encoding field can modify the behavior of classes and / or functions in an application (such as a page). This encoding field may also be called an encoding module or encoding component. The first function is an existing function in an electronic device's application. The first intent is one of multiple intents.

[0115] Optionally, the encoded fields can be annotated to modify the behavior of classes and / or functions. Annotations are a way to embed metadata in code.

[0116] Electronic devices typically have multiple pre-set functions in their applications, which may include, but are not limited to, "linking", "jumping to a specified page", "executing a specified function", and "creating a card".

[0117] For example, if the first function is to "jump to" the application via a link, then the corresponding first intent could be the "link jump" intent. Similarly, if the first function is to "jump to a specified page," then the corresponding first intent could be the "jump to a specified page" intent.

[0118] In step S330, during the compilation phase, an intent configuration file corresponding to the first intent is generated based on the encoding fields.

[0119] In this embodiment, the encoding field can modify the behavior of classes and / or functions, defining existing first functions in the application as intents. This eliminates the need to write additional intent execution functions (execution code) or configuration files, helping to reduce the complexity of integrating with intent frameworks and improve development efficiency.

[0120] In some implementations, the encoded field can be a decorator. Defining multiple intent parameters in step S310 can include defining multiple intent parameters through a decorator. Defining the first function as the first intent through the encoded field in step S320 can include:

[0121] Define the first function as the first intent using decorators.

[0122] A decorator is a general design pattern that extends functionality by dynamically wrapping objects or functions without modifying the original code. For example, a TypeScript (TS) decorator is a special type of declaration that can be attached to class declarations, methods, accessors, properties, or parameters. TypeScript is a superset of JavaScript and is an open-source programming language. Decorators can also include Kotlin decorators, Java decorators, or Swift decorators, etc.

[0123] It should be understood that this application uses TS decorators in some examples, but is not limited to this.

[0124] Decorators decouple business logic from the declaration, parsing, and execution of intents, resulting in clearer code organization and dynamic strategy management. They eliminate the need to write additional intent execution functions or configuration files, helping to reduce the complexity of integrating with intent frameworks.

[0125] In some implementations, this decorator can be an intent decorator. The above-mentioned definition of multiple intent parameters via a decorator can include:

[0126] The intent decorator predefines information about the first parameter set, which consists of required parameters for the intent definition and is a subset of multiple intent parameters.

[0127] In other words, the intent decorator predefines information about a first parameter set, which includes multiple required parameters for the intent definition.

[0128] For example, an intent decorator can include basic information about the intent definition, which can include at least the following: intent name, intent domain, intent version number, intent display name, and a large model description of the intent.

[0129] An Intent Decorator is a decorator specifically designed to enhance or modify the behavior of an Intent. It is a programming technique that combines the Decorator pattern with Intent-Driven Design. Intent Decorators can decouple business logic from intents (such as goals, constraints, and strategies) through declarative syntax, allowing the code to more clearly express "what" rather than "how".

[0130] The intent decorator predefines information for multiple parameters used in intent definition, eliminating the need for users to define additional parameters. This helps standardize intent definition parameters, simplifies the integration process of standard intents, and improves development efficiency.

[0131] In some implementations, method S300 of this application embodiment may further include:

[0132] The intent decorator predefines information about the second parameter set, which consists of optional parameters defined for the intent, and is another part of a set of intent parameters. In other words, the second parameter set contains optional parameters that developers can customize.

[0133] Alternatively, the intent decorator also predefines information for a second parameter set. This second parameter set can include several optional parameters defined in the intent. Intents can be categorized into two types: Type 1 intents and Type 2 intents. Type 1 intents are based on the first parameter set; that is, they are intents based on required parameters and are also called standard intents. Type 2 intents are based on both the first and second parameter sets; that is, they are intents based on both the required first parameter set and the optional second parameter set and are also called custom intents. A first intent can belong to either Type 1 or Type 2 intents.

[0134] Standard intents typically meet basic needs and are suitable for simple, general component communication. They can be directly instantiated using the system-provided default Intent class. Custom intents are used to solve complex business scenarios, improving code reusability and maintainability through encapsulation. Developers can implement customized intents by inheriting from or extending the Intent class. For ease of understanding, in this application, the first type of intent is referred to as a standard intent, and the second type of intent is referred to as a custom intent. In the embodiments of this application, the developer may be referred to as the user.

[0135] Intent decorators predefine basic information about intents, including required parameters for standard intents and optional parameters for custom intents. This allows developers to integrate standard intents and define custom intents, facilitating parameter standardization, supporting expansion to various scenarios, and meeting diverse business needs.

[0136] By declaring intents and defining metadata through decorators, existing functionalities (classes, methods) can be associated with intent identifiers, automatically generating entry points without requiring manual registration with the intent framework. This helps reduce the complexity of integrating with intent frameworks and improves development efficiency.

[0137] In some implementations, the first function is one of several existing functions in the application. These functions can include at least some or all of the following: link navigation, navigation to a specified page, execution of a specified function, and card creation. Link navigation, also known as navigation within the application via a link, can include deep linking and app linking. Card creation, also known as adding a card, is another implementation.

[0138] Optionally, based on the intent decorator, the annotation generates the intent configuration file corresponding to the first intent.

[0139] Generating intent configuration files via annotations is called implicit intent configuration file generation. Developers do not need to write additional (explicit) intent configuration files, which helps improve development efficiency.

[0140] In some implementations, the method of this application embodiment may further include: during the installation phase, registering the first intent to the intent framework or component management service.

[0141] Figure 4 This is a schematic diagram illustrating the intent definition and invocation process provided for embodiments of this application. For example... Figure 4 As shown, an IDE can include standard intent definitions and annotation parsing plugins. Compared to related technologies, a developer's application / meta-service can include: custom intent definition units, intent configuration files generated by annotations, and intents defined using existing functionalities defined by annotations. For example, an annotation can be used to define a link capability as an intent `@insightintentlink`, to define jumping to a specified page as an intent `@insightintentPage`, to define executing a specified function as an intent `@insightintentFunction`, and to define creating a card as an intent `@insightintentForm`. Ability components are the basic units of system scheduling and typically include UIAbility components and ExtensionAbility components. UIAbility components are application components that include a user interface (UI) and are primarily used for user interaction. ExtensionAbility components are application components provided based on specific scenarios (such as service cards, input methods, etc.) and can meet more usage scenarios.

[0142] Optionally, application developers can choose to integrate standard intents (Type 1 intents), adhering to the parameter constraints defined in the standard intent definition. Each time an intent is invoked, the intent parameters passed to the application conform to the standard intent definition. Alternatively, developers can also choose to integrate custom intents (Type 2 intents), allowing them to define custom intent parameters, which are then learned by the system integration entry point. Each time an intent is invoked, the parameters passed to the application conform to the custom intent parameter definition.

[0143] When an intent is invoked, it is triggered by the system integration entry point. The intent framework executes the intent according to different intent categories and different intent execution modes.

[0144] The system architecture of this application embodiment can mainly include the process of intent development and intent invocation, which are presented in the development state, compilation state and runtime state respectively.

[0145] like Figure 5 As shown, in development mode, application developers can define intents using decorators. The IDE includes the definition of the decorator's application programming interface (API). The IDE may include a software development kit (SDK), which is a collection of documentation, examples, and tools to assist in developing a specific type of software. In compilation mode, the intent compilation plugin parses the abstract syntax tree (AST), extracts the intents defined by the decorators, compiles and generates the application package, and obtains the annotation-generated intent configuration file. In runtime mode, the system integration entry point triggers intent calls through the intent framework, triggering the application's (APP) capability components, and the APP executes the intents. Here, the AST is an abstract representation of the source code syntax structure; it represents the syntax structure of a programming language in a tree-like form, where each node in the tree represents a structure in the source code.

[0146] Figure 6 This is a flowchart illustrating an intent management method provided in an embodiment of this application. Figure 6 The intent management method shown can be applied to electronic devices. The following section combines... Figure 6 The intent management method in the embodiments of this application will be described in detail. Figure 6 The intention management method S600 shown can mainly include steps S610 to S630, which are described in detail below.

[0147] In step S610, the intent execution parameters of the target intent to be executed are obtained. The target intent is the identified intent to be executed.

[0148] Understandably, during the runtime phase of an intent-driven application, the target intent and its execution parameters are obtained.

[0149] In some possible implementations, the intent execution parameters for obtaining the target intent to be executed, as described above, may include:

[0150] The system integration entry point retrieves the intent execution parameters of the target intent to be executed. This entry point integrates information on multiple intent parameters defined according to the intent definition method described earlier. Alternatively, the system integration entry point integrates information on multiple intent parameters corresponding to the application's page components.

[0151] For example, system integration entry points could be Xiaoyi, Quansou, Siri, Shortcut, etc.

[0152] The system integrates an entry point to collect intents, enabling centralized data processing and analysis. All requests are submitted through a unified entry point, reducing cognitive load, lowering user complexity, and improving user experience.

[0153] Optionally, semantic parsing is used to obtain intent execution parameters, and the system integration entry point passes the obtained intent and intent execution parameters to the intent framework.

[0154] In step S620, the intent framework parses the target intent.

[0155] The intent framework is part of the operating system, and it registers intents defined according to any of the intent definition methods described in the embodiments of this application. Specifically, the intent framework registers the aforementioned first intent and / or second intent. The target intent is parsed to obtain the application corresponding to the target intent.

[0156] In step S630, the application corresponding to the parsed target intent is invoked according to the intent execution parameters.

[0157] For example, execute the application corresponding to the target intent, or return the result of the target intent execution.

[0158] In this embodiment, the encoding field can modify the behavior of classes and / or functions. The intent framework registers intents that define existing functionalities in the application through the encoding field. This eliminates the need to write additional intent execution functions (execution code) or configuration files, helping to reduce the complexity of integrating with the intent framework.

[0159] In some implementations, before obtaining the intent execution parameters of the target intent to be executed, the intent management method S600 may further include:

[0160] During the installation phase, the first intent is registered with the intent framework based on the intent configuration file corresponding to the first intent. The first intent is the intent defined according to the intent definition method described above, and the intent configuration file is the configuration file corresponding to the first intent generated by annotations.

[0161] Alternatively, the primary intent is integrated into the intent framework. The intent framework serves as an intelligent scheduling layer connecting the system integration entry point and application services, responsible for intent parsing, service matching, and resource coordination.

[0162] For example, a decorator can be used to register the first intent with the intent framework. This way, when the intent is invoked, the intent framework can parse the intent, match it with the corresponding service path (such as an Ability component), and then execute the intent.

[0163] The following section provides an example of defining existing functionality as an intent using an intent decorator in development mode.

[0164] An intent decorator can include basic information about the intent definition, such as the intent name, intent domain, intent version number, intent display name, and a large model description of the intent. In other words, the intent decorator defines multiple intent parameters. For example, the parameter code for the intent definition is shown below.

[0165]

[0166] Specifically, the intent decorator includes basic information about the intent definition, which may include information from a first parameter set and a second parameter set. The first parameter set may include several required parameters of the intent definition, such as intent name, intent domain, intent version, and intent display name. The second parameter set may include several optional parameters, such as the intent's large model description (llmDescription), keywords, and parameters.

[0167] Scenario 1: Define the application jump via Link as an intent.

[0168] Different functions correspond to different scenarios, and different scenarios have different requirements. Therefore, the parameters of a function need to be matched to the specific requirements of a particular scenario.

[0169] In some implementations, in development mode, if the first function is a Link jump, the aforementioned definition of multiple intent parameters through decorators can also include: defining information for a third set of parameters through intent decorators.

[0170] The third parameter set is the set of parameters that matches the scenario type of the first function, or in other words, the third parameter set is the set of parameters that matches the scenario type of the intent. The third parameter set can be the set of parameters that matches the scenario type of the first function among multiple intent parameters. The third parameter set corresponding to a Link jump can include at least some or all of the parameters in the Uniform Resource Identifier (URI) and parameter alias mapping.

[0171] Understandably, the first parameter set is required for all intents, and the third parameter set is required for all custom intents. The third parameter set is related to the scenario type of the function (intent). The third parameter set is required in some intents (which can be standard intents or custom intents); it may not be required in other intents.

[0172] Optionally, the Link navigation function can be defined as a standard intent based on the information from the first and third parameter sets. Optionally, the Link navigation function can be defined as a custom intent based on the information from the first, second, and third parameter sets.

[0173] Configure the parameters of the third parameter set that match the scenario type of the first function. While adapting to the corresponding scenario requirements, it can reduce the number of predefined intent parameters (basic information) of the intent decorator, that is, reduce the number of parameters in the predefined first parameter set (standard parameters) and second parameter set (custom parameters).

[0174] The basic information of the intent definition (IntentDecoratorInfo) can include parameter information for the first and second parameter sets. "Jump to application via Link" requires adding a definition of URI and parameter alias mappings for the third parameter set, based on the basic information of the intent definition. The URI is a string used on the internet to uniquely identify abstract or physical resources, using a standardized naming mechanism to locate or name the resource. For example, the code defining the URI and parameter alias mappings is shown below.

[0175]

[0176]

[0177] Define an application intent decorator (InsightIntentLink) that jumps through a Link using the ClassDecorator keyword. For example, the code defining InsightIntentLink is shown below.

[0178] / / Application intent decorator via Link jump

[0179] export declare constInsightIntentLink:((intentInfo:LinkIntentDecoratorInfo)=>ClassDecorator);

[0180] Here, "export declare" indicates a type declaration used to describe the static type of InsightIntentLink, rather than its specific implementation. "constInsightIntentLink" declares a constant of type function type that accepts the parameter intentInfo and returns a class decorator. The defined InsightIntentLink function takes as input a parameter of type LinkIntentDecoratorInfo and outputs a class decorator of type ClassDecorator.

[0181] Developers can use intent decorators to define the functionality of link navigation as an intent. The following example illustrates this using a standard intent (i.e., the first type of intent), where the intent name is "PlayMusic" and the intent version number is "1.0.1".

[0182]

[0183] As can be seen, you can use the intent decorator to define an existing link navigation function (such as uri:'https: / / www.example.com / music / ') as an intent.

[0184] Decorators decouple the application's business logic for link navigation from the declaration and execution of intents, eliminating the need to write additional intent execution functions. Intent configuration files can be generated via annotations during the compilation phase, resulting in clearer code organization. Declaring intents through decorators automatically generates entry points, eliminating the need for manual registration with the intent framework. This helps reduce the complexity of integrating with intent frameworks and improves development efficiency.

[0185] The following describes the runtime invocation process of the defined Link intent (InsightIntentLink).

[0186] In some implementations, the intent framework described in steps S620 to S630 parses the target intent and calls the application corresponding to the parsed target intent, which may include:

[0187] The target intent to be executed is determined to be a Link jump; when the target intent is a first type intent, the information of the first parameter set and the third parameter set corresponding to the target intent is obtained, where the first type intent is an intent based on the first parameter set; when the target intent is a second type intent, the information of the first parameter set, the second parameter set and the third parameter set corresponding to the target intent are obtained, where the second type intent is an intent based on the first parameter set and the second parameter set; according to the intent execution parameter information of the target intent, the Link application corresponding to the target intent is launched; the intent execution result is returned.

[0188] The first parameter set consists of several predefined required parameters, and the second parameter set includes several predefined optional parameters. The third parameter set consists of parameters that match the scenario type of the target intent. The third parameter set corresponding to a Link jump includes at least some or all of the parameters in the Uniform Resource Identifier and Parameter Alias ​​Mapping.

[0189] Once the target intent to be executed is determined to be a Link jump, it is necessary to determine the type of the target intent, obtain the parameter information under that type, and accurately launch the Link application corresponding to the target intent based on the parameter information.

[0190] Figure 7 This is a schematic diagram illustrating a possible intent framework triggering a Link jump, as provided in an embodiment of this application. Specifically, as... Figure 7 As shown, the process of triggering the "jump to application via Link" intent through the intent framework can mainly include steps S710 to S770, which are described in detail below.

[0191] In step S710, semantic parsing is performed as intent execution parameters.

[0192] In step S720, the system integration entry point obtains the target intent to be executed and its intent execution parameters. The target intent is determined to be a Link jump.

[0193] In step S730, it is determined whether the target intent is a standard intent.

[0194] If it is a standard intent (i.e., a first type of intent), proceed to step S740; if it is a custom intent (i.e., a second type of intent), proceed to step S750.

[0195] In step S740, parameter mapping of the standard intent is performed to obtain the standard intent parameters corresponding to the target intent.

[0196] That is, to obtain information about the first and third parameter sets corresponding to the target intent.

[0197] In step S750, the URI and other Link parameters are obtained. For example, information about the first, second, and third parameter sets of the Link intent is obtained.

[0198] For example, the obtained intentName can be 'PlayMusic', displayName can be 'Play Song', displayDescription can be 'Intent to Play Music', and URI can be 'https: / / www.example.com / music / '.

[0199] In step S760, the application is started via OpenLink.

[0200] openLink is used to enable navigation between applications via URLs or other forms of links.

[0201] In step S770, the result of the intended execution is returned.

[0202] Scenario 2: Define redirection to a specified page as an intent.

[0203] Redirecting to a specified page, or redirecting to a specified page of the application, has different scenarios than link redirection and has its own specific requirements.

[0204] In some implementations, in development mode, if the first function is to jump to a specified page, the aforementioned definition of multiple intent parameters through decorators may also include: defining information for a third set of parameters through intent decorators.

[0205] The third parameter set corresponding to the jump to the specified page includes at least some or all of the parameters from the page component bound to the page, the name of the page route, the identifier of the component navigation page, and the name of the component navigation subpage. Among them, the page component can be, for example, a UIAbility component.

[0206] For example, "Jump to a specified page in the application" includes not only the basic information of the intent definition (IntentDecoratorInfo), but also the definition of the UIAbility component bound to the page, the name of the page route, the ID of the component navigation page, and the name of the component navigation subpage.

[0207] Optionally, redirecting to a specified page can be defined as a standard intent based on the information from the first and third parameter sets. Optionally, redirecting to a specified page can be defined as a custom intent based on the information from the first, second, and third parameter sets.

[0208] For example, the code for defining the corresponding third parameter set is shown below.

[0209]

[0210] The defined InsightIntentLink function takes a parameter of type PageIntentDecoratorInfo as input and outputs a class decorator of type ClassDecorator.

[0211] You can use intent decorators to define the functionality of redirecting to a specific page as an intent. Below, we'll use integrating a custom intent (i.e., a second-type intent) as an example to define the parameters for redirecting to a specific page. The code for a possible page intent decorator definition is shown below.

[0212]

[0213]

[0214] The @EntryAbility tag is the entry point for the page.

[0215] In other examples, a @apk tag can be the entry point of a page.

[0216] In addition to the necessary first parameter set, the parameter `llmDescription` in the second parameter set can be 'Supports passing song names to search for songs', and the custom parameters are: {"$schema":"http: / / json-schema.org / draft-07 / schema#","type":"object"……}. In the third parameter set corresponding to the scenario of jumping to a specified page: the UIAbility component bound to the page can be 'EntryAbility', the page route name is 'MainPage', the identifier for the component navigation page is '1', and the component navigation subpage name is 'PageOne'.

[0217] When an intent is invoked, it can first be semantically parsed into the corresponding intent execution parameters, and then passed to the intent framework through the system integration entry point, and then to the application / meta service.

[0218] In some implementations, during the runtime phase, the intent framework described above parses the target intent and calls the application corresponding to the parsed target intent, which may include:

[0219] The target intent to be executed is determined to be to jump to a specified page; the page component containing the page is launched, and a window is created; the intent execution parameters for the target page and the target intent are set, and the home page is loaded, with the target page being the page expected to jump to the specified page; if it is an intent-driven event, then jump to the target page, pass the intent execution parameters, and display the page. The page component can be a UIAbility component.

[0220] Once the target intent to be executed is to redirect to a specified page, it is necessary to determine whether the intent has been initiated. If it has, then redirect to the target page and pass the corresponding intent execution parameters so that the page can be displayed accurately according to the intent execution parameters.

[0221] Figure 8 This is a schematic diagram illustrating a possible intent framework triggering a jump to a specified page, as provided in an embodiment of this application. Specifically, as... Figure 8 As shown, the process of triggering the "jump to specified page" intent through the intent framework can mainly include steps S810 to S890, which are described in detail below.

[0222] In step S810, semantic parsing is performed as intent execution parameters.

[0223] In step S820, the system integration entry point obtains the intent execution parameters.

[0224] The intent execution parameters are identified as those corresponding to the intent to jump to the specified page.

[0225] In step S830, the UAbility component where the page is located is launched and a window is created.

[0226] In step S840, set the page and intent execution parameters. Set the page and intent execution parameters corresponding to the window.

[0227] In step S850, the homepage is loaded.

[0228] In step S860, it is determined whether the intention is to start.

[0229] If the intention is to start, proceed to step S870; otherwise, proceed to step S880.

[0230] In step S870, the target page is redirected and the intent execution parameters are passed. The target page is the page expected (or specified) by "redirecting to the specified page".

[0231] In step S880, the page is displayed.

[0232] In step S890, the intent call ends.

[0233] Setting step S860 to determine whether it is an intentional start helps improve the controllability of internal logic.

[0234] In other examples, it is possible to skip the determination of whether it is an intent-driven event, i.e., there is no step S860, and the process proceeds directly from step S850 to step S870. That is, after loading the homepage in step S850, the user is redirected to the target page according to the corresponding intent, and the intent execution parameters are passed.

[0235] Scenario 3: Define the execution of a specified function as an intent.

[0236] The intent definition for "execute a specified function" is based on the intent information (i.e., the first parameter set and the second parameter set) and requires no additional information. For example, the code for the intent information interface for executing a specified function is shown below.

[0237] / / Execute the specified function

[0238] interface FunctionIntentDecoratorInfo extends IntentDecoratorInfo{}

[0239] The `MethodDecorator` keyword can be used to define an intent decorator that executes a specified function. Method decorators are used to enhance or intercept specific behavioral logic.

[0240] Optionally, the class containing the function can be decorated using the ClassDecorator keyword, which can help improve the parsing performance of the plugin.

[0241] / / Intent decorator to execute the specified function

[0242] export declare constInsightIntentFunctionMethod:((intentInfo:FunctionIntentDecoratorInfo)=>MethodDecorator);

[0243] export declare constInsightIntentFunction:(()=>ClassDecorator);

[0244] Developers use intent decorators to define existing functionalities that execute specified functions as intents, allowing them to bind class methods to specific business intents. The `InsightIntentFunctionMethod` function, for example, accepts a `FunctionIntentDecoratorInfo` parameter and returns a `MethodDecorator`.

[0245] The following example demonstrates how to define the parameters for executing a specified function by accessing a custom intent (Type II intent). For instance, the following is a possible definition of the intent decorator for executing a specified function.

[0246]

[0247]

[0248] In addition to the necessary first parameter set, the parameter `llmDescription` in the second parameter set can be "Getweather of an location", and the custom parameters are: `{"$schema":"http: / / json-schema.org / draft-07 / schema#","type":"object","title":"Weather Schema"...}`. `getWeather()` is an existing function, and you can use an intent decorator to define the functionality of this existing function as an intent.

[0249] When an intent is invoked, it can first be semantically parsed into corresponding parameters, then brought to the intent framework by the system integration entry point, and then passed to the corresponding function.

[0250] Figure 9 This is a schematic diagram illustrating a possible intent framework for triggering the execution of a specified function, as provided in an embodiment of this application. Specifically, as... Figure 9 As shown, the process of triggering the "execute specified function" intent through the intent framework can mainly include steps S910 to S950, which are described in detail below.

[0251] In step S910, semantic parsing is performed as intent execution parameters.

[0252] In step S920, the system integration entry point obtains the intent execution parameters.

[0253] In step S930, the intent framework triggers the background startup of the UIAbility component.

[0254] In step S940, the method is invoked, passing the intent execution parameters corresponding to the specified function, and the specified function is executed.

[0255] In step S950, the intent call ends.

[0256] Scenario 4: Define card creation as an intent.

[0257] The intent definition for "Create Card" is based on the existing intent information and requires no additional information. Creating a card is also known as adding a card. For example, the code for the card creation intent information interface is shown below.

[0258] / / Add Card

[0259] interface FormIntentDecoratorInfo extends IntentDecoratorInfo{}

[0260] The `ClassDecorator` keyword defines the intent decorator for adding cards. For example, the code is as follows.

[0261] / / Add Card Intent Decorator

[0262] export declare constInsightIntentForm:((intentInfo:FormIntentDecoratorInfo)=>ClassDecorator);

[0263] The defined InsightIntentForm function takes a parameter of type FormIntentDecoratorInfo as input and outputs a class decorator of type ClassDecorator.

[0264] You can use intent decorators to define the function of adding cards as an intent. Below is an example of accessing a standard intent (Type 1 intent), with the intent name "LoadPlayMusicCard" and intent version number "1.0.1". The following is a possible definition code for the add card intent decorator.

[0265]

[0266]

[0267] The onAddForm() function is an existing feature. You can use the intent decorator to define the existing function of adding a card as an intent.

[0268] When defining an intent, you can choose to integrate a standard intent or a custom intent. When integrating a standard intent, there's no need to define the main model description, search keywords, and intent parameters in the second parameter set. When integrating a custom intent, you need to define the main model description, search keywords, and intent parameters in the second parameter set.

[0269] Optionally, since the system is familiar with the operations and data of the standard intent, it can implement some customized distribution logic for the standard intent. For example, music playback cards have a standardized card template.

[0270] During the runtime phase, the "Add Card" intent can be triggered through the intent framework. Figure 10 This is a schematic diagram illustrating a possible intent framework triggering the addition of a card, as provided in an embodiment of this application. Specifically, as... Figure 10As shown, the process of triggering the "Add Card" intent through the intent framework can mainly include steps S1010 to S1060, which are described in detail below.

[0271] In step S1010, semantics are resolved to intent execution parameters.

[0272] In step S1020, the system integration entry point obtains the intent execution parameters.

[0273] In step S1030, a card is created.

[0274] In step S1040, card service management.

[0275] Card service management can manage cards (such as App components, information display cards, etc.) in a unified manner, covering the entire process of card creation, display, update, interaction and destruction.

[0276] In step S1050, the card lifecycle and card rendering are performed.

[0277] During initialization, data sources are loaded and styles and interaction rules are defined based on the configuration. For example, the UI is rendered using predefined templates (such as JSON) combined with dynamic styles (theme adaptation, resolution responsiveness).

[0278] In step S1060, the intent call ends.

[0279] Existing functionalities can be defined as intents using decorators and integrated into the intent framework without requiring additional implementation of intent execution entry points and intent execution function code. System integration entry points, such as Xiaoyi or QuanSou, can directly trigger application functions through the intent framework.

[0280] The above text explains how to define existing functions (such as link navigation, navigation to a specified page, execution of a specified function, and card creation) as intents and register them to the intent framework, as well as how intents can be invoked. These can be defined as standard intents or custom intents.

[0281] In other embodiments, intents can also be defined or accessed through an intent execution entry point. The following describes the intent definition through an intent execution entry point.

[0282] In some implementations, defining the first function as the first intent through a decorator, as described above, can include:

[0283] Define an intent execution entry point through a decorator, which is associated with at least one Ability component; define the first function as the first intent through the intent execution entry point.

[0284] The intent execution entry point is the starting point for the system to receive intent requests and trigger execution. It is responsible for routing external requests (such as user operations, API calls, and event triggers) to the corresponding processing logic.

[0285] In some implementations, the intent definition method S300 of this application embodiment may further include:

[0286] Define an intent execution entry point through a decorator, which is associated with at least one capability component; define a second function as a second intent through the intent execution entry point, which is a new function or code added to the application.

[0287] By using intent execution entry points, existing functionalities can be defined as intents, as can newly added functionalities, which helps improve the versatility of intent definitions. Generating intent configuration files via annotations is essentially implicit intent configuration file generation; developers do not need to write additional (explicit) intent configuration files, which helps improve development efficiency.

[0288] In some implementations, before defining the second function as the second intent through the intent execution entry point, the intent definition method S300 of this application embodiment may further include:

[0289] An intent entity is defined by an intent decorator. The intent entity is a predefined structured parameter. The intent entity includes at least the parameters of the first parameter set. The first parameter set is the required parameters of the intent definition and is a subset of the parameters of multiple intent parameters.

[0290] Intent parameters are key-value pairs used to pass data or configuration information between different components (such as Ability components). An intent entity encapsulates multiple related parameters into a structured object, merging multiple scattered custom parameters into a single structured entity. By defining intent entities, logic and data decoupling can be achieved, helping to reduce redundant management of key-value pairs for intent parameters.

[0291] For example, the definition of the intent entity of a standard intent (i.e., the first type of intent) and the code for accessing the standard intent through a newly added intent execution entry are as follows.

[0292]

[0293] The `@InsightIntentEntity` decorator is used to mark the current class as an intent entity, used to register the entity in the framework. The configuration parameter `entityCategory:'artist entity category'` defines the entity's category identifier. The class declaration (`class ArtistClassDef`) indicates that this is an entity definition class related to artists. In the `@InsightIntentEntry` intent execution entry point, the defined `intentName` is 'SearchMusicList', which is a newly added feature, and the bound capability component's `abilityName` is 'EntryAbility'.

[0294] In some implementations, the intent entity may also include parameters from a second parameter set. This second parameter set consists of optional parameters defined for the intent, representing another portion of the multiple intent parameters. In other words, the second parameter set consists of optional parameters from multiple intent parameters. The second intent belongs to either the first type of intent or the second type of intent. The first type of intent is based on the first parameter set, while the second type of intent is based on both the first and second parameter sets.

[0295] This application's embodiments support defining existing functions as intents via decorators, and also support adding new intent execution entry points and binding them to Ability components. Both methods can access standard intents, and no additional parameters need to be defined when accessing standard intents. The parameters of standard intents are predefined and standardized, simplifying the standard intent access process and helping to improve development efficiency.

[0296] Both methods allow for the definition and integration of custom intents. They support custom intent parameter definitions and intent entity definitions, facilitating the standardization and generalization of parameter definitions and enabling business switching and expansion.

[0297] Optionally, the intent entity may include some or all of the parameters corresponding to the first parameter set and / or the second parameter set. By defining intent entities (corresponding to the first type of intent or the second type of intent), the logic and data can be decoupled, which helps to reduce redundant management of key-value pairs of intent parameters.

[0298] In some implementations, the intent-defined method S300 of this application embodiment may further include:

[0299] During the compilation phase, it is determined whether the second intent has an intent annotation; if an intent annotation exists and the second intent is a first type intent, the information of the intent entity corresponding to the second intent is obtained from the SDK; if an intent annotation exists and the second intent is a second type intent, the information of the first parameter set and the second parameter set corresponding to the second intent is obtained; if the parameters of the second intent match the predefined parameters of the intent execution entry point, the intent configuration file corresponding to the second intent is generated.

[0300] The intention configuration file generated by the annotation is obtained through compilation.

[0301] In some implementations, defining an intent entity via an intent decorator as described above can include:

[0302] This is based on intent decorators and uses JSON Schema to define the parameters of intent entities.

[0303] JSON is a lightweight data-interchange format that is easy to read and write, and easy for machines to parse and generate. It is commonly used for data formatting and transmission. JSON Schema is a powerful tool for validating JSON data structures; it is a declarative format for describing other data structures. A schema can be understood as a pattern or rule.

[0304] Customizing intent parameter and intent entity definitions using JSON Schema specifications helps standardize and generalize parameter definitions, facilitating business switching and expansion.

[0305] By using intent execution entry points, existing functionalities can be defined as intents, as can newly added functionalities, which helps improve the versatility of intent definitions. Generating intent configuration files via annotations is essentially implicit intent configuration file generation; developers do not need to write additional (explicit) intent configuration files, which helps improve development efficiency.

[0306] By accessing the standard intent through the intent execution entry point, parameter validation is performed on the member variables of the intent execution entry point class during the compilation phase.

[0307] Figure 11 This is a schematic diagram illustrating a possible process for compiling and validating intent annotations, as provided in an embodiment of this application. Specifically, as... Figure 11 As shown, the process of compiling intent annotations and validating parameters can mainly include steps S1110 to S1190, which are described in detail below.

[0308] In step S1110, compilation is started.

[0309] In step S1120, the AST syntax tree is traversed.

[0310] In step S1130, it is determined whether an intent annotation exists.

[0311] If an intent annotation exists, proceed to step S1140; if no intent annotation exists, proceed to step S1190.

[0312] In step S1140, the intent annotation compilation plugin is started.

[0313] In step S1150, it is determined whether the target intent to be executed is a standard intent.

[0314] If it is a standard intent, proceed to step S1170; if it is a custom intent, proceed to step S1160.

[0315] In step S1160, if it is a custom intent, obtain the custom intent parameters. For example, obtain the custom intent parameters from the intent entity.

[0316] In step S1170, if it is a standard intent, the standard intent parameters defined by the JSON Schema are obtained from the SDK.

[0317] In step S1180, verify whether the intent parameters match.

[0318] For example, verify whether the intent parameters of the obtained target intent match the predefined intent parameters and class attribute definitions of the intent execution entry point.

[0319] If the intent parameters match, proceed to step S1181; if the intent parameters do not match, proceed to step S1182.

[0320] In step S1181, continue with the other compilation processes.

[0321] In step S1182, a compilation error occurred.

[0322] In step S1190, compilation is complete, and the intent configuration file is generated. That is, the intent configuration file is generated from annotations.

[0323] An intent entity is a data transmission method related to intent operations. It can also be defined via annotations and parameters via JSON Schema. For example, the code for defining an intent entity for a custom intent (second type intent) is as follows.

[0324]

[0325] The defined intent entity can include multiple required parameters or several optional parameters. Intent entities can be defined using "$id" (" / schemas / ArtistClassDef"). `implementsinsightIntent.IntentEntity` indicates that the class implements the `IntentEntity` interface under `insightIntent`.

[0326] The code example below shows how to define a custom intent (second type intent) by adding an intent execution entry point.

[0327]

[0328]

[0329] In the `@InsightIntentEntry` intent execution entry point, the defined intentName is "PlayMusic," a newly added feature, and the bound capability component's abilityName is "EntryAbility." The custom intent parameters are: {"$schema":"http: / / json-schema.org / draft-07 / schema#","type":"object","title":"Song Schema"...}. The custom intent parameter definitions can reference the intent entity defined by "$id" (" / schemas / ArtistClassDef") via "$ref".

[0330] The following section explains how to define custom intents through the intent execution entry point, how to integrate with the intent framework, and how to invoke intents.

[0331] Figure 12 This is a flowchart illustrating a process for defining a custom intent through an intent execution entry point, as provided in an embodiment of this application. Specifically, during the development phase, such as... Figure 12 As shown, the process of compiling intent annotations and validating parameters can mainly include steps S1210 to S1230, which are described in detail below.

[0332] In step S1210, develop a custom intent.

[0333] Custom intents can be defined using decorators; specifically, custom intents can be defined through intent execution entry points.

[0334] In step S1220, the intent entity is developed.

[0335] For example, define an intent entity corresponding to a custom intent. This intent entity may include parameters corresponding to the first parameter set and the first parameter set.

[0336] In step S1230, the intent is registered to the intent framework.

[0337] Figure 13 This is another schematic diagram of a process invocation via intent provided in an embodiment of this application. Specifically, during the runtime phase, such as... Figure 13 As shown, the process of intent invocation mainly includes steps S1310 to S1370, which are described in detail below.

[0338] In step S1310, the system integration entry learns the parameter definitions of the custom intent.

[0339] In step S1320, the system integrates the entry point to learn the intent entity definition.

[0340] In step S1330, the user triggers the action.

[0341] In step S1340, the system integration entry point matches the user's semantics with the custom intent.

[0342] For example, the system integration entry point matches the user's semantic intent type.

[0343] In step S1350, the intent entity corresponding to the custom intent is constructed.

[0344] Optionally, an intent entity corresponding to a custom intent can be constructed based on intent parameters and intent type.

[0345] Optionally, the intent and the intent entity are bound together. The intent entity corresponding to the custom intent can be constructed based on the binding relationship.

[0346] In step S1360, an intent invocation is performed.

[0347] In step S1370, the intent call ends.

[0348] This application supports exposing existing functions through intents and adding new intent execution entry points bound to Ability components. Both methods allow defining standard intents as well as custom intents. It supports integrating standard intents via decorators without requiring additional parameter definitions, thus simplifying the integration process, improving development efficiency, and reducing modification costs. It supports defining intent entities through decorators and JSON Schema specifications, facilitating the standardization of parameter definitions, supporting expansion to other scenarios, and meeting flexible and diverse business needs.

[0349] The above text combined Figures 1 to 13The method embodiments of this application are described in detail below, in conjunction with... Figure 14 The present application provides a detailed description of the device embodiments. It should be understood that the description of the device embodiments corresponds to the description of the method embodiments; therefore, any parts not described in detail can be referred to the foregoing method embodiments.

[0350] Figure 14 This is a schematic structural diagram of an electronic device provided in an embodiment of this application. Figure 14 The dashed lines indicate that the unit or module is optional. The electronic device 1400 can be used to implement the methods described in the above method embodiments.

[0351] Electronic device 1400 may include one or more processors 1410. The processor 1410 may support the electronic device 1400 in implementing the methods described in the preceding method embodiments. The processor 1410 may be a general-purpose processor or a special-purpose processor. For example, the processor may be a central processing unit (CPU). Alternatively, the processor may also be other general-purpose processors, microprocessor units (MPUs), microcontroller units (MCUs), graphics processing units (GPUs), artificial intelligence processors (AI processors) or neural processing units (NPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0352] The electronic device 1400 may also include one or more memories 1420. The memories 1420 store a program that can be executed by the processor 1410, causing the processor 1410 to perform the methods described in the preceding method embodiments. The memories 1420 may be independent of the processor 1410 or integrated into the processor 1410.

[0353] In this embodiment, the memory 1420 may include, but is not limited to, a cache, a read-only memory (ROM), a random access memory (RAM), a synchronous dynamic random access memory (SDRAM), a hard disk drive (HDD) or a solid-state drive (SSD), an erasable programmable read-only memory (EPROM), or a compact disc read-only memory (CD-ROM), etc.

[0354] Electronic device 1400 may also include transceiver 1430. Processor 1410 can communicate with other devices or chips via transceiver 1430. For example, processor 1410 can send and receive data with other devices or chips via transceiver 1430.

[0355] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0356] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0357] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the steps described in the various method embodiments above.

[0358] This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the steps in the various method embodiments described above.

[0359] This application also provides a chip, which includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory, so that a device or equipment (such as a communication device) with the chip installed performs the steps in the above-described method embodiments.

[0360] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate form. The computer-readable storage medium can include at least: any entity or device capable of carrying computer program code to a device / app, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, depending on legislation and patent practice, the computer-readable storage medium may not be an electrical carrier signal or a telecommunication signal.

[0361] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0362] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application merely describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Additionally, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or order of execution, and that "first," "second," etc., do not necessarily imply that they are different. It should be understood that in this application, descriptions such as "in the case of," "if," "when," "if," etc., can be used interchangeably.

[0363] Furthermore, various aspects or features of this application can be implemented as methods, apparatus, or articles of manufacture using standard programming and / or engineering techniques. The term "article of manufacture" as used herein encompasses a computer program accessible from any computer-readable device, carrier, or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.). Additionally, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.

[0364] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0365] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0366] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0367] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for defining intent, characterized in that, include: Define multiple intent parameters; Based on the multiple intent parameters, the first function of the application is defined as the first intent through the encoding field; During the compilation phase, an intent configuration file corresponding to the first intent is generated based on the encoded fields; The encoded field can modify the behavior of the application's classes and / or functions, where the first function is an existing function in the electronic device's application.

2. The method according to claim 1, characterized in that, The encoded field is a decorator, and the definition includes multiple intent parameters, including: The multiple intent parameters are defined by the decorator; Defining the first function as the first intent through the encoded field includes: The first function is defined as the first intent through the decorator.

3. The method according to claim 2, characterized in that, The decorator is an intent decorator, and the multiple intent parameters defined through the decorator include: The intent decorator predefines information about a first parameter set, which consists of required parameters for the intent definition and is a subset of the multiple intent parameters.

4. The method according to claim 3, characterized in that, The method further includes: The second parameter set is predefined by the intent decorator. The second parameter set is an optional parameter set for intent definition. The second parameter set is another part of the multiple intent parameters. The first intent belongs to either a first type of intent or a second type of intent. The first type of intent is an intent based on the first parameter set, and the second type of intent is an intent based on both the first parameter set and the second parameter set.

5. The method according to any one of claims 3-4, characterized in that, If the first function is a link jump, then defining multiple intent parameters through the decorator also includes: The third parameter set is defined using the intent decorator; The third parameter set is a parameter set that matches the scenario type of the first function. The third parameter set corresponding to the Link jump includes at least some or all of the parameters in the Uniform Resource Identifier and Parameter Alias ​​Mapping. If the first function is to jump to a specified page, then defining multiple intent parameters through the decorator further includes: The information of the third parameter set is defined by the intent decorator; The third parameter set corresponding to the jump to the specified page includes at least some or all of the parameters in the page component bound to the page, the name of the page route, the identifier of the component navigation page, and the name of the component navigation subpage.

6. The method according to any one of claims 1-5, characterized in that, The first function is one of a plurality of functions already existing in the application, and the plurality of functions includes at least some or all of the following: Link redirection, redirection to a specified page, execution of a specified function, and card creation.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: Define an intent execution entry point using a decorator, wherein the intent execution entry point is associated with at least one Ability component; The second function is defined as a second intent through the intent execution entry point, and the second function is a newly added function or code in the application.

8. The method according to claim 7, characterized in that, Before defining the second function as the second intent through the intent execution entry point, the method further includes: Define intent entities using intent decorators; The intent entity is a predefined structured parameter, and the intent entity includes parameters of a first parameter set, which are mandatory parameters defined by the intent and are a subset of the multiple intent parameters.

9. The method according to claim 8, characterized in that, The intent entity also includes parameters of a second parameter set, which are optional parameters for intent definition. The second parameter set is another part of the multiple intent parameters. The second intent belongs to either a first type intent or a second type intent. The first type intent is an intent based on the first parameter set, and the second type intent is an intent based on both the first parameter set and the second parameter set.

10. The method according to any one of claims 8-9, characterized in that, The definition of intent entities via intent decorators includes: The intent decorator is based on the parameters of the intent entity defined by the JSON Schema.

11. The method according to any one of claims 8-10, characterized in that, The method further includes: During the compilation phase, it is determined whether the second intent has an intent annotation; If an intent annotation exists, and the second intent is a first type of intent, then information about the first parameter set corresponding to the intent entity is obtained from the software development tool SDK; If an intent annotation exists, and the second intent is a second type of intent, then obtain the information of the first parameter set and the second parameter set corresponding to the second intent; If the parameters of the second intent match the predefined parameters of the intent execution entry point, then an intent configuration file corresponding to the second intent is generated.

12. The method according to any one of claims 1-11, characterized in that, The method is applied in an integrated development environment (IDE).

13. A method for intention management, characterized in that, include: Obtain the intent execution parameters for the target intent to be executed; The target intent is parsed using an intent framework; Based on the intent execution parameters, the application corresponding to the parsed target intent is invoked; The intent framework is part of the operating system, and the intent framework registers intents defined by the method according to any one of claims 1-12.

14. The method according to claim 13, characterized in that, The step of parsing the target intent through an intent framework and invoking the application corresponding to the parsed target intent includes: The target intent is determined to be a Link jump; When the target intent is a first type intent, information about the first parameter set and the third parameter set corresponding to the target intent is obtained; wherein, the first type intent is an intent based on the first parameter set; When the target intent is a second type intent, information about the first parameter set, the second parameter set, and the third parameter set corresponding to the target intent is obtained; wherein, the second type intent is an intent based on the first parameter set and the second parameter set; Launch the Link application corresponding to the stated target intent; The first parameter set includes a number of predefined required parameters, the second parameter set includes a number of predefined optional parameters, and the third parameter set is a set of parameters that match the scenario type of the target intent. The third parameter set corresponding to the Link jump includes at least some or all of the parameters in the Uniform Resource Identifier and Parameter Alias ​​Mapping.

15. The method according to claim 13, characterized in that, The step of parsing the target intent through an intent framework and invoking the application corresponding to the parsed target intent includes: The target intent is determined to be to redirect to a specified page; Launch the page component containing the page and create a window; Set the intent execution parameters for the target page and the target intent, load the homepage, where the target page is the page expected to redirect to the specified page; If the event is initiated by an intent, the user will be redirected to the target page, where the intent execution parameters will be passed and the page will be displayed.

16. The method according to any one of claims 13-15, characterized in that, Obtain the intent execution parameters of the target intent to be executed, including: The intent execution parameters of the target intent to be executed are obtained through the system integration entry point; The system integration entry point integrates information on multiple intent parameters corresponding to the page components of the application.

17. The method according to any one of claims 13-16, characterized in that, Before obtaining the intent execution parameters of the target intent to be executed, the method further includes: During the installation phase, the first intent is registered to the intent framework based on the intent configuration file corresponding to the first intent; The first intent is the intent defined by the method according to any one of claims 1-12.

18. An electronic device, characterized in that, include: A processor and a memory, the processor being coupled to the memory, the memory being used to store a computer program that, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 13 to 17.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 12, or to perform the method as described in any one of claims 13 to 17.

20. A computer program product, characterized in that, include: A computer program, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 12, or to perform the method as described in any one of claims 13 to 17.