Control method, device, equipment and storage medium of vehicle-mounted terminal
By combining hardware peripherals and touch screen operations on the vehicle terminal, the security control of the mini program is achieved, and the distraction problem caused by mini program control is solved, and a low-cost and widely applicable security control solution is provided.
Patent Information
- Application Number
- CN202210070015.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-01-21
AI Technical Summary
The touch screen control of mini programs on the on-board terminal causes users to be distracted from their eyes, posing a safety hazard, and a safer mini program control method is needed.
The mini program is controlled by using hardware peripherals such as physical knobs, dial buttons and buttons on the vehicle terminal, and combined with the operation of the touch screen, the mini program interface is controlled, and the joint operation through the hardware peripherals and the touch screen is supported.
It provides a safe control method, which reduces the risk of distractions for users during driving, and can adapt without special modifications to the mini program. It is low in cost and has a wide range of applications.
Smart Images

Figure CN114407796B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle-mounted central control, and in particular to a control method, device, equipment and storage medium for a vehicle-mounted terminal. Background Art
[0002] With the development of intelligent driving and 5G networks, the functions of vehicle terminals are becoming more diversified and intelligent, and small programs can be run on vehicle terminals.
[0003] Mini programs are programs that rely on the mini program engine to run. When the vehicle terminal supports the mini program engine, the mini program engine can support the running of one or more mini programs. Since mini programs were originally designed for the touch screen usage scenarios of smartphones, the mini programs on the vehicle terminal also use a human-computer interaction method based on the touch screen.
[0004] However, since the user uses the touch screen to control the vehicle terminal during driving, the user's vision will be focused on the touch screen of the vehicle terminal, causing unsafe hidden dangers, so it is urgent to provide a safer mini-program control method. Summary of the invention
[0005] The present application provides a control method, device, equipment and storage medium for a vehicle-mounted terminal, and the technical solution is as follows:
[0006] According to one aspect of the present application, a control method of a vehicle terminal is provided, wherein the vehicle terminal has a touch screen and hardware peripherals, and a mini-program that depends on a mini-program engine is running in the vehicle terminal, and the method comprises:
[0007] Displaying the mini-program interface of the mini-program, wherein the mini-program interface includes at least two components;
[0008] In response to a physical control operation on the hardware peripheral, controlling a first target component of the at least two components in the applet interface to execute a target event;
[0009] In response to a touch operation on the touch screen, a second target component among the at least two components in the applet interface is controlled to execute the target event.
[0010] In an optional design of the application, in response to the physical control operation on the hardware peripheral, controlling the first target component of the at least two components in the applet interface to execute the target event also includes:
[0011] In response to a first type of control operation on the hardware peripheral, the focus component is controlled to lose its focus state, and the first target component sorted before or after the focus component in the mini-program interface is controlled to be in the focus state, and the focus component is the component that is in the focus state before receiving the first type of control operation.
[0012] In an optional design of the application, the method further comprises:
[0013] Obtain a target node in the document object model DOM tree corresponding to the mini-program interface, wherein the target node includes an event node and a focus node, wherein the event node is a node corresponding to a component having a function of responding to the physical control operation and / or touch operation, and the focus node is a node corresponding to a focus component in a focus state;
[0014] In response to the first type of control operation on the hardware peripheral, controlling the focus component to lose the focus state, and controlling the first target component sorted before or after the focus component in the applet interface to be in the focus state, includes:
[0015] In response to a first type of control operation on the hardware peripheral, reading a first focus index corresponding to the focus component;
[0016] updating the first focus index based on the operation direction of the first type of control operation to obtain a second focus index;
[0017] Determine the first target component corresponding to the second focus index; control the focus component to lose the focus state, and control the first target component to switch to the focus state.
[0018] In an optional design of the application, the updating of the first focus index based on the operation direction of the first type of control operation to obtain the second focus index includes:
[0019] When the operation direction of the first type of control operation is the first direction, adding one to the first focus index to obtain the second focus index;
[0020] When the operation direction of the first type of control operation is the second direction, the first focus index is reduced by one to obtain the second focus index.
[0021] In an optional design of the application, in response to the physical control operation on the hardware peripheral, controlling the first target component of the at least two components in the applet interface to execute the target event also includes:
[0022] In response to a second type of control operation on the hardware peripheral, the focus component is controlled to lose its focus state, and the first target component at the upper or lower level of the focus component in the mini-program interface is controlled to be in the focus state, and the focus component is the component that is in the focus state before receiving the second type of control operation.
[0023] In an optional design of the application, in response to the second type of control operation on the hardware peripheral, controlling the focus component to lose the focus state, and controlling the first target component at the upper level or the lower level of the focus component in the applet interface to be in the focus state, includes:
[0024] In response to a second type of control operation on the hardware peripheral, reading a first level index corresponding to the focus component;
[0025] The first hierarchical index is updated based on the operation direction of the second type of control operation to obtain a second hierarchical index; the first target component corresponding to the second hierarchical index is determined;
[0026] The focus component is controlled to lose the focus state, and the first target component is controlled to switch to the focus state.
[0027] In an optional design of the application, the mini program interface also displays a native label, and the native label is provided by the mini program engine; the method further includes:
[0028] In the case that the second-level index cannot be successfully updated, the focus component is controlled to lose the focus state, and the native tag corresponding to the focus component is controlled to be in the focus state.
[0029] In an optional design of the application, the updating of the first hierarchical index based on the operation direction of the second type of control operation to obtain the second hierarchical index includes:
[0030] When the operation direction of the second type of control operation is the third direction, adding one to the first level index to obtain the second level index;
[0031] In the case where the operation direction of the second type of control operation is the fourth direction, the first hierarchical index is reduced by one to obtain the second hierarchical index. According to another aspect of the present application, a control device for a vehicle terminal is provided, the vehicle terminal having a touch screen and hardware peripherals, a mini-program that depends on a mini-program engine is running in the vehicle terminal, and the device comprises:
[0032] A display module, used to display the mini-program interface of the mini-program, wherein the mini-program interface includes at least two components;
[0033] A control module, configured to control a first target component of the at least two components in the mini-program interface to execute a target event in response to a physical control operation on the hardware peripheral;
[0034] The control module is further used to control the second target component of the at least two components in the mini-program interface to execute the target event in response to a touch operation on the touch screen.
[0035] In an optional design of the application, the control module comprises:
[0036] a processing unit, configured to generate a first touch click event in response to a confirmation operation on the hardware peripheral, wherein the touch coordinates in the first touch click event belong to a coordinate range of the first target component in a focus state;
[0037] A transmitting unit is used to transmit the first touch click event to the mini program, and the first touch click event is used to trigger the mini program to control the first target component to execute a response event.
[0038] In an optional design of the application, the processing unit is further used for:
[0039] In response to a confirmation operation on the hardware peripheral, generating a first touch coordinate based on a first reference point in a coordinate range of the first target component;
[0040] In a case where the first target component does not include a subcomponent, the first touch click event is generated based on the first touch coordinates.
[0041] In an optional design of the application, the processing unit is further used for:
[0042] In response to a confirmation operation on the hardware peripheral, generating a first touch coordinate based on a first reference point within a coordinate range of the first target component;
[0043] In a case where the first target component includes a subcomponent and the first touch coordinates do not belong to a coordinate range of the subcomponent, generating the first touch click event based on the first touch coordinates;
[0044] or,
[0045] In the case where the first target component includes a subcomponent and the first touch coordinates belong to a coordinate range of the subcomponent, the second touch coordinates are regenerated based on the coordinate range of the subcomponent; and the first touch click event is generated based on the second touch coordinates.
[0046] In an optional design of the application, the processing unit is further used for:
[0047] Determining a first boundary of the subcomponent and a second boundary of the first target component based on a coordinate range of the subcomponent and a coordinate range of the first target component;
[0048] A second reference point between a first boundary belonging to the subcomponent and a second boundary of the first target component is determined, and the second touch coordinates are generated based on the second reference point.
[0049] In an optional design of the application, the processing unit is further used for:
[0050] In response to a confirmation operation on the hardware peripheral, acquiring a coordinate range of the first target component and a coordinate range of a subcomponent in the first target component;
[0051] Determining a third reference point that is within the coordinate range of the first target component and outside the coordinate range of the subcomponent;
[0052] A third touch coordinate is generated based on the third reference point, and the first touch click event is generated based on the third touch coordinate.
[0053] In an optional design of the application, the control module is also used for:
[0054] In response to a first type of control operation on the hardware peripheral, the focus component is controlled to lose its focus state, and the first target component sorted before or after the focus component in the mini-program interface is controlled to be in the focus state, and the focus component is the component that is in the focus state before receiving the first type of control operation.
[0055] In an optional design of the application, the device further comprises:
[0056] An acquisition module, used to acquire a target node in a document object model DOM tree corresponding to the mini-program interface, wherein the target node includes an event node and a focus node, wherein the event node is a node corresponding to a component having a function of responding to the physical control operation and / or touch operation, and the focus node is a node corresponding to a focus component in a focus state;
[0057] The control module is also used for:
[0058] In response to a first type of control operation on the hardware peripheral, reading a first focus index corresponding to the focus component;
[0059] updating the first focus index based on the operation direction of the first type of control operation to obtain a second focus index;
[0060] Determine the first target component corresponding to the second focus index; control the focus component to lose the focus state, and control the first target component to switch to the focus state.
[0061] In an optional design of the application, the control module is also used for:
[0062] In the case that the first target component does not include a subcomponent and the first target component is not completely displayed in the mini-program interface, based on the operation direction of the first type of control operation, the first target component is controlled to be scrolled and displayed on the mini-program interface.
[0063] In an optional design of the application, the control module is also used for:
[0064] When the operation direction of the first type of control operation is the first direction, adding one to the first focus index to obtain the second focus index;
[0065] When the operation direction of the first type of control operation is the second direction, the first focus index is reduced by one to obtain the second focus index.
[0066] In an optional design of the application, the acquisition module is also used for:
[0067] Filtering the event node from all nodes in the mini-program interface;
[0068] Determining the focus node in the event node;
[0069] Acquire the node status of the event node and the focus node; and update the focus node according to the change of the node status.
[0070] In an optional design of the application, the acquisition module is also used for:
[0071] Filter the event node among all nodes in the mini-program interface according to a filtering condition;
[0072] The screening condition includes at least one of the following:
[0073] Register nodes with event response devices;
[0074] A page navigation node whose Uniform Resource Locator System URL is not empty;
[0075] Input node;
[0076] Scroll view node.
[0077] In an optional design of the application, the control module is also used for:
[0078] In response to a second type of control operation on the hardware peripheral, the focus component is controlled to lose its focus state, and the first target component at the upper or lower level of the focus component in the mini-program interface is controlled to be in the focus state, and the focus component is the component that is in the focus state before receiving the second type of control operation.
[0079] In an optional design of the application, the control module is also used for:
[0080] In response to a second type of control operation on the hardware peripheral, reading a first level index corresponding to the focus component;
[0081] The first hierarchical index is updated based on the operation direction of the second type of control operation to obtain a second hierarchical index; the first target component corresponding to the second hierarchical index is determined;
[0082] The focus component is controlled to lose the focus state, and the first target component is controlled to switch to the focus state.
[0083] In an optional design of the application, in the case where the first hierarchical index and the second hierarchical index have an affiliation relationship, the first target component is a component corresponding to the second hierarchical index and having an affiliation relationship with the focus component;
[0084] When there is no belonging relationship between the first hierarchical index and the second hierarchical index, the first target component is the first component corresponding to the second hierarchical index.
[0085] In an optional design of the application, the mini-program interface also displays a native label, and the native label is provided by the mini-program engine; the control module is also used to:
[0086] In the case that the second-level index cannot be successfully updated, the focus component is controlled to lose the focus state, and the native tag corresponding to the focus component is controlled to be in the focus state.
[0087] In an optional design of the application, the control module is also used for:
[0088] When the operation direction of the second type of control operation is the third direction, adding one to the first level index to obtain the second level index;
[0089] When the operation direction of the second-type control operation is the fourth direction, the first level index is reduced by one to obtain the second level index.
[0090] In an optional design of the application, the control module is also used for:
[0091] In response to the third type of control operation on the hardware peripheral, control is returned to the upper interface of the mini-program interface, or the mini-program interface is closed, or a pop-up window on the mini-program interface is closed.
[0092] In an optional design of the application, the control module is also used for:
[0093] In response to a third type of control operation on the hardware peripheral, a second touch click event is generated; the second touch click event is passed to the mini program, and the second touch click event is used to trigger the mini program to add a data-close pop-up attribute to the node corresponding to the pop-up window, so that the pop-up window is closed.
[0094] According to another aspect of the present application, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the control method of the vehicle terminal as described above.
[0095] According to another aspect of the present application, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the control method of the vehicle terminal as described above.
[0096] According to another aspect of the present application, a computer program product or a computer program is provided, wherein the computer program product or the computer program includes computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the control method of the vehicle-mounted terminal as described above.
[0097] The beneficial effects of the technical solution provided by this application include at least:
[0098] By using hardware peripherals such as physical knobs, physical dials, and hardware buttons to control mini-programs, it is possible to simultaneously support the control of mini-programs through hardware peripherals and touch screens, providing a safe control method on the in-vehicle terminal. This function can be used for all mini-programs without the need for mini-program developers to modify the mini-programs to specific specifications, providing a low-cost adaptation solution for adapting mini-programs to in-vehicle terminals. BRIEF DESCRIPTION OF THE DRAWINGS
[0099] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0100] Figure 1 is a structural block diagram of a vehicle-mounted terminal provided by an embodiment of the present application;
[0101] Figure 2 This is a schematic diagram of a scenario of a small program control method based on a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0102] Figure 3 is a schematic diagram of vehicle-mounted terminal control provided by an exemplary embodiment of the present application;
[0103] Figure 4 is a schematic diagram of vehicle-mounted terminal control provided by an exemplary embodiment of the present application;
[0104] Figure 5 is a flow chart of a control method of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0105] Figure 6 is a flow chart of a control method of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0106] Figure 7 is a schematic diagram of a music playing component provided by an exemplary embodiment of the present application;
[0107] Figure 8 is a flow chart of a control method of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0108] Fig. 9 is a flow chart of a control method of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0109] Fig.10 is a flow chart of a control method of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0110] Fig.11 is a schematic diagram of a small program interface provided by an exemplary embodiment of the present application;
[0111] Fig.12 is a flow chart of a control method of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0112] Fig.13 is a flow chart of a control method of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0113] Fig.14 is a flow chart of a control method of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0114] Fig.15 is a schematic diagram of a small program interface provided by an exemplary embodiment of the present application;
[0115] Fig.16 is a schematic diagram of a small program interface provided by an exemplary embodiment of the present application;
[0116] Fig.17 is a flow chart of a control method of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0117] Fig.18 is a structural block diagram of a control device of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0118] Fig.19 is a block diagram of a vehicle-mounted terminal provided by an exemplary embodiment of the present application;
[0119] Fig. 20 It is a block diagram of a vehicle terminal provided by an exemplary embodiment of the present application.
[0120] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION
[0121] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0122] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0123] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0124] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0125] Figure 1 The structure block diagram of the vehicle terminal 100 provided by an exemplary embodiment of the present application is shown. The vehicle terminal 100 includes: at least one processor 210, a memory 250, at least one network interface 220 and a user interface 230. The various components in the server 200 are coupled together through a bus system 240. It can be understood that the bus system 240 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 240 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 1 Various buses are labeled as bus system 240 .
[0126] The processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0127] The user interface 230 includes one or more output devices that enable the presentation of media content. Typically, the output device includes: a touch screen 231 and a hardware peripheral 232. The hardware peripheral 232 includes: at least one of a hardware knob, a hardware dial, a hardware touchpad, and a hardware button. In one example, the hardware peripheral 232 includes: a hardware knob for triggering a selection operation, a confirmation button for triggering a confirmation operation, and a back button for triggering a back operation. The hardware knob for triggering the selection operation can also be implemented as a hardware dial or a hardware touchpad instead. In some examples, there is a center console button that supports multiple control functions, and the center console button supports at least one of rotation control, dial control, touchpad control, and button control at the same time. Optionally, the hardware peripheral 232 refers to a non-touch screen input peripheral, or an input peripheral in the form of physical input, or an input peripheral in the form of mechanical input or electromechanical input. Among them, electromechanical input refers to an input form that combines mechanical and electrical, also known as semi-mechanical; the hardware peripheral 232 is also called a physical control device.
[0128] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 250 may optionally include one or more storage devices that are physically remote from the processor 210.
[0129] The memory 250 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 250 described in the embodiments of the present application is intended to include any suitable type of memory.
[0130] In some embodiments, memory 250 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0131] The operating system 251 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The operating system 251 can be various vehicle operating systems, and the specific type of the vehicle operating system is not limited.
[0132] A small program engine 252 runs in the operating system 251. The small program engine 252 is used to provide an operating environment for small programs. One or more small programs, such as small program 1 and small program 2, run in the small program engine 252. Regardless of the vehicle operating system, as long as the small program engine 252 runs in the vehicle operating system, the small program can rely on the small program engine 252 to run.
[0133] Next, the control method of the vehicle terminal is introduced:
[0134] Figure 2 This is a scenario diagram of a method for controlling a mini-program based on a vehicle-mounted terminal provided by an embodiment of the present application; this section will focus on an exemplary introduction to the process of using hardware peripherals in the vehicle-mounted terminal to control the mini-program;
[0135] The vehicle-mounted terminal has a touch screen 231 and hardware peripherals 232; in the present embodiment, the touch screen 231 displays a small program interface, which includes a popular video display area 910 and a popular news display area 920; wherein, the popular video display area 910 includes the following components: a live concert video component 912, a singer interview video component 914 and a recitation video component 916; the popular news display area 920 includes the following components: a northern city cooling news component 922, a first supermarket price reduction news component 924 and a school opening notice component 926.
[0136] The hardware peripherals 232 include: a vertical slide button 930 , a horizontal slide button 940 , and a rotation click button 950 .
[0137] In the present application, in response to a physical control operation on a hardware peripheral, a first target component in the applet interface is controlled to execute a target event;
[0138] The control process of the above-mentioned vehicle-mounted terminal includes at least the following four human-computer interaction modes based on hardware peripherals:
[0139] The first human-computer interaction method based on hardware peripherals: in response to the confirmation operation on the hardware peripherals, the first target component is controlled to execute the response event. The confirmation operation may be an operation of clicking the rotation click button 950 .
[0140] The second human-computer interaction method based on hardware peripherals: in response to the first type of control operation on the hardware peripherals, the focus component in the focus state is switched to control the previous or next component (first target component) to be in the focus state. The first type of control operation can be an operation of toggling the horizontal toggle button 940.
[0141] Human-computer interaction method 3 based on hardware peripherals: In response to the second type of control operation on the hardware peripherals, the level of the focus component in the focus state is switched to control the component of the previous level or the next level (the first target component) to be in the focus state. The second type of control operation can be an operation of toggling the vertical toggle button 930.
[0142] Human-computer interaction mode 4 based on hardware peripherals: in response to the third type of control operation on the hardware peripherals, control to return to the upper interface of the mini-program interface, or close the mini-program interface, or close the pop-up window on the mini-program interface. The third type of control operation can be a counterclockwise rotation click button 950 operation.
[0143] Next, we will combine Figure 2The touch screen 231 and the hardware peripherals 232 in the vehicle terminal are introduced to realize the control of the vehicle terminal through four human-computer interaction methods based on hardware peripherals; it should be noted that the following descriptions are exemplary descriptions and do not constitute a limitation of the present application; those skilled in the art can understand that the touch screen 231 can display different Figure 2 In the mini-program interface shown, the hardware peripherals 232 may include more or fewer hardware such as buttons.
[0144] A first human-computer interaction method based on hardware peripherals: in response to a confirmation operation on the hardware peripherals, controlling the first target component to execute a response event.
[0145] Exemplarily, the confirmation operation of the hardware peripheral is clicking the rotation click button 950; in response to the confirmation operation of the hardware peripheral, the first target component is controlled to execute a response event; when the first target component is the recitation video component 916, a response event of playing the recitation video is executed.
[0146] The second human-computer interaction method based on hardware peripherals: in response to the first type of control operation on the hardware peripherals, the focus component in the focus state is switched to control the previous or next component (first target component) to be in the focus state.
[0147] Exemplarily, the first type of control operation of the hardware peripheral is toggling the horizontal toggle button 940;
[0148] When the singer interview video component 914 is in the focus state, in response to toggling the horizontal toggle button 940 to the right, the singer interview video component 914 loses the focus state, and the next component of the singer interview video component 914, namely the recitation video component 916, is in the focus state; the switching of components is realized.
[0149] The third human-computer interaction method based on hardware peripherals: In response to the second type of control operation on the hardware peripherals, the level of the focus component in the focus state is switched to control the component of the previous level or the next level (the first target component) to be in the focus state.
[0150] Exemplarily, the second type of control operation of the hardware peripheral is toggling the vertical toggle button 930;
[0151] The level of the components included in the popular video display area 910 is the first level, and the level of the components included in the popular news display area 920 is the second level;
[0152] When the recitation video component 916 is in the focus state, in response to the vertical toggle button 930 being pushed downward, the recitation video component 916 loses the focus state, and the component switches from the first level to the second level. Among the three components at the second level, the first component, the northern city cooling news component 922, is in the focus state; the switching of the component level is realized.
[0153] Human-computer interaction method 4 based on hardware peripherals: In response to the third type of control operation on the hardware peripherals, control the return to the upper interface of the mini-program interface, or close the mini-program interface, or close the pop-up window on the mini-program interface.
[0154] Exemplarily, the third type of control operation of the hardware peripheral is rotating the rotation click button 950 counterclockwise;
[0155] On the mini-program page, rotate and click button 950 counterclockwise to return the control to the upper interface of the mini-program interface.
[0156] To summarize, the method provided in this embodiment controls the mini-program by using hardware peripherals such as physical knobs, physical dials, and hardware buttons; it supports controlling the mini-program through both hardware peripherals and touch screens at the same time, and provides a safe control method on the vehicle terminal; it provides corresponding control methods for the vehicle terminal on the hardware peripherals for touch confirmation events, touch switching events, touch level switching events, and touch close events, and establishes a connection between the touch operation and the physical control operation on the hardware peripherals.
[0157] The control process of realizing the vehicle terminal will be introduced through the following two schematic diagrams;
[0158] Figure 3 A schematic diagram of vehicle terminal control provided by an exemplary embodiment of the present application is shown.
[0159] The hardware peripheral 310 of the vehicle terminal sends the hardware event 340 to the script program 320; illustratively, the hardware event 340 is transmitted based on the static library (Protobuf) protocol, and the script program 320 is used to communicate with the mini program 330 to respond to the hardware event 340 triggered on the hardware peripheral 310; the hardware peripheral 310 is the core control device of the intelligent driving control system (Zentrales Bedienelement iDrive Controller, ZBE). The hardware event 340 can be responded to as at least one of click, move, and selection on the mini program, but is not limited to.
[0160] The script program 320 sends an instruction message 350 to the mini-program 330 according to the hardware event 340 ; the instruction message 350 is used to control the target component of the mini-program interface to execute the target event; the components in the mini-program interface correspond to the nodes of the mini-program 330 .
[0161] In an optional case, the mini-program 330 sends the node information 360 to the script program 320 , that is, the script program 320 sends the instruction information 350 to the mini-program 330 according to the hardware event 340 and the node information 360 ;
[0162] Optional, such as Figure 4 As shown, in an optional design, the hardware peripheral 310 sends the hardware event 340 to the service process 370, the service process 370 distributes the hardware event 340 to the applet 330, and the applet 330 sends the hardware event 340 to the script program 320;
[0163] The service process 370 is a Moss Service process provided by the vehicle operating system for distributing the hardware events 340 of the hardware peripherals 310; the applet 330 includes a widget 332 and a page view 334. The widget 332 is used to realize the page display of the applet 330; the page view 334 is used to realize information communication with the script program 320. For example, the page view 334 sends the node information 360 and the hardware event 340 to the script program 320 through the evaluation JavaScript language (Evaluate JavaScript) established on the applet engine; the script program 320 sends the indication information 350 to the page view 334 through the Java bridge (JavaScriptBridge) established on the applet engine.
[0164] The following is a detailed introduction to the control method of the vehicle terminal in this application:
[0165] Figure 5 A flow chart of a control method of a vehicle terminal of the present application is shown. The method can be executed by a vehicle terminal having a touch screen and hardware peripherals, and a mini program that depends on a mini program engine is running in the vehicle terminal. The method includes:
[0166] Step 510: Display the mini program interface of the mini program;
[0167] One or more mini-programs are running on the vehicle terminal. The mini-program page is the user interface when the mini-program is running. Exemplarily, the mini-program is based on the web architecture, so the mini-program page is usually a web page. The mini-program interface includes at least two components. Components include but are not limited to: at least one of a view, text, image, media, a slider view, a scrollable view, a form, a navigation, a map, and a canvas.
[0168] Mini-programs are programs that rely on a host program to run. Mini-programs can be web applications.
[0169] Step 520: In response to the physical control operation on the hardware peripheral, control a first target component of at least two components in the applet interface to execute a target event;
[0170] Exemplarily, the hardware peripherals include but are not limited to at least one of a hardware knob, a hardware dial, a hardware touchpad, and a hardware button; the above four hardware may also be combined to obtain new hardware. For example, the rotating click button shown above is a combination of a hardware knob and a hardware button, and the rotating click button can support both a rotating operation and a pressing operation;
[0171] Specifically, the hardware peripherals with a control function include at least one of a hardware knob, a hardware dial, and a hardware touch pad.
[0172] In the case where the hardware peripheral includes a hardware knob, the hardware knob supports counterclockwise rotation and clockwise rotation. In the case where the hardware peripheral includes a hardware dial button, the hardware dial button supports dialing operations in at least two directions of up, down, left and right. In the case where the hardware peripheral includes a hardware touchpad, the hardware touchpad supports touch operations in at least two directions of up, down, left and right.
[0173] Specifically, the hardware peripherals with the confirmation function include: hardware buttons. Schematically, the hardware buttons support the confirmation operation.
[0174] In the case where the hardware peripheral includes a hardware button, the hardware button supports a press operation.
[0175] Exemplarily, the target event executed by the first target component includes, but is not limited to, at least one of the following: executing a response event, being in focus, losing focus, scrolling display, and closing display.
[0176] Step 530: In response to a touch operation on the touch screen, control a second target component of at least two components in the mini-program interface to execute a target event;
[0177] Exemplarily, the touch operation on the touch screen includes but is not limited to at least one of the following: sliding, clicking down, and clicking up.
[0178] It should be noted that in the present application, step 520 can be executed before, after or simultaneously with step 530, and the present application does not make any restrictive provisions on this. That is, the vehicle-mounted terminal can be controlled by touch operation first, or by physical control operation first, or the above two operation methods can be used at the same time.
[0179] To summarize, the method provided in this embodiment controls the mini-program by using hardware peripherals such as physical knobs, physical dials, and hardware buttons; it supports controlling the mini-program through both hardware peripherals and touch screens, and provides a safe control method on the vehicle terminal; the mini-program developer does not need to modify the mini-program to specific specifications, and this function can be used for all mini-programs, providing a low-cost adaptation solution for adapting the mini-program to the vehicle terminal.
[0180] Referring to the four human-computer interaction modes based on hardware peripherals in the control process of the vehicle terminal mentioned above, the control method of the vehicle terminal will be introduced through the following embodiments:
[0181] Corresponding to the control process of the vehicle terminal, the human-computer interaction method based on hardware peripherals is as follows: Figure 6 The flowchart of a control method of a vehicle terminal of the present application is shown. The method can be executed by the vehicle terminal; specifically, the method can also be run by a script program in the vehicle terminal, the vehicle terminal has a touch screen and hardware peripherals, and a small program that depends on the small program engine is running in the vehicle terminal. That is, in an optional design of the present application, step 520 can be implemented as the following steps:
[0182] Step 521: generating a first touch click event in response to a confirmation operation on the hardware peripheral;
[0183] The first touch click event is used to control the focus component to execute a response event. The focus component is a component that is in a focus state before receiving a confirmation operation. The focus component corresponds to a focus node.
[0184] The touch coordinates in the first touch click event belong to the coordinate range of the first target component in the focus state; in this embodiment, the coordinate range of the first component is usually rectangular, but it does not exclude the case where the coordinate range is circular, elliptical, fan-shaped or other polygonal.
[0185] Step 522: passing the first touch click event to the mini program;
[0186] The first touch click event is used to trigger the mini program to control the first target component to execute a response event. Exemplarily, the response event includes but is not limited to at least one of the following: returning to the upper interface of the mini program interface, jumping to the lower interface of the mini program interface, jumping to the first position in the mini program interface, jumping to the first URL, and executing the function corresponding to the first target component;
[0187] Exemplarily, when the first target component is a video pause component, the execution response event is to pause video playback; when the first target component is a return component, the execution response event is to return to the upper interface of the mini-program interface; when the first target component is a URL link of website A, the execution response event is to jump to website A.
[0188] In an optional design of this embodiment, step 521 has at least the following three implementation methods:
[0189] Implementation method 1: in response to a confirmation operation on a hardware peripheral, generating a first touch coordinate based on a first reference point in a coordinate range of a first target component;
[0190] In a case where the first target component does not include a subcomponent, a first touch click event is generated based on the first touch coordinates.
[0191] Exemplarily, the first reference point is a reference point in the coordinate range of the first target component; preferably, the first reference point is a center point in the coordinate range of the first target component. A first touch click event is generated based on the first touch coordinates, that is, by simulating a click on the first touch point, the first target component is controlled to execute a response event.
[0192] Implementation method 2: In response to a confirmation operation on the hardware peripheral, generating a first touch coordinate based on a first reference point within a coordinate range of the first target component;
[0193] In a case where the first target component includes a subcomponent and the first touch coordinates do not belong to a coordinate range of the subcomponent, generating a first touch click event based on the first touch coordinates;
[0194] Or, when the first target component includes a subcomponent and the first touch coordinates belong to the coordinate range of the subcomponent, the second touch coordinates are regenerated based on the coordinate range of the subcomponent; and the first touch click event is generated based on the second touch coordinates.
[0195] Figure 7A schematic diagram of a music playback component of the present application is shown; the music playback component 1020 has three subcomponents: a play previous song component 1020a, a start playback component 1020b, and a play next song component 1020c; when the music playback component 1020 is in focus, in response to a confirmation operation on a hardware peripheral, the music playback component 1020 is controlled to execute a response event of opening a music playback interface.
[0196] In the case where the generated first touch coordinates do not belong to the coordinate range of the subcomponent, it will not cause the play previous song component 1020a, the start play component 1020b or the play next song component 1020c to incorrectly control the response event of playing the previous song, starting to play or playing the next song. A first touch click event can be generated based on the first touch coordinates;
[0197] When the generated first touch coordinates belong to the coordinate range of the subcomponent, it will cause the play previous song component 1020a, the start play component 1020b or the play next song component 1020c to incorrectly control the response events of playing the previous song, starting play or playing the next song; the second touch coordinates need to be regenerated based on the coordinate range of the subcomponent; and the first touch click event is generated based on the second touch coordinates.
[0198] Specifically, regenerating the second touch coordinates based on the coordinate range of the subcomponent may be implemented as follows:
[0199] Determining a first boundary of the subassembly and a second boundary of the first target assembly based on a coordinate range of the subassembly and a coordinate range of the first target assembly;
[0200] A second reference point between a first boundary belonging to the subcomponent and a second boundary of the first target component is determined, and a second touch coordinate is generated based on the second reference point.
[0201] Exemplarily, the first boundary of the subcomponent is the leftmost edge coordinate of the subcomponent, and the second boundary of the first target component is the leftmost edge coordinate of the first target component; the second reference point is located between the first boundary of the subcomponent and the second boundary of the first target component, which can ensure that the second reference point is within the coordinate range of the first target component and avoid the second reference point being within the coordinate range of the subcomponent.
[0202] Implementation method three: in response to a confirmation operation on the hardware peripheral, obtaining a coordinate range of the first target component and a coordinate range of a subcomponent in the first target component;
[0203] Determining a third reference point that is within the coordinate range of the first target component and outside the coordinate range of the subcomponent;
[0204] A third touch coordinate is generated based on the third reference point, and a first touch click event is generated based on the third touch coordinate.
[0205] When the first target component includes a subcomponent, first determine a third reference point within the coordinate range of the first target component and outside the coordinate range of the subcomponent, and generate a third touch coordinate directly based on the third reference point; illustratively, connect the coordinate point in the coordinate range of the first target component closest to the coordinate origin and the coordinate point in the coordinate range of the subcomponent closest to the coordinate origin, and determine the third reference point as the midpoint of the above connection.
[0206] To sum up, the method provided in this embodiment controls the mini-program through hardware peripherals; realizes simultaneous support for controlling the mini-program through hardware peripherals and touch screens, and provides a safe control method on the vehicle terminal; by responding to the confirmation operation on the hardware peripheral, the first target component is controlled to execute the response event, and a corresponding control method of the vehicle terminal on the hardware peripheral is provided for the touch confirmation event, thereby establishing a connection between the touch operation and the physical control operation on the hardware peripheral.
[0207] Figure 8 A flow chart of a control method of a vehicle terminal of the present application is shown, and the method can be executed by the vehicle terminal; specifically, the method can also be run by a script program in the vehicle terminal, and the vehicle terminal has a touch screen and hardware peripherals, and a small program that depends on the small program engine is run in the vehicle terminal. The method includes:
[0208] Step 602: The script program obtains a confirmation event;
[0209] A confirmation event is an event generated based on a confirmation operation on a hardware peripheral and is used to indicate that a confirmation operation is triggered on the hardware peripheral.
[0210] Step 604: The script program determines the first target component;
[0211] The first target component is a component in a focus state, that is, when a confirmation operation is performed on the hardware peripheral, the first target component in a focus state executes a response event;
[0212] Step 606: The script program determines a first reference point of the first target component;
[0213] The first reference point is used to generate a corresponding touch click event, and the touch click event controls the first target component in the focus state to execute a response event;
[0214] Exemplarily, the first reference point is determined according to a coordinate range of the first target component, and the first reference point is within the coordinate range of the first target component.
[0215] Step 608: The script determines whether the first target component has a subcomponent;
[0216] Exemplarily, the coordinate range of the subcomponent is within the coordinate range of the first target component, but the situation where the coordinate range of some subcomponents exceeds the coordinate range of the first target component is not excluded.
[0217] If the first target component has a subcomponent, execute step 610;
[0218] If the first target component does not have a subcomponent, execute step 612;
[0219] Step 610: The script program determines whether the first reference point is a sub-assembly position;
[0220] Exemplarily, when the first target component has a subcomponent, determining whether the first reference point is within the coordinate range of the subcomponent;
[0221] In the case where the first reference point is the subassembly position, executing step 614;
[0222] In the case where the first reference point is not the subassembly position, executing step 612;
[0223] Step 612: When the first target component does not have a subcomponent, or when the first target component has a subcomponent and the first reference point is not the position of the subcomponent, the script program responds to the confirmation event with the first reference point;
[0224] After the judgment of the above steps 608 and 610, when there is no sub-component in the first target component, or when there is a sub-component in the first target component and the first reference point is not the position of the sub-component, the sub-component will not be triggered erroneously, and a touch click event will be generated based on the first reference point. The first target component in focus will be controlled by the touch click event to execute a response event.
[0225] Step 614: When the first target component has a subcomponent and the first reference point is the position of the subcomponent, the script program determines a second reference point of the first target component;
[0226] After the judgment in the above steps 608 and 610, if there is a sub-component in the first target component and the first reference point is the position of the sub-component, the sub-component will be triggered by mistake; and the second reference point needs to be re-determined;
[0227] The second reference point is determined based on the coordinate range of the first target component and the coordinate range of the subcomponent, and the second reference point is located within the coordinate range of the first target component and outside the coordinate range of the subcomponent;
[0228] Step 616: The script program responds to the confirmation event with a second reference point;
[0229] A touch click event is generated based on the second reference point to avoid erroneous triggering of a subcomponent to execute a response event; and a first target component in a focused state is controlled to execute a response event.
[0230] To sum up, the method provided in this embodiment controls the mini-program through hardware peripherals; realizes simultaneous support for controlling the mini-program through hardware peripherals and touch screens, and provides a safe control method on the vehicle terminal; by responding to the confirmation operation on the hardware peripheral, the first target component is controlled to execute the response event, and a corresponding control method of the vehicle terminal on the hardware peripheral is provided for the touch confirmation event, thereby establishing a connection between the touch operation and the physical control operation on the hardware peripheral.
[0231] The second human-computer interaction method based on hardware peripherals corresponding to the control process of the vehicle terminal, Fig. 9 The flowchart of a control method of a vehicle terminal of the present application is shown. The method can be executed by the vehicle terminal; specifically, the method can also be run by a script program in the vehicle terminal, the vehicle terminal has a touch screen and hardware peripherals, and a small program that depends on the small program engine is running in the vehicle terminal. That is, in an optional design of the present application, step 520 can be implemented as the following steps:
[0232] Step 523: In response to the first type of control operation on the hardware peripheral, control the focus component to lose the focus state, and control the first target component sorted before or after the focus component in the applet interface to be in the focus state;
[0233] The focus component is a component that is in a focus state before receiving a first type of control operation; illustratively, the first target component in the focus state is displayed on the mini-program interface in a highlighted manner.
[0234] For the display of step 523 on the mini program interface, please refer to the above Figure 2 The second human-computer interaction method based on hardware peripherals in the scenario diagram shown.
[0235] In an optional design of this embodiment, Fig.10 As shown, in Fig. 9 The embodiment shown may further include step 524, and step 523 may be implemented as step 523a, step 523b, and step 523c:
[0236] Step 524: Obtain the target node in the Document Object Model (DOM) tree corresponding to the mini-program interface;
[0237] The target node includes an event node and a focus node. The event node is a node corresponding to a component having a function of responding to physical control operations and / or touch operations, and the focus node is a node corresponding to a focus component in a focus state. Exemplarily, the focus node is usually one of the event nodes, but it is not excluded that the focus node may be a node other than an event node.
[0238] It should be noted that in this embodiment, there is no restriction on the execution order between step 524 and the first branch, that is, step 524 can be executed before, after or simultaneously with any step in the first branch, and the first branch includes step 523a, step 523b and step 523c.
[0239] Step 523a: In response to a first type of control operation on the hardware peripheral, read a first focus index corresponding to the focus component;
[0240] The first focus index is used to indicate the index information of the focus component; illustratively, the first focus index is determined according to the node position of the focus node corresponding to the focus component in the mini program;
[0241] Step 523b: updating the first focus index based on the operation direction of the first type of control operation to obtain a second focus index;
[0242] Exemplarily, the second focus index is usually the previous or next focus index of the first focus index; however, it does not exclude the possibility that there are other correlations between the second focus index and the first focus index.
[0243] Exemplarily, when the operation direction of the first type of control operation is the first direction, the first focus index is increased by one to obtain the second focus index; for example, when the first type of control operation is toggling a horizontal toggle button, and the operation direction is toggling rightward in the first direction; when the horizontal toggle button is toggled rightward, the first focus index is increased by one to obtain the second focus index;
[0244] When the operation direction of the first type of control operation is the second direction, the first focus index is reduced by one to obtain the second focus index; similarly, when the first type of control operation is toggling the horizontal dial button, the operation direction is toggling to the left in the first direction; when the horizontal dial button is toggled to the left, the first focus index is reduced by one to obtain the second focus index;
[0245] Step 523c: Determine the first target component corresponding to the second focus index; control the focus component to lose the focus state, and control the first target component to switch to the focus state;
[0246] The second focus index corresponds to a component, the component corresponding to the second focus index is determined as the first target component, the focus component is controlled to lose the focus state, and the first target component is controlled to switch to the focus state. Exemplarily, the first target component in the focus state is displayed on the mini program interface in a highlighted manner.
[0247] To summarize, the method provided in this embodiment controls the mini-program through hardware peripherals; realizes simultaneous support for controlling the mini-program through hardware peripherals and touch screens, and provides a safe control method on the vehicle terminal; controls the switching component in response to the first type of control operation on the hardware peripheral so that the first target component is in focus, provides a corresponding control method for the vehicle terminal on the hardware peripheral for the touch switching event, and establishes a connection between the touch operation and the physical control operation on the hardware peripheral.
[0248] Next, in Fig. 9 The process of acquiring the target node is introduced based on the illustrated embodiment, that is, in an optional design of the above embodiment, step 524 can be implemented as the following sub-steps:
[0249] Sub-step 1: Filter event nodes from all nodes in the mini-program interface;
[0250] Exemplarily, event nodes are filtered out from all nodes in the mini-program interface according to the filtering condition; wherein the filtering condition includes at least one of the following:
[0251] A node with an event response method registered; exemplary event response methods include but are not limited to at least one of the following: returning to the upper interface of the mini-program interface, jumping to the lower interface of the mini-program interface, jumping to the first position in the mini-program interface, jumping to the first URL, executing the function corresponding to the first target component;
[0252] A page navigation (Navigator) node whose Uniform Resource Locator (URL) is not empty; illustratively, the page navigation node is registered with an event of jumping to the website indicated by the URL;
[0253] Input node; illustratively, the input node is used for content input;
[0254] ·Scroll-View node; illustratively, the scroll-view node is used to scroll the applet interface or the scroll component corresponding to the scroll-view node supports scrolling display.
[0255] Fig.11A schematic diagram of a mini-program interface provided by an exemplary embodiment of the present application is shown; the mini-program interface 1100 includes a user information component 1102, a logout component 1104, a my favorite songs component 1106, a visit new version homepage component 1108, a search input component 1110, a search component 1112, a first video overlay image component 1114, a second video overlay image component 1116, a third video overlay image component 1118, a first video text component 1114a, a second video text component 1116a and a third video text component 1118a; the my favorite songs component 1106 includes 5 subcomponents: a song 001 component 1106a, a song 002 component 1106b, a song 003 component 1106c, a song 004 component 1106d and a song 005 component 1106e.
[0256] Among them, the node corresponding to the user information component 1102 does not meet the filtering conditions, the node corresponding to the logout component 1104 has a registered logout event response method that meets the filtering conditions, the node corresponding to the my favorite song component 1106 is an event response method registered with a binding tag (Bindtap) that meets the filtering conditions, the node corresponding to the subcomponent of the my favorite song component 1106 is an event response method registered with a hidden tag (Cachetap) that meets the filtering conditions, the node corresponding to the visit new version homepage component 1108 is a page navigation node whose URL is not empty, and the response event is jumping to the new version homepage that meets the filtering conditions; the node corresponding to the search input component 1110 is an input node that meets the filtering conditions, and the node corresponding to the search component 1112 is an event response method registered with a search song that meets the filtering conditions; the nodes corresponding to the first video cover picture component 1114, the second video cover picture component 1116, and the third video cover picture component 1118 are video cover bound picture nodes (Video-Cover-Play-Button Img node) has registered an event response method for playing video, which meets the filtering conditions; the first video text component 1114a, the second video text component 1116a and the third video text component 1118a are only text introductions of the first video to the third video, which do not meet the filtering conditions.
[0257] Sub-step 2: determine the focus node in the event node;
[0258] Exemplarily, in the event node, a focus node is determined according to a first type of control operation on the hardware peripheral device;
[0259] Sub-step 3: obtaining the node status of the event node and the focus node; and updating the focus node according to the change of the node status;
[0260] When the node state changes, the focus node is updated; for example, when the focus component loses the focus state and the first target component is in the focus state, the focus node is updated to the node corresponding to the first target component.
[0261] Next, in Fig. 9 The first target component is further introduced based on the illustrated embodiment, that is, in an optional design of the above embodiment, the following sub-steps are also included:
[0262] When the first target component does not include a subcomponent and the first target component is not completely displayed in the mini-program interface, based on the operation direction of the first type of control operation, controlling the first target component to be scrolled and displayed on the mini-program interface;
[0263] Exemplarily, the first target component is a long text component, which does not include the self-component. Also, because the first target component contains a lot of text content, it cannot be fully displayed on the mini-program interface. Based on the operation direction of the first type of control operation, the first target component is controlled to scroll and display on the mini-program interface to facilitate the display of the content of the first target component.
[0264] Exemplarily, the direction of scrolling to display the first target component is determined based on the operation direction of the first type of control operation; for example: when the operation direction of the first type of control operation is the first direction, scrolling down to display the first target component; when the operation direction of the first type of control operation is the second direction, scrolling up to display the first target component.
[0265] Fig.12 A flow chart of a control method of a vehicle terminal of the present application is shown, and the method can be executed by the vehicle terminal; specifically, the method can also be run by a script program in the vehicle terminal, and the vehicle terminal has a touch screen and hardware peripherals, and a small program that depends on the small program engine is run in the vehicle terminal. The method includes:
[0266] Step 620: The script program obtains the selection event;
[0267] The selection event is an event generated based on the first type of control operation on the hardware peripheral device, and is used to indicate that the first type of control operation is triggered on the hardware peripheral device;
[0268] Step 622: The script determines the focus component;
[0269] The focus component is the component that is in the focus selected state before obtaining the selection time;
[0270] Step 624: The script determines whether there is a mini-program component in the focus component;
[0271] The situation where the focus component does not have a mini-program component includes but is not limited to at least one of the following: the focus node has no event response method registered; the content of the focus node is empty;
[0272] If there is no applet component in the focus component, execute step 626;
[0273] If there is a mini-program component in the focus component, execute step 628;
[0274] Step 626: when there is no applet component in the focus component, the script program controls the native label component to be in the focus state;
[0275] If there is no applet node for the focus component, the component state of the focus component cannot be changed, and the native label component corresponding to the focus component is controlled to be in the focus state;
[0276] Step 628: When the focus component has a mini-program component, the script determines whether the focus component supports scrolling;
[0277] Exemplarily, the node corresponding to the focus component supporting scrolling is a scroll-view node.
[0278] If the focus component supports scrolling, execute step 630;
[0279] If the focus component does not support scrolling, execute step 632;
[0280] Step 630: When the focus component supports scrolling, the script program controls the scrolling display of the focus component;
[0281] Scrolling displays a focus component that supports scrolling; illustratively, the scrolling direction of the focus component is determined according to the operation direction of the first type of control operation; for example: when the operation direction of the first type of control operation is the first direction, scroll the focus component downward; when the operation direction of the first type of control operation is the second direction, scroll the focus component upward.
[0282] Step 632: When the focus component does not support scrolling, the script program determines the first target component;
[0283] Exemplarily, the first target component is typically a component before or after the focus component; the first target component is determined based on the operation direction of the first type of control operation and the focus index of the focus component; exemplarily, when the operation direction of the first type of control operation is the first direction, the first focus index is increased by one to obtain a second focus index, and the second focus index is used to indicate the first target component; similarly, when the operation direction of the first type of control operation is the second direction, the first focus index is decreased by one to obtain a second focus index, and the second focus index is used to indicate the first target component.
[0284] It should be noted that, in the process of calculating the second focus index from the first focus index according to the first type of control operation, the second focus index may not be obtained; for example, if the first focus index indicates the last component in the mini-program interface, and the first type of control operation indicates the next component, the second focus index cannot be obtained; if the second focus index cannot be obtained, the processing of the selection event is terminated, that is, the focus component is kept in the focus state.
[0285] Step 634: The script program determines whether the first target component is completely displayed in the mini-program interface;
[0286] Determine whether the first target component is fully displayed in the mini-program interface. If the first target component has a lot of content, it may not be fully displayed in the mini-program interface. For example, the first target component is a text component, which includes 7 lines of text content, but there is only display space for 5 lines of text content in the mini-program interface.
[0287] When the first target component is completely displayed in the mini-program interface, execute step 636;
[0288] If the first target component is not completely displayed in the mini-program interface, execute step 638;
[0289] Step 636: When the first target component is completely displayed in the mini-program interface, the script program controls the first target component to be in a focus state;
[0290] Controlling the first target component to be in a focus state; optionally, controlling the focus component to lose the focus state;
[0291] Step 638: When the first target component is not completely displayed in the mini-program interface, the script program determines whether the first target component has a subcomponent;
[0292] Exemplarily, the coordinate range of the subcomponent is within the coordinate range of the first target component, but the situation where the coordinate range of some subcomponents exceeds the coordinate range of the first target component is not excluded.
[0293] If the first target component has a subcomponent, execute step 642;
[0294] If the first target component does not have a subcomponent, execute step 640;
[0295] Step 640: When the first target component does not have a subcomponent, the script program controls the scrolling display of the first target component;
[0296] When the first target component does not have any subcomponents, in order to fully display the content of the first target component in the mini-program interface, the first target component is scrolled and displayed; it should be noted that the scrolling display in this step is to fully display the content of the first target component; the scrolling display of the component corresponding to the scroll view node in the above text is the component's response event to execute the scrolling display.
[0297] Step 642: When the first target component has a subcomponent, the script program controls the first subcomponent to be in focus;
[0298] The first subcomponent is determined according to the operation direction of the first type of control operation; exemplarily, when the operation direction of the first type of control operation is the first direction, the first focus index is increased by one to obtain the second focus index, and the first subcomponent is the first subcomponent in the first target component; when the operation direction of the first type of control operation is the second direction, the first focus index is reduced by one to obtain the second focus index, and the first subcomponent is the last subcomponent in the first target component.
[0299] Step 644: when the component state of the component changes, the script program updates the node information corresponding to the component;
[0300] When the node state changes, the focus node is updated; for example, when the focus component loses the focus state and the first target component is in the focus state, the focus node is updated to the node corresponding to the first target component. In summary, the method provided in this embodiment controls the applet through the hardware peripherals; it supports the control of the applet through the hardware peripherals and the touch screen at the same time, and provides a safe control method on the vehicle terminal; by responding to the first type of control operation on the hardware peripheral, the switching component is controlled so that the first target component is in the focus state, and a corresponding control method of the vehicle terminal on the hardware peripheral is provided for the touch switching event, and the touch operation is linked with the physical control operation on the hardware peripheral.
[0301] The third human-computer interaction method based on hardware peripherals corresponding to the control process of the vehicle terminal is: Fig.13The flowchart of a control method of a vehicle terminal of the present application is shown. The method can be executed by the vehicle terminal; specifically, the method can also be run by a script program in the vehicle terminal, the vehicle terminal has a touch screen and hardware peripherals, and a small program that depends on the small program engine is running in the vehicle terminal. That is, in an optional design of the present application, step 520 can be implemented as the following steps:
[0302] Step 525: In response to the second type of control operation on the hardware peripheral, control the focus component to lose the focus state, and control the first target component in the upper layer or lower layer of the focus component in the applet interface to be in the focus state;
[0303] The focus component is a component that is in a focus state before receiving the second type of control operation; illustratively, the first target component in the focus state is displayed on the mini-program interface in a highlighted manner.
[0304] For the display of step 525 on the mini program interface, please refer to the above Figure 2 The third human-computer interaction method based on hardware peripherals in the scenario diagram shown.
[0305] In an optional design of this embodiment, Fig.14 As shown, in Fig.13 The illustrated embodiment can be implemented in step 525 as steps 525a, 525b, and 525c:
[0306] Step 525a: In response to the second type of control operation on the hardware peripheral, read the first level index corresponding to the focus component;
[0307] The first focus level is used to indicate the level information of the focus component; illustratively, the first level index is determined according to the node level of the focus node corresponding to the focus component in the mini program;
[0308] Exemplarily, the hierarchical index of a component is obtained by adding a data-focus index attribute to a node corresponding to the component; the hierarchical index corresponding to the component may be completed when designing the mini-program, or may be added to the component through the vehicle terminal;
[0309] Step 525b: updating the first level index based on the operation direction of the second type of control operation to obtain a second level index; determining a first target component corresponding to the second level index;
[0310] Exemplarily, the second-level index is usually the previous or next level index of the first-level index; however, it does not exclude the possibility that there are other related relationships between the second-level index and the first-level index.
[0311] Exemplarily, when the operation direction of the second type of control operation is the third direction, the first level index is incremented by one to obtain the second level index; for example, when the second type of control operation is toggling the vertical dial button, and the operation direction is the third direction of downward dialing; when the vertical dial button is toggled downward, the first level index is incremented by one to obtain the second level index;
[0312] When the operation direction of the second type of control operation is the fourth direction, the first level index is reduced by one to obtain the second level index; for example, when the second type of control operation is toggling the vertical dial button, the operation direction is the fourth direction, which is toggling upward; when the vertical dial button is toggled upward, the first level index is reduced by one to obtain the second level index;
[0313] Determine the first target component corresponding to the second level index, the first target node is the node corresponding to the second level index. When there are multiple components corresponding to the second level index, there is no restriction on how to determine the first target component, and the first target component can be determined by preset conditions; exemplary preset conditions include but are not limited to at least one of the following: the first target node is the node corresponding to the randomly determined second level index; the first target node is the first node among the nodes corresponding to the second level index.
[0314] Optionally, when there is an ownership relationship between the first-level index and the second-level index, the first target component is a component corresponding to the second-level index and having an ownership relationship with the focus component;
[0315] Fig.15 A schematic diagram of a mini-program interface provided by an exemplary embodiment of the present application is shown; the mini-program interface 1200 includes: a historical listening list component 1202 and a my favorite list component 1204, the historical listening list component 1202 and the my favorite list component 1204 correspond to the first level index; the my favorite list component 1204 includes subcomponents: a song 001 component 1204a, a song 002 component 1204b and a song 003 component 1204c;
[0316] When the song 002 component 1204b is the focus node, in response to pressing the vertical toggle button upward, the first target component that has an affiliation with the song 002 component 1204b in the first-level index that is in the upper level of the song 002 component 1204b in the control mini-program interface is in focus, and the first target component is my favorite list component 1204.
[0317] Optionally, when there is no belonging relationship between the first-level index and the second-level index, the first target component is the first component corresponding to the second-level index.
[0318] Refer to the above Figure 2 In the scene diagram shown, the third human-computer interaction mode based on hardware peripherals is shown. Since the components included in the popular video display area 910 have no belonging relationship with the components included in the popular news display area 920, the first target component is the first component corresponding to the second-level index, that is, the first target component is the northern city cooling news component 922.
[0319] Optionally, when the second-level index cannot be successfully updated, the focused component is controlled to lose the focused state, and the native label corresponding to the focused component is controlled to be in the focused state;
[0320] The mini program interface also displays native tags, which are provided by the mini program engine. Exemplary situations where the second-level index cannot be successfully updated include but are not limited to at least one of the following:
[0321] The focus node has no event response method registered;
[0322] The content of the focus node is empty;
[0323] In the case where the second level index is obtained by subtracting one from the first level index, the first level index is the top level;
[0324] Fig.16 A schematic diagram of a mini-program interface provided by an exemplary embodiment of the present application is shown, where the mini-program interface 1300 includes a tab bar display area 1310 and a travel navigation function display area 1320;
[0325] The tab bar display area 1310 includes three native tabs: a movie lover tab 1312, a music gallery tab 1314, and a travel navigation tab 1316; the content of the travel navigation tab 1316 is displayed in the travel navigation function display area 1320;
[0326] The travel navigation function display area 1320 includes: a navigation component 1322, a memo component 1324 and a subscription component 1326; wherein the memo component 1324 only displays the violation record and has no event response method registered; the hierarchical indexes corresponding to the navigation component 1322 and the subscription component 1326 are both top-level hierarchical;
[0327] When the node corresponding to the memo component 1324 is the focus node, in response to the second type of control operation on the hardware peripheral, the second level index cannot be successfully updated, the native label travel navigation label 1316 corresponding to the control memo component 1324 is in the focus state, and the control memo component 1324 loses the focus state.
[0328] When the node corresponding to the navigation component 1322 is the focus node and the operation direction of the second type of control operation is the fourth direction, the first-level index is reduced by one to obtain the second-level index; since the level index corresponding to the navigation component 1322 is the top level, the second-level index cannot be successfully updated, and the native label travel navigation label 1316 corresponding to the control navigation component 1322 is in the focus state, and the control navigation component 1322 loses the focus state.
[0329] Step 525c: Control the focus component to lose the focus state, and control the first target component to switch to the focus state;
[0330] The second level index corresponds to a component, the component corresponding to the second level index is determined as the first target component, the focus component is controlled to lose the focus state, and the first target component is controlled to switch to the focus state. Exemplarily, the first target component in the focus state is displayed on the mini program interface in a highlighted manner.
[0331] To summarize, the method provided in this embodiment controls the mini-program through hardware peripherals; realizes simultaneous support for controlling the mini-program through hardware peripherals and touch screens, and provides a safe control method on the vehicle terminal; by responding to the second type of control operation on the hardware peripheral, controls the level of the switching component so that the first target component is in the focus state, and provides a corresponding control method for the vehicle terminal on the hardware peripheral for the touch level switching event, thereby establishing a connection between the touch operation and the physical control operation on the hardware peripheral.
[0332] The fourth human-computer interaction method based on hardware peripherals corresponding to the control process of the vehicle terminal, Fig.17 The flowchart of a control method of a vehicle terminal of the present application is shown. The method can be executed by the vehicle terminal; specifically, the method can also be run by a script program in the vehicle terminal, the vehicle terminal has a touch screen and hardware peripherals, and a small program that depends on the small program engine is running in the vehicle terminal. That is, in an optional design of the present application, step 520 can be implemented as the following steps:
[0333] Step 526: In response to the third type of control operation on the hardware peripheral, control the return to the upper interface of the mini-program interface, or close the mini-program interface, or close the pop-up window on the mini-program interface;
[0334] For the display of step 526 on the mini program interface, please refer to the above Figure 2 The scene diagram shows a fourth human-computer interaction method based on hardware peripherals; exemplarily, the third type of control operation of the hardware peripheral is to rotate the click button counterclockwise; rotate the click button counterclockwise on the mini-program page to control the return to the upper interface of the mini-program interface, or close the mini-program interface, or close the pop-up window on the mini-program interface.
[0335] In an optional design of this embodiment, step 526 of closing the pop-up window on the mini-program interface can be implemented as follows:
[0336] In response to a third type of control operation on the hardware peripheral, generating a second touch click event; transmitting the second touch click event to the applet;
[0337] The second touch click event is used to trigger the mini program to add a data-close popup attribute to the node corresponding to the pop-up window, so that the pop-up window is closed and displayed. Exemplarily, the mini program adds a data-close popup attribute to the node corresponding to the pop-up window on the mini program interface, and the data-close popup attribute indicates that the pop-up window on the mini program interface is closed and displayed.
[0338] Exemplarily, the touch coordinates in the second touch click event belong to the coordinate range of the closing component of the pop-up window on the mini-program interface; in the present embodiment, the coordinate range of the closing component of the pop-up window on the mini-program interface is usually rectangular, but it does not exclude the case where the coordinate range is circular, elliptical, fan-shaped or other polygonal. The touch coordinates in the second touch click event are determined based on the fourth reference point in the coordinate range of the closing component of the pop-up window on the mini-program interface. The fourth reference point is a reference point in the coordinate range of the closing component; preferably, the first reference point is the center point in the coordinate range of the closing component.
[0339] To sum up, the method provided in this embodiment controls the mini-program through hardware peripherals; it supports the control of the mini-program through hardware peripherals and touch screens at the same time, and provides a safe control method on the vehicle terminal; by responding to the third type of control operation on the hardware peripheral, the control returns to the upper interface of the mini-program interface, or closes the mini-program interface, or closes the pop-up window on the mini-program interface, and provides a corresponding control method of the vehicle terminal on the hardware peripheral for the touch close event, thereby establishing a connection between the touch operation and the physical control operation on the hardware peripheral.
[0340] Those skilled in the art will appreciate that the above embodiments may be implemented independently, or the above embodiments may be freely combined to form new embodiments to implement the control method of the vehicle-mounted terminal of the present application.
[0341] Fig.18 A block diagram of a control device of a vehicle terminal provided by an exemplary embodiment of the present application is shown. The vehicle terminal has a touch screen and hardware peripherals, and a small program that depends on a small program engine runs in the vehicle terminal. The device includes:
[0342] A display module 710, configured to display the mini-program interface of the mini-program, wherein the mini-program interface includes at least two components;
[0343] A control module 720, configured to control a first target component of the at least two components in the mini-program interface to execute a target event in response to a physical control operation on the hardware peripheral;
[0344] The control module 720 is further configured to control a second target component of the at least two components in the mini-program interface to execute the target event in response to a touch operation on the touch screen.
[0345] In an optional design of the embodiment, the control module 720 includes:
[0346] The processing unit 722 is configured to generate a first touch click event in response to a confirmation operation on the hardware peripheral, wherein the touch coordinates in the first touch click event belong to a coordinate range of the first target component in a focus state;
[0347] The transmitting unit 724 is used to transmit the first touch click event to the mini program, where the first touch click event is used to trigger the mini program to control the first target component to execute a response event.
[0348] In an optional design of the embodiment, the processing unit 722 is further configured to:
[0349] In response to a confirmation operation on the hardware peripheral, generating a first touch coordinate based on a first reference point in a coordinate range of the first target component;
[0350] In a case where the first target component does not include a subcomponent, the first touch click event is generated based on the first touch coordinates.
[0351] In an optional design of the embodiment, the processing unit 722 is further configured to:
[0352] In response to a confirmation operation on the hardware peripheral, generating a first touch coordinate based on a first reference point within a coordinate range of the first target component;
[0353] In a case where the first target component includes a subcomponent and the first touch coordinates do not belong to a coordinate range of the subcomponent, generating the first touch click event based on the first touch coordinates;
[0354] or,
[0355] In the case where the first target component includes a subcomponent and the first touch coordinates belong to a coordinate range of the subcomponent, the second touch coordinates are regenerated based on the coordinate range of the subcomponent; and the first touch click event is generated based on the second touch coordinates.
[0356] In an optional design of the embodiment, the processing unit 722 is further configured to:
[0357] Determining a first boundary of the subcomponent and a second boundary of the first target component based on a coordinate range of the subcomponent and a coordinate range of the first target component;
[0358] A second reference point between a first boundary belonging to the subcomponent and a second boundary of the first target component is determined, and the second touch coordinates are generated based on the second reference point.
[0359] In an optional design of the embodiment, the processing unit 722 is further configured to:
[0360] In response to a confirmation operation on the hardware peripheral, acquiring a coordinate range of the first target component and a coordinate range of a subcomponent in the first target component;
[0361] Determining a third reference point that is within the coordinate range of the first target component and outside the coordinate range of the subcomponent;
[0362] A third touch coordinate is generated based on the third reference point, and the first touch click event is generated based on the third touch coordinate.
[0363] In an optional design of the embodiment, the control module 720 is further used for:
[0364] In response to a first type of control operation on the hardware peripheral, the focus component is controlled to lose its focus state, and the first target component sorted before or after the focus component in the mini-program interface is controlled to be in the focus state, and the focus component is the component that is in the focus state before receiving the first type of control operation.
[0365] In an optional design of the embodiment, the device further includes:
[0366] The acquisition module 730 is used to acquire the target node in the document object model DOM tree corresponding to the mini-program interface, wherein the target node includes an event node and a focus node, wherein the event node is a node corresponding to a component having a function of responding to the physical control operation and / or touch operation, and the focus node is a node corresponding to a focus component in a focus state;
[0367] The control module 720 is also used for:
[0368] In response to a first type of control operation on the hardware peripheral, reading a first focus index corresponding to the focus component;
[0369] updating the first focus index based on the operation direction of the first type of control operation to obtain a second focus index;
[0370] Determine the first target component corresponding to the second focus index; control the focus component to lose the focus state, and control the first target component to switch to the focus state.
[0371] In an optional design of the embodiment, the control module 720 is further used for:
[0372] In the case that the first target component does not include a subcomponent and the first target component is not completely displayed in the mini-program interface, based on the operation direction of the first type of control operation, the first target component is controlled to be scrolled and displayed on the mini-program interface.
[0373] In an optional design of the embodiment, the control module 720 is further used for:
[0374] When the operation direction of the first type of control operation is the first direction, adding one to the first focus index to obtain the second focus index;
[0375] When the operation direction of the first type of control operation is the second direction, the first focus index is reduced by one to obtain the second focus index.
[0376] In an optional design of the embodiment, the acquisition module 730 is further used for:
[0377] Filtering the event node from all nodes in the mini-program interface;
[0378] Determining the focus node in the event node;
[0379] Acquire the node status of the event node and the focus node; and update the focus node according to the change of the node status.
[0380] In an optional design of the embodiment, the acquisition module 730 is further used for:
[0381] Filter the event node among all nodes in the mini-program interface according to a filtering condition;
[0382] The screening condition includes at least one of the following:
[0383] Register nodes with event response devices;
[0384] A page navigation node whose Uniform Resource Locator System URL is not empty;
[0385] Input node;
[0386] Scroll view node.
[0387] In an optional design of the embodiment, the control module 720 is further used for:
[0388] In response to a second type of control operation on the hardware peripheral, the focus component is controlled to lose its focus state, and the first target component at the upper or lower level of the focus component in the mini-program interface is controlled to be in the focus state, and the focus component is the component that is in the focus state before receiving the second type of control operation.
[0389] In an optional design of the embodiment, the control module 720 is further used for:
[0390] In response to a second type of control operation on the hardware peripheral, reading a first level index corresponding to the focus component;
[0391] The first hierarchical index is updated based on the operation direction of the second type of control operation to obtain a second hierarchical index; the first target component corresponding to the second hierarchical index is determined;
[0392] The focus component is controlled to lose the focus state, and the first target component is controlled to switch to the focus state.
[0393] In an optional design of the embodiment, when the first hierarchical index and the second hierarchical index have an affiliation relationship, the first target component is a component corresponding to the second hierarchical index and having an affiliation relationship with the focus component;
[0394] When there is no belonging relationship between the first hierarchical index and the second hierarchical index, the first target component is the first component corresponding to the second hierarchical index.
[0395] In an optional design of the embodiment, the mini-program interface further displays a native label, and the native label is provided by the mini-program engine; the control module 720 is further used to:
[0396] In the case that the second-level index cannot be successfully updated, the focus component is controlled to lose the focus state, and the native tag corresponding to the focus component is controlled to be in the focus state.
[0397] In an optional design of the embodiment, the control module 720 is further used for:
[0398] When the operation direction of the second type of control operation is the third direction, adding one to the first level index to obtain the second level index;
[0399] When the operation direction of the second-type control operation is the fourth direction, the first level index is reduced by one to obtain the second level index.
[0400] In an optional design of the embodiment, the control module 720 is further used for:
[0401] In response to the third type of control operation on the hardware peripheral, control is returned to the upper interface of the mini-program interface, or the mini-program interface is closed, or a pop-up window on the mini-program interface is closed.
[0402] In an optional design of the embodiment, the control module 720 is further used for:
[0403] In response to a third type of control operation on the hardware peripheral, a second touch click event is generated; the second touch click event is passed to the mini program, and the second touch click event is used to trigger the mini program to add a data-close pop-up attribute to the node corresponding to the pop-up window, so that the pop-up window is closed.
[0404] One point that needs to be explained is that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0405] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method; the technical effects achieved by each module performing operations are the same as those in the embodiment of the method, and will not be elaborated here.
[0406] Fig.19 The structural block diagram of a vehicle-mounted terminal 1400 provided by an exemplary embodiment of the present application is shown. The vehicle-mounted terminal 1400 includes: a control chip 1420, a display screen 1440 connected to the control chip 1420, and control hardware 1460;
[0407] The display screen 1440 is used to display the mini-program page under the control of the control chip, and the mini-program page includes at least two components;
[0408] The control hardware 1460 is used to report physical control events to the control chip in response to physical control operations on the hardware peripherals, and report touch events to the control chip in response to touch operations on the touch screen;
[0409] The control chip 1420 is used to control the first target component among the at least two components in the mini-program interface to execute the target event upon receiving the physical control event; and to control the second target component among the at least two components in the mini-program interface to execute the target event upon receiving the touch event.
[0410] In an optional design of this embodiment, the control chip 1420 is further used to generate a first touch click event in response to a confirmation operation on the hardware peripheral, wherein the touch coordinates in the first touch click event belong to a coordinate range of the first target component in a focus state;
[0411] The first touch click event is transmitted to the applet, where the first touch click event is used to trigger the applet to control the first target component to execute a confirmation response event.
[0412] In an optional design of this embodiment, the control chip 1420 is further used to generate a first touch coordinate based on a first reference point in a coordinate range of the first target component in response to a confirmation operation on the hardware peripheral;
[0413] In a case where the first target component does not include a subcomponent, the first touch click event is generated based on the first touch coordinates.
[0414] In an optional design of this embodiment, the control chip 1420 is further used to generate a first touch coordinate based on a first reference point inside a coordinate range of the first target component in response to a confirmation operation on the hardware peripheral;
[0415] In a case where the first target component includes a subcomponent and the first touch coordinates do not belong to a coordinate range of the subcomponent, generating the first touch click event based on the first touch coordinates;
[0416] or,
[0417] In the case where the first target component includes a subcomponent and the first touch coordinates belong to a coordinate range of the subcomponent, the second touch coordinates are regenerated based on the coordinate range of the subcomponent; and the first touch click event is generated based on the second touch coordinates.
[0418] In an optional design of this embodiment, the control chip 1420 is further used to determine a first boundary of the subcomponent and a second boundary of the first target component based on a coordinate range of the subcomponent and a coordinate range of the first target component;
[0419] A second reference point between a first boundary belonging to the subcomponent and a second boundary of the first target component is determined, and the second touch coordinates are generated based on the second reference point.
[0420] In an optional design of this embodiment, the control chip 1420 is further used to obtain the coordinate range of the first target component and the coordinate range of the subcomponent in the first target component in response to the confirmation operation on the hardware peripheral;
[0421] Determining a third reference point that is within the coordinate range of the first target component and outside the coordinate range of the subcomponent;
[0422] A third touch coordinate is generated based on the third reference point, and the first touch click event is generated based on the third touch coordinate.
[0423] In an optional design of this embodiment, the control chip 1420 is also used to control the focus component to lose the focus state in response to the first type of control operation on the hardware peripheral, and to control the first target component sorted before or after the focus component in the mini-program interface to be in the focus state, and the focus component is the component that is in the focus state before receiving the first type of control operation.
[0424] In an optional design of this embodiment, the control chip 1420 is also used to control the focus component to lose its focus state in response to a second type of control operation on the hardware peripheral, and to control the first target component in the mini-program interface that is at the upper or lower level of the focus component to be in the focus state, and the focus component is the component that is in the focus state before receiving the second type of control operation.
[0425] In an optional design of this embodiment, the control chip 1420 is further used to read the first level index corresponding to the focus component in response to the second type of control operation on the hardware peripheral;
[0426] The first hierarchical index is updated based on the operation direction of the second type of control operation to obtain a second hierarchical index; the first target component corresponding to the second hierarchical index is determined;
[0427] The focus component is controlled to lose the focus state, and the first target component is controlled to switch to the focus state.
[0428] In an optional design of this embodiment, the control chip 1420 is also used to respond to a third type of control operation on the hardware peripheral to control the return to the upper interface of the mini-program interface, or close the mini-program interface, or close the pop-up window on the mini-program interface.
[0429] Fig. 20The structure block diagram of the vehicle terminal 1500 provided by an exemplary embodiment of the present application is shown. Generally, the vehicle terminal 1500 includes: a processor 1501 and a memory 1502 .
[0430] The processor 1501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1501 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1501 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1501 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0431] The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1502 is used to store at least one instruction, which is used to be executed by the processor 1501 to implement the control method of the vehicle terminal provided in the method embodiment of the present application.
[0432] In some embodiments, the vehicle-mounted terminal 1500 may also optionally include: a peripheral device interface 1503 and at least one peripheral device. The processor 1501, the memory 1502 and the peripheral device interface 1503 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1503 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1504, a touch display screen 1505, a camera 1506, an audio circuit 1507 and a power supply 1508.
[0433] The peripheral device interface 1503 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1501 and the memory 1502. In some embodiments, the processor 1501, the memory 1502 and the peripheral device interface 1503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1501, the memory 1502 and the peripheral device interface 1503 can be implemented on a separate chip or circuit board, which is not limited in this embodiment. The peripheral device includes control hardware, and the control hardware includes: at least one of a hardware knob, a hardware dial, a hardware touchpad and a hardware button. In one example, the control hardware includes: a hardware knob for triggering a selection operation, a confirmation button for triggering a confirmation operation, and a back button for triggering a back operation. The hardware knob for triggering a selection operation can also be implemented as a hardware dial or a hardware touchpad instead. In some examples, there is a center console button that supports multiple control functions, and the center console button supports at least one of rotation control, dial control, touchpad control and button control at the same time.
[0434] The radio frequency circuit 1504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1504 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1504 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1504 can communicate with other vehicle-mounted terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a wireless fidelity (Wireless Fidelity, WiFi) network. In some embodiments, the radio frequency circuit 1504 may also include circuits related to NFC (Near Field Communication, short-range wireless communication), which is not limited in this application.
[0435] The display screen 1505 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1505 is a touch display screen, the display screen 1505 also has the ability to collect touch signals on the surface or above the surface of the display screen 1505. The touch signal can be input to the processor 1501 as a control signal for processing. At this time, the display screen 1505 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1505 can be one, and the front panel of the vehicle terminal 1500 is set; in other embodiments, the display screen 1505 can be at least two, which are respectively set on different surfaces of the vehicle terminal 1500 or are folded; in some other embodiments, the display screen 1505 can be a flexible display screen, which is set on the curved surface or folded surface of the vehicle terminal 1500. Even, the display screen 1505 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1505 can be made of materials such as a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
[0436] The camera assembly 1506 is used to capture images or videos. Optionally, the camera assembly 1506 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the vehicle terminal, and the rear camera is arranged on the back of the vehicle terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1506 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0437] The audio circuit 1507 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1501 for processing, or input them into the RF circuit 1504 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the vehicle-mounted terminal 1500. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1501 or the RF circuit 1504 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1507 may also include a headphone jack.
[0438] The power supply 1508 is used to power various components in the vehicle-mounted terminal 1500. The power supply 1508 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1508 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0439] In some embodiments, the vehicle terminal 1500 further includes one or more sensors 1510 . The one or more sensors 1510 include but are not limited to: an acceleration sensor 1511 , a gyroscope sensor 1512 , a pressure sensor 1513 , an optical sensor 1514 , and a proximity sensor 1515 .
[0440] The acceleration sensor 1511 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the vehicle-mounted terminal 1500. For example, the acceleration sensor 1511 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1501 can control the touch display screen 1505 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1511. The acceleration sensor 1511 can also be used for collecting game or user motion data.
[0441] The gyro sensor 1512 can detect the body direction and rotation angle of the vehicle terminal 1500. The gyro sensor 1512 can cooperate with the acceleration sensor 1511 to collect the user's 3D actions on the vehicle terminal 1500. The processor 1501 can implement the following functions based on the data collected by the gyro sensor 1512: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0442] The pressure sensor 1513 can be set on the side frame of the vehicle terminal 1500 and / or the lower layer of the touch display screen 1505. When the pressure sensor 1513 is set on the side frame of the vehicle terminal 1500, it can detect the user's holding signal of the vehicle terminal 1500, and the processor 1501 performs left and right hand recognition or quick operation according to the holding signal collected by the pressure sensor 1513. When the pressure sensor 1513 is set on the lower layer of the touch display screen 1505, the processor 1501 controls the operability components on the UI interface according to the user's pressure operation on the touch display screen 1505. The operability components include at least one of a button component, a scroll bar component, an icon component, and a menu component.
[0443] The optical sensor 1514 is used to collect the ambient light intensity. In one embodiment, the processor 1501 can control the display brightness of the touch display screen 1505 according to the ambient light intensity collected by the optical sensor 1514. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1505 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1505 is reduced. In another embodiment, the processor 1501 can also dynamically adjust the shooting parameters of the camera assembly 1506 according to the ambient light intensity collected by the optical sensor 1514.
[0444] The proximity sensor 1515, also called a distance sensor, is usually arranged on the front panel of the vehicle terminal 1500. The proximity sensor 1515 is used to collect the distance between the user and the front of the vehicle terminal 1500. In one embodiment, when the proximity sensor 1515 detects that the distance between the user and the front of the vehicle terminal 1500 is gradually decreasing, the processor 1501 controls the touch display screen 1505 to switch from the screen-on state to the screen-off state; when the proximity sensor 1515 detects that the distance between the user and the front of the vehicle terminal 1500 is gradually increasing, the processor 1501 controls the touch display screen 1505 to switch from the screen-off state to the screen-on state.
[0445] Those skilled in the art will understand that Fig. 20 The structure shown in the figure does not constitute a limitation on the vehicle-mounted terminal 1500, and may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0446] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0447] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0448] In an exemplary embodiment, a chip is also provided, which includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement the control method of the vehicle terminal described in the above aspects.
[0449] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor reads and executes the computer instruction from the computer-readable storage medium to implement the control method of the vehicle terminal provided by the above-mentioned method embodiments.
[0450] In an exemplary embodiment, a computer-readable storage medium is also provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the control method of the vehicle terminal provided by the above-mentioned method embodiments.
[0451] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0452] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0453] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A control method for a vehicle-mounted terminal, characterized in that: The vehicle-mounted terminal has a touch screen and hardware peripherals, and a mini-program that depends on a mini-program engine runs in the vehicle-mounted terminal. The method includes: Displaying the mini-program interface of the mini-program, wherein the mini-program interface includes at least two components; In response to a confirmation operation on the hardware peripheral, generating a first touch coordinate based on a first reference point within a coordinate range of a first target component; In the case where the first target component includes a subcomponent and the first touch coordinates do not belong to the coordinate range of the subcomponent, a first touch click event is generated based on the first touch coordinates; or, in the case where the first target component includes a subcomponent and the first touch coordinates belong to the coordinate range of the subcomponent, a second touch coordinate is regenerated based on the coordinate range of the subcomponent; the first touch click event is generated based on the second touch coordinates; the touch coordinates in the first touch click event belong to the coordinate range of the first target component in focus; Passing the first touch click event to the applet, where the first touch click event is used to trigger the applet to control the first target component to execute a confirmation response event; In response to a touch operation on the touch screen, controlling a second target component of the at least two components in the mini-program interface to execute a target event; Among them, the confirmation response event includes at least one of the following: returning to the upper interface of the mini-program interface, jumping to the lower interface of the mini-program interface, jumping to the first position in the mini-program interface, jumping to the first URL, and executing the function corresponding to the first target component.
2. The method according to claim 1, characterized in that The method further comprises: In a case where the first target component does not include a subcomponent, the first touch click event is generated based on the first touch coordinates.
3. The method according to claim 1, characterized in that The regenerating the second touch coordinates based on the coordinate range of the subcomponent includes: Determining a first boundary of the subcomponent and a second boundary of the first target component based on a coordinate range of the subcomponent and a coordinate range of the first target component; A second reference point between a first boundary belonging to the subcomponent and a second boundary of the first target component is determined, and the second touch coordinates are generated based on the second reference point.
4. The method according to claim 2, characterized in that: The method further comprises: In response to a confirmation operation on the hardware peripheral, acquiring a coordinate range of the first target component and a coordinate range of a subcomponent in the first target component; Determining a third reference point that is within the coordinate range of the first target component and outside the coordinate range of the subcomponent; A third touch coordinate is generated based on the third reference point, and the first touch click event is generated based on the third touch coordinate.
5. The method according to any one of claims 1 to 4, characterized in that: In response to the physical control operation on the hardware peripheral, controlling the first target component of the at least two components in the applet interface to execute a target event also includes: In response to a first type of control operation on the hardware peripheral, the focus component is controlled to lose its focus state, and the first target component sorted before or after the focus component in the mini-program interface is controlled to be in the focus state, and the focus component is the component that is in the focus state before receiving the first type of control operation.
6. The method according to claim 5, characterized in that The method further comprises: Obtain a target node in the document object model DOM tree corresponding to the mini-program interface, wherein the target node includes an event node and a focus node, wherein the event node is a node corresponding to a component having a function of responding to the physical control operation and / or touch operation, and the focus node is a node corresponding to a focus component in a focus state; In response to the first type of control operation on the hardware peripheral, controlling the focus component to lose the focus state, and controlling the first target component sorted before or after the focus component in the applet interface to be in the focus state, includes: In response to a first type of control operation on the hardware peripheral, reading a first focus index corresponding to the focus component; updating the first focus index based on the operation direction of the first type of control operation to obtain a second focus index; Determine the first target component corresponding to the second focus index; control the focus component to lose the focus state, and control the first target component to switch to the focus state.
7. The method according to claim 6, characterized in that The method further comprises: In the case that the first target component does not include a subcomponent and the first target component is not completely displayed in the mini-program interface, based on the operation direction of the first type of control operation, the first target component is controlled to be scrolled and displayed on the mini-program interface.
8. The method according to claim 6, characterized in that The step of obtaining a target node in a document object model DOM tree corresponding to the mini-program interface includes: Filtering the event node from all nodes in the mini-program interface; Determining the focus node in the event node; Acquire the node status of the event node and the focus node; and update the focus node according to the change of the node status.
9. The method according to claim 8, characterized in that The screening of the event node from all nodes in the mini-program interface includes: Filter the event node among all nodes in the mini-program interface according to a filtering condition; The screening condition includes at least one of the following: Register nodes with event response methods; A page navigation node whose Uniform Resource Locator System URL is not empty; Input node; Scroll view node.
10. The method according to any one of claims 1 to 4, characterized in that: In response to the physical control operation on the hardware peripheral, controlling the first target component of the at least two components in the applet interface to execute a target event also includes: In response to a second type of control operation on the hardware peripheral, the focus component is controlled to lose its focus state, and the first target component at the upper or lower level of the focus component in the mini-program interface is controlled to be in the focus state, and the focus component is the component that is in the focus state before receiving the second type of control operation.
11. The method according to claim 10, characterized in that In response to the second type of control operation on the hardware peripheral, controlling the focus component to lose the focus state, and controlling the first target component in the applet interface that is at an upper level or a lower level of the focus component to be in the focus state, includes: In response to a second type of control operation on the hardware peripheral, reading a first level index corresponding to the focus component; The first hierarchical index is updated based on the operation direction of the second type of control operation to obtain a second hierarchical index; the first target component corresponding to the second hierarchical index is determined; The focus component is controlled to lose the focus state, and the first target component is controlled to switch to the focus state.
12. The method according to claim 11, characterized in that In the case where the first hierarchical index and the second hierarchical index have an ownership relationship, the first target component is a component corresponding to the second hierarchical index and having an ownership relationship with the focus component; When there is no belonging relationship between the first hierarchical index and the second hierarchical index, the first target component is the first component corresponding to the second hierarchical index.
13. The method according to any one of claims 1 to 4, characterized in that: In response to the physical control operation on the hardware peripheral, controlling the first target component of the at least two components in the applet interface to execute a target event also includes: In response to the third type of control operation on the hardware peripheral, control is returned to the upper interface of the mini-program interface, or the mini-program interface is closed, or a pop-up window on the mini-program interface is closed.
14. The method according to claim 13, characterized in that The controlling the closing of the pop-up window on the mini-program interface in response to the third type of control operation on the hardware peripheral device includes: In response to a third type of control operation on the hardware peripheral, a second touch click event is generated; the second touch click event is passed to the mini program, and the second touch click event is used to trigger the mini program to add a data-close pop-up attribute to the node corresponding to the pop-up window, so that the pop-up window is closed.
15. A control device for a vehicle-mounted terminal, characterized in that: The vehicle-mounted terminal has a touch screen and hardware peripherals, a mini-program that depends on a mini-program engine runs in the vehicle-mounted terminal, and the device includes: A display module, used to display the mini-program interface of the mini-program, wherein the mini-program interface includes at least two components; a control module, configured to generate a first touch coordinate based on a first reference point within a coordinate range of a first target component in response to a confirmation operation on the hardware peripheral; In the case where the first target component includes a subcomponent and the first touch coordinates do not belong to the coordinate range of the subcomponent, a first touch click event is generated based on the first touch coordinates; or, in the case where the first target component includes a subcomponent and the first touch coordinates belong to the coordinate range of the subcomponent, a second touch coordinate is regenerated based on the coordinate range of the subcomponent; the first touch click event is generated based on the second touch coordinates; the touch coordinates in the first touch click event belong to the coordinate range of the first target component in focus; Passing the first touch click event to the applet, where the first touch click event is used to trigger the applet to control the first target component to execute a confirmation response event; The control module is further configured to control a second target component of the at least two components in the mini-program interface to execute a target event in response to a touch operation on the touch screen; Among them, the confirmation response event includes at least one of the following: returning to the upper interface of the mini-program interface, jumping to the lower interface of the mini-program interface, jumping to the first position in the mini-program interface, jumping to the first URL, and executing the function corresponding to the first target component.
16. A computer device, characterized in that: The computer device includes: a processor and a memory, wherein the memory stores at least one program; the processor is used to execute the at least one program in the memory to implement the control method of the vehicle terminal as described in any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that: The readable storage medium stores executable instructions, and the executable instructions are loaded and executed by the processor to implement the control method of the vehicle terminal as described in any one of claims 1 to 14.
18. A computer program product or a computer program, characterized in that The computer program product or computer program includes computer instructions, which are stored in a computer-readable storage medium. The processor reads and executes the computer instructions from the computer-readable storage medium to implement the control method of the vehicle-mounted terminal as described in any one of claims 1 to 14.
Citation Information
Patent Citations
Smart television control method, device and system, terminal and smart television
CN108958569A
Small program control method and device based on vehicle-mounted terminal, equipment and storage medium
CN112394869A