CN117014683A - Data processing method, apparatus, device, storage medium, and program product - Google Patents

Data processing method, apparatus, device, storage medium, and program product Download PDF

Info

Publication number
CN117014683A
CN117014683A CN202211122599.7A CN202211122599A CN117014683A CN 117014683 A CN117014683 A CN 117014683A CN 202211122599 A CN202211122599 A CN 202211122599A CN 117014683 A CN117014683 A CN 117014683A
Authority
CN
China
Prior art keywords
focus
page
page element
code
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211122599.7A
Other languages
Chinese (zh)
Inventor
郭恺懿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211122599.7A priority Critical patent/CN117014683A/en
Publication of CN117014683A publication Critical patent/CN117014683A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4438Window management, e.g. event handling following interaction with the user interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a data processing method, a device, equipment, a storage medium and a program product, which are applied to various focus control scenes such as cloud technology, artificial intelligence, intelligent traffic, vehicle-mounted and the like; the data processing method comprises the following steps: executing a first code instruction to execute page focus processing, the first code instruction being obtained by compiling a business code for displaying a page in different execution environments and a focus control code for controlling display contents of the page through focus, the page focus processing comprising: displaying a page to be controlled, wherein the page to be controlled comprises initial page elements in a focus obtaining state; determining Jiao Yemian elements adapted to focus control events in response to focus control events for the initial page elements, wherein the focus control events are events triggering the focus acquisition states of the initial page elements to change; and displaying the focus obtaining page element in the focus obtaining state. The application can improve the efficiency of data processing.

Description

Data processing method, apparatus, device, storage medium, and program product
Technical Field
The present application relates to data processing technology in the field of computer applications, and in particular, to a data processing method, apparatus, device, storage medium, and program product.
Background
Multi-terminal isomorphism development refers to a process of developing a set of front-end codes and generating executable code instructions which are executed in different execution environments based on the front-end codes; however, in the multi-terminal isomorphism development process, there is often a focus control problem with respect to an execution environment of a Television (TV) terminal or the like through focus control, which affects data processing efficiency.
Disclosure of Invention
Embodiments of the present application provide a focus-based data processing method, apparatus, device, computer readable storage medium, and computer program product, which can improve the efficiency of data processing.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a data processing method based on focus, which comprises the following steps:
executing a first code instruction to execute a page focus process, wherein the first code instruction is obtained by compiling business codes and focus control codes, the business codes are used for displaying pages in different execution environments, the focus control codes are used for controlling the display content of the pages through focus, and the page focus process comprises the following steps:
displaying a page to be controlled, wherein the page to be controlled is a currently displayed page, the page to be controlled comprises an initial page element in a focus obtaining state, and the focus obtaining state refers to a state of the position of the focus;
Determining Jiao Yemian elements adapted to focus control events in response to focus control events for the initial page elements, wherein the focus control events are events triggering changes in the focus acquisition state of the initial page elements;
displaying the focus obtaining page element in the focus obtaining state.
The embodiment of the application provides a focus-based data processing device, which comprises:
the instruction execution module is used for executing page focus processing by executing a first code instruction, wherein the first code instruction is obtained by compiling service codes and focus control codes, the service codes are used for displaying pages in different execution environments, the focus control codes are used for controlling the display content of the pages through the focus, and the instruction execution module comprises a page display module and a focus processing module;
the page display module is used for displaying a page to be controlled, wherein the page to be controlled is a currently displayed page, the page to be controlled comprises an initial page element in a focus obtaining state, and the focus obtaining state refers to a state of the position of the focus;
a focus processing module, configured to determine a focus control event for the initial page element, where the focus control event is an event that triggers a change in the focus obtaining state of the initial page element, and determine a focus obtaining Jiao Yemian element that is adapted to the focus control event;
The page display module is further used for displaying the focus obtaining page element in the focus obtaining state.
In the embodiment of the application, the focus control event comprises at least one of a direction key event, a confirmation key event and a page turning key event; the direction key event is used for triggering the focus obtaining state of the initial page element to change from the direction, the confirmation key event is used for triggering the focus obtaining state of the initial page element to change from the level, and the page turning key event is used for triggering the focus obtaining state of the initial page element to change through page turning.
In the embodiment of the present application, when the focus control event includes a direction key event, the focus processing module is further configured to determine a focus movement direction in response to the direction key event for the initial page element, where the focus movement direction is a direction determined on a page presentation view angle and based on the initial page element; and determining the first page element closest to the initial page element based on at least one first page element in the focus moving direction, and determining the determined first page element as the focused page element matched with the focus control event.
In an embodiment of the present application, when at least one first page element includes a plurality of first page elements, the focus processing module is further configured to determine, for each of the plurality of first page elements in the focus moving direction, a corresponding first side boundary position, where a direction in which a side corresponding to the first side boundary position is located is opposite to the focus moving direction; acquiring a second side boundary position corresponding to the initial page element, wherein the direction of a side boundary corresponding to the second side boundary position is consistent with the focus moving direction; the first page element closest to the initial page element is selected from a plurality of the first page elements based on a distance difference between the first side boundary position and the second side boundary position.
In an embodiment of the present application, when the focus moving direction is a horizontal direction on the page display view angle, the focus processing module is further configured to select, from a plurality of first page elements, the first page element closest to the initial page element based on a linear distance difference between the first side boundary position and the second side boundary position, where a distance difference between the first side boundary position and the second side boundary position is the linear distance difference; when the focus moving direction is a vertical direction on the page display view angle, selecting a first page element closest to the initial page element from a plurality of first page elements based on a vertical distance difference between the first side boundary position and the second side boundary position and a linear distance difference between the first side boundary position and the second side boundary position, wherein the distance difference between the first side boundary position and the second side boundary position is the vertical distance difference and the linear distance difference.
In the embodiment of the present application, the focus processing module is further configured to determine, when the focus moving direction includes a specified page element corresponding to the initial page element, the specified page element as the focus obtaining page element adapted to the focus control event.
In an embodiment of the present application, the focus processing module is further configured to determine, when the focus moving direction does not include the designated page element corresponding to the initial page element, based on at least one first page element in the focus moving direction, the first page element closest to the initial page element.
In the embodiment of the present application, when the focus control event includes a confirmation key event, the focus processing module is further configured to, when a confirmation key lock is in a closed state, update the confirmation key lock from the closed state to an open state in response to the confirmation key event for the initial page element, and determine the in-focus page element adapted to the focus control event.
In the embodiment of the present application, the focus processing module is further configured to cancel a response to a re-accepted confirmation key event when the confirmation key lock is in the open state; and when the time length of the confirmation key lock in the open state is longer than the appointed time length, updating the confirmation key lock from the open state to the closed state.
In the embodiment of the present application, the focus processing module is further configured to obtain a first target height between the Jiao Yemian element and the top of the window; determining a second target height when the Jiao Yemian element is located in the window; determining a height difference between the second target height and the first target height as a roll distance; and scrolling the list where the Jiao Yemian element is located based on the scrolling distance.
In the embodiment of the present application, the page display module is further configured to display the in-focus page element in the in-focus state when scrolling of the list where the in-focus Jiao Yemian element is located is completed.
In the embodiment of the present application, the focus processing module is further configured to obtain a current focus level, where the initial page element is a level obtaining Jiao Yemian element of the current focus level, and the level obtaining Jiao Yemian element is a page element in the focus-obtaining state in the focus level when entering a sub-level.
In an embodiment of the present application, the focus processing module is further configured to determine a next focus level in response to the focus control event for the initial page element; determining the Jiao Yemian element adapted to the focus control event from at least one second page element of the next focus level when the next focus level is a child level of the current focus level; when the next focus level is a parent level of the current focus level, the level of the next focus level is determined to be the in-focus page element adapted to the focus control event as Jiao Yemian element.
In the embodiment of the application, the focus-based data processing device further comprises an instruction acquisition module, wherein the instruction acquisition module is used for packing the service code and a first frame library to obtain a first code to be compiled when the packing instruction is a first packing instruction, and the first frame library comprises the focus control code; compiling the first code to be compiled to obtain the first code instruction, wherein the first code instruction is webpage data executed in a first execution environment, and the first execution environment controls display content through a focus and is different from the development environment of the service code.
In the embodiment of the present application, the instruction obtaining module is further configured to, when the packaging instruction is a second packaging instruction, package the service code and the second frame library to obtain a second code to be compiled, and compile the second code to be compiled to obtain a second code instruction, where the second code instruction is web page data executed in a second execution environment, and the second execution environment controls display content in a touch manner and is different from a development environment of the service code; and when the packaging instruction is a third packaging instruction, packaging the service code and a third framework library to obtain a third code to be compiled, and compiling the third code to be compiled to obtain a third code instruction, wherein the third code instruction is client data for execution in a third execution environment, and the third execution environment is the same as the development environment of the service code.
An embodiment of the present application provides a focus-based data processing apparatus, including:
a memory for storing computer executable instructions;
and the processor is used for realizing the focus-based data processing method provided by the embodiment of the application when executing the computer executable instructions stored in the memory.
The embodiment of the application provides a computer readable storage medium, which stores computer executable instructions for realizing the focus-based data processing method provided by the embodiment of the application when being executed by a processor.
The embodiment of the application provides a computer program product, which comprises a computer program or a computer executable instruction, wherein the computer program or the computer executable instruction realizes the focus-based data processing method provided by the embodiment of the application when being executed by a processor.
The embodiment of the application has at least the following beneficial effects: because the service codes are used for displaying the pages in different execution environments, the focus control codes are used for controlling the display content of the pages through the focus, and therefore the first code instruction is obtained by compiling the focus control codes and the service codes together, when the first code instruction is executed, the page display can be realized, the control of the page display content through the focus can be realized, the focus control problem is solved, and the data processing efficiency can be improved.
Drawings
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present application;
fig. 2 is a schematic diagram of a composition structure of the terminal in fig. 1 according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a focus-based data processing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an exemplary display to control page provided by an embodiment of the present application;
FIG. 5 is a second flow chart of a focus-based data processing method according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a focus-based data processing method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an exemplary cross-end development architecture provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of an exemplary focus movement provided by an embodiment of the present application;
FIG. 9 is a second exemplary focus movement schematic provided by an embodiment of the present application;
FIG. 10 is a third exemplary focus movement schematic provided by an embodiment of the present application;
fig. 11 is a schematic diagram of an exemplary focus movement provided by an embodiment of the present application.
Detailed Description
The present application will be further described in detail with reference to the accompanying drawings, for the purpose of making the objects, technical solutions and advantages of the present application more apparent, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, the terms "first", "second", "third" and the like are merely used to distinguish similar objects and do not represent a particular ordering of the objects, it being understood that the "first", "second", "third" may be interchanged with a particular order or sequence, as permitted, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the embodiments of the application is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
Before describing embodiments of the present application in further detail, the terms and terminology involved in the embodiments of the present application will be described, and the terms and terminology involved in the embodiments of the present application will be used in the following explanation.
1) Artificial intelligence (Artificial Intelligence, AI), is a theory, method, technique, and application system that simulates, extends, and extends human intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, obtains knowledge, and uses the knowledge to obtain optimal results.
2) Machine Learning (ML), a multi-domain interdisciplinary, involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. Specially researching how a computer simulates or implements learning behavior of a human to acquire new knowledge or skill; reorganizing the existing knowledge structure to continuously improve the performance of the knowledge structure. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning typically includes techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, and induction learning.
3) An artificial neural network, which is a mathematical model that mimics the structure and function of a biological neural network, exemplary structures of the artificial neural network in embodiments of the present application include a graph roll-up network (Graph Convolutional Network, GCN, a neural network for processing data of the graph structure), a deep neural network (Deep Neural Networks, DNN), a convolutional neural network (Convolutional Neural Network, CNN) and a cyclic neural network (Recurrent Neural Network, RNN), a neural state machine (Neural State Machine, NSM), and a Phase-function neural network (Phase-Functioned Neural Network, PFNN), etc. In the embodiment of the application, the focus obtaining page element adapted to the focus control event can be determined through a model corresponding to the artificial neural network.
4) Code instructions, which refer to native instructions executable by a device, are used to display pages on the device side. For example, the first code instruction, the second code instruction, and the third code instruction provided in the embodiments of the present application.
In the multi-terminal isomorphic development process, focus control problems often exist in an execution environment through focus control for a television terminal and the like, so that the data processing efficiency is affected; for example, executable code of a TV scene generated by a cross-end development framework (real Native framework) cannot realize focus control when executed by a displayed Web page. In addition, in the multi-terminal isomorphic development process, grammar and ecology are different aiming at a development environment and an execution environment, so that a migration problem exists.
Based on the above, the embodiments of the present application provide a focus-based data processing method, apparatus, device, computer readable storage medium and computer program product, which can solve the focus control and migration problems. The following describes an exemplary application of the focus-based data processing device (hereinafter referred to as a data processing device) provided by the embodiments of the present application, where the data processing device provided by the embodiments of the present application may be implemented as various types of terminals such as a smart phone, a smart watch, a notebook computer, a tablet computer, a desktop computer, an intelligent home appliance, a set-top box, an intelligent vehicle-mounted device, a portable music player, a personal digital assistant, a dedicated messaging device, an intelligent voice interaction device, a portable game device, and an intelligent sound box, and may also be implemented as a server. In the following, an exemplary application when the data processing apparatus is implemented as a terminal will be described.
With reference now to FIG. 1, FIG. 1 is a schematic diagram illustrating an architecture of a data processing system in accordance with an embodiment of the present application; as shown in FIG. 1, to support a data processing application, in data processing system 100, a terminal 400 (terminal 400-1 and terminal 400-2 are illustratively shown, referred to as a data processing device) is coupled to server 200 via a network 300, where network 300 may be a wide area network or a local area network, or a combination of both. In addition, database 500 is included in data processing system 100 for providing data support to server 200; also, the database 500 is shown in fig. 3 as a case independent of the server 200, and in addition, the database 500 may be integrated in the server 200, which is not limited in the embodiment of the present application.
A terminal 400 for receiving a first packet instruction sent by the server 200 through the network 300, and executing a first code instruction to perform a page focus process, wherein the first code instruction is obtained by compiling a service code for displaying a page in different execution environments (including a first execution environment, a second execution environment, and a third execution environment), and a focus control code for controlling display contents of the page through the focus, the page focus process comprising: displaying a page to be controlled, wherein the page to be controlled is a currently displayed page, and comprises initial page elements in a focus obtaining state, and the focus obtaining state refers to a state of a position of a focus; determining Jiao Yemian elements adapted to focus control events in response to focus control events for the initial page elements, wherein the focus control events are events triggering changes in focus acquisition states of the initial page elements; the in-focus page elements in the in-focus state are displayed at a graphical interface (graphical interface 410-1 and graphical interface 410-2 are illustratively shown).
The server 200 is configured to package the service code and the first frame library to obtain a first code to be compiled when the package instruction is a first package instruction, where the first frame library includes a focus control code; compiling a first code to be compiled to obtain a first code instruction, wherein the first code instruction is webpage data executed in a first execution environment, and the first execution environment controls display content through a focus and is different from a development environment of a service code; the first packet instruction is sent to the terminal 400 through the network 300.
It should be noted that, the processing of the server 200 may be integrated on the terminal 400, and of course, the processing of the terminal 400 may be integrated on the server, which is not limited in the embodiment of the present application.
In some embodiments, the server 200 may be a stand-alone physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs, content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 400 may be, but is not limited to, a smart phone, a smart watch, a notebook computer, a tablet computer, a desktop computer, a smart television, a set-top box, a smart car device, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device, a smart speaker, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiment of the present application.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a terminal in fig. 1 according to an embodiment of the present application, and a terminal 400 shown in fig. 2 includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in terminal 400 are coupled together by a bus system 440. It is understood that the bus system 440 is used to enable connected communication between these components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled in fig. 2 as bus system 440.
The processor 410 may be an integrated circuit chip having signal processing capabilities such as a general purpose processor, such as a microprocessor or any conventional processor, or the like, a digital signal processor (DSP, digital Signal Processor), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable presentation of the media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
Memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard drives, optical drives, and the like. Memory 450 optionally includes one or more storage devices physically remote from processor 410.
Memory 450 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a random access Memory (RAM, random Access Memory). The memory 450 described in embodiments of the present application is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 451 including system programs, e.g., framework layer, core library layer, driver layer, etc., for handling various basic system services and performing hardware-related tasks, for implementing various basic services and handling hardware-based tasks;
a network communication module 452 for accessing other electronic devices via one or more (wired or wireless) network interfaces 420, the exemplary network interface 420 comprising: bluetooth, wireless compatibility authentication (Wi-Fi), universal serial bus (USB, universal Serial Bus), and the like;
A presentation module 453 for enabling presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, speakers, etc.) associated with the user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the focus-based data processing apparatus provided in the embodiments of the present application may be implemented in software, and fig. 2 shows the focus-based data processing apparatus 455 stored in the memory 450, which may be software in the form of a program, a plug-in, or the like, including the following software modules: an instruction execution module 4551 and an instruction acquisition module 4552, wherein the instruction execution module 4551 comprises a page display module 45511 and a focus processing module 45512, which are logical, and thus may be arbitrarily combined or further split depending on the functions implemented. The functions of the respective modules will be described hereinafter.
In some embodiments, the focus-based data processing apparatus provided by the embodiments of the present application may be implemented in hardware, and by way of example, the focus-based data processing apparatus provided by the embodiments of the present application may be a processor in the form of a hardware decoding processor programmed to perform the focus-based data processing method provided by the embodiments of the present application, for example, the processor in the form of a hardware decoding processor may employ one or more application-specific integrated circuits (ASIC, application Specific Integrated Circuit), DSP, programmable logic device (PLD, programmable Logic Device), complex programmable logic device (CPLD, complex Programmable Logic Device), field programmable gate array (FPGA, field-Programmable Gate Array), or other electronic component.
In some embodiments, the terminal or the server may implement the focus-based data processing method provided by the embodiment of the present application by running a computer program. For example, the first code instruction may be a Native Application (APP), i.e. a program that needs to be installed in an operating system to be run, such as a live APP or a video APP; the method can also be an applet, namely a program which can be run only by being downloaded into a browser environment; but also an applet that can be embedded in any APP. In general, the computer programs described above may be any form of application, module or plug-in.
In the following, a focus-based data processing method provided by an embodiment of the present application will be described in connection with exemplary applications and implementations of the data processing apparatus provided by the embodiment of the present application. In addition, the data processing method based on the focus is applied to various focus control scenes such as cloud technology, artificial intelligence, intelligent traffic, vehicle-mounted and the like.
Referring to fig. 3, fig. 3 is a schematic flow chart of a focus-based data processing method according to an embodiment of the present application, and the steps shown in fig. 3 will be described.
In the embodiment of the present application, the data processing device executes the page focus processing by executing the first code instruction, where the first code instruction is obtained by compiling a service code and a focus control code, the service code is used to display a page in different execution environments, the focus control code is used to control the display content of the page through the focus, and the page focus processing includes steps 301 to 303, and each step is described below separately.
And 301, displaying a page to be controlled, wherein the page to be controlled comprises an initial page element in a focus obtaining state.
In the embodiment of the application, the data processing equipment responds to the code execution instruction and executes the first code instruction to display the page, namely the page to be controlled; and, the display content in the page to be controlled includes an initial page element.
It should be noted that, the code execution instruction may be an instruction generated in response to a received operation (for example, an operation of receiving an entry of the user into the membership page), an instruction generated by triggering a specified event (for example, a current video playing completion event), or the like, which is not limited by the embodiment of the present application. The page to be controlled is a currently displayed page, and the focus obtaining state refers to the state of the position of the focus; the initial page element is a page element at the position of the current focus in the page to be controlled, wherein the page element is page content which can be controlled by the focus in the page, such as a button, a tab, an area, a text, a picture, a graphic and the like; in addition, the page to be controlled may include other page elements in addition to the initial page element.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating an exemplary page to be controlled according to an embodiment of the present application; as shown in fig. 4, the page to be controlled 4-1 is a member center page; wherein, the initial page element 4-11 in the focus obtaining state is a button for switching account numbers; in addition, the page to be controlled 4-1 also displays personal related information 4-12 such as head portraits, nicknames, prompt information (… number … … for you is a super movie member, clicking to switch accounts), and "purchase protocol" buttons, a price list 4-13, two-dimensional codes 4-14, buttons 4-15, and a personal asset list 4-16.
Step 302, in response to a focus control event for an initial page element, determining a focus-achieved page element that is adapted to the focus control event.
In the embodiment of the application, when the data processing equipment detects an event triggering the change of the focus acquisition state of the initial page element, a focus control event aiming at the initial page element is detected; thus, at this time, the data processing apparatus performs a focus seeking process to determine a page element at the next focus position in response to the focus control event, and thus obtains a focused page element adapted to the focus control event.
It should be noted that, the focus control event refers to an event that triggers a change of a focus acquisition state of an initial page element, that is, a focus movement event, where the focus movement event is triggered by receiving a focus movement instruction sent by a focus control device; the focus control device is used for controlling the movement of a focus, such as a keyboard, a remote controller, a laser pen and the like.
It should be further noted that the focus control event includes at least one of a direction key event, a confirm key event, and a page-turning key event; the direction key event is a direction key pressed event, and is used for triggering the focus acquisition state of the initial page element to change from the direction; the confirming key event is a confirming key pressed event, and is used for triggering the focus acquisition state of the initial page element to change from the hierarchy; the page turning button event refers to an event that a page turning button is pressed down, and is used for triggering the focus obtaining state of the initial page element to change through page turning.
Step 303, displaying the focus obtaining page element in the focus obtaining state.
In the embodiment of the application, after the data processing equipment determines the in-focus page element, the in-focus page element in the in-focus state is displayed. The focus obtaining page element may be a page element in the page to be controlled, or may be a page element outside the page to be controlled, which is not limited in the embodiment of the present application. When the focus obtaining page element can be a page element in a page to be controlled, the page to be controlled is indicated to comprise an initial page element and a focus obtaining Jiao Yemian element, and at the moment, the data processing equipment can display the focus obtaining Jiao Yemian element in the focus obtaining state and simultaneously can display the initial page element in the focus losing state; here, the defocus state refers to a position where the focus is not located, and the defocus state and the focus acquisition state are two opposite states.
It should be noted that, the detection and processing of the focus control event is realized by the focus control code; the focus control code is a focus control module, and is configured to interact with a service component (for example, a focus component, a ScrollView component, a Modal component) corresponding to a page element, perform processing of a focus control event (for example, a browser event, a frame event (Hippy event) corresponding to a service code development environment), and return a processing result (called a per Jiao Yemian element) to the service component, so as to display the in-focus page element in an in-focus state through the service code.
It can be understood that, because the service code is used for displaying the page and the focus control code is used for controlling the display content of the page through the focus, the first code instruction is obtained by compiling the focus control code and the service code together, so that when the first code instruction is executed, the page display can be realized, and meanwhile, the control of the page display content through the focus can be realized, the focus control problem is solved, and the efficiency of data processing can be improved.
Referring to fig. 5, fig. 5 is a second flowchart of a focus-based data processing method according to an embodiment of the present application; as shown in fig. 5, in an embodiment of the present application, when the focus control event includes a direction key event, step 302 may be implemented through steps 3021 and 3022; that is, the data processing apparatus determines Jiao Yemian elements adapted to the focus control event in response to the focus control event for the initial page element, including steps 3021 and 3022, which will be described below, respectively.
Step 3021, determining a focus movement direction in response to a direction key event for the initial page element.
It should be noted that the direction key event refers to focal movement in a direction based on the initial page element, so that the data processing apparatus can obtain an angular movement direction corresponding to the direction key event in response to the direction key event; the focus moving direction refers to a direction determined by taking an initial page element as a reference, for example, any one of the four directions of up, down, left and right, on the page display view angle.
Step 3022, determining a first page element closest to the initial page element based on at least one first page element in the focus moving direction, and determining the determined first page element as a focused page element adapted to the focus control event.
In the embodiment of the application, the data processing device acquires all page elements in the focus moving direction, and at least one first page element is acquired; next, the data processing device selects a page element closest to the initial page element from at least one first page element; here, when at least one first page element is one first page element, the one first page element is the page element closest to the initial page element; when at least one first page element is a plurality of first page elements, the data processing apparatus selects a page element closest to the initial page element from the plurality of first page elements.
It can be understood that when the data processing device performs focus searching processing in response to the direction key event, the page element which is determined based on the focus moving direction and is closest to the focus moving direction is determined as the Jiao Yemian element, so that the stability of the focus moving process can be improved, and the focus moving effect can be improved.
In the embodiment of the present application, when the at least one first page element includes a plurality of first page elements, the data processing apparatus in step 3022 determines, based on the at least one first page element in the focus movement direction, a first page element closest to the initial page element, including: the data processing device determines a corresponding first side boundary position for each of a plurality of first page elements in a focus movement direction; acquiring a second side edge position corresponding to the initial page element; and selecting a first page element closest to the initial page element from the plurality of first page elements based on a distance difference between the first side boundary position and the second side boundary position.
It should be noted that the page element has a side boundary, including a side boundary in which the direction is consistent with the focus moving direction, and a side boundary in which the direction is opposite to the focus moving direction; the first side boundary position is the position of the side boundary of the first page element, and the direction of the corresponding side boundary is opposite to the focus moving direction; the second side edge position is the position of the side boundary of the initial page element, and the direction of the corresponding side boundary is consistent with the focus moving direction. Here, the first page element corresponding to the minimum distance difference obtained by the data processing apparatus is the first page element closest to the initial page element.
In an embodiment of the present application, a data processing apparatus selects a first page element closest to an initial page element from a plurality of first page elements based on a distance difference between a first side boundary position and a second side boundary position, including: when the focus moving direction is a horizontal direction on the page display view angle, the data processing apparatus selects a first page element closest to the initial page element from among the plurality of first page elements based on a linear distance difference between the first side boundary position and the second side boundary position.
It should be noted that, the focus moving direction is a horizontal direction on the page display view angle, or is a vertical direction on the page display view angle; and the distance difference between the first side boundary position and the second side boundary position includes at least one of a vertical distance difference and a linear distance difference. Here, when the focus movement direction is a horizontal direction on the page presentation view angle (for example, a focus movement direction obtained when the left key is pressed, a focus movement direction obtained when the right key is pressed), the distance difference between the first side boundary position and the second side boundary position is a straight line distance difference, and the first page element closest to the initial page element obtained by the data processing apparatus is the first page element closest to the straight line distance of the initial page element.
In an embodiment of the present application, a data processing apparatus selects a first page element closest to an initial page element from a plurality of first page elements based on a distance difference between a first side boundary position and a second side boundary position, including: when the focus moving direction is a vertical direction on the page showing view angle, the data processing apparatus selects a first page element closest to the initial page element from the plurality of first page elements based on a vertical distance difference between the first side boundary position and the second side boundary position, and a linear distance difference between the first side boundary position and the second side boundary position.
When the focus movement direction is a vertical direction on the view angle of the page display (for example, a focus movement direction obtained when the up button is pressed, and a focus movement direction obtained when the down button is pressed), the distance difference between the first side boundary position and the second side boundary position is a vertical distance difference and a linear distance difference, and the first page element closest to the initial page element obtained by the data processing apparatus is the first page element closest to the initial page element and closest to the vertical distance. In addition, since the sizes of the respective page elements in the same horizontal direction may be different, at this time, the data processing apparatus may determine the first page element whose straight line is closest to and whose vertical distance is closest to in combination with the vertical distance error range.
With continued reference to fig. 5, in an embodiment of the present application, step 3023 is further included after step 3021; that is, after the data processing apparatus determines the focus movement direction in response to the direction key event for the initial page element, the focus-based data processing method further includes step 3023, which will be described below.
Step 3023, when the focus moving direction includes a specified page element corresponding to the initial page element, determining the specified page element as a focused page element adapted to the focus control event.
In the embodiment of the application, after the data processing equipment obtains the focus moving direction, judging whether an initial page element is preset with a specified page element in the focus moving direction, and when judging that the initial page element is preset with the specified page element in the focus moving direction, namely, the data processing equipment comprises the specified page element corresponding to the initial page element in the focus moving direction; thus, the data processing apparatus directly determines the specified page element as a focus-achieved page element adapted to the focus control event. The designated page element is a page element which is designated to be in focus in a focus moving direction preset for the initial page element.
With continued reference to fig. 5, in an embodiment of the present application, step 3022 is implemented by step 30221; that is, the data processing apparatus determines, based on at least one first page element in the focus movement direction, a first page element closest to the initial page element, and determines the determined first page element as the element Jiao Yemian adapted to the focus control event, including step 30221, which will be described below.
Step 30221, when the focus moving direction does not include the designated page element corresponding to the initial page element, determining, based on at least one first page element in the focus moving direction, a first page element closest to the initial page element, and determining the determined first page element as a focus obtaining page element adapted to the focus control event.
When the data processing device determines that the initial page element is not preset with the specified page element in the focus moving direction, the data processing device is that the focus moving direction does not include the specified page element corresponding to the initial page element; thus, the data processing device determines a focused page element adapted to the focus control event based on at least one first page element in the focus movement direction.
It will be appreciated that the data processing apparatus may set, in advance, the specified focused page element in the focus moving direction for the initial page element to determine the element Jiao Yemian, or may determine the element Jiao Yemian by the closest distance in the focus moving direction, so that flexibility of focus movement can be improved.
In an embodiment of the present application, when the focus control event includes a confirm key event, the data processing apparatus determines Jiao Yemian elements adapted to the focus control event in response to the focus control event for the initial page element in step 302, including: when the confirmation key lock is in the closed state, the data processing device responds to the confirmation key event for the initial page element, updates the confirmation key lock from the closed state to the open state, and determines the focus-achieved page element matched with the focus control event.
In an embodiment of the present application, after the data processing device updates the confirmed key lock from the closed state to the open state, the focus-based data processing method further includes: when the confirmation key lock is in an open state, the data processing equipment cancels the response to the received confirmation key event again; and when the time length for confirming that the key lock is in the open state is longer than the appointed time length (for example, 400 milliseconds), the key lock is updated from the open state to the closed state.
It should be noted that, the data processing device responds to the confirmation key event in combination with the state of the confirmation key lock; that is, the data processing apparatus responds to the focus control event only when it confirms that the key lock is in the off state, and cancels the response to the focus control event when it confirms that the key lock is in the on state.
It should be further noted that, the maximum time length of the confirmation key lock in the open state is a specified time length, so that when the time length of the confirmation key lock in the open state is greater than the specified time length, the data processing device updates the confirmation key lock to the closed state to continue to respond to the subsequently received confirmation key event.
It can be understood that the data amount device responds to the focus control event when the confirmation key lock is in the closed state, and updates the confirmation key lock from the closed state to the open state so as to cancel the response to the subsequently received focus control event, so that the response to the misoperation (such as repeatedly pressing the confirmation key) can be canceled, and the accuracy of responding to the confirmation key event is improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a focus-based data processing method according to an embodiment of the present application; as shown in fig. 6, in the embodiment of the present application, step 302 further includes steps 304 to 307; that is, after the data processing apparatus determines the in-focus page element adapted to the focus control event in response to the focus control event for the initial page element, the focus-based data processing method further includes steps 304 to 307, which will be described below.
Step 304, obtaining a first target height between the Jiao Yemian element and the top of the window.
It should be noted that when the element Jiao Yemian is not completely in the window, or the element of the focused page is not centrally displayed in the window, scrolling of the list of the element Jiao Yemian is triggered. When the data processing equipment calculates the rolling distance, acquiring a first target height between Jiao Yemian elements and the top of the window; when the sum of the first target height and the height of the element to be burnt is larger than the height of the window, the element to be obtained Jiao Yemian is not completely located in the window. In addition, the window is determined based on the display range of the screen.
Step 305, determining a second target height when the Jiao Yemian element is located in the window.
It should be noted that, when the data processing apparatus determines that the element Jiao Yemian is located at the second target height in the window, the element Jiao Yemian is located in the window, or the element Jiao Yemian is located at the center in the window, or the element Jiao Yemian is located at the top of the window, or the element Jiao Yemian is located at the bottom of the window, or the element Jiao Yemian is located at any position in the window, or the like, which is not limited in this embodiment of the present application.
Step 306, determining the height difference between the second target height and the first target height as the rolling distance.
In an embodiment of the application, the data processing device determines the height difference between the second target height and the first target height as the scrolling distance of the list.
Step 307, scrolling the list of the focus page elements based on the scroll distance.
Note that, the scroll direction of the element Jiao Yemian is opposite to the focus moving direction, and after the data processing apparatus obtains the scroll distance, the list in which the element Jiao Yemian is located is scrolled in the opposite direction to the focus moving direction by the determined scroll distance.
With continued reference to FIG. 6, in an embodiment of the present application, step 303 is implemented by step 3031; that is, the data processing apparatus displays the element Jiao Yemian in the focus-obtained state, including step 3031, which is described below.
Step 3031, when the scrolling of the list where the element Jiao Yemian is located is finished, displaying the element of the focus-obtained page in the focus-obtained state.
It should be noted that when the data processing apparatus completes scrolling the list of Jiao Yemian elements, in the currently displayed window, the in-focus page element in the in-focus state is displayed.
In an embodiment of the present application, before the data processing apparatus determines the in-focus page element adapted to the focus control event in response to the focus control event for the initial page element in step 302, the focus-based data processing method further includes: the data processing device obtains a current focus level.
It should be noted that the data processing device is further configured to record a level where the focus is located; the current focus level is the level where the current focus is located, the initial page element is the level obtaining Jiao Yemian element of the current focus level, and the level obtaining Jiao Yemian element is the page element in the focus state in the focus level when entering the sub-level.
Accordingly, in step 302 of the embodiment of the present application, the data processing apparatus, in response to the focus control event for the initial page element, determines a get Jiao Yemian element adapted to the focus control event, including: the data processing apparatus determining a next focus level in response to a focus control event for the initial page element; when the next focus level is a sub-level of the current focus level, the data processing apparatus determines Jiao Yemian elements adapted to the focus control event from at least one second page element in the next focus level; when the next focus level is a parent level of the current focus level, the data processing apparatus determines a level of the next focus level as Jiao Yemian element as a focused page element adapted to the focus control event.
It should be noted that, when the focus control event indicates to change the current focus level, the data processing apparatus determines the next focus level in response to the focus control event first; the next focus level refers to the level where the next focus is located, and may be a child level of the current focus level or a parent level of the current focus level. When the next focus level is a child level of the current focus level, the data processing apparatus records Jiao Yemian elements of the current focus level as initial page elements to determine the initial page elements as Jiao Yemian elements when the data processing apparatus reenters the current focus level by focus level rollback (i.e., is the current focus level as a parent level); when the next focus level is a parent of the current focus level, the data processing apparatus determines a level obtained Jiao Yemian element of the next focus level of the record as a focused page element adapted with the focus control event.
In an embodiment of the present application, before the data processing apparatus performs the page focus processing by executing the first code packet, the focus-based data processing method further includes: when the packing instruction is a first packing instruction, the data processing equipment packs the service code and the first frame library to obtain a first code to be compiled; and compiling the first code to be compiled to obtain the first code instruction.
It should be noted that, the first packet instruction is configured to instruct to package the service code into a page code that runs in the first execution environment and is controlled by the focus; the first framework library comprises focus control codes, the first code instructions are webpage data executed in a first execution environment, and the first execution environment displays content through focus control and is different from a development environment of service codes. For example, when the development environment is a development environment of a "Hippy" framework, the first execution environment is an execution environment of an embedded web view (WebView) engine.
In an embodiment of the present application, the focus-based data processing method further includes: and when the packaging instruction is a second packaging instruction, the data processing equipment packages the service code and the second frame library to obtain a second code to be compiled, and compiles the second code to be compiled to obtain a second code instruction.
It should be noted that, the second packing instruction is configured to instruct to pack the service code into a page code that is running in the second execution environment and is controlled by a touch manner; the second code instruction is web page data executed in a second execution environment, and the second execution environment controls display content in a touch mode and is different from a development environment of the service code.
In an embodiment of the present application, the focus-based data processing method further includes: and when the packaging instruction is a third packaging instruction, the data processing equipment packages the service code and the third frame library to obtain a third code to be compiled, and compiles the third code to be compiled to obtain a third code instruction.
It should be noted that, the third packing instruction is configured to instruct to pack the service code into a client code running in the third execution environment; the third execution environment is the same as the development environment of the service code.
In the following, an exemplary application of the embodiment of the present application in a practical application scenario will be described. This exemplary application describes a process for generating a TV Web page based on a cross-end development framework (e.g., hippy framework).
Referring to FIG. 7, FIG. 7 is a schematic diagram of an exemplary cross-end development architecture provided by embodiments of the present application; as shown in FIG. 7, the exemplary cross-end development architecture includes business code 7-1, a framework library 7-2, a packaging tool 7-3, and a terminal environment 7-4, each of which is described separately below.
The business code 7-1 is a front-end code developed through a Hippy framework and comprises a business page code 7-11 and a business base code 7-12; the service page code 7-11 is a code developed for different page functions, and the service base library code 7-12 is used to implement various functions in the service, and is called by the service page code 7-11 to display a service page (simply referred to as a page).
The terminal environment 7-4 comprises a client environment 7-41 (called a third execution environment), a mobile end webpage environment 7-42 (called a second execution environment) and a television end webpage environment 7-43 (called a third execution environment); wherein the client side environment 7-41 refers to an execution environment comprising a Hippy engine, and can realize focus control; the mobile terminal webpage environment 7-42 is an execution environment which comprises a webpage view (Webview) engine and controls page display content in a touch mode; the tv-side web page environments 7-43 are execution environments including Webview engines and displaying content through focus control pages, such as execution environments corresponding to smart tv terminals or smart boxes.
The frame library 7-2 comprises frame libraries corresponding to different execution environments respectively; that is, the frame libraries 7-21 (Hippy-React and React, referred to as third frame library) corresponding to the client side environment 7-41, the frame libraries 7-22 (Hippy-React-Web and React, referred to as second frame library) corresponding to the mobile side Web environment 7-42, and the frame libraries 7-23 (Hippy-React-TV-Web and React, referred to as first frame library) corresponding to the television side Web environment 7-43 are included. Because focus control cannot be achieved in the television-side webpage environment 7-43, the Hippy-reaction-TV-Web content in the framework library 7-23 comprises a focus control module 7-231 (called a focus control code) for detecting a direction key event, searching and selecting an element (called a page element) adjacent in a corresponding direction from a current focus obtaining element, then triggering a focus losing event of an initial element and a focus obtaining event of a selected element respectively, and finally controlling the list to roll based on the condition that the focus obtaining element is in the list so as to enable the focus obtaining element to move to a proper position in the window.
Packaging tool 7-3 (Hippy-TV-Pack) for packaging the service code 7-1 in combination with the corresponding frame library 7-2 into Hippy APP executable in the client environment 7-41, mobile Web page executable in the mobile Web environment 7-42, and TV Web page executable in the mobile Web environment 7-42, respectively.
Note that, since the focus control modules 7-231 are implemented by interacting with a component unit (for example, a Focusable component) of the user page, the Focusable component will be described herein.
And a Focusable component, configured to request a focus control event from the focus control module 7-231 when the element in the focus obtaining state is mounted, or the state of the element is changed from the focus losing state to the focus obtaining state. When the received focus control event is a focus acquisition event, the focus control event is acquired by executing the code "handleFocus (e) { const { onFocus } = this. The method comprises the steps of (through a handleFocus () method, firstly calling back an onFocus method set on a service side) } this.setState ({ isFocus: e.focus }) (updating a component isFocus state through a setState method), and realizing the updating of a focus state. When the received focus control event is a confirm key event, executing the code "handleClick () { const { onClick } = this. Tips; onClick (); and } ") to effect a response to the confirmation key. The method is also used for controlling focus acquisition of the element, for example, by setting attribute 'tabindex= -1' to prohibit keyboard navigation to acquire focus to the element, so as to solve the problem of focus control disorder; and by setting properties (e.g., view-name, focusableid and requestfocus), the focus control module 7-231 may also be enabled to identify the element as a focus available element ("view-name ': focus'"), send a focus control event request ("focus safe: this.focus safe eid"), trigger active focus acquisition ("requestfocus=true"), etc., and additionally include a property of the current focus available state ("isfocus: this.state. Isfocus. Tostring").
The following describes the processes of the focus control module 7-231 for implementing focus control, including an event detection process, a focus finding process, a focus acquisition and click processing process, a list scrolling process, and a multi-level focus processing process.
During event detection, the focus control module 7-231 is able to detect browser events and component events (Hippy events). The browser event may be detected through a front-end code library (e.g., zepto library, a lightweight JavaScript library), and the browser event includes a direction key event (keydown), a confirm key event (keyup), and a list scroll end event (transitionend).
The direction KEY event is an operation of detecting that the direction KEY is pressed, and the detection code is "$ (window. Document) & on (' keydown, (e) = > { if ((e.keycode= =key_up|e.keycode= =key_right|e.keycode= =key_down|e.keycode= =key_left) |and { this.handlekeydown event (e) }). ". In addition, the response to the direction key event is canceled in the list scrolling process, so that the problem of picture jitter is solved.
Confirm KEY event, which is to detect the release operation after the confirm KEY is pressed, the detection code is "$ (window. Document) & on ('KEY up', (e) = > { if (e.key code= = = key_enter) { this. Handle click ($currentfocus);}); ". It can be understood that by detecting the operation of confirming the release of the key, the resource consumption of continuously responding to the operation of confirming the release of the key is reduced when the key is pressed and not released in time, and accurate response is realized.
A list scroll end event, which means that the completion of scrolling of the list is detected; because the rolling identifier is in a rolling state currently and does not respond to the direction key event in the list rolling process, at the moment, the corresponding rolling identifier is updated to a rolling ending state so as to restore the response to the direction key event, and the corresponding code is "$ (window. Document) & on ('transitionend', (e) = > { TVfocus. ClearListViewScrolling ()); ".
Component events, including a focus event (request_focus) requested by a focus component, an event (scroll_view_scroll_to) scrolled to specified coordinates by a scroll component (e.g., a scroll view component), a pop-up event (e.g., a Modal component) show/hide event (model_show/model_hide), and a list scroll control event (call_dom, an event in which the DOM is directly operated by the service side via JS). Illustratively, the detection code of the focus event requested by the focus component is "this.listner= new HippyEventListener ('request_focus'); this is. Listner. Addcallback = > (const domnode= findNodeHandle (component); this is. Handlefocus ($ (DOMNode)); ".
In the focus searching process, the focus shows the position of the currently selected content, and the movement of the focus can be controlled by a remote controller or a keyboard and other focus control equipment, so that two principles of cross movement and near movement are adopted in order to realize the smoothness and rationality of the movement of the focus.
It should be noted that, the cross movement means that the focus is moved in a "cross" shape according to up/down/left/right (with the element display view angle as a reference) keys of the focus control apparatus; the screen content area is divided regularly and is moved in the horizontal direction or the vertical direction without a vacant element. The near movement means that the focus is sequentially moved during the movement of the focus, i.e., the focus movement direction corresponds to the operation of up/down/left/right keys of the focus control apparatus and is sequentially moved to the nearest position from the position where the previous focus was located.
Here, the process of moving the focus using two principles of cross movement and near movement is described taking the rightward search for the next focus as an example. Referring to fig. 8, fig. 8 is a schematic diagram illustrating an exemplary focus movement provided by an embodiment of the present application; as shown in fig. 8, the x-axis of the coordinate axis is located in the horizontal direction of the element display view angle, the y-axis is located in the vertical direction of the element display view angle, and the position point 8-1 is the origin of coordinates (0, 0); the elements 8-21 in the list are current focus obtaining elements, and the list also comprises the elements 8-22 to 8-24. Firstly, acquiring position information of elements 8-21, including center point coordinates (cx 1, cy 1) and right boundary midpoint coordinates (cr, cy 1) (called second side boundary positions), and acquiring corresponding center point coordinates (nx 1, ny 1) for each element except the elements 8-21 in the list; then, the elements of cr1< nx1 are acquired, and a list ($focusable) of available elements is obtained; finally, obtaining the midpoint coordinates (nl, ny 1) of the left boundary of each obtainable coke element in the obtainable coke element list (called a first side boundary position) so as to determine the element with the smallest distance with the element 8-2 from the elements 8-22 to 8-24 through the distance d (shown as a formula (1)) between (cr, cy 1) and (nl, ny 1), namely the element 8-24; wherein, the elements 8-22 are elements which do not satisfy cr1< nx1, and the elements 8-23 are elements which satisfy cr1< nx1 but are not the smallest distance from the elements 8-21.
d=(cr-nl) 2 +(cy1-ny1) 2 (I);
In addition, when the minimum distance (minOffset) between the elements in the obtainable coke element list and the elements 8-21 is acquired, recording the minimum distance acquired until the current time is recorded in the acquisition process, and comparing the calculated distance with the minimum distance which is found currently when the distance (tempOffset) is calculated each time, and storing the relatively small distance between the two distances; repeating the steps until the calculation of all the distances is completed for the obtainable coke element list, and obtaining the minimum distance; the corresponding code is "$focusables.each ((i) = > { if (minoffset= null|minoffset > tempOffset) { minoffset=tempoffset; = $next= $focuser; }); ".
In the embodiment of the application, the process of searching the next focus leftwards and the process of searching the next focus rightwards are similar, namely, the current focus obtaining element is taken as a starting point, a focus obtaining element list of the current focus obtaining element at one side of the key direction is firstly screened out, the distance between each focus obtaining element in the focus obtaining element list and the current focus obtaining element is calculated, and then the focus obtaining element with the minimum distance is determined as the position of the next focus.
It should be noted that, when determining the position of the next focal point in the upward and downward directions, it is necessary to combine layout determination. Here, description will be made taking an example of looking down for the next focus. Referring to fig. 9, fig. 9 is a second exemplary focus movement schematic diagram provided in an embodiment of the present application; as shown in fig. 9, three rows of elements are included in the list 9-1, the first row of elements including elements 9-21 to 9-23, the second row of elements including elements 9-24, and the third row of elements including elements 9-25 to 9-27; the elements 9-23 in the first row of elements are current focus obtaining elements, and as two elements are empty in the second row of elements, when the operation of pressing down a key is received, the position of the next focus is determined to be the elements 9-27 according to the nearby movement rule, and a jump occurs; therefore, the accurate determination of the position of the next focus in the vertical direction is realized by combining the vertical distance between the obtainable focus element and the current focus element, so as to solve the problem of line adjustment.
Here, the process of moving the focus using two principles of cross movement and near movement is described taking the downward search for the next focus as an example. Referring to fig. 10, fig. 10 is a third exemplary focus movement schematic provided by an embodiment of the present application; as shown in fig. 10, the x-axis of the coordinate axis is located in the horizontal direction of the element display view angle, the y-axis is located in the vertical direction of the element display view angle, and the position point 10-1 is the origin of coordinates; three rows of elements are included in the list 10-2, the first row of elements including elements 10-21 through 10-23, the second row of elements including elements 10-24 and 10-25, and the third row of elements including elements 10-26 through 10-28; wherein elements 10-23 in the first row of elements are currently focus-acquired elements. First, position information of the element 10-23 is acquired, including center point coordinates (cx 2, cy 2) and lower boundary midpoint coordinates (cx 2, cb) (referred to as second side boundary positions), and for each element in the list 10-2 except the element 10-23, a corresponding center point coordinate (nx 2, ny 2) is acquired; then, obtaining the elements of cy2< ny2, and obtaining a list of available coke elements; finally, the upper boundary midpoint coordinates (nx 2, nt) (referred to as a first side boundary position) of each obtainable coke element in the obtainable coke element list are acquired to determine an element 10-25 having the smallest straight-line distance and vertical distance from the element 10-23 from the element 10-24 to the element 10-28 by the distance (tempH) between (cx 2, cb) and (nx 2, nt); wherein, the elements 10-21 and 10-22 are elements which do not satisfy cy2< ny2, the elements 10-24 are elements which satisfy cy2< ny2 and have the smallest vertical distance but the smallest linear distance, and the elements 10-26 to 10-28 are elements which satisfy cy2< ny2 but have neither the smallest linear distance nor the smallest vertical distance; in addition, the existence of the allowable error in determining the minimum vertical distance, for example, the vertical distances between the elements 10 to 24 and the elements 10 to 25 and the elements 10 to 23, respectively, are both the minimum vertical distances. The corresponding code is "const temph=math.abs (nt-cb); if (minH |=null & (minh+allowableerror < tempH)) { return null; -if (minH > temph+allowableerror) { minoffset=null; if (minh=null minH > tempph) { minh=tempph; the } if (minoffset= =null||minoffset > tempOffset) { minoffset=tempoffset; next= $secure; "minH" where "minH" denotes the minimum vertical distance.
In the embodiment of the present application, the focus control module 7-231 may also adopt a specified focus obtaining mode, that is, an element corresponding to a specified next focus (for example, an element corresponding to a next focus is specified for a current focus obtaining element in the up-down, left-right directions of the current focus obtaining element, which is called a specified page element); thus, when the focus control module 7-231 detects a specified focus obtaining element for the current focus obtaining element, the specified focus obtaining element is determined as the element corresponding to the next focus. Here, the focus obtaining element may be designated by a "witref" attribute name, and the next focus obtaining element in the up-down, left-right direction may be designated by a "nextFocusUpId/nextFocusDownId/nextfocusriskid" attribute, respectively, for the current focus obtaining element. The focus control module 7-231 preferentially searches whether the appointed focus obtaining element exists when detecting that the current focus obtaining element comprises the appointed focus obtaining element in the corresponding direction, and determines the appointed focus obtaining element as the element corresponding to the next focus when the appointed focus obtaining element exists; if not, the elements corresponding to the next focus are searched for by continuously moving according to the cross and moving the next yard. The corresponding codes are "< Focusable withRef = { 'a' } … > </vacuable > < Focusable nextFocusUpId = { 'a' }, nextfocusdown id = { 'b' }, nextFocusLeftId = { 'c' }, nextFocusRightId = {'d' } … > </vacuable >".
In the process of focus acquisition and clicking, aiming at focus acquisition, when a next focus-available element is found after a direction key event is received, the following processing is performed: firstly, if a focus obtaining element exists currently, triggering a focus losing event of the element; then, recording the found available coke elements as current coke obtaining elements; finally triggering a focus acquisition event of the element through a Hippy event mechanism; the corresponding code is "this. Emutter. Emit ('focus_ $ { focus sableid }', { focus: true }); ". For click processing, after receiving a confirmation key event, firstly, finding out a corresponding element through the record of the current focus obtaining element; secondly, checking whether a lock (called a confirmation key lock) for preventing repeated triggering of the confirmation key is effective or not, if so, exiting, otherwise, setting the lock and executing the next step; finally, triggering a clicking event of the element through a Hippy event mechanism; the corresponding code is "this. Emitter. Emit (' click_ $ { focussableid }); ".
In the list scrolling process, firstly, relevant information of a list visible window, a list and a current focus obtaining element is calculated, wherein the relevant information comprises list visible window information (const { winH } = helper. Getwininfo ($win)), a list height (constlisth= $list. Height ()), a list upper boundary ordinate (constlistoffset= $list. Offset (); constlisttop = listOffset. Top ()), a list maximum scrollable distance (constttransmaxy = winH-listH), a list scrollable distance (constttformy = Number ($list. Data ('focus-trans-y')), a current focus obtaining element upper boundary ordinate (const currentOffset = $current. Offset (); consttop= currentOtop), and a current focus obtaining element upper boundary height (constttransmaxy = current focus obtaining element); then, the scroll distance transY is calculated. When the current focus obtaining element is not on the first screen or forced centering (iscenter=false) is set, scrolling the current focus obtaining element to a window centering position through list scrolling; finally, list scrolling is controlled by setting style (CSS) attributes, such as the code "const transform= 'transform 3d ($ftransx) px, $ [ transform y) px,1 px)'; list. Css ({ 'transform': transform '-webkit-transform': transform) } ".
It should be noted that, when the focus is moved in the list, the scrolling of the list is triggered, so that the current focus-obtaining element can be kept in the visible range of the list window at any time. Here, with the attributes (transitions) of the CSS, controllable scrolling of the list is achieved by setting different displacement values. Referring to fig. 11, fig. 11 is a schematic diagram showing an exemplary focus movement provided by an embodiment of the present application; as shown in FIG. 11, list 11-1 includes elements 11-11 through 11-13, with element 11-11 displayed in window 11-2 being the currently in focus element, where height 11-31 represents the list top ordinate listTop, height 11-32 represents the height win of window 11-2, height 11-33 represents the top ordinate currentTop of element 11-12, and height 11-34 represents the height currentH of element 11-12. When the downward direction key event is triggered, determining that the element corresponding to the next focus is the element 11-12, and determining the list scroll distance transY is shown in the formula (2).
In the multi-level focus processing process, when a popup frame (for example, a Modal popup frame) is popped up in a picture, the element focus is moved within the Modal popup frame. It should be noted that, when the frame is not flicked initially, the level where the focus is located is 0; when the first layer of Modal frame is popped up, the level of the focus in the Modal frame is 1, and when the second layer of Modal frame is popped up, the level of the focus in the Modal frame is 2; and so on. Here, the recorded information includes: the level at which the focus is currently located (jackindex), the current per-level acquisition Jiao Yuansu (vacussstack [ ]), and the parent container for each level ($wrapstack [ ]). When the focus control module 7-231 receives a Modal component pop event, the stackIndex is processed by 1 (stackIndex+=1), and the current box container is recorded within $wrapStack [ stackIndex ], and the current get Jiao Yuansu focusStack [ stackIndex ] variable is left empty (focusStack [ stackIndex ] =null) for recording the new focus found on that level. When the focus control module 7-231 receives the Modal component off event, the current level record is cleared (vacusStack [ stabIndex ] = null; $ wrapack [ stabIndex ] = null;), and the level stabIndex is decremented by 1 (stabIndex- = 1), and finally the focus of the previous level is restored ($currentFocus = vacusStack;).
In the embodiment of the present application, the packing tool 7-3 is obtained based on a code compiling tool (weback), so in order to improve compatibility, a configuration item (babel-loader) may be used in combination to convert a syntax used in a service (for example, to convert an ES6 syntax into an ES 5); namely "module: { springs: [ { test:/\(js) $/use: { loader: 'Babel-loader', options: { presets: [ 'env', { targets: { browsers: '0.1%, last 2version, android > =4', } usebuilins: true, modules: false, }, 'exact', 'stage-0' ], }, include: the node_modules [// I\ ] zepto/, }, ".
In the embodiment of the application, the method also comprises style conversion; wherein style conversion is determined based on the support degree of the browser to the elastic layout (flex style); for example, for an adaptive layout (Webkit Box) device, a code pattern (display: flex) is converted (into display: -Webkit-Box). The corresponding code is "constv=obj. The if (v= = = = 'flex' |v= = 'WebkitFlex' |v= = = 'webkit-flex') { if (flexsuppltffo. Issuppltfex) { obj. Display= 'flex' } else if (flexsupplnfo. Issuppltfex) { obj. Display = '-webkit-flex' } elif (flexsupplnfo. Issupplafirox) { flex) } is } b.
It can be understood that the same service code respectively constructs pages capable of running on three execution environments through the packing tool 7-3, so that the efficiency of multi-terminal development is improved, and the cost of code maintenance is reduced. And by adding a TV focus control library (namely, the focus control module 7-231), key event processing and rollback detection processing are realized, style conversion is perfected, and the problems of special focus control, list scrolling, page rollback, equipment compatibility and the like on a TV are solved.
Continuing with the description below of an exemplary architecture of the focus-based data processing apparatus 455 implemented as a software module provided by embodiments of the present application, in some embodiments, as shown in FIG. 4, the software modules stored in the focus-based data processing apparatus 455 of the memory 450 may include:
an instruction execution module 4551 configured to execute a page focus process by executing a first code instruction, where the first code instruction is obtained by compiling a service code for displaying a page in different execution environments and a focus control code for controlling display contents of the page through focus, and the instruction execution module 4551 includes a page display module 45511 and a focus process module 45512;
The page display module 45511 is configured to display a page to be controlled, where the page to be controlled is a currently displayed page, the page to be controlled includes an initial page element in a focus obtaining state, and the focus obtaining state refers to a state where the focus is located;
a focus processing module 45512 configured to determine a focus control event for the initial page element, wherein the focus control event is an event that triggers a change in the focus acquisition state of the initial page element, and determine a focus acquisition Jiao Yemian element that is adapted to the focus control event;
the page display module 45511 is further configured to display the in-focus page element in the in-focus state.
In the embodiment of the application, the focus control event comprises at least one of a direction key event, a confirmation key event and a page turning key event; the direction key event is used for triggering the focus obtaining state of the initial page element to change from the direction, the confirmation key event is used for triggering the focus obtaining state of the initial page element to change from the level, and the page turning key event is used for triggering the focus obtaining state of the initial page element to change through page turning.
In an embodiment of the present application, when the focus control event includes a direction key event, the focus processing module 45512 is further configured to determine a focus movement direction in response to the direction key event for the initial page element, where the focus movement direction is a direction determined on a page presentation view angle and based on the initial page element; and determining the first page element closest to the initial page element based on at least one first page element in the focus moving direction, and determining the determined first page element as the focused page element matched with the focus control event.
In the embodiment of the present application, when at least one first page element includes a plurality of first page elements, the focus processing module 45512 is further configured to determine, for each of the plurality of first page elements in the focus moving direction, a corresponding first side boundary position, where a direction in which a side boundary corresponding to the first side boundary position is located is opposite to the focus moving direction; acquiring a second side boundary position corresponding to the initial page element, wherein the direction of a side boundary corresponding to the second side boundary position is consistent with the focus moving direction; the first page element closest to the initial page element is selected from a plurality of the first page elements based on a distance difference between the first side boundary position and the second side boundary position.
In the embodiment of the present application, the focus processing module 45512 is further configured to select, when the focus moving direction is a horizontal direction on the page display view angle, the first page element closest to the initial page element from a plurality of first page elements based on a linear distance difference between the first side boundary position and the second side boundary position, where the distance difference between the first side boundary position and the second side boundary position is the linear distance difference; when the focus moving direction is a vertical direction on the page display view angle, selecting a first page element closest to the initial page element from a plurality of first page elements based on a vertical distance difference between the first side boundary position and the second side boundary position and a linear distance difference between the first side boundary position and the second side boundary position, wherein the distance difference between the first side boundary position and the second side boundary position is the vertical distance difference and the linear distance difference.
In the embodiment of the present application, the focus processing module 45512 is further configured to determine, when the focus movement direction includes a specified page element corresponding to the initial page element, the specified page element as the focused page element adapted to the focus control event.
In the embodiment of the present application, the focus processing module 45512 is further configured to determine, when the specified page element corresponding to the initial page element is not included in the focus movement direction, the first page element closest to the initial page element based on at least one first page element in the focus movement direction.
In an embodiment of the present application, when the focus control event includes a confirm key event, the focus processing module 45512 is further configured to, when a confirm key lock is in a closed state, update the confirm key lock from the closed state to an open state in response to the confirm key event for the initial page element, and determine the in-focus page element adapted to the focus control event.
In this embodiment of the present application, the focus processing module 45512 is further configured to cancel a response to the confirmation key event received again when the confirmation key lock is in the on state; and when the time length of the confirmation key lock in the open state is longer than the appointed time length, updating the confirmation key lock from the open state to the closed state.
In the embodiment of the present application, the focus processing module 45512 is further configured to obtain a first target height between the element Jiao Yemian and the top of the window; determining a second target height when the Jiao Yemian element is located in the window; determining a height difference between the second target height and the first target height as a roll distance; and scrolling the list where the Jiao Yemian element is located based on the scrolling distance.
In the embodiment of the present application, the page display module 45511 is further configured to display the in-focus page element in the in-focus state when scrolling of the list where the in-focus Jiao Yemian element is located is completed.
In the embodiment of the present application, the focus processing module 45512 is further configured to obtain a current focus level, where the initial page element is a level obtaining Jiao Yemian element of the current focus level, and the level obtaining Jiao Yemian element is a page element in the focus-obtaining state in the focus level when entering a sub-level.
In an embodiment of the present application, the focus processing module 45512 is further configured to determine a next focus level in response to the focus control event for the initial page element; determining the Jiao Yemian element adapted to the focus control event from at least one second page element of the next focus level when the next focus level is a child level of the current focus level; when the next focus level is a parent level of the current focus level, the level of the next focus level is determined to be the in-focus page element adapted to the focus control event as Jiao Yemian element.
In this embodiment of the present application, the focus-based data processing apparatus 455 further includes an instruction obtaining module 4552 configured to package, when the package instruction is a first package instruction, the service code and a first frame library to obtain a first code to be compiled, where the first frame library includes the focus control code; compiling the first code to be compiled to obtain the first code instruction, wherein the first code instruction is webpage data executed in a first execution environment, and the first execution environment controls display content through a focus and is different from the development environment of the service code.
In this embodiment of the present application, the instruction obtaining module 4552 is further configured to, when the packaging instruction is a second packaging instruction, package the service code and the second frame library to obtain a second code to be compiled, and compile the second code to be compiled to obtain a second code instruction, where the second code instruction is web page data executed in a second execution environment, and the second execution environment controls display content in a touch manner and is different from a development environment of the service code; and when the packaging instruction is a third packaging instruction, packaging the service code and a third framework library to obtain a third code to be compiled, and compiling the third code to be compiled to obtain a third code instruction, wherein the third code instruction is client data for execution in a third execution environment, and the third execution environment is the same as the development environment of the service code.
Embodiments of the present application provide a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of the data processing apparatus reads the computer-executable instructions from the computer-readable storage medium, and executes the computer-executable instructions, so that the computer apparatus performs the focus-based data processing method described above according to the embodiment of the present application.
Embodiments of the present application provide a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, cause the processor to perform a focus-based data processing method provided by embodiments of the present application, for example, as shown in fig. 3.
In some embodiments, the computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; but may be a variety of devices including one or any combination of the above memories.
In some embodiments, computer-executable instructions may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, in the form of programs, software modules, scripts, or code, and they may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
As an example, computer-executable instructions may, but need not, correspond to files in a file system, may be stored as part of a file that holds other programs or data, such as in one or more scripts in a hypertext markup language (HTML, hyper Text Markup Language) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, the computer-executable instructions may be deployed to be executed on one electronic device (in this case, the one electronic device is referred to as a data processing device), or on a plurality of electronic devices located at one place (in this case, a plurality of electronic devices located at one place are referred to as a data processing device), or on a plurality of electronic devices distributed at a plurality of places and interconnected via a communication network (in this case, a plurality of electronic devices distributed at a plurality of places and interconnected via a communication network are referred to as a data processing device).
It can be appreciated that in the embodiment of the present application, related data such as an image to be detected is related, when the embodiment of the present application is applied to a specific product or technology, user permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
In summary, since the service code is used to display the page in different execution environments, and the focus control code is used to control the display content of the page through the focus, the first code instruction is obtained by compiling the focus control code and the service code together, so that when the first code instruction is executed, the page display can be realized, and meanwhile, the control of the page display content through the focus can be realized, the focus control problem is solved, and the efficiency of data processing can be improved.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims (15)

1. A focus-based data processing method, the method comprising:
Executing a first code instruction to execute a page focus process, wherein the first code instruction is obtained by compiling business codes and focus control codes, the business codes are used for displaying pages in different execution environments, the focus control codes are used for controlling the display content of the pages through focus, and the page focus process comprises the following steps:
displaying a page to be controlled, wherein the page to be controlled is a currently displayed page, the page to be controlled comprises an initial page element in a focus obtaining state, and the focus obtaining state refers to a state of the position of the focus;
determining Jiao Yemian elements adapted to focus control events in response to focus control events for the initial page elements, wherein the focus control events are events triggering changes in the focus acquisition state of the initial page elements;
displaying the focus obtaining page element in the focus obtaining state.
2. The method of claim 1, wherein the focus control event comprises at least one of a direction key event, a confirm key event, and a page flip key event;
the direction key event is used for triggering the focus obtaining state of the initial page element to change from the direction, the confirmation key event is used for triggering the focus obtaining state of the initial page element to change from the level, and the page turning key event is used for triggering the focus obtaining state of the initial page element to change through page turning.
3. The method of claim 1 or 2, wherein when the focus control event comprises a direction key event, the determining Jiao Yemian element adapted to the focus control event in response to the focus control event for the initial page element comprises:
determining a focus movement direction in response to the direction key event for the initial page element, wherein the focus movement direction refers to a direction determined on a page presentation view and based on the initial page element;
and determining the first page element closest to the initial page element based on at least one first page element in the focus moving direction, and determining the determined first page element as the focused page element matched with the focus control event.
4. A method according to claim 3, wherein when at least one of the first page elements includes a plurality of the first page elements, the determining the first page element closest to the initial page element based on at least one first page element in the focus movement direction includes:
Determining a corresponding first side boundary position for each of a plurality of first page elements in the focus moving direction, wherein the direction of a side boundary corresponding to the first side boundary position is opposite to the focus moving direction;
acquiring a second side boundary position corresponding to the initial page element, wherein the direction of a side boundary corresponding to the second side boundary position is consistent with the focus moving direction;
the first page element closest to the initial page element is selected from a plurality of the first page elements based on a distance difference between the first side boundary position and the second side boundary position.
5. The method of claim 4, wherein the selecting the first page element from the plurality of first page elements that is closest to the initial page element based on a distance difference between the first side boundary position and the second side boundary position comprises:
when the focus moving direction is a horizontal direction on the page display view angle, selecting the first page element closest to the initial page element from a plurality of first page elements based on a linear distance difference between the first side boundary position and the second side boundary position, wherein the distance difference between the first side boundary position and the second side boundary position is the linear distance difference;
When the focus moving direction is a vertical direction on the page display view angle, selecting a first page element closest to the initial page element from a plurality of first page elements based on a vertical distance difference between the first side boundary position and the second side boundary position and a linear distance difference between the first side boundary position and the second side boundary position, wherein the distance difference between the first side boundary position and the second side boundary position is the vertical distance difference and the linear distance difference.
6. A method according to claim 3, wherein after determining a focus movement direction in response to the direction key event for the initial page element, the method further comprises:
when a specified page element corresponding to the initial page element is included in the focus movement direction, determining the specified page element as the Jiao Yemian element adapted to the focus control event;
the determining, based on at least one first page element in the focus movement direction, the first page element closest to the initial page element, includes:
When the specified page element corresponding to the initial page element is not included in the focus movement direction, determining the first page element closest to the initial page element based on at least one first page element in the focus movement direction.
7. The method of claim 1 or 2, wherein when the focus control event comprises a confirm key event, the determining Jiao Yemian element adapted to the focus control event in response to the focus control event for the initial page element comprises:
updating the confirm key lock from the closed state to an open state in response to the confirm key event for the initial page element when the confirm key lock is in a closed state, and determining the Jiao Yemian element adapted to the focus control event;
after the confirmation key lock is updated from the closed state to the open state, the method further comprises:
when the confirmation key lock is in the open state, canceling the response to the accepted confirmation key event again;
and when the time length of the confirmation key lock in the open state is longer than the appointed time length, updating the confirmation key lock from the open state to the closed state.
8. The method of claim 1 or 2, wherein after the determining of the in-focus page element adapted to the focus control event in response to the focus control event for the initial page element, the method further comprises:
acquiring a first target height between the Jiao Yemian element and the top of the window;
determining a second target height when the Jiao Yemian element is located in the window;
determining a height difference between the second target height and the first target height as a roll distance;
scrolling the list of Jiao Yemian elements based on the scrolling distance;
the displaying the element Jiao Yemian in the focus-achieved state comprises:
and displaying the in-focus page element in the in-focus state when the scrolling of the list of the Jiao Yemian element is finished.
9. The method of claim 1 or 2, wherein, in response to a focus control event for the initial page element, prior to determining a focus-achieved page element that is adapted to the focus control event, the method further comprises:
acquiring a current focus level, wherein the initial page element is a level acquisition Jiao Yemian element of the current focus level, and the level acquisition Jiao Yemian element is a page element in the focus state in the focus level when entering a sub-level;
The determining Jiao Yemian element adapted to the focus control event in response to the focus control event for the initial page element, comprising:
determining a next focus level in response to the focus control event for the initial page element;
determining the Jiao Yemian element adapted to the focus control event from at least one second page element of the next focus level when the next focus level is a child level of the current focus level;
when the next focus level is a parent level of the current focus level, the level of the next focus level is determined to be the in-focus page element adapted to the focus control event as Jiao Yemian element.
10. The method according to claim 1 or 2, wherein before the performing of the page focus processing by executing the first code packet, the method further comprises:
when the packaging instruction is a first packaging instruction, packaging the service code and a first frame library to obtain a first code to be compiled, wherein the first frame library comprises the focus control code;
compiling the first code to be compiled to obtain the first code instruction, wherein the first code instruction is webpage data executed in a first execution environment, and the first execution environment controls display content through a focus and is different from the development environment of the service code.
11. The method according to claim 1 or 2, characterized in that the method further comprises:
when the packaging instruction is a second packaging instruction, packaging the service code and a second frame library to obtain a second code to be compiled, and compiling the second code to be compiled to obtain a second code instruction, wherein the second code instruction is webpage data executed in a second execution environment, and the second execution environment controls display content in a touch mode and is different from a development environment of the service code;
and when the packaging instruction is a third packaging instruction, packaging the service code and a third framework library to obtain a third code to be compiled, and compiling the third code to be compiled to obtain a third code instruction, wherein the third code instruction is client data for execution in a third execution environment, and the third execution environment is the same as the development environment of the service code.
12. A focus-based data processing apparatus, the data processing apparatus comprising:
the instruction execution module is used for executing page focus processing by executing a first code instruction, wherein the first code instruction is obtained by compiling service codes and focus control codes, the service codes are used for displaying pages in different execution environments, the focus control codes are used for controlling the display content of the pages through the focus, and the instruction execution module comprises a page display module and a focus processing module;
The page display module is used for displaying a page to be controlled, wherein the page to be controlled is a currently displayed page, the page to be controlled comprises an initial page element in a focus obtaining state, and the focus obtaining state refers to a state of the position of the focus;
a focus processing module, configured to determine a focus control event for the initial page element, where the focus control event is an event that triggers a change in the focus obtaining state of the initial page element, and determine a focus obtaining Jiao Yemian element that is adapted to the focus control event;
the page display module is further used for displaying the focus obtaining page element in the focus obtaining state.
13. A focus-based data processing apparatus, the data processing apparatus comprising:
a memory for storing computer executable instructions;
a processor for implementing the focus-based data processing method of any one of claims 1 to 11 when executing computer-executable instructions stored in said memory.
14. A computer readable storage medium storing computer executable instructions which, when executed by a processor, implement the focus-based data processing method of any one of claims 1 to 11.
15. A computer program product comprising a computer program or computer-executable instructions which, when executed by a processor, implement the focus-based data processing method of any one of claims 1 to 11.
CN202211122599.7A 2022-09-15 2022-09-15 Data processing method, apparatus, device, storage medium, and program product Pending CN117014683A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211122599.7A CN117014683A (en) 2022-09-15 2022-09-15 Data processing method, apparatus, device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211122599.7A CN117014683A (en) 2022-09-15 2022-09-15 Data processing method, apparatus, device, storage medium, and program product

Publications (1)

Publication Number Publication Date
CN117014683A true CN117014683A (en) 2023-11-07

Family

ID=88566098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211122599.7A Pending CN117014683A (en) 2022-09-15 2022-09-15 Data processing method, apparatus, device, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN117014683A (en)

Similar Documents

Publication Publication Date Title
CN109074277A (en) Stateful dynamic link is enabled in mobile application
CN111258486B (en) Information sharing method and device, electronic equipment and storage medium
CN1890632B (en) Determining the possibility of adverse effects arising from a code change
US20140245205A1 (en) Keyboard navigation of user interface
CN102591928A (en) Surfacing content including content accessed from jump list tasks and items
US9684718B2 (en) System for searching for a web document
US11775321B2 (en) Robotic process automation with resilient playback capabilities
JP2018190400A (en) Method for analyzing data based on block, system, and program
CN109074278A (en) Verify the stateful dynamic link in mobile application
CN100416498C (en) Display processing device and display processing method
CN111581069A (en) Data processing method and device
EP3722943A1 (en) Correction of software coding projects
CN116560683A (en) Software updating method, device, equipment and storage medium
Kordts et al. Towards self-explaining ambient applications
CN110020279A (en) Page data processing method, device and storage medium
CN117014683A (en) Data processing method, apparatus, device, storage medium, and program product
Chen et al. ZK: AJAX without the JavaScript framework
CN110404253A (en) Interface data acquisition methods and device, electronic equipment, storage medium
JP7290293B2 (en) System and method for generating and displaying target information about a robot working in an operating environment
JP7262526B2 (en) Determining method, device and electronic equipment for focal position
CN110604918B (en) Interface element adjustment method and device, storage medium and electronic equipment
CN115081423A (en) Document editing method and device, electronic equipment and storage medium
CN114327709A (en) Control page generation method and device, intelligent device and storage medium
CN113722630A (en) Method and equipment for presenting resource data in web page based on client rendering
CN117130717B (en) Element positioning method and system of HTMLayout application program in RPA scene

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination