CN117631920A - Data selection method and related device - Google Patents

Data selection method and related device Download PDF

Info

Publication number
CN117631920A
CN117631920A CN202210983383.3A CN202210983383A CN117631920A CN 117631920 A CN117631920 A CN 117631920A CN 202210983383 A CN202210983383 A CN 202210983383A CN 117631920 A CN117631920 A CN 117631920A
Authority
CN
China
Prior art keywords
data
cursor
interface
selection area
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210983383.3A
Other languages
Chinese (zh)
Inventor
安祺
李涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210983383.3A priority Critical patent/CN117631920A/en
Publication of CN117631920A publication Critical patent/CN117631920A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the application provides a data selection method and a related device, wherein in the method, in response to receiving a first operation of a user, electronic equipment controls a display position of a first cursor in a data interface to be fixed, the first cursor is used for marking first candidate data or last candidate data included in a data selection area, and the data selection area is located in the data interface. In response to receiving a first sliding operation of a user, the electronic device controls candidate data in the data interface to move along with the first sliding operation, and updates the data selection area from the first data selection area to the second data selection area along with the movement of the candidate data; candidate data marked by the first cursor in the first data selection region is different from candidate data marked by the first cursor in the second data selection region. According to the method, the user can trigger the candidate data in the interface to move by sliding operation, so that the selected candidate data is adjusted, the operation is more convenient, and the user experience is improved.

Description

Data selection method and related device
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a data selection method and a related device.
Background
The electronic equipment has a text selection function, and a user can select the text based on the function, especially for the text selected in office applications or information applications, and can also derive operations such as copying, jumping or searching.
After the user presses or double-clicks the text for a long time to display the selected area and the front and rear cursors of the selected area in the interface, the user can adjust the selected area again. Currently, user adjustment of the selected area is accomplished by continuously holding and dragging two cursors of the selected area. When the method is applied to the condition of selecting a long text, the user needs to press and drag the cursor to move the whole screen for a distance to trigger the interface to slide, then the user needs to press the cursor all the time, the interface can slide continuously, the operation process is complex, and the experience of the user is not facilitated.
Disclosure of Invention
The embodiment of the application provides a data selection method and a related device, which can realize data selection by convenient user operation and improve user experience.
In a first aspect, an embodiment of the present application provides a data selection method, in which, in response to receiving a first operation of a user, an electronic device controls a display position of a first cursor in a data interface to be fixed. The first cursor is used for marking the first candidate data or the last candidate data included in the data selection area; the data selection area is located in the data interface. In response to receiving a first sliding operation of a user, the electronic device controls candidate data in the data interface to move along with the first sliding operation, and updates the data selection area from the first data selection area to the second data selection area along with the movement of the candidate data; candidate data marked by the first cursor in the first data selection region is different from candidate data marked by the first cursor in the second data selection region.
Therefore, in the data selection method, the display position of the first cursor in the data interface is fixed, and the user can trigger the candidate data in the interface to move by sliding operation, so that the adjustment of the data selection area can be realized. The sliding operation performed by the user can be performed in a limited movable range, so that the operation is more convenient and the user experience is improved.
In an alternative embodiment, the first sliding operation is not an operation acting on the first cursor. The data selection method can realize adjustment of the data selection area, namely adjustment of the selected candidate data, without executing dragging operation on the first cursor.
In an alternative embodiment, the execution area of the first sliding operation is located in an area of the data interface other than the data selection area.
In an alternative embodiment, the first cursor is used to mark the first candidate data in the data selection area, the first sliding operation is sliding down, and the movement of the candidate data is moving down; alternatively, the first cursor is used to mark the last candidate data in the data selection area, the first sliding operation is an upward sliding, and the movement of the candidate data is an upward movement.
As can be seen, when the first cursor is used for marking the first candidate data in the data selection area, the user performs a downward first sliding operation to enable the candidate data to move downward; when the first cursor is used for marking the last candidate data in the data selection area, the user performs a first sliding operation upwards so that the candidate data can be moved upwards; both of these approaches can increase the candidate data included in the data selection area, i.e., increase the selected candidate data.
In an alternative embodiment, the first cursor is used to mark the first candidate data in the data selection area, and the second cursor is used to mark the last candidate data in the data selection area; alternatively, the first cursor is used to mark the last candidate data in the data selection area and the second cursor is used to mark the first candidate data in the data selection area.
In an alternative embodiment, the candidate data marked by the second cursor in the first data selection area is the same as the candidate data marked by the second cursor in the second data selection area.
Therefore, the display position of the first cursor is fixed, and the display position of the second cursor is not fixed, so that the candidate data marked by the second cursor is unchanged and the candidate data marked by the first cursor is changed in the data selection area in the process of moving the candidate data, and the candidate data included in the data selection area can be adjusted.
In an alternative embodiment, the method further comprises: in response to receiving a second operation of the user, the electronic device controls the display position of the second cursor to be fixed in the data selection interface; the candidate data marked by the second cursor in the first data selection area is different from the candidate data marked by the second cursor in the second data selection area.
It can be seen that the display positions of the first cursor and the second cursor are fixed, and the position of the data selection area in the data interface does not change along with the movement of the candidate characters, so that the candidate data can be adjusted by moving the candidate data along with the execution of the first sliding operation.
In an alternative embodiment, the method further comprises: in response to receiving a third operation of the user, the electronic device releases the fixed state of the display position of the first cursor in the data interface.
In an alternative embodiment, the method further comprises: in response to receiving the fourth operation of the user, the electronic device releases the fixed state of the display position of the second cursor in the data interface.
In an alternative embodiment, the method further comprises: the electronic equipment displays a selected prompt in a preset display area in the data interface; the selection hint is used to characterize the relative position of candidate data included in the data selection area in the plurality of candidate data. The method can display the selection prompt, and is convenient for a user to check the relative positions of the selected candidate data in the plurality of candidate data.
In an alternative embodiment, in response to receiving the first operation of the user, the electronic device controls the first cursor to be fixed in display position in the data interface, and the method further includes: in response to receiving a fifth operation by the user, the electronic device displays a first cursor and a data selection region in the data interface.
In a second aspect, embodiments of the present application provide an electronic device, including: one or more processors and memory; the memory is coupled to the one or more processors, the memory for storing computer program code, the computer program code comprising computer instructions that the one or more processors call to cause the electronic device to perform:
and controlling the display position of the first cursor to be fixed in the data interface in response to receiving the first operation of the user. The first cursor is used for marking the first candidate data or the last candidate data included in the data selection area; the data selection area is located in the data interface. In response to receiving a first sliding operation of a user, controlling candidate data in the data interface to move along with the first sliding operation, and updating the data selection area from the first data selection area to the second data selection area along with the movement of the candidate data; candidate data marked by the first cursor in the first data selection region is different from candidate data marked by the first cursor in the second data selection region.
In an alternative embodiment, the first sliding operation is not an operation acting on the first cursor.
In an alternative embodiment, the execution area of the first sliding operation is located in an area of the data interface other than the data selection area.
In an alternative embodiment, the first cursor is used to mark the first candidate data in the data selection area, the first sliding operation is sliding down, and the movement of the candidate data is moving down; alternatively, the first cursor is used to mark the last candidate data in the data selection area, the first sliding operation is an upward sliding, and the movement of the candidate data is an upward movement.
In an alternative embodiment, the first cursor is used to mark the first candidate data in the data selection area, and the second cursor is used to mark the last candidate data in the data selection area; alternatively, the first cursor is used to mark the last candidate data in the data selection area and the second cursor is used to mark the first candidate data in the data selection area.
In an alternative embodiment, the candidate data marked by the second cursor in the first data selection area is the same as the candidate data marked by the second cursor in the second data selection area.
In an alternative embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: controlling the display position of the second cursor to be fixed in the data selection interface in response to receiving a second operation of the user; the candidate data marked by the second cursor in the first data selection area is different from the candidate data marked by the second cursor in the second data selection area.
In an alternative embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: in response to receiving a third operation of the user, releasing the fixed state of the display position of the first cursor in the data interface; and/or, in response to receiving the fourth operation of the user, releasing the fixed state of the display position of the second cursor in the data interface.
In an alternative embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: displaying a selected prompt in a preset display area in a data interface; the selection hint is used to characterize the relative position of candidate data included in the data selection area in the plurality of candidate data.
In an alternative embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: before controlling the display position of the first cursor to be fixed in the data interface in response to receiving the first operation of the user, the first cursor and the data selection area are displayed in the data interface in response to receiving the fifth operation of the user.
In a third aspect, embodiments of the present application provide a chip system for application to an electronic device, the chip system comprising one or more processors for invoking computer instructions to cause the electronic device to perform a method as described in the first aspect and any possible implementation of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform a method as described in the first aspect and any possible implementation of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform a method as described in the first aspect and any possible implementation of the first aspect.
It will be appreciated that the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer program product provided in the fourth aspect and the computer storage medium provided in the fifth aspect described above are all configured to perform the method provided by the embodiments of the present application. Therefore, the advantages achieved by the method can be referred to as the advantages of the corresponding method, and will not be described herein.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 2 is a schematic diagram of a software architecture according to an embodiment of the present application;
FIGS. 3 a-3 d are a set of interface diagrams for text selection provided by embodiments of the present application;
FIGS. 4 a-4 d are a set of interface diagrams for text selection provided by embodiments of the present application;
FIGS. 5 a-5 b are a set of interface schematic diagrams provided in an embodiment of the present application;
FIGS. 6 a-6 c are another set of interface schematic diagrams provided by embodiments of the present application;
FIGS. 7 a-7 b are another set of interface schematic diagrams provided by embodiments of the present application;
FIGS. 8 a-8 c are another set of interface schematic diagrams provided by embodiments of the present application;
FIGS. 9 a-9 b are another set of interface schematic diagrams provided by embodiments of the present application;
FIGS. 10 a-10 b are another set of interface schematic diagrams provided by embodiments of the present application;
FIGS. 11 a-11 d are another set of interface schematic diagrams provided by embodiments of the present application;
FIGS. 12 a-12 d are another set of interface schematic diagrams provided by embodiments of the present application;
FIGS. 13 a-13 d are another set of interface schematic diagrams provided by embodiments of the present application;
FIGS. 14 a-14 d are another set of interface schematic diagrams provided by embodiments of the present application;
FIGS. 15 a-15 d are another set of interface schematic diagrams provided by embodiments of the present application;
FIG. 16 is a flowchart of a data selection method according to an embodiment of the present disclosure;
FIGS. 17 a-17 d are another set of interface schematic diagrams provided by embodiments of the present application;
FIG. 18 is a flowchart illustrating another method for data selection according to an embodiment of the present disclosure;
fig. 19 is a schematic block diagram of an electronic device according to an embodiment of the present application;
FIG. 20 is a flowchart of another method for selecting data according to an embodiment of the present disclosure;
fig. 21 is a schematic block diagram of another electronic device according to an embodiment of the present application.
Detailed Description
The terminology used in the following embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates to the contrary. It should also be understood that the term "and/or" as used in this application refers to and encompasses any or all possible combinations of one or more of the listed items.
Embodiments of an electronic device, a user interface for such an electronic device, and for using such an electronic device are described below. In some embodiments, the electronic device may be a device that also includes other functions such as a personal digital assistant and/or a voicePortable electronic devices with music player functions, such as cell phones, tablet computers, wearable electronic devices with wireless communication functions (e.g., smart watches), and the like. Exemplary embodiments of portable electronic devices include, but are not limited to, piggy-back Or other operating system. The portable electronic device described above may also be other portable electronic devices such as a Laptop computer (Laptop) or the like having a touch sensitive surface or touch panel. It should also be appreciated that in other embodiments, the electronic device described above may not be a portable electronic device, but rather a desktop computer having a touch-sensitive surface or touch panel.
The term "User Interface (UI)" in the description and claims of the present application and in the drawings is a media interface for interaction and information exchange between an application program or an operating system and a user, which enables conversion between an internal form of information and a form acceptable to the user. The user interface of the application program is source code written in a specific computer language such as java, extensible markup language (extensible markup language, XML) and the like, the interface source code is analyzed and rendered on the terminal equipment, and finally the interface source code is presented as content which can be identified by a user, such as a picture, characters, buttons and the like. Controls (controls), also known as parts (widgets), are basic elements of a user interface, typical controls being toolbars (toolbars), menu bars (menu bars), text boxes (text boxes), buttons (buttons), scroll bars (scrollbars), pictures and text. The properties and content of the controls in the interface are defined by labels or nodes, such as XML specifies the controls contained in the interface by nodes of < Textview >, < ImgView >, < VideoView >, etc. One node corresponds to a control or attribute in the interface, and the node is rendered into visual content for a user after being analyzed and rendered. In addition, many applications, such as the interface of a hybrid application (hybrid application), typically include web pages. A web page, also referred to as a page, is understood to be a special control embedded in an application program interface, and is source code written in a specific computer language, such as hypertext markup language (hyper text markup language, GTML), cascading style sheets (cascading style sheets, CSS), java script (JavaScript, JS), etc., and the web page source code may be loaded and displayed as user-recognizable content by a browser or web page display component similar to the browser function. The specific content contained in a web page is also defined by tags or nodes in the web page source code, such as GTML defines elements and attributes of the web page by < p >, < img >, < video >, < canvas >.
A commonly used presentation form of the user interface is a graphical user interface (graphic user interface, GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It may be an interface element such as an icon, a window, a control, etc. displayed in a display screen of the electronic device, where the control may include a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
An exemplary electronic device 100 provided in the following embodiments of the present application is first described.
Fig. 1 shows a schematic configuration of an electronic device 100.
The embodiment will be specifically described below taking the electronic device 100 as an example. It should be understood that electronic device 100 may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bidirectional synchronous serial bus, and includes a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the electronic device.
The I2S interface may be used for audio communication. PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present invention is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied on an electronic device. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. for application on an electronic device. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In an embodiment of the present invention, camera 193 includes a camera, such as an infrared camera or other camera, that captures images required for face recognition. The camera for collecting the image required for face recognition is generally located on the front side of the electronic device, for example, above the touch screen, or may be located at other positions, which is not limited in the embodiment of the present invention. In some embodiments, electronic device 100 may include other cameras. The electronic device may further comprise a matrix emitter (not shown in the figures) for emitting light. The camera collects light reflected by the face to obtain a face image, and the processor processes and analyzes the face image and performs verification by comparing the face image with stored information of the face image.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an operating system, an application required for at least one function (such as a face recognition function, a fingerprint recognition function, a mobile payment function, etc.), and the like. The storage data area may store data created during use of the electronic device 100 (e.g., face information template data, fingerprint information templates, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc. The fingerprint sensor 180H may be disposed below the touch screen, the electronic device 100 may receive a touch operation of a user on the touch screen in an area corresponding to the fingerprint sensor, and the electronic device 100 may collect fingerprint information of a finger of the user in response to the touch operation, so as to realize that the hidden album is opened after the fingerprint identification in the embodiment of the present application passes through, the hidden application is opened after the fingerprint identification passes through, the account is logged in after the fingerprint identification passes through, and payment is completed after the fingerprint identification passes through.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. In some embodiments, the electronic device 100 employs esims, i.e.: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the invention, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
The software system of the electronic device may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the invention, an Android system with a layered architecture is taken as an example, and the software structure of the electronic equipment is illustrated.
Fig. 2 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications (also referred to as applications) such as cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification presented in the form of a chart or scroll bar text in the system top status bar, such as a notification of a background running application, or a notification presented on a screen in the form of a dialog interface. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The electronic equipment has a text selection function, and a user can select the text based on the function, especially for the text selected in office applications or information applications, and can also derive operations such as copying, jumping or searching.
For example, first, as shown in FIG. 3a, the user may double click text or long press text; then, as shown in fig. 3b, a start cursor 301, an end cursor 302, and a selected area 303 (e.g., gray area in the figure) appear in the text. The characters in the selected area 303 are the characters selected in the text, the first character in the selected area 303 is marked by the start cursor 301, and the last character in the selected area 303 is marked by the end cursor 302. In fig. 3b, the selected area 303 includes the character "hua as inheriting" open ", the start cursor 301 marks the character" hua ", and the end cursor 302 marks the character" put ".
The user may then press and drag the start cursor or end cursor to adjust the selected area. The following description will take an example in which the user holds and drags the start cursor to adjust the selected area. As shown in fig. 3c, the user holds and drags the start cursor 301 such that the start cursor 301 moves from the current position 304 to the position 305. After this operation, the character marked by the start cursor 301 and the selected area 303 are updated. As shown in fig. 3d, after the start cursor 301 moves from the position 304 to the position 305, the character marked by the start cursor 301 is updated from "hua" to "shen", and the character included in the selected area 303 is updated from "hua to take hold of" open "to" industrial long term … take hold of "open".
If the user selects a long text, for example, the character that the user wants to select from among the text includes other characters not displayed in the interface in addition to the characters displayed in the interface, the user needs to hold and drag the start cursor or end cursor all the time to trigger the interface sliding. That is, the user needs to make it possible to display characters in the text that are not originally displayed in the interface by pressing and dragging the start cursor or the end cursor. At the same time, the selected area is updated as the interface slides. The following description will take an example in which the user presses and drags the start cursor to trigger the interface sliding.
As shown in fig. 4a, the user holds and drags the start cursor 301 up until the top character in the interface; the user continues to hold the start cursor 301 and the characters in the text move downward, causing the characters in the text that are not displayed in the interface to be displayed. With reference to fig. 4a and 4b, as the characters move downward, the characters of the "continued exploration new theory … global industry" displayed in the interface of fig. 4a are not displayed in the interface of fig. 4b, and the "unprecedented … wisdom experience" of the interface not displayed in fig. 4a is displayed in fig. 4 b.
As the character moves downward, the character marked by the start cursor 301 changes, as does the selected region 303. Referring to fig. 4a and 4b, as the character moves downward, the character marked by the start cursor 301 changes from the character "hua" to the character "se", and the character included in the selected area changes from "hua to inherit" open "to" all industries … inherit "open". The end cursor 302 always marks the character "put" during the downward movement of the character, and the character "put" is not displayed in the interface after the movement, and thus, the end cursor 302 is not displayed in the interface.
The user continuously presses the start cursor 301, the characters in the interface continuously move downwards, the characters easily exceed the area expected to be selected by the user, and accurate positioning is not easy. For example, the user expects the selected character to be "open" for the redefined experience …, i.e., the start cursor 301 marks the character "heavy", but the start cursor 301 marks the character "place" before the character "heavy" because the user continues to hold the start cursor 301 such that the character continues to move downward. It can be seen that the selected area 303 includes characters that the user does not desire to select in addition to the characters that the user desires to select. Then, the user needs to repeatedly adjust the position of the start cursor 301 so that the characters included in the selected area are all characters that the user desires to select. As shown in fig. 4c and 4d, the user also needs to press and drag the start cursor 301 to move downward, so that the start cursor 301 is adjusted from the "down" character to the "heavy" character, and further, the character included in the selected area is changed to the character desired to be selected by the user.
In addition, the manner in which the user presses and drags the end cursor to trigger the interface sliding is similar to that described in detail.
Therefore, when a user selects a long text, the user needs to press and drag the cursor all the time to move in a large range and trigger the interface to slide when moving to the interface boundary, and after moving to the interface boundary, the user needs to press the cursor continuously to enable the interface to slide continuously, so that the user experience is poor. In addition, the mode is very easy to enable the selected area to exceed the expected selected area, and accurate positioning is not easy to achieve; then, the user needs to press and drag the cursor again to repeatedly adjust the selected area, the operation process is complex, and the user experience is affected.
The embodiment of the application provides a data selection method, wherein in the method, in response to receiving a first operation of a user, electronic equipment controls a display position of a first cursor in a data interface to be fixed; the first cursor is used for marking the first candidate data or the last candidate data included in the data selection area; the data selection area is located in the data interface. In response to receiving a first sliding operation of a user, the electronic device controls candidate data in the data interface to move along with the first sliding operation, and updates the data selection area from the first data selection area to the second data selection area along with the movement of the candidate data; candidate data marked by the first cursor in the first data selection region is different from candidate data marked by the first cursor in the second data selection region. In the data selection method, as the display position of the first cursor in the data interface is fixed, the user can trigger the candidate data in the interface to move by performing sliding operation, so that the data selection area can be adjusted, the sliding operation performed by the user can be performed in a limited movable range, the operation is more convenient, and the user experience is improved.
Several scenarios of the data selection method provided in the embodiments of the present application are described below by way of example.
Scene 1, candidate data is a character in text.
The text may be a long text, and all characters included in the long text may not be displayed in the display interface of the electronic device at the same time. The text may be text in a document, text in a web page, and so on. The characters in the text can be characters such as Chinese characters, english characters, punctuation marks and the like, the types of the characters are not limited in the embodiment of the application, and the characters shown in the drawings of the embodiment of the application are only exemplary characters used for convenience of explanation and do not form a limitation on the characters. In addition, in this scenario, the data interface may also be referred to as a text interface, and the data selection area may also be referred to as a text selection area.
As shown in fig. 5a, the user may perform a fifth operation on the text interface; the text interface includes a plurality of characters in the text, and the fifth operation may be a predefined long-press, double-click or voice command operation. In response to the fifth operation, the electronic device enters a text selection state and the electronic device may display a first cursor, a second cursor, and a text selection region 503 (e.g., a gray region in the figure) in the text interface, as shown in fig. 5 b. The characters covered by the gray areas in the graph are characters contained in the text selection areas, and the characters contained in the text selection areas are selected characters. The first cursor and the second cursor are used to mark one of the first character and the last character in the text selection area, respectively.
In fig. 5b, the first cursor and the second cursor may be one of the cursor 501 and the cursor 502, respectively. Specifically, if the first cursor is cursor 501, the second cursor is cursor 502; if the first cursor is cursor 502, the second cursor is cursor 501. Wherein the cursor 501 is used to mark the first character in the text selection area 503 and the cursor 502 is used to mark the last character in the text selection area 503. In fig. 5b, text selection area 503 includes characters that are "endless fronts of technology," identify industry needs and overcome world-level challenges, with landscape and assumptions being "stretch," cursor 501 marks the characters "skill," and cursor 502 marks the characters "stretch.
Then, the user may perform a first operation, so that the electronic device controls the display position of the first cursor to be fixed in the text interface. Specifically, the first cursor may be fixedly displayed at a certain coordinate in the text interface. Optionally, the user may further perform a second operation, so that the electronic device controls the display position of the second cursor to be fixed in the text interface. Specifically, the second cursor may be fixedly displayed at a certain coordinate in the text interface. The embodiment of the application does not limit the sequence of the first operation and the second operation. In addition, the first operation and the second operation may be operations such as a long press, a double click or a voice command, which are predefined, and the embodiment of the present application does not limit the first operation and the second operation.
Optionally, when/after the electronic device controls the display position of the first cursor and/or the second cursor in the text interface to be fixed, the display state of the first cursor and/or the second cursor in the text interface may be different from the display state when the display position is not fixed. In particular, the color or shape of the first cursor and/or the second cursor may be different when the display position is fixed compared to when the display position is not fixed. For example, when/after the electronic device controls the display position of the first cursor and/or the second cursor in the text interface to be fixed, the color of the first cursor and/or the second cursor displayed in the text interface changes from gray to black, or the shape of the first cursor and/or the second cursor displayed in the text interface is thickened, or the like. The embodiment of the application does not limit the way in which the display state of the first cursor and/or the second cursor changes due to the fixed display position. Hereinafter, description will be made taking an example in which the display position is fixed such that the color of the first cursor and/or the second cursor displayed in the text interface changes from gray to black.
The following describes how the first cursor is used to mark the first character or the last character in the text selection area, and whether the user performs the first operation or performs the first operation and the second operation, respectively, as described in embodiments 1.1 to 1.3.
In embodiment 1.1, the first cursor is used to mark the first character in the text selection area, and the user performs the first operation.
As shown in fig. 6a, the first cursor is cursor 501 and the second cursor is cursor 502; the user performs a first operation, such as double clicking or long pressing the cursor 501, and the electronic device may control the display position of the cursor 501 in the text interface to be fixed, that is, the cursor 501 is fixed at a position 504 currently displayed in the text interface, and the color of the display of the cursor 501 in the text interface changes from gray to black.
Then, as shown in fig. 6b, the user may perform a first sliding operation corresponding to a sliding direction indicated by an arrow in fig. 6 b. The electronic device may control all characters in the text interface to move with the first sliding operation in a downward direction as indicated by the arrow in fig. 6 b. That is, as the user performs the first sliding operation downward, the plurality of characters also moves downward. Fig. 6c shows the text interface after the first sliding operation is performed. In addition, the execution position of the first sliding operation in the text interface is not limited, for example, the first sliding operation may be executed in a text selection area by a user, or may be executed in other areas except the text selection area in the text interface, or the executed area includes a partial area in the text selection area and a partial area except the text selection area, and so on. The second sliding operation hereinafter is similar and will not be described again.
It can be seen that as the plurality of characters move downward, characters in the text preceding the characters displayed in the text interface shown in fig. 6b (which characters are not displayed in the text interface shown in fig. 6 b) are displayed in the text interface shown in fig. 6 c. As the text interface is not shown in fig. 6b, and the "weave" in the text that is in front of the characters shown in the text interface in fig. 6b, is a powerful … wisdom experience. "is displayed in the text interface in fig. 6 c. Characters in the text that are displayed in the text interface shown in fig. 6b and that move out of the text interface as the plurality of characters move downward are not displayed in the text interface shown in fig. 6 c. As the "technology of text interface display in fig. 6b, the global industry supporting industry … health" moves out of the text interface as characters move down, which are not displayed in the text interface in fig. 6 c.
Additionally, as the plurality of characters move, the electronic device can also update the text selection area from the first text selection area 503 to the second text selection area 505. Since the plurality of characters are moved, the display position of the first cursor in the text interface is fixed, that is, the cursor 501 is fixed at the position 504 for display, and thus the character marked by the first cursor in the first text selection area 503 is different from the character marked by the first cursor in the second text selection area 505. In connection with fig. 6b and 6c, the cursor 501 marks the character "skill" in the first text selection area 503 and the cursor 501 marks the character "entertainment" in the second text selection area 505. In addition, the cursor 502 always marks the character "pull" during the downward movement of the character in the text interface with the first sliding operation. Further, the second text selection area 505 adds the character "entertainment, sports … exploration science" preceding the characters "… of the technology" in addition to the characters "traction" in the first text selection area 503.
Optionally, after the process shown in fig. 6a to 6c, as shown in fig. 7a, the user may further perform a second sliding operation with a sliding direction opposite to the first sliding operation, the electronic device may control the character to move upwards along with the second sliding operation, and fig. 7b illustrates a text interface after the second sliding operation is performed. It can be seen that the first cursor, i.e. cursor 501, is always fixed in position 504 during the execution of the second sliding operation and that as the character moves upwards, the character marked by cursor 501 changes from "entertainment" to "face"; the second cursor, the character marked by cursor 502, is always the character "pull". Further, the text selection area is updated from the second text selection area 505 to the third text selection area 506; the third text selection area 506 includes fewer characters than the second text selection area 505, the third text selection area 506 includes characters that are "future-oriented … assumed to be" pulled "and do not include" entertainment, sports …, and innovations "in the second text selection area 505: ".
In embodiment 1.2, the first cursor is used to mark the last character in the text selection area, and the user performs the first operation. Embodiment 1.2 is similar to embodiment 1.1, and embodiment 1.2 is briefly described below with reference to the drawings.
As shown in fig. 8a, the first cursor is cursor 502 and the second cursor is cursor 501; the user performs a first operation, such as double clicking or long pressing the cursor 502, the electronic device may control the cursor 502 to be fixed at a position 507 currently displayed in the text interface, the color of the cursor 502 displayed in the text interface changing from gray to black.
Then, as shown in fig. 8b, the user may perform a first sliding operation, where the sliding direction corresponding to the first sliding operation is an upward direction indicated by an arrow in fig. 8b, and the electronic device may control all characters in the text interface to move along with the first sliding operation, where the moving direction is also an upward direction indicated by an arrow in fig. 8b, and fig. 8c shows the text interface after the first sliding operation is performed. It can be seen that as the character moves upward, the character "research and innovation" displayed in the text interface in fig. 8 b: … further, in research and creation, "text interface not shown in fig. 8c," ecology of characters not shown in text interface in fig. 8b, "force … breaks through trust" is shown in text interface in fig. 8 c. The case where the character moves upward is similar to the case where the character moves downward in embodiment 1.1, and will not be described again.
In addition, as the character moves, the electronic device can also update the text selection area from the first text selection area 503 to the second text selection area 508. Referring to fig. 8b and 8c, the cursor 502 marks the character "pull" in the first text selection area 503, the cursor 502 marks the character "ok" in the second text selection area 508, and the cursor 501 marks the character "skill" all the time during the movement of the character. Further, the second text selection area 508 adds the character "lead" in addition to the … assumption of the character "technique" in the first text selection area 503, and is long-term available with all ….
Optionally, after the flow shown in fig. 8a to 8c, as shown in fig. 9a, the user may further perform a second sliding operation with a sliding direction opposite to the first sliding operation, the electronic device may control the characters in the text interface to move downward along with the second sliding operation, and fig. 9b illustrates the text interface after the second sliding operation is performed. In the process that the character moves downwards along with the second sliding operation, the cursor 502 is always fixed at the position 507, and the character marked by the cursor 502 is changed from 'ok' to 'do'; the character marked by the cursor 501 is always the character "skill". Further, the text selection area is updated from the second text selection area 508 to the third text selection area 509; third text selection area 509 includes fewer characters than second text selection area 508, third text selection area 509 includes characters "… open collaboration of technology", does not include characters in second text selection area 508 ", continues to explore … industry long term availability".
Optionally, in embodiment 1 and embodiment 2 above, the user may further perform a third operation, and the electronic device may release the fixed state of the first cursor at the display position of the text interface. The third operation is similar to the first operation, and will not be described again.
In embodiment 1.3, the user performs a first operation and a second operation. In this embodiment 1.3, the display positions of the first cursor and the second cursor in the text interface are fixed.
As shown in fig. 10a, the user may perform one of a first operation and a second operation on the cursor 501, such as double clicking or long pressing the cursor 501, the electronic device may control the cursor 501 to be fixed at a position 504, and the color of the cursor 501 displayed in the text interface changes from gray to black; as shown in fig. 10b, the electronic device may control the cursor 502 to be fixed at a position 507, and the color displayed by the cursor 502 in the text interface changes from gray to black, for the other of the first operation and the second operation of the cursor 502, such as double clicking or long pressing the cursor 502. Then, the user may perform a first sliding operation upward or downward. In fig. 10a and fig. 10b, taking the example that the user double-clicks or long-presses the cursor 501 to fix the cursor 501, and then double-clicks or long-presses the cursor 502 to fix the cursor 502, in fact, the sequence of these two operations is not limited in the embodiment of the present application.
Fig. 11a and 11b illustrate a case where the user performs the downward first sliding operation, and fig. 11c and 11d illustrate a case where the user performs the upward first sliding operation, which will be described below, respectively.
As shown in fig. 11a and 11b, the user performs a first sliding operation downward, and the electronic device may control characters in the text interface to move downward with the first sliding operation. As the character moves down, the character marked by the cursor 501 changes from "skill" to "face" and the character marked by the cursor 502 changes from "drag" to "force". Since the display positions of the cursor 501 and the cursor 502 in the text interface are fixed, the characters marked by the cursor 501 and the cursor 502 respectively change with the movement of the characters, so that the display position of the text selection area 503 in the text interface is unchanged, but the characters included in the text selection area 503 change. The text selection area 503 includes characters that are assumed to change from "technological … to" future-oriented … investment, effort ".
As shown in fig. 11c and 11d, the user performs a first sliding operation upward, and the electronic device may control characters in the text interface to move upward with the first sliding operation. As the character moves upward, the character marked by the cursor 501 changes from "skill" to "ball", the character marked by the cursor 502 changes from "stretch" to "ok", and the character included in the text selection area 503 changes from "skill … to" ball academy … "for a long period of time.
Optionally, the user may further perform a second sliding operation with a sliding direction opposite to the first sliding operation, and the electronic device may control the characters in the text interface to move along with the second sliding operation, and update the text selection area along with the movement of the characters. Similar to the electronic device responding to the first sliding operation, a description thereof will be omitted.
Optionally, the user may further perform a third operation, and the electronic device may release the fixed state of the first cursor at the display position of the text interface; and/or the user can also execute a fourth operation, and the electronic device can release the fixed state of the second cursor at the display position of the text interface. The third and fourth operations are similar to the first operation, and will not be described again.
In addition, in any one of the above embodiments 1.1 to 1.3, after the first sliding operation and/or the second sliding operation is performed, the user may further continue to perform one or more sliding operations, and the electronic device may control the plurality of characters to move along with the sliding operation performed by the user each time, and update the text selection area along with the movement of the characters. Similar to the manner in which the electronic device responds to the first sliding operation or the second sliding operation, a description thereof will be omitted.
In addition, as shown in fig. 6c, 7a, 7b, 8c, 9a, 9b, 11b and 11d, the electronic device may further display a selection prompt 511 in a preset display area 510 in the text interface; the selection hint characterizes the relative position in the text of characters included in the selected area of the text.
In addition, in addition to the case where the candidate data described above is a character in a text, the candidate data may be data arranged in a plurality of rows and columns, such as pictures arranged in a plurality of rows and columns in a gallery, files arranged in a plurality of rows and columns in a folder, or the like. The manner of data selection in these scenes is similar to the manner of text selection in the case where the candidate data is characters in text, and reference is made to the manner of text selection in the case where the candidate data is characters in text. The following will briefly describe an example in which candidate data is a picture arranged in a plurality of rows and a plurality of columns in a gallery, and a first cursor is used to mark a last picture in a data selection area. In this example, the data selection region may also be referred to as a picture selection region.
As shown in fig. 12a, the data interface includes a plurality of pictures, and the plurality of pictures are displayed in a form of a plurality of rows and a plurality of columns. The data interface shown in fig. 12a further includes a picture selection area, where the picture included in the picture selection area is a selected picture, for example, a frame in which the picture included in the picture selection area in fig. 12a is displayed in gray and a right lower corner of the picture is displayed with a "v", and the picture selection area includes pictures 10 to 14. In addition, in fig. 12a, the first cursor is used to mark the last picture in the picture selection area, that is, the picture 14, and the first cursor is not yet fixed at this time, and the first cursor may not be displayed in the data interface. Next, as shown in fig. 12b, the user may perform a first operation, such as double clicking or long pressing the position of the picture 14 in the data interface, and the electronic device may display a first cursor (such as a bold black box in fig. 12 b) in the data interface and fix the display position of the first cursor in the data interface in response to the first operation. Then, as shown in fig. 12c, the user may perform a first sliding operation, which is an upward sliding operation. With the first sliding operation, the browsed picture in the data interface moves upwards, as shown in fig. 12d, the picture marked by the first cursor is updated from the picture 14 to the picture 18, and the pictures included in the picture selection area are added with the pictures 15 to 18 in addition to the pictures 10 to 14.
Scene 2, candidate data is data in the form of a list.
The list-form data may be a list-form file, a picture, a text, an application program, or the like, which is not limited in the embodiment of the present application. In addition, the list here may be a vertical list or a horizontal list. The following is a specific description taking a vertical list as an example.
First, as shown in fig. 13a, a user may perform a fifth operation on a data interface including a plurality of data in a list form; then, as shown in fig. 13b, in response to this operation, the electronic device enters a list multi-selection state, and the electronic device may display a selection box corresponding to each data in the data interface. Wherein, the selection box corresponding to each data can be represented in a box form, and the display position can be positioned at the left side of the data. The form of the selection frame corresponding to the data and the display position in the interface are not limited in the embodiment of the present application, for example, the selection frame corresponding to each data is represented in the form of a circular frame, the display position is located on the right side of the data, and the like.
Next, as shown in fig. 13c, the user may perform a first operation; as shown in fig. 13d, in response to the first operation, the electronic device may display the first cursor 1301 and the data selection area in the data interface, and control the display position of the first cursor 1301 to be fixed in the data interface. The data included in the data selection area is the selected data. As shown in fig. 13d, the data selection area may be represented by displaying "v" in the selection frame, and the data corresponding to the selection frame displaying "v" is the data included in the data selection area. The embodiment of the application does not limit the expression form of the data selection area, for example, a form of filling the selection box with color, and the like. In addition, the form of the first cursor is not limited in the embodiment of the present application, for example, as shown in fig. 13d, the first cursor 1301 may be represented by a triangle frame.
Alternatively, if the user performs the first operation at the display position of a certain data or the display position of the selection frame corresponding to the certain data, the electronic device may display the first cursor on the line where the display position of the data is located, for example, display the first cursor on the left side of the selection frame corresponding to the data, or display the first cursor on the right side of the data, or the like, without limitation. For example, in connection with fig. 13c and 13d, the user performs a first operation at the display position of the selection frame corresponding to data 5, and the electronic device may display the first cursor 1301 on the left side of the selection frame corresponding to data 5, and the data selection area includes data 5.
The user may then perform a first sliding operation, with the browsed content (including all candidate data) in the data interface moving along with the first sliding operation. The following description will explain whether the sliding direction of the first sliding operation is an upward direction or a downward direction in the data interface, respectively, as described in embodiment 2.1 and embodiment 2.2.
In embodiment 2.1, the sliding direction of the first sliding operation is an upward direction in the data interface.
As shown in fig. 14a, the first sliding operation performed by the user is from the position 1302 to the position 1303, and the sliding direction is the upward direction indicated by the arrow in fig. 14 a. Then, as shown in fig. 14b, the electronic device may control the data in the data interface to move up with the first sliding operation and update the data selection area from the first data selection area to the second data selection area as the data moves up. The data that has passed through the first cursor 1301 and does not belong to the first data selection region during the execution of the first sliding operation is divided into data included in the second data selection region, that is, data that has not been selected before the execution of the first sliding operation is updated to be selected after passing through the first cursor 1301 during the execution of the first sliding operation. Passing the first cursor here may refer to passing the line where the first cursor is located.
As shown in fig. 14a, the first data selection area includes data 5; with the execution of the first sliding operation, data 6, data 7, and data 8 not included in the first data selection area pass through the first cursor 1301, so that in fig. 14b, the second data selection area includes data 5, data 6, data 7, and data 8.
In embodiment 2.2, the sliding direction of the first sliding operation is a downward direction in the data interface. This embodiment 2.2 is similar to embodiment 2.1 and will be briefly described below.
As shown in fig. 14c, the first sliding operation performed by the user is from the position 1304 to the position 1305, and the sliding direction is the downward direction indicated by the arrow in fig. 14 c. Then, as shown in fig. 14d, the electronic device may control the data in the data interface to move downward with the first sliding operation and update the data selection area from the first data selection area to the second data selection area as the data moves downward. The data that was not selected before the execution of the first sliding operation is updated to be selected through the first cursor 1301 during the execution of the first sliding operation.
As shown in fig. 14c, the first data selection area includes data 5; with the execution of the first sliding operation, data 3 and data 4 not included in the first data selection area pass through the first cursor 1301, and thus the second data selection area includes data 3, data 4, and data 5.
Alternatively, taking the case described in embodiment 2.1 as an example, as shown in fig. 15a, next, the user may also perform a second sliding operation, the sliding direction of the second sliding operation being opposite to that of the first sliding operation, the second sliding operation performed by the user being from the position 1306 to the position 1307, the sliding direction being the downward direction indicated by the arrow in fig. 15 a; then, as shown in fig. 15b, the electronic device may control the plurality of candidate data to move downward along with the execution of the second sliding operation, and update the data selection area from the second data selection area to the third data selection area as the plurality of candidate data moves downward. In the process of executing the second sliding operation, the data which passes through the first cursor 1301 and belongs to the second data selection area does not belong to the data included in the third data selection area. That is, the first cursor 1301 is passed and the selected data in fig. 15a is deselected.
In fig. 15a, the second data selection area includes data 5, data 6, data 7, and data 8, and as the second sliding operation is performed, the data 7 and the data 8 pass through the first cursor 1301, and thus, in fig. 15b, the third data selection area includes data 5 and data 6, and does not include data 7 and data 8.
Next, as shown in fig. 15c, if the user continues to perform a downward sliding operation, such as sliding from position 1307 to position 1308, both data 5 and data 6 in the third data selection region, and data 3 and data 4 not included in the third data selection region pass through the first cursor, and thus, as shown in fig. 15d, after the user slides from position 1307 to position 1308, the data selection region includes data 3 and data 4, that is, data 3 and data 4 are selected, and data 5 and data 6 are deselected.
In addition, as shown in fig. 14a, 14d, and 15a to 15d, the electronic device may further display a selection prompt 1310 in a preset display area 1309 in the data interface; the selection hint 1310 characterizes the location of the data included in the data selection area among all candidate data.
In addition, the sliding direction of the sliding operation (including the first sliding operation and the second sliding operation) may be different from the downward or upward longitudinal direction in the data interface in the case that the list is the longitudinal list, and in the case that the list is the lateral list, the sliding direction of the sliding operation may be a rightward or leftward lateral direction in the data interface, and further, the moving direction of the data may also be a rightward or leftward lateral direction, which is not described herein.
The following describes a data selection method provided in an embodiment of the present application with reference to the accompanying drawings.
Referring to fig. 16, fig. 16 is a schematic diagram of a data selection method according to an embodiment of the present application, where the data selection method may be performed by an electronic device. The data selection method comprises the following steps:
s101, in response to receiving a first operation of a user, the electronic equipment controls the display position of a first cursor in a data interface to be fixed; the first cursor is used for marking the first candidate data or the last candidate data included in the data selection area; the data selection area is located in the data interface.
Wherein the data interface includes a plurality of candidate data; the first operation may be a long press, a double click, or the like, and the embodiment of the present application does not limit the first operation. Candidate data may be characters in text or data arranged in a plurality of rows and columns, as described in scenario 1 above; the candidate data may also be data in the form of a list, as described in scenario 2 above.
Optionally, when/after the electronic device controls the display position of the first cursor in the text interface to be fixed, the display state of the first cursor in the text interface may be different from the display state when the display position is not fixed. In particular, the color or shape of the first cursor and/or the second cursor may be different when the display position is fixed compared to when the display position is not fixed.
For example, as shown in fig. 17a, the first cursor is a cursor 1701 for marking the last candidate data included in the data selection area, i.e., a character "d"; in response to receiving the first operation by the user, the electronic device controls the location 1702 at which the first cursor is fixed in the data interface to display, the color of the first cursor changing from gray to black.
In addition, the embodiment of the application does not limit the expression forms of the first cursor and the data selection area. For example, the first cursor may be represented in the form of a combination of the cursor 501 and the cursor 502 in fig. 5b or the line segments shown by the cursor 1701 and the cursor 1703 in fig. 17a and a circle frame, or the first cursor may also be represented in the form of a bold black box in fig. 12b to 12d, or the first cursor may also be represented in the form of a triangle frame shown by the cursor 1301 in fig. 13 d. For another example, the data selection area may be represented in the form of a shadow overlay as shown in the gray area in fig. 5b, or may also be represented in the form of an underline, or the data selection area may also be represented in the form of a display of a "v" in the selection box in fig. 13d, or the like.
In an alternative embodiment, a second cursor may also be displayed in the data interface. If the first cursor is used to mark the first candidate data in the data selection area, the second cursor is used to mark the last candidate data in the data selection area. If the first cursor is used to mark the last candidate data in the data selection area, the second cursor is used to mark the first candidate data in the data selection area. This embodiment is applicable to a scenario where the candidate data may be characters in text, for example, in fig. 17a, the first cursor is a cursor 1701, the second cursor is a cursor 1703, and the second cursor is used to mark the first candidate data included in the data selection area, i.e., the character "o". As another example, as shown in fig. 5b, if the first cursor is cursor 501, then the second cursor is cursor 502; if the first cursor is cursor 502, then the second cursor is cursor 501. In addition, the expression form of the second cursor is similar to that of the first cursor, and the embodiment of the application does not limit the expression form of the second cursor. The specific explanation of the second cursor may also refer to the related explanation in scenario 1, and will not be repeated.
In an alternative embodiment, before step S101, the method may further include: in response to receiving a fifth operation by the user, the electronic device displays a first cursor and a data selection region in the data interface. The fifth operation may be a predefined long press, double click, or voice command, which is not limited in the embodiments of the present application. In the case that the candidate data is a character in the text, the process of the electronic device responding to the fifth operation may be shown in fig. 5a and 5b, and the detailed description may be referred to the related description in the foregoing case 1, which is not repeated.
In an alternative embodiment, in the case that the candidate data is data in the form of a list, the method may further include, before step S101: in response to receiving the fifth operation by the user, the electronic device displays a selection box for each candidate data in the data interface. And responding to the first operation, the electronic equipment also displays a first cursor and a data selection area, and then executes the operation of controlling the display position of the first cursor in the data interface to be fixed. The specific process is shown in fig. 13a to 13 d. The specific description can be found in the foregoing case 2, and the detailed description is omitted.
S102, in response to receiving a first sliding operation of a user, the electronic equipment controls candidate data in a data interface to move along with the first sliding operation, and updates a data selection area from the first data selection area to a second data selection area along with the movement of the candidate data; candidate data marked by the first cursor in the first data selection region is different from candidate data marked by the first cursor in the second data selection region.
That is, the browsing content (including all candidate data in the data interface) in the data interface moves along with the first sliding operation, and the data selection area is updated along with the movement of the browsing content and the fixed display position of the first cursor.
In an alternative embodiment, the first sliding operation is not an operation on the first cursor, such as the first sliding operation is not a drag operation for the first cursor. Therefore, the data selection method realizes that the selected candidate data is adjusted without drag operation on the first cursor, so that the operation is more convenient, and the user experience is improved.
In an alternative embodiment, if the first cursor is used to mark the first candidate data in the data selection region, the first sliding operation is a downward sliding, and its corresponding sliding direction may be a direction pointing from the top of the data interface to the bottom of the data interface; the movement of the candidate data is a downward movement. The downward sliding direction indicates a trend of the sliding direction corresponding to the first sliding operation, and the sliding direction corresponding to the first sliding operation may be a vertically downward direction or a diagonally downward direction. In case the candidate data is a character in text, the process of step S102 can be seen from fig. 6b and 6 c. In the case where the candidate data is data in the form of a list, the process of step S102 can be seen from fig. 14c and 14 d. The specific description can be found in the foregoing case 1 and case 2, and the detailed description is omitted.
If the first cursor is used for marking the last candidate data in the data selection area, the first sliding operation is upward sliding, and the corresponding sliding direction can be a direction pointing from the bottom of the data interface to the top of the data interface; the movement of the candidate data is an upward movement. The upward sliding direction indicates a tendency of the sliding direction corresponding to the first sliding operation, and the sliding direction corresponding to the first sliding operation may be a vertically upward direction or a diagonally upward direction.
For example, as shown in fig. 17b and 17c, a first cursor 1701 is used to mark the last candidate data in the data selection area, i.e., character "d", and a second cursor 1703 is used to mark the first candidate data in the data selection area, i.e., character "o". As the user moves up the first swipe operation, the candidate data moves up, and the data selection area includes characters that, in addition to "of outer soil is … customer-center and", have been added "creating value for … company' scommon" located after those characters. In addition, fig. 17d shows a chinese interpretation corresponding to the characters displayed in the data interfaces shown in fig. 17a to 17 c.
In case the candidate data is a character in text, the process of step S102 is also shown with reference to fig. 8b and 8 c. In the case where the candidate data is data in the form of a list, the process of step S102 can be seen from fig. 14a and 14 b. The specific description can be found in the foregoing case 1 and case 2, and the detailed description is omitted.
In an alternative embodiment, in the case where the second cursor is also displayed in the data interface, the candidate data marked by the second cursor in the first data selection area is the same as the candidate data marked by the second cursor in the second data selection area. That is, the electronic device controls the display position of the first cursor to be fixed in the data interface, and in the case that the display position of the second cursor is not controlled to be fixed in the data interface, candidate data marked by the second cursor is unchanged in the process of moving the candidate data in the data interface by performing the first sliding operation. In the process shown in fig. 6b and 6c, the second cursor, cursor 502, is always marked with the character "pull". In the process shown in fig. 8b and 8c, the second cursor, cursor 501, is always marked with the character "skill". In the process shown in fig. 17b and 17c, the second cursor, cursor 1703, is always marked with the character "o".
In an alternative embodiment, in the case where the data interface further displays the second cursor, the method may further include, before step S102: in response to receiving a second operation of the user, the electronic device controls the display position of the second cursor to be fixed in the data interface; the candidate data marked by the second cursor in the first data selection area is different from the candidate data marked by the second cursor in the second text selection area. The second operation is similar to the first operation, and the specific description thereof can be referred to the related description of the first operation, which is not repeated. In addition, the embodiment of the present application does not limit the sequence of the step and the step S102.
In this embodiment, the display positions of the first cursor and the second cursor in the data interface are fixed, and the display position of the data selection area in the data interface is unchanged, but as the candidate data in the data interface moves along with the first sliding operation, the candidate data marked by the first cursor and the second cursor respectively changes, so that the candidate data included in the data selection area also changes. The specific description can be found in the above-mentioned related descriptions of fig. 11a to 11d, and the detailed description is omitted.
In an alternative embodiment, after step S102, the method may further include: in response to a second sliding operation of which the sliding direction is opposite to that of the first sliding operation, the electronic device controls candidate data in the data interface to move along with the second sliding operation in the data interface, and updates the data selection area from the second data selection area to a third data selection area along with the movement of the candidate data. The candidate data marked by the first cursor in the second data selection area is different from the candidate data marked by the first cursor in the third data selection area. It can be seen that since the sliding direction of the second sliding operation is opposite to the sliding direction of the first sliding operation, all candidate data in the data interface moves in the opposite direction along with the second sliding operation to the first sliding operation. With this embodiment, the user may further adjust the candidate data included in the data selection area. The specific description may refer to the foregoing descriptions of fig. 7a and 7b, the foregoing descriptions of fig. 9a and 9b, and the foregoing descriptions of fig. 15a to 15d, which are not repeated.
In the embodiment of the present application, the first sliding operation and/or the second sliding operation may be performed by a user in the data interface. The first sliding operation is described below as an example, and the second sliding operation is similar and will not be described again.
In an alternative embodiment, the execution area of the first sliding operation is located in an area of the data interface other than the data selection area. Specifically, the start position and the end position of the first sliding operation may both be located in an area other than the data selection area in the data interface. For example, the first sliding operation is performed in an area above the data selection area in the data interface, or in an area below the data selection area in the data interface.
In another alternative embodiment, the execution area of the first sliding operation is located within the data selection area, that is, the first sliding operation may be executed within the data selection area. The start position and the end position of the first sliding operation may both be located within the data selection area.
In still another alternative embodiment, the execution area of the first sliding operation includes both a partial area in the data selection area and a partial area other than the data selection area. Specifically, the start position of the first sliding operation is located in an area other than the data selection area in the data interface, and the end position is located in the data selection area. Or the starting position of the first sliding operation is positioned in the data selection area, and the ending position is positioned in an area except the data selection area in the data interface. Or, the starting position and the ending position of the first sliding operation are both located in the area except the data selection area in the data interface, but the first sliding operation passes through the data selection area.
In an alternative embodiment, the method may further comprise: the electronic equipment displays a selected prompt in a preset display area in the data interface; the selection hint may be used to characterize the relative position of candidate data included in the data selection area among the plurality of candidate data. For example, in a scenario where the candidate data is a character in a text, the plurality of candidate data may refer to all characters included in the entire text, and the selection hint may be used to characterize the relative position of the characters included in the data selection area in the entire text. For another example, in a scenario where the candidate data is a character in a web page, the plurality of candidate data may refer to all characters included in the entire web page, and the selection hint may be used to characterize the relative position of the characters included in the data selection area in the entire web page. For another example, in a scenario where the candidate data is in the form of a list, the plurality of candidate data may refer to all of the data included in the entire list, and the selection hint may be used to characterize the relative position of the data included in the data selection area within the entire list.
In addition, the position of the preset display area in the data interface is not limited in the embodiments of the present application, for example, the preset display area may be located at the upper left of the text interface, as shown in the preset display area 510 in fig. 6c, and as shown in the preset display area 1309 in fig. 14b and 14 d. The embodiment of the present application also does not limit the presentation form of the selected prompt, for example, in the selected prompt, the position of the black rectangular block in the white rectangular block may be used to represent the relative position of the candidate data included in the data selected area in the plurality of candidate data, as shown by the selected prompt 511 in fig. 6c, and as shown by the selected prompt 1310 in fig. 14b and 14 d.
In an alternative embodiment, the method may further comprise: in response to receiving a third operation of the user, the electronic device releases the fixed state of the display position of the first cursor in the data interface; and/or, in response to receiving the fourth operation of the user, the electronic device releases the fixed state of the display position of the second cursor in the data interface. In this embodiment of the present application, the third operation and/or the fourth operation may be long-press, double-click, or voice command operation, which is not limited in this embodiment of the present application. In addition, in response to receiving the third operation of the user, the electronic device releases the fixed state of the display position of the first cursor in the data interface, and in response to receiving the fourth operation of the user, the electronic device releases the fixed state of the display position of the second cursor in the data interface, where both operations exist, the sequence of the two operations is not limited in the embodiments of the present application.
In summary, in the data selecting method, in response to receiving the first operation of the user, the electronic device may control the display position of the first cursor in the data interface to be fixed; the first cursor is used for marking the first candidate data or the last candidate data included in the data selection area; the data selection area is displayed in a data interface. In response to receiving a first sliding operation of a user in the data selection area, the electronic device can control candidate data in the data interface to move along with the first sliding operation, and update the data selection area from the first data selection area to the second data selection area along with the movement of the candidate data; candidate data marked by the first cursor in the first data selection region is different from candidate data marked by the first cursor in the second data selection region.
Therefore, the display position of the first cursor in the data interface is fixed, and the user can slide the candidate data in the data interface along with the sliding operation, so that the adjustment of the data selection area can be realized. The sliding operation performed by the user can be performed in a limited movable range by the single finger of the user, and the user does not need to move a cursor in a large range and continuously press the cursor to adjust the data selection area, so that the operation is more convenient and faster, and the user experience can be improved. In the data selection mode, the display position of the first cursor is fixed, and the user can conduct small-range sliding to adjust the data selection area, so that the data selection area can be more accurately adjusted to be the area expected to be selected by the user, and the data selection efficiency is improved.
Referring to fig. 18, fig. 18 is a flowchart of another data selection method according to an embodiment of the present application, where the data selection method may be applied to a scenario where candidate data is characters in text. In this scenario, the data interface may also be referred to as a text interface, and the data selection area may also be referred to as a text selection area. The data selection method may include the steps of:
s201, receiving a fifth operation executed by a user in the text interface, and enabling the electronic equipment to enter a text selection state. The text interface includes characters in text.
And S202, responding to a fifth operation of a user, and displaying a first cursor, a second cursor and a text selection area on a text interface by the electronic equipment.
If the first cursor is used to mark the first character in the text selection area, the second cursor is used to mark the last character in the text selection area. If the first cursor is used to mark the last character in the text selection area, the second cursor is used to mark the first character in the text selection area.
And S203, in response to receiving a first operation of a user, the electronic equipment controls the display position of the first cursor in the text interface to be fixed. That is, the electronic device controls the first cursor to enter a fixed state (may also be referred to as a fixed mode).
S204, receiving a first sliding operation of a user.
S205, the electronic equipment judges whether the following conditions are met: the first cursor is used to mark the first character in the text selection area and the sliding direction of the first sliding operation is a downward direction in the text interface, or the first cursor is used to mark the last character in the text selection area and the sliding direction of the first sliding operation is an upward direction in the text interface. If so, executing step S206; otherwise, step S207 is performed.
S206, responding to the first sliding operation, and adjusting the text selection area by the electronic equipment. Specifically, the electronic equipment controls characters in the text interface to move along with the first sliding operation, and updates a text selection area from a first text selection area to a second text selection area along with the movement of the characters; the character marked by the first cursor in the first text selection area is different from the character marked by the first cursor in the second text selection area.
In addition, the electronic device may display the selection indication in a preset display area in the text interface.
S207, the electronic device does not adjust the text selection area.
In addition, after step S203, step S208 may also be performed.
And S208, responding to the received third operation of the user, and releasing the fixed state of the display position of the first cursor in the text interface by the electronic equipment. That is, the electronic device may control the first cursor to exit the fixed mode.
For a specific description of the above steps, reference may be made to the above case 1 and the related description in the data selection method shown in fig. 16, which are not repeated here.
Therefore, by the method, the user can move the single finger in the limited movable range to adjust the text selection area, the adjustment is carried out without moving the finger in a large range and continuously pressing, the operation is more convenient, and the user experience is improved. And the display position of the first cursor is fixed, and the user can adjust the text selection area by sliding in a small range, so that the text selection area can be more accurately adjusted to be the area expected to be selected by the user, and the efficiency of selecting long text is improved.
In addition, referring to fig. 19, fig. 19 is a schematic block diagram of an electronic device according to an embodiment of the present application, where the electronic device shown in fig. 19 may be used to perform the data selection method described in fig. 18. The functional modules of the electronic device may include: text box (TextView), textView extension class (TextView ex), edit (Editor), selection modifier cursor controller (selecteidercursorcontroller) as an internal class of Editor, selecteiderfilecursor extension class (selectex).
The TextView is an Android open source code item (Android Open Source Project, AOSP) text class control, and TextView ex can be used for providing functions of sliding in a text selection area and dynamically adjusting the text selection area, and can call TextView ex. In addition, textview ex may include: displaying a selected area (showSelectedRegion), updating a start cursor position (updateStartSelecter), updating an end cursor position (updateEndSelecter), and acquiring selected content (getSelectedContents). Wherein the showSelectedRegion may be used to display a hint bar (such as the aforementioned selected hint) that characterizes the relative position of the text selected region in full text. The updatestertselector may be configured to update the relative position of the end cursor (for marking the last character in the text selection area) of the text selection area and the text after receiving the sliding operation of the user in the case where the display position of the start cursor (for marking the first character in the text selection area) of the text selection area in the text interface is fixed. The updateStart selector may be used to update the relative position of the start cursor and the text of the text selection area after receiving the sliding operation of the user in the case where the display position of the end cursor of the text selection area in the text interface is fixed. getSelectedContents may be used to obtain content included in a text selection area.
The Editor is an AOSP editing class control. SelectionModifierCursorController is an Editor inner class that can be used to control a start/end cursor of a text selection area. The selector ex may be used to provide a long press operation of the start cursor/end cursor with respect to the text selection area to fix the display position of the start cursor/end cursor in the text interface. The SelecterModifierCursorController may call SelectEx. Additionally, the selector ex may include: the user presses gesture recognition (longPress), sets the start/end cursor of the text selection area to enter a fixed state (setFocus), cancels the fixed state (cancelFocus) of the start/end cursor of the text selection area.
Referring to fig. 20, fig. 20 is a flowchart of yet another data selection method according to an embodiment of the present application, where the data selection method may be applied to a scenario where candidate data is data in a list form. In this scenario, the data selection method may include the steps of:
s301, receiving a fifth operation of a user, and enabling the electronic equipment to enter a list multi-selection state.
S302, responding to a fifth operation of a user, and displaying a selection frame corresponding to each data in a data interface by the electronic equipment. Wherein the data interface comprises a plurality of data in the form of a list.
And S303, responding to the received first operation of the user for any selection frame, displaying a first cursor and a data selection area by the electronic equipment, and controlling the display position of the first cursor in the data interface to be fixed. I.e. to control the first cursor into a fixed state (which may also be referred to as a fixed mode).
S304, receiving a first sliding operation of a user.
S305, the electronic equipment judges whether the following conditions are met: data that passes through the first cursor with the first sliding operation has been selected. That is, in the process of moving the data with the first sliding operation, it is determined whether the data passing through the first cursor is the data included in the first data selection area.
If so, executing step S306; otherwise, step S307 is performed.
S306, the electronic equipment clears the data. That is, after the data selection area is updated from the first data selection area to the second data selection area with the execution of the first sliding operation, the data passing through the first cursor with the movement of the first sliding operation in the first data selection area is excluded from the second data selection area, and this part of the data is deselected.
S307, the electronic equipment selects the data. That is, after the data selection area is updated from the first data selection area to the second data selection area as the first sliding operation is performed, the second data selection area includes data that passes through the first cursor as the first sliding operation moves and does not belong to the first data selection area, and this portion of data is selected.
In addition, after step S303, step S308 may also be performed.
And S308, responding to the received third operation of the user, and releasing the fixed state of the display position of the first cursor in the data interface by the electronic equipment. That is, the electronic device may control the first cursor to exit the fixed mode.
Therefore, by the method, the user can slide the list in a limited movable range to adjust the selected data by single finger, and does not need to continuously press or click each piece of data which is expected to be selected to adjust, so that the operation is more convenient, and the user experience can be improved.
In addition, referring to fig. 21, fig. 21 is a schematic block diagram of another electronic device according to an embodiment of the present application, where the electronic device shown in fig. 21 may be used to perform the data selection method described in fig. 20. The functional modules of the electronic device may include: multiple box class controls (CheckBox), checkBox extension class (CheckBox ex). Among other things, checkbox ex may be used to perform gestures and cursor functions for multi-box controls.
In addition, the electronic device may have both the functional module shown in fig. 19 and the functional module shown in fig. 21, so that the electronic device may be used to perform the data selection method shown in fig. 18 and the data selection method shown in fig. 20.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (15)

1. A method of data selection, the method comprising:
in response to receiving a first operation of a user, the electronic device controls the display position of the first cursor to be fixed in the data interface; the first cursor is used for marking the first candidate data or the last candidate data included in the data selection area; the data selection area is positioned in the data interface;
in response to receiving a first sliding operation of a user, the electronic device controls candidate data in the data interface to move along with the first sliding operation, and updates the data selection area from a first data selection area to a second data selection area along with the movement of the candidate data;
And the candidate data marked by the first cursor in the first data selection area is different from the candidate data marked by the first cursor in the second data selection area.
2. The method of claim 1, wherein the first sliding operation is not an operation that acts on the first cursor.
3. The method according to claim 1 or 2, wherein the execution area of the first sliding operation is located in an area of the data interface other than the data selection area.
4. A method according to any one of claim 1 to 3, wherein,
the first cursor is used for marking first candidate data in the data selection area, the first sliding operation is downward sliding, and the movement of the candidate data is downward movement; or,
the first cursor is used for marking the last candidate data in the data selection area, the first sliding operation is upward sliding, and the movement of the candidate data is upward movement.
5. The method according to any one of claim 1 to 4, wherein,
the first cursor is used for marking the first candidate data in the data selection area, and the second cursor is used for marking the last candidate data in the data selection area; or,
The first cursor is used for marking the last candidate data in the data selection area, and the second cursor is used for marking the first candidate data in the data selection area.
6. The method of claim 5, wherein the candidate data marked by the second cursor in the first data selection region is the same as the candidate data marked by the second cursor in the second data selection region.
7. The method of claim 5, wherein the method further comprises:
in response to receiving a second operation of a user, the electronic device controls the display position of the second cursor in the data selection interface to be fixed;
and the candidate data marked by the second cursor in the first data selection area is different from the candidate data marked by the second cursor in the second data selection area.
8. The method according to any one of claims 1 to 7, further comprising:
and responding to the received third operation of the user, and releasing the fixed state of the display position of the first cursor in the data interface by the electronic equipment.
9. The method according to claim 7 or 8, characterized in that the method further comprises:
And responding to the fourth operation of the user, and releasing the fixed state of the display position of the second cursor in the data interface by the electronic equipment.
10. The method according to any one of claims 1 to 9, further comprising:
the electronic equipment displays a selection prompt in a preset display area in the data interface;
the selection prompt is used for representing the relative positions of candidate data included in the data selection area in the plurality of candidate data.
11. The method of any of claims 1-10, wherein the electronic device, in response to receiving a first operation by a user, further comprises, prior to the electronic device controlling the first cursor to be fixed in display position in the data interface:
and in response to receiving a fifth operation of the user, the electronic device displays the first cursor and the data selection area in the data interface.
12. An electronic device, the electronic device comprising: one or more processors and memory;
the memory being coupled to the one or more processors, the memory being for storing computer program code comprising computer instructions that are invoked by the one or more processors to cause the electronic device to perform the method of any one of claims 1 to 11.
13. A chip system for application to an electronic device, the chip system comprising one or more processors for invoking computer instructions to cause the electronic device to perform the method of any of claims 1 to 11.
14. A computer readable storage medium comprising instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 11.
15. A computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 11.
CN202210983383.3A 2022-08-16 2022-08-16 Data selection method and related device Pending CN117631920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210983383.3A CN117631920A (en) 2022-08-16 2022-08-16 Data selection method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210983383.3A CN117631920A (en) 2022-08-16 2022-08-16 Data selection method and related device

Publications (1)

Publication Number Publication Date
CN117631920A true CN117631920A (en) 2024-03-01

Family

ID=90027449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210983383.3A Pending CN117631920A (en) 2022-08-16 2022-08-16 Data selection method and related device

Country Status (1)

Country Link
CN (1) CN117631920A (en)

Similar Documents

Publication Publication Date Title
CN110597512B (en) Method for displaying user interface and electronic equipment
WO2020238774A1 (en) Notification message preview method and electronic device
WO2021129326A1 (en) Screen display method and electronic device
WO2021139768A1 (en) Interaction method for cross-device task processing, and electronic device and storage medium
CN110362244B (en) Screen splitting method and electronic equipment
CN110119296B (en) Method for switching parent page and child page and related device
WO2021000881A1 (en) Screen splitting method and electronic device
CN111078091A (en) Split screen display processing method and device and electronic equipment
US11914850B2 (en) User profile picture generation method and electronic device
WO2021082835A1 (en) Method for activating function and electronic device
CN113994317A (en) User interface layout method and electronic equipment
CN109857401B (en) Display method of electronic equipment, graphical user interface and electronic equipment
CN113132526B (en) Page drawing method and related device
WO2023130921A1 (en) Method for page layout adapted to multiple devices, and electronic device
WO2023051511A1 (en) Icon moving method, related graphical interface, and electronic device
CN114816167A (en) Application icon display method, electronic device and readable storage medium
CN116048933A (en) Fluency detection method
CN116467221B (en) Pile inserting method and system based on interpreter and related electronic equipment
CN114205457B (en) Method for moving user interface element, electronic equipment and storage medium
CN117769696A (en) Display method, electronic device, storage medium, and program product
CN117631920A (en) Data selection method and related device
CN115185440B (en) Control display method and related equipment
WO2023098417A1 (en) Interface display method and apparatus
WO2023160455A1 (en) Object deletion method and electronic device
CN116185245B (en) Page display method and electronic equipment

Legal Events

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