Cursor navigation method and system and electronic equipment
By obtaining page structure information and injecting logic processing code during the target application compilation phase, the problem of coupling between cursor navigation function and business module is solved, realizing efficient development and low-cost integration of cursor navigation function, improving development efficiency and code maintainability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNICOM SMART CONNECTION TECH LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies require deep modifications and adaptations to business code when implementing cursor navigation functionality, resulting in low development efficiency and high maintenance costs. The cursor navigation function is strongly coupled with business modules, making it difficult to iterate and maintain efficiently.
During the target application compilation phase, page structure information is obtained, target elements are identified, and logical processing code is injected into the target elements to form the target application. The application responds to device input to generate cursor navigation information and injects focus interaction and attribute code through compile-time bytecode hooking technology to decouple the cursor navigation function from the business module.
This decouples the cursor navigation function from the business modules, reduces development and maintenance costs, improves development efficiency and code maintainability, and ensures seamless integration and efficient iteration of the cursor navigation function.
Smart Images

Figure CN122018899A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent cockpits, and more specifically, to a method, system, electronic device, and computer-readable storage medium for cursor navigation. Background Technology
[0002] In the rapid development of smart cockpit technology, cursor navigation has become a key module for achieving efficient human-computer interaction. However, existing technologies typically require deep modifications and adaptations to business logic to implement cursor navigation, resulting in low development efficiency and high maintenance costs. This is because there is a strong coupling between cursor navigation and business modules, requiring developers to write separate cursor focus rendering, direction control, and event response logic for each interactive element on each page. This approach not only leads to the repetitive writing of a large amount of homogeneous code but also makes the functionality deeply tied to business scenarios, making efficient iteration and maintenance difficult.
[0003] Therefore, how to improve the development efficiency of cursor navigation functions is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] To address the problem of low development efficiency of cursor navigation functions in existing technologies, this invention provides a method, system, electronic device, and computer-readable storage medium for cursor navigation.
[0005] A method for cursor navigation, comprising: Obtain page structure information during the target application compilation phase; Identify target elements based on the page structure information; Logic processing code is injected into the target element to form the target application; the logic processing code is used to describe the mapping relationship between device input and page interaction logic; In response to device input, corresponding cursor navigation information is generated in the target application.
[0006] Optionally, injecting logic processing code into the target element includes: Identify the element type and layout characteristics of the target element in the page structure information; Match focus effects based on the element type and match focus switching logic based on the layout features; The corresponding focus interaction code is determined based on the focus effect and the focus switching logic. Obtain predefined focus attribute code and page input service registration code, and inject the focus interaction code, focus attribute code, and page input service registration code into the target element; the focus attribute code is used to define the focus selectability effect of the target element; the page input service registration code is used to register the triggering event of the target element in the event system framework.
[0007] Optionally, injecting the focus interaction code, the focus attribute code, and the page input service registration code into the target element includes: By using compile-time bytecode hooking technology, the focus interaction code, the focus attribute code, and the page input service registration code are injected into the target element.
[0008] Optionally, before generating corresponding cursor navigation information in the target application in response to device input, the method further includes: Identify the device type and protocol version; A pre-configured configuration file is matched based on the device type and the protocol version; the configuration file is used to describe the logical mapping relationship of the devices. The configuration file is parsed to configure the logical mapping relationship for the device, and the input events of the device are distributed and processed through the input service and system event framework.
[0009] Optionally, generating corresponding cursor navigation information in the target application in response to device input includes: In response to input events from the device, system event mapping processing, simulation triggering processing, system event injection processing, and application scenario response processing are performed sequentially to generate corresponding cursor navigation information in the target application.
[0010] Optionally, matching a preset configuration file according to the device type and the protocol version includes: Determine if a configuration file matching the device type and protocol version exists; If not, the input custom event is obtained, and a configuration file matching the device type and the protocol version is created based on the custom event.
[0011] Optionally, identifying target elements based on the page structure information includes: For any element in the page structure information, determine whether the element supports interactive responses; If so, then the element is determined as the target element.
[0012] A cursor navigation system, comprising: The acquisition module is used to obtain page structure information during the compilation phase of the target application; The identification module is used to identify target elements based on the page structure information; The code injection module is used to inject logic processing code into the target element to form the target application; the logic processing code is used to describe the mapping relationship between device input and page interaction logic; The cursor navigation module is used to generate corresponding cursor navigation information in the target application in response to device input.
[0013] An electronic device, comprising: A processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, implements the cursor navigation method as described in any of the preceding embodiments.
[0014] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the cursor navigation method as described in any of the preceding claims.
[0015] The cursor navigation method provided in this invention obtains page structure information during the target application compilation phase; identifies target elements based on the page structure information; injects logic processing code into the target elements to form the target application; and generates corresponding cursor navigation information in the target application in response to device input. This invention automatically obtains page structure information and identifies target elements during the target application compilation phase, injecting logic processing code into the target elements to achieve a mapping relationship between device input and page interaction logic, avoiding deep modifications to business code and reducing development and maintenance costs. Simultaneously, by injecting logic processing code during compilation, the cursor navigation function is decoupled from the business module, allowing users to focus on business logic development without needing to concern themselves with the specific implementation details of cursor navigation, thus improving development efficiency and code maintainability. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating a cursor navigation method provided in an embodiment of the present invention; Figure 2 for Figure 1 A flowchart illustrating an actual manifestation of S03 in a provided cursor navigation method; Figure 3A flowchart illustrating another cursor navigation method provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a cursor navigation system provided in an embodiment of the present invention. Detailed Implementation
[0018] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0019] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0020] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0021] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0022] In the rapid development of intelligent cockpit technology, cursor navigation has become one of the key modules for achieving efficient human-computer interaction. However, existing technologies for implementing cursor navigation typically require deep modification and adaptation of business code, leading to low development efficiency and high maintenance costs. This is because there is a strong coupling between cursor navigation and business modules, requiring developers to write separate cursor focus rendering, direction control, and event response logic for each interactive element on each page. This approach not only results in the repetitive writing of a large amount of homogeneous code but also makes the function implementation deeply bound to the business scenario, making efficient iteration and maintenance difficult. Therefore, this invention provides a cursor navigation method to solve the above problems.
[0023] Please refer to Figure 1 The flowchart of a cursor navigation method provided in an embodiment of the present invention includes the following steps: Step S01: Obtain page structure information during the target application compilation phase.
[0024] In this embodiment, the page layout and elements of the target application are analyzed during code compilation using a compiler or related tools to extract page structure information. The compilation stage is a critical period for converting code from source code into an executable program. At this time, static analysis and modification of the code can be performed without affecting runtime performance. The page structure information can include the position, type, and hierarchical relationship of each element on the page, providing basic data support for subsequent function implementation.
[0025] In some embodiments, compiler plugins or bytecode manipulation tools can be used to scan and parse the page template or layout code during code compilation, extracting page structure information and storing it as intermediate data. The page structure information can be a tree structure, JSON format, or other formats suitable for subsequent processing.
[0026] Step S02: Identify target elements based on page structure information.
[0027] In complex interactive scenarios such as smart cockpits, pages may contain a large number of different types of elements, but not all elements require cursor navigation support. Therefore, in this embodiment, using the acquired page structure information, specific algorithms and rules are used to automatically identify target elements on the page that require cursor navigation support. Target elements may include interactive controls such as buttons, input boxes, and links, which are the core operation objects of the cursor navigation function. By identifying target elements, the elements that need to be interacted with can be accurately located, avoiding unnecessary processing of irrelevant elements, thereby providing an operational basis for subsequent cursor navigation and interaction logic.
[0028] In some embodiments, to accurately identify target elements that support interaction and improve the efficiency and accuracy of cursor navigation, identification can be performed by determining whether each element on the page supports interactive responses. This avoids unnecessary processing of non-interactive elements, thereby optimizing resource utilization, reducing performance overhead, and reducing the workload of manual configuration by developers, thus improving development efficiency. Specifically, as mentioned in step S02, identifying target elements based on page structure information can include: Step S11: For any element in the page structure information, determine whether the element supports interactive responses.
[0029] If so, proceed to step S12.
[0030] Step S12: Determine the element as the target element.
[0031] In this embodiment, by evaluating the interactivity of each element on the page, elements that can respond to user actions (such as clicks, focus switching, etc.) are selected, thereby assigning cursor navigation functionality to the target elements. These target elements are the core operation objects of the cursor navigation function, determining the scope of user interaction on the page.
[0032] For example, in an HTML page, button elements typically have an "onclick" attribute, and input boxes have an "onfocus" attribute; these attributes indicate that they support interaction. The system determines the target element by examining these attributes and generates the appropriate cursor navigation logic for the target element.
[0033] Step S03: Inject logical processing code into the target element to form the target application.
[0034] The logic processing code describes the mapping relationship between device input and page interaction logic.
[0035] In this embodiment, the functionality of target elements is extended by dynamically inserting code for implementing cursor navigation into them. This logic processing code defines how the target elements respond to device input (such as buttons, gestures, etc.) and implements page interaction logic such as cursor navigation and focus switching. This process ultimately generates a target application with cursor navigation functionality, enabling the target application to support user interaction based on device input.
[0036] The purpose of injecting logic processing code in this embodiment is to achieve rapid integration of the cursor navigation function without modifying the original business logic. In traditional methods, the cursor navigation function is deeply coupled with business logic, leading to low development efficiency and high maintenance costs. By injecting logic code, the cursor navigation function can be decoupled from the business module. Developers do not need to write large amounts of homogeneous code for each page's interactive elements, thereby improving development efficiency and code maintainability. At the same time, this approach also ensures that the implementation of the cursor navigation function has low intrusiveness to the business logic, reducing potential risks associated with function integration.
[0037] Step S04: In response to device input, generate corresponding cursor navigation information in the target application.
[0038] In this embodiment, when a user issues operation commands through various devices (such as a keyboard, gamepad, mouse, etc.), the target application can capture these inputs in real time and generate corresponding cursor navigation information according to preset logic and rules. The cursor navigation information may include the cursor's position, movement direction, focus switching, etc., to guide the user in interactive operations within the application interface. This process is a key step in achieving efficient human-computer interaction, ensuring that users can accurately control the cursor through input devices to complete operations such as page navigation and function activation.
[0039] Based on the above technical solution, the cursor navigation method provided in this embodiment of the invention obtains page structure information during the target application compilation stage; identifies target elements based on the page structure information; injects logic processing code into the target elements to form the target application; and generates corresponding cursor navigation information in the target application in response to device input. This invention automatically obtains page structure information and identifies target elements during the target application compilation stage, injecting logic processing code into the target elements, thereby realizing the mapping relationship between device input and page interaction logic, avoiding deep modification of business code, and reducing development and maintenance costs. Simultaneously, by injecting logic processing code during compilation, the cursor navigation function is decoupled from the business module, allowing users to focus on the development of business logic without worrying about the specific implementation details of cursor navigation, improving development efficiency and code maintainability.
[0040] Please refer to Figure 2 ,for Figure 1 A flowchart illustrating one actual implementation of step S03 in a provided cursor navigation method. In some embodiments, injecting logic processing code into the target element mentioned in step S03 may specifically include the following steps: Step S21: Identify the element type and layout characteristics of the target element in the page structure information.
[0041] In this embodiment, the element type of the target element may include buttons, input boxes, images, etc., and the layout features may include grid layout, linear layout, flow layout, etc.
[0042] Step S22: Match focus effects according to element type and match focus switching logic based on layout features.
[0043] In this embodiment, the system assigns appropriate focus visual effects (such as highlighting, borders, cursor blinking, etc.) to the target element based on its specific type (such as buttons, input boxes, images, etc.), and determines the cursor switching logic (such as switching by row, switching by sequence, etc.) based on the element's layout (such as grid layout, linear layout, flow layout, etc.). This process ensures that the cursor navigation performance under different elements and layouts not only meets user expectations but also has good consistency and smoothness.
[0044] In some embodiments, this can be achieved through a predefined rule base and a dynamic matching algorithm. The rule base can predefine focus effects for different element types and focus switching logic for different layout features. At runtime, the system searches the rule base for matching focus effects and switching logic based on the identified element types and layout features.
[0045] Step S23: Determine the corresponding focus interaction code based on the focus effect and focus switching logic.
[0046] In this embodiment, based on the determined focus visual effects and focus switching logic, focus interaction code capable of implementing these functions is matched. The focus interaction code defines the appearance changes of the target element when it gains focus and the behavior rules when the cursor moves between elements, thereby implementing cursor navigation functionality in the target application and avoiding the tedious process of manually writing a large amount of repetitive code.
[0047] In some embodiments, the system can generate corresponding focus interaction code based on a predefined rule base, combined with matched focus effects and focus switching logic.
[0048] Step S24: Obtain the predefined focus attribute code and page input service registration code, and inject the focus interaction code, focus attribute code, and page input service registration code into the target element.
[0049] The focus attribute code is used to define the focus selectability effect of the target element; the page input service registration code is used to register the triggering event of the target element in the event system framework.
[0050] In this embodiment, the system retrieves code snippets related to the focus selectability effect and code snippets related to page input service registration from a predefined code library. These code snippets, along with previously generated focus interaction code, are then injected into the target element, thereby granting the target element focus navigation functionality. This process ensures that the target element correctly displays the focus effect during user interaction and can interact with the system's input service.
[0051] In some embodiments, to improve the efficiency and automation of cursor navigation function integration, ensure the stability and consistency of code injection, and avoid performance overhead and compatibility issues that may arise from dynamic code modification at runtime, the process mentioned in step S24, which involves injecting focus interaction code, focus attribute code, and page input service registration code into the target element, can be specifically as follows: By using compile-time bytecode hooking techniques, focus interaction code, focus attribute code, and page input service registration code are injected into the target element.
[0052] In this embodiment, bytecode manipulation techniques are used to dynamically modify and extend the code of the target element. This technique injects the code snippets required for cursor navigation into the bytecode of the target element without directly modifying the source code, thereby endowing the target element with cursor navigation functionality and avoiding direct interference with business logic. This approach not only improves development efficiency but also enhances code maintainability and system stability, while ensuring seamless integration of cursor navigation functionality into existing applications.
[0053] Based on the above technical solution, this embodiment achieves automation and customization of cursor navigation function through a refined code injection strategy, thereby improving user experience and development efficiency.
[0054] Please refer to Figure 3 The flowchart of another cursor navigation method provided in the embodiment of the present invention includes the following steps: Step S31: Obtain page structure information during the target application compilation phase.
[0055] The specific implementation process of this step is the same as that of step S01, and will not be repeated here.
[0056] Step S32: Identify target elements based on page structure information.
[0057] The specific implementation process of this step is the same as that of step S02, and will not be repeated here.
[0058] Step S33: Inject logical processing code into the target element to form the target application.
[0059] The specific implementation process of this step is the same as that of step S03, and will not be repeated here.
[0060] Step S34: Identify the device type and protocol version.
[0061] Since different types of input devices may have different function key layouts, signal transmission methods, and operating logic, differences in protocol versions can also affect the communication efficiency and accuracy between the device and the system. Therefore, in this embodiment, by detecting the specific type of input device connected to the system (such as a keyboard, game controller, remote control, etc.) and the communication protocol version used by these devices, the system can load the corresponding configuration file to provide accurate logic mapping and operation support for each device, thereby ensuring that the device can seamlessly connect to the system and work normally.
[0062] In some embodiments, the identification of the device type and protocol version mentioned in step S34 can specifically be: For devices connected via Bluetooth, the system can discover the device through BLE (Bluetooth Low Energy) scanning and read the device type and protocol version information from its broadcast data packets.
[0063] For devices connected via wired connections (such as USB), the system can obtain the device descriptor through USB enumeration to identify the device type (e.g., through the device class code) and protocol version.
[0064] Step S35: Match the preset configuration file according to the device type and protocol version.
[0065] The configuration file is used to describe the logical mapping relationship of the devices.
[0066] In this embodiment, after identifying the type and protocol version of the input device, a configuration file matching the device is searched from a predefined configuration file library. The configuration file details the logical mapping relationship of the device, and may include, for example, button functions, signal transmission methods, and operation logic, to ensure that the system can correctly process input events according to the characteristics of the device.
[0067] In this way, the system can automatically identify and adapt to various input devices, eliminating the need for developers to write separate adaptation code for each device, thus improving system compatibility and scalability, and reducing development and maintenance costs.
[0068] In some embodiments, to achieve rapid adaptation to new devices, avoid system compatibility issues caused by device updates, and allow users to adjust the device's input logic according to their own needs, thereby improving system scalability, the step S35, which involves matching a pre-set configuration file based on the device type and protocol version, may specifically include: Step S41: Determine if a configuration file matching the device type and protocol version exists.
[0069] If not, proceed to step S42.
[0070] Step S42: Obtain the input custom event and create a configuration file that matches the device type and protocol version based on the custom event.
[0071] In this embodiment, the pre-configured configuration file can quickly adapt to common device types and protocol versions, while the ability to dynamically create configuration files allows the system to flexibly handle the input logic of new or special devices. The system checks its pre-configured configuration file library for files that match the current device type and protocol version. If no matching file exists, a new configuration file is dynamically generated by acquiring user-inputted custom events (such as key mappings, operation logic, etc.) to ensure that the device can be recognized by the system and that input events are processed correctly.
[0072] In some embodiments, the configuration file may be an XML-formatted configuration file.
[0073] Step S36: Parse the configuration file, configure logical mapping relationships for the device, and complete the distribution and processing of the device's input events through the input service and system event framework.
[0074] The purpose of this embodiment is to ensure that device input can be correctly understood and responded to by the system, thereby achieving seamless interaction between the device and the system. After obtaining a configuration file that matches the device, the mapping information in the configuration file is parsed, and corresponding logical mapping relationships are set for the device based on this information, so that the system can accurately map the device's input events to the corresponding system functions. For example, a button on the controller can be mapped to the "confirm" operation in the system.
[0075] Subsequently, by utilizing input services and system event frameworks, device input events (such as key presses, gestures, etc.) are distributed and processed according to preset mapping rules, thereby achieving efficient interaction between device input and system functions. This can improve the system's response speed and stability, and ensure that user operations receive immediate feedback.
[0076] Step S37: In response to the input event from the device, system event mapping processing, simulation triggering processing, system event injection processing, and application scenario response processing are performed sequentially to generate corresponding cursor navigation information in the target application.
[0077] In this embodiment, after a user inputs an event through the device, the system maps the device input into a standard event that the system can understand. Then, it generates corresponding operation instructions through simulated triggering, injects these instructions into the system event framework, and finally, the application scenario module responds to these events to generate corresponding cursor navigation information. This process ensures that input events can be accurately processed and transformed into cursor navigation operations in the user interface.
[0078] The purpose of this embodiment is to achieve efficient input event processing and cursor navigation. Through system event mapping, input events from different devices are standardized, ensuring system compatibility and scalability. Simulated trigger processing allows the system to simulate user actions when necessary, enhancing the flexibility of interaction. System event injection processing ensures that events are correctly received and distributed by the system framework, and application scenario response processing achieves the final effect of cursor navigation, providing users with a smooth interactive experience.
[0079] Based on the above technical solution, this embodiment achieves efficient adaptation and management of different input devices, and ensures that input events from different devices can be accurately identified and processed, thus achieving high efficiency and accuracy in generating cursor navigation information.
[0080] Please refer to Figure 4 The diagram below illustrates the structure of a cursor navigation system provided in an embodiment of the present invention. The cursor navigation system may include: Module 100 is used to obtain page structure information during the compilation phase of the target application. The recognition module 200 is used to identify target elements based on page structure information; The code injection module 300 is used to inject logic processing code into the target element to form the target application; the logic processing code is used to describe the mapping relationship between device input and page interaction logic; The cursor navigation module 400 is used to generate corresponding cursor navigation information in the target application in response to device input.
[0081] Based on the above embodiments, in one specific embodiment, the code injection module 300 can be used for: Identify the element type and layout characteristics of the target element in the page structure information; Match focus effects based on element type and focus switching logic based on layout features; Determine the corresponding focus interaction code based on the focus effect and focus switching logic; Retrieve predefined focus attribute code and page input service registration code, and inject focus interaction code, focus attribute code, and page input service registration code into the target element; the focus attribute code is used to define the focus selectability effect of the target element; the page input service registration code is used to register the triggering event of the target element in the event system framework.
[0082] Based on the above embodiments, in one specific embodiment, the code injection module 300 can be used for: By using compile-time bytecode hooking techniques, focus interaction code, focus attribute code, and page input service registration code are injected into the target element.
[0083] Based on the above embodiments, in one specific embodiment, the cursor navigation module 400 can also be used for: Identify the device type and protocol version; Match a pre-configured configuration file based on the device type and protocol version; the configuration file describes the logical mapping relationship of the device. The configuration file is parsed to configure logical mapping relationships for the device, and the input events of the device are distributed and processed through the input service and system event framework.
[0084] Based on the above embodiments, in one specific embodiment, the cursor navigation module 400 can be specifically used for: In response to input events from the device, system event mapping processing, simulated trigger processing, system event injection processing, and application scenario response processing are performed sequentially to generate corresponding cursor navigation information in the target application.
[0085] Based on the above embodiments, in one specific embodiment, the cursor navigation module 400 can be specifically used for: Determine if a configuration file matching the device type and protocol version exists; If not, the input custom event is retrieved, and a configuration file matching the device type and protocol version is created based on the custom event.
[0086] Based on the above embodiments, in one specific embodiment, the acquisition module 100 can be specifically used for: For any element in the page structure information, determine whether the element supports interactive responses; If so, then the element will be designated as the target element.
[0087] This embodiment provides an electronic device, including a processor and a memory. The memory is used to store at least one instruction. When the instruction is loaded and executed by the processor, it implements the above-described cursor navigation method. Its execution method and beneficial effects are similar and will not be described again here.
[0088] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described cursor navigation method. The execution method and beneficial effects are similar, and will not be described again here.
[0089] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.
[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for cursor navigation, characterized in that, include: Obtain page structure information during the target application compilation phase; Identify target elements based on the page structure information; Inject logical processing code into the target element to form the target application; The logic processing code is used to describe the mapping relationship between device input and page interaction logic; In response to device input, corresponding cursor navigation information is generated in the target application.
2. The method according to claim 1, characterized in that, The step of injecting logic processing code into the target element includes: Identify the element type and layout characteristics of the target element in the page structure information; Match focus effects based on the element type and match focus switching logic based on the layout features; The corresponding focus interaction code is determined based on the focus effect and the focus switching logic. Obtain predefined focus attribute code and page input service registration code, and inject the focus interaction code, focus attribute code, and page input service registration code into the target element; the focus attribute code is used to define the focus selectability effect of the target element; the page input service registration code is used to register the triggering event of the target element in the event system framework.
3. The method according to claim 2, characterized in that, The step of injecting the focus interaction code, the focus attribute code, and the page input service registration code into the target element includes: By using compile-time bytecode hooking technology, the focus interaction code, the focus attribute code, and the page input service registration code are injected into the target element.
4. The method according to claim 1, characterized in that, Before generating corresponding cursor navigation information in the target application in response to device input, the method further includes: Identify the device type and protocol version; A pre-configured configuration file is matched based on the device type and the protocol version; the configuration file is used to describe the logical mapping relationship of the devices. The configuration file is parsed to configure the logical mapping relationship for the device, and the input events of the device are distributed and processed through the input service and system event framework.
5. The method according to claim 4, characterized in that, The step of generating corresponding cursor navigation information in the target application in response to device input includes: In response to input events from the device, system event mapping processing, simulation triggering processing, system event injection processing, and application scenario response processing are performed sequentially to generate corresponding cursor navigation information in the target application.
6. The method according to claim 4, characterized in that, The step of matching a pre-set configuration file according to the device type and the protocol version includes: Determine if a configuration file matching the device type and protocol version exists; If not, the input custom event is obtained, and a configuration file matching the device type and the protocol version is created based on the custom event.
7. The method according to claim 1, characterized in that, The identification of target elements based on the page structure information includes: For any element in the page structure information, determine whether the element supports interactive responses; If so, then the element is determined as the target element.
8. A cursor navigation system, characterized in that, include: The acquisition module is used to obtain page structure information during the compilation phase of the target application; The identification module is used to identify target elements based on the page structure information; The code injection module is used to inject logical processing code into the target element to form the target application; The logic processing code is used to describe the mapping relationship between device input and page interaction logic; The cursor navigation module is used to generate corresponding cursor navigation information in the target application in response to device input.
9. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, implements the cursor navigation method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the cursor navigation method as described in any one of claims 1-7.