Search

CN-122018899-A - Cursor navigation method, system and electronic equipment

CN122018899ACN 122018899 ACN122018899 ACN 122018899ACN-122018899-A

Abstract

The invention belongs to the field of intelligent cabins, and discloses a cursor navigation method, a cursor navigation system and electronic equipment, wherein the method comprises the steps of acquiring page structure information at a compiling stage of a target application; the method includes identifying a target element based on page structure information, injecting logic processing code for the target element to form a target application, and generating corresponding cursor navigation information in the target application in response to device input. According to the invention, the page structure information is automatically acquired and the target element is identified in the compiling stage of the target application, and the logic processing code is injected for the target element, so that the mapping relation between the equipment input and the page interaction logic is realized, the deep modification of the service code is avoided, and the development and maintenance cost is reduced. Meanwhile, the decoupling of the cursor navigation function and the service module is realized by injecting logic processing codes in the compiling period, so that a user can concentrate on the development of the service logic without paying attention to specific implementation details of cursor navigation, and the development efficiency and the maintainability of codes are improved.

Inventors

  • WEI LICHENG
  • ZHAO JINGXIAO
  • YANG JINGCHENG

Assignees

  • 联通智网科技股份有限公司

Dates

Publication Date
20260512
Application Date
20251224

Claims (10)

  1. 1. A method of cursor navigation, comprising: acquiring page structure information at a compiling stage of a target application; identifying a target element based on the page structure information; injecting logic processing codes for the target elements to form target applications, wherein the logic processing codes are used for describing the mapping relation between equipment input and page interaction logic; responsive to the device input, corresponding cursor navigation information is generated in the target application.
  2. 2. The method of claim 1, wherein the injecting logic processing code for the target element comprises: Identifying element types and layout characteristics of the target elements in the page structure information; matching a focus effect according to the element type, and matching focus switching logic based on the layout characteristics; Determining a corresponding focus interaction code based on the focus effect and the focus switching logic; The method comprises the steps of obtaining a predefined focus attribute code and a page input service registration code, and injecting the focus interaction code, the focus attribute code and the page input service registration code for the target element, wherein the focus attribute code is used for defining a focus selectable effect of the target element, and the page input service registration code is used for registering a trigger event of the target element in an event system framework.
  3. 3. The method of claim 2, wherein the injecting the focus interaction code, the focus attribute code, and the page input service registration code for the target element comprises: And injecting the focus interaction code, the focus attribute code and the page input service registration code into the target element by utilizing a compiling-period byte code HOOK technology.
  4. 4. The method of claim 1, wherein prior to generating corresponding cursor navigation information in the target application in response to a device input, the method further comprises: identifying the device type and protocol version of the device; matching a preset configuration file according to the type of the equipment and the protocol version, wherein the configuration file is used for describing the logic mapping relation of the equipment; analyzing the configuration file, configuring the logic mapping relation for the equipment, and completing the distribution processing of the input event of the equipment through an input service and system event framework.
  5. 5. The method of claim 4, wherein generating corresponding cursor navigation information in the target application in response to device input comprises: and responding to the input event of the equipment, and sequentially performing system event mapping processing, simulation triggering processing, system event injection processing and application scene response processing to generate corresponding cursor navigation information in the target application.
  6. 6. The method of claim 4, wherein said matching a preset profile according to said device type and said protocol version comprises: judging whether a configuration file matched with the equipment type and the protocol version exists or not; If not, acquiring the input custom event, and creating a configuration file matched with the equipment type and the protocol version based on the custom event.
  7. 7. The method of claim 1, wherein the identifying a target element based on the page structure information comprises: judging whether the element supports response interaction or not according to any element in the page structure information; if yes, the element is determined to be the target element.
  8. 8. A cursor navigation system, comprising: the acquisition module is used for acquiring page structure information at the compiling stage of the target application; the identification module is used for identifying target elements based on the page structure information; the code injection module is used for injecting logic processing codes for the target elements to form target applications, wherein the logic processing codes are used for describing the mapping relation between equipment input and page interaction logic; and the cursor navigation module is used for responding to the input of the equipment and generating corresponding cursor navigation information in the target application.
  9. 9. An electronic device comprising a processor and a memory for storing at least one instruction that when loaded and executed by the processor implements a method of cursor navigation according to any one of claims 1-7.
  10. 10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements a method of cursor navigation according to any of claims 1-7.

Description

Cursor navigation method, system and electronic equipment Technical Field The invention relates to the field of intelligent cabins, in particular to a cursor navigation method, a cursor navigation system, electronic equipment and a computer readable storage medium. Background In the rapid development of intelligent cabin technology, a cursor navigation function has become one of key modules for realizing efficient man-machine interaction. However, in implementing the cursor navigation function, the prior art generally needs to deeply modify and adapt the service code, which results in low development efficiency and high maintenance cost. The reason for this is that there is a strong coupling relationship between the cursor navigation function and the service module, and the developer needs to write cursor focus rendering, direction control and event response logic for each interactive element of each page separately. The mode not only leads to repeated writing of a large number of homogeneous codes, but also leads to deep binding of the function realization and the business scene, and is difficult to carry out efficient iteration and maintenance. Therefore, how to improve the development efficiency of the cursor navigation function is a technical problem to be solved by those skilled in the art. Disclosure of Invention In order to solve the problem of low development efficiency of cursor navigation functions in the prior art, the invention provides a cursor navigation method, a cursor navigation system, electronic equipment and a computer readable storage medium. A method of cursor navigation, comprising: acquiring page structure information at a compiling stage of a target application; identifying a target element based on the page structure information; injecting logic processing codes for the target elements to form target applications, wherein the logic processing codes are used for describing the mapping relation between equipment input and page interaction logic; responsive to the device input, corresponding cursor navigation information is generated in the target application. Optionally, the injecting logic processing code for the target element includes: Identifying element types and layout characteristics of the target elements in the page structure information; matching a focus effect according to the element type, and matching focus switching logic based on the layout characteristics; Determining a corresponding focus interaction code based on the focus effect and the focus switching logic; The method comprises the steps of obtaining a predefined focus attribute code and a page input service registration code, and injecting the focus interaction code, the focus attribute code and the page input service registration code for the target element, wherein the focus attribute code is used for defining a focus selectable effect of the target element, and the page input service registration code is used for registering a trigger event of the target element in an event system framework. Optionally, the injecting the focus interaction code, the focus attribute code, and the page input service registration code for the target element includes: And injecting the focus interaction code, the focus attribute code and the page input service registration code into the target element by utilizing a compiling-period byte code HOOK technology. Optionally, before generating corresponding cursor navigation information in the target application in response to a device input, the method further comprises: identifying the device type and protocol version of the device; matching a preset configuration file according to the type of the equipment and the protocol version, wherein the configuration file is used for describing the logic mapping relation of the equipment; analyzing the configuration file, configuring the logic mapping relation for the equipment, and completing the distribution processing of the input event of the equipment through an input service and system event framework. Optionally, the generating, in response to the device input, corresponding cursor navigation information in the target application includes: and responding to the input event of the equipment, and sequentially performing system event mapping processing, simulation triggering processing, system event injection processing and application scene response processing to generate corresponding cursor navigation information in the target application. Optionally, the matching the preset configuration file according to the device type and the protocol version includes: judging whether a configuration file matched with the equipment type and the protocol version exists or not; If not, acquiring the input custom event, and creating a configuration file matched with the equipment type and the protocol version based on the custom event. Optionally, the identifying the target element based on the page structure information includes: judging whether the