A video switching method and device, electronic equipment and storage medium

By determining the starting position of touch operations on the short video interface and matching them with a swipe operation recognition strategy, the problem of misoperation caused by non-standard swipe gestures is solved, improving the accuracy and experience of user operations.

CN116339596BActive Publication Date: 2026-05-05DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DOUYIN VISION CO LTD
Filing Date
2021-12-24
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

During short video browsing, non-standard user swiping gestures can easily lead to accidental triggering of interactive buttons or video descriptions, resulting in a high rate of misoperation and negatively impacting user experience.

Method used

By determining whether the starting position of the touch operation event is at a preset feature position, and matching the corresponding swipe operation recognition strategy based on that position, it is determined whether the touch operation event is a swipe operation event, and the video switching command is triggered only when it is confirmed to be a swipe operation.

Benefits of technology

It reduces the probability of erroneous operations caused by non-standard swipe gestures, improves the accuracy of user operation intent recognition, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116339596B_ABST
    Figure CN116339596B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a video switching method and device, electronic equipment and storage medium, wherein the method comprises: obtaining a touch operation event of a video information display interface, and determining whether the starting position of the touch operation event is at a preset feature position; when the starting position of the touch operation event is at the preset feature position, determining whether the touch operation event is a sliding operation event based on a sliding operation recognition strategy matched with the preset feature position; when it is determined that the touch operation event is a sliding operation event, triggering a video switching instruction according to the sliding parameters of the touch operation event to complete video switching. The technical solution disclosed in the embodiments of the present disclosure solves the problem of low accuracy and high error rate of recognizing user operation in the video information display interface in the prior art, can reduce the probability of error operation events caused by non-standard sliding operation gestures, improve the accuracy of user operation intention recognition, and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of smart terminal technology, and in particular to a video switching method, apparatus, electronic device, and storage medium. Background Technology

[0002] In the short video field, content is provided to users through continuously updated information feeds. The video feed interface typically includes many interactive elements, such as like buttons, comment buttons, and video descriptions. However, when users swipe up and down on their phone screens to switch videos, accidental touches frequently occur, accidentally clicking on interactive elements that cover the video content, thus negatively impacting the short video browsing experience. Summary of the Invention

[0003] This disclosure provides a video switching method, apparatus, electronic device, and storage medium, which can reduce the probability of erroneous operation events caused by non-standard swipe gestures, improve the accuracy of user operation intent recognition, and enhance user experience.

[0004] In a first aspect, embodiments of this disclosure provide a video switching method, including:

[0005] The system acquires touch operation events from the video information display interface and determines whether the starting position of the touch operation event is at a preset feature position.

[0006] When the starting position of the touch operation event is at a preset feature position, it is determined whether the touch operation event is a sliding operation event based on a sliding operation recognition strategy that matches the preset feature position.

[0007] When the touch operation event is determined to be a swipe operation event, a video switching command is triggered according to the swipe parameters of the touch operation event to complete the video switching.

[0008] Secondly, embodiments of this disclosure also provide a video switching device, including:

[0009] The operation position confirmation module is used to acquire touch operation events of the video information display interface and determine whether the starting position of the touch operation event is at a preset feature position.

[0010] The swipe event determination module is used to determine whether the touch operation event is a swipe operation event based on a swipe operation recognition strategy that matches the preset feature position when the starting position of the touch operation event is at a preset feature position.

[0011] The video switching module is used to trigger a video switching command based on the sliding parameters of the touch operation event when the touch operation event is determined to be a sliding operation event, thereby completing the video switching.

[0012] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0013] One or more processors;

[0014] Storage device for storing one or more programs.

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the video switching method as described in any of the embodiments of this disclosure.

[0016] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the video switching method as described in any of the embodiments of this disclosure.

[0017] The technical solution of this disclosure, upon receiving a touch operation event on the video information display interface, determines whether the starting position of the touch operation event is located at a preset characteristic position prone to accidental touches. If the starting position of the touch operation event is at the preset characteristic position, a corresponding swipe operation recognition strategy is matched to determine whether the touch operation event is a swipe operation event. Finally, when the touch operation event is determined to be a swipe operation event based on the corresponding swipe operation recognition strategy, a video switching command is triggered according to the swipe parameters of the touch operation event to complete the video switching. This technical solution solves the problems of low accuracy and high error rate in recognizing user operations on the video information display interface in the prior art, reducing the probability of accidental operation events caused by non-standard swipe gestures, improving the accuracy of user operation intent recognition, and enhancing the user experience. Attached Figure Description

[0018] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0019] Figure 1 This is a flowchart illustrating a video switching method provided in Embodiment 1 of this disclosure;

[0020] Figure 2 This is a schematic diagram of a swiping gesture for a video information interface provided in Embodiment 1 of this disclosure;

[0021] Figure 3 This is a schematic diagram of a touch operation start position at a preset feature position provided in Embodiment 1 of this disclosure;

[0022] Figure 4 This is a schematic diagram illustrating the movement of a video information display interface provided in Embodiment 1 of this disclosure;

[0023] Figure 5 This is a schematic diagram of a button click event determination strategy provided in Embodiment 1 of this disclosure;

[0024] Figure 6 This is a flowchart illustrating a video switching method provided in Embodiment 2 of this disclosure;

[0025] Figure 7 This is a schematic diagram of a touch operation start position at a preset feature position provided in Embodiment 2 of this disclosure;

[0026] Figure 8 This is a schematic diagram of a video switching device provided in Embodiment 3 of this disclosure;

[0027] Figure 9 This is a schematic diagram of an electronic device structure provided in Embodiment 4 of this disclosure. Detailed Implementation

[0028] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0029] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0030] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0031] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0032] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0033] Example 1

[0034] Figure 1 This is a schematic flowchart of a video switching method provided in Embodiment 1 of this disclosure. This embodiment is applicable to scenarios involving video stream data switching, and is particularly suitable for video stream switching operations on short video playback platforms. The method can be executed by a video switching device, which can be implemented in software and / or hardware. This device can be configured in an electronic device, such as a mobile terminal or server device.

[0035] like Figure 1 As shown, the video switching method provided in this embodiment includes:

[0036] S110. Obtain the touch operation event of the video information display interface, and determine whether the starting position of the touch operation event is at a preset feature position.

[0037] The video information display interface can be any application client interface used for video playback. This interface not only allows video playback but also enables users to switch between video streams via swipe gestures. Especially in the short video technology field, this interface is also known as a feed browsing interface. Users can interact with the video information by clicking interactive buttons such as likes, shares, comments, favorites, and avatars, or by viewing video descriptions. The video descriptions include a brief video summary and relevant hashtags.

[0038] Users typically switch between videos using swipe gestures: swiping up switches to the next video and swiping down switches to the previous video. The swipe direction and video switching order can also be the reverse, or other correspondences. It should be noted that in this embodiment, the example uses the correspondence of swiping up to switch to the next video and swiping down to switch to the previous video. The swipe gesture for switching videos can be as follows: Figure 2 As shown, where, Figure 2 This demonstrates a specific example of a video information interface.

[0039] Furthermore, in Figure 2In the video information display interface, the vertical arrows indicate vertical swiping. However, the swiping operation does not need to be absolutely vertical. As long as it is within the preset compatible angle, the user's swipe operation can be recognized and the corresponding action command can be executed. Typically, when using ViewPager as a view page turning toolkit, the default compatible angle for swiping operations during video switching is 45°. That is, swiping upwards between 0° and 45° will trigger feed stream switching. Figure 2 In the diagram, the angle between the dashed arrow and the solid arrow represents the angle between the sliding operation at different angles and the vertical direction of the video information display interface.

[0040] The video information interface displays not only the video content but also interactive buttons such as creator avatars, likes, shares, comments, favorites, and descriptions. When users interact with the video information interface directly or indirectly, they can obtain touch events. During touch and swipe actions, users often accidentally touch interactive buttons or descriptions. The client needs to identify the user's true intention: is it a swipe to switch video information, a click on a button, or a triggering of a specific action? In such cases, accidental touches are easily detected.

[0041] Specifically, in this embodiment, when a touch operation event is received, considering the possibility of accidental touch, it is necessary to first determine whether the starting position of the touch operation event is at a preset feature position, namely the position of the preset interactive function button on the video information display interface and the position of the video information description content. Each preset interactive function button is a view on top of the Feed stream view, and all the video information description content is on one view.

[0042] Specifically, upon receiving a touch event, the coordinates of the touch point on the client's display interface can be determined. The preset feature position is location information recorded during video information initialization. The coordinates of the touch event's starting position can be matched with the preset feature position's location information to determine whether the touch event's starting position is within the preset feature position based on the matching result.

[0043] S120. When the starting position of the touch operation event is at a preset feature position, determine whether the touch operation event is a sliding operation event based on a sliding operation recognition strategy that matches the preset feature position.

[0044] When a touch event originates at a specific feature location, the transmission of the touch event must be considered: whether it is handled by the Feed view layer or by the view layer containing the button or video text description. This requires separate analysis based on the specific type of preset feature location. The possibility of accidental touches during swipe operations can be reduced by increasing the compatibility angle of the swipe operation and / or other measures.

[0045] For example, the location of the preset interactive function button is illustrated by taking the preset feature position where the starting position of the touch operation event is located. Figure 3 In the example, a user performs a touch operation on the video information display interface using gestures, generating a corresponding swipe trajectory. However, the starting position of the swipe trajectory falls within the area of ​​the "like" button. First, the angle between the swipe trajectory and the vertical direction of the video information display interface can be determined based on the coordinates of the touch operation's movement trajectory. Specifically, a straight line can be drawn using the coordinates of the first few touch points in the trajectory, and the angle between this line and the vertical direction of the video information display interface can be determined; alternatively, the angle between the tangent to the touch operation's movement trajectory and the vertical direction of the video information display interface can be calculated. When the determined angle is less than a preset angle threshold, the touch operation is determined to be a swipe operation event, not a button click event. The preset angle threshold is greater than the default swipe angle threshold in scenarios using preset view pagination tools, and can be values ​​such as 50° or 60°. Assuming 60° is used as the preset angle threshold, any touch operation event with an angle within 60° between its movement trajectory and the vertical direction of the video information display interface can trigger a video swipe operation. This increases the angle, making the touch operation event more easily intercepted by the feed view layer, reducing the probability of accidental button clicks.

[0046] S130. When it is determined that the touch operation event is a sliding operation event, a video switching command is triggered according to the sliding parameters of the touch operation event to complete the video switching.

[0047] Once the touch event is confirmed to be a swipe event (meaning the Feed view layer successfully intercepted the swipe event), it can be further determined whether this swipe event can trigger a video stream switch. Specifically, this can be determined based on the distance and speed at which the video information display interface moves with the swipe gesture. For example, during the swipe event, if the distance the video information display interface moves exceeds a first reference value (e.g., 40% of the vertical distance of the terminal screen), or if the distance the video information display interface moves exceeds a second reference value and the speed exceeds a preset speed reference value, a video switching command is triggered, completing the video switch. The reference values ​​for movement distance and preset speed can be statistically set based on empirical values. Figure 4As shown, when a swipe gesture is executed, the currently displayed video stream interface moves upward, and the next video stream interface (gray-filled interface) also moves upward. When the upward movement distance and / or speed meet preset conditions, a video switching operation can be performed.

[0048] Furthermore, if the angle between the touch operation event's movement trajectory and the vertical direction of the video information display interface is greater than a preset angle threshold, the condition for the Feed stream view layer to intercept the swipe operation event is not met, and the touch operation event will be passed to the view layer to which the preset interactive function button belongs. Then, based on the movement range of the touch operation event, it is determined whether the touch operation event is a button click event; if so, the target interactive function button is triggered, and the button click operation is performed. Figure 5 In the button touch diagram shown, A, the entire grayscale-filled interface, represents a button (BUTTON), with the circle indicating the starting position of the user's touch operation on the video information display interface. B shows the movement trajectory of the touch operation; if this trajectory remains within the button's area, a button click event can still be triggered when the finger is lifted. C shows a movement trajectory that extends beyond the button's area, meaning a button click event will not be triggered when the finger is lifted.

[0049] The technical solution of this disclosure can determine whether the starting position of a touch operation event on a video information display interface is located at a preset feature position that is prone to accidental touches when a touch operation event is obtained. If the starting position of the touch operation event is located at the preset feature position, a corresponding swipe operation recognition strategy is matched to the touch operation event to determine whether the touch operation event is a swipe operation event. Finally, when the touch operation event is determined to be a swipe operation event based on the corresponding swipe operation recognition strategy, a video switching command is triggered according to the swipe parameters of the touch operation event to complete the video switching. The technical solution disclosed in this disclosure solves the problems of low accuracy and high error rate in recognizing user operations on video information display interfaces in the prior art, reduces the probability of accidental operation events caused by non-standard swipe operation postures, improves the accuracy of user operation intent recognition, and enhances user experience.

[0050] Example 2

[0051] This embodiment can be combined with the various optional solutions in the video switching method provided in the above embodiments. The video switching method provided in this embodiment further describes the process of video switching when the starting position of a touch operation event falls on the feature position corresponding to clickable descriptive text.

[0052] Figure 6 This is a flowchart illustrating a video switching method provided in Embodiment 2 of this disclosure. Figure 6As shown, the video switching method provided in this embodiment includes:

[0053] S210. Obtain the touch operation event of the video information display interface, and determine whether the starting position of the touch operation event is at a preset feature position.

[0054] S220. When the starting position of the touch operation event is at a preset feature position, and the preset feature position is the location of the video information description content, determine the angle between the movement trajectory and the vertical direction of the video information display interface according to the coordinate position of the movement trajectory of the touch operation event, and determine whether the angle is less than a preset angle threshold, and determine whether the ending position of the touch operation event is at the location of the video information description content.

[0055] exist Figure 7 In the video description, the text (represented by X) that is started by the hash symbol (#) is the video information description content, also known as a hash tag. It is a clickable element in the video description. Figure 7 Multiple hash tags in the video reside on the same view layer. While clicking each hash tag will navigate to its associated details page, because all hash tags are on a single view, the event is not canceled when a swipe action moves from one hash tag to another. Therefore, when the starting position of a touch event falls within the characteristic location of the video information description, it's necessary to analyze, according to the corresponding strategy, whether the obtained touch event is a swipe event or a hash tag click event.

[0056] Specifically, when the starting position of a touch operation event is located within the video information description content, it is necessary not only to determine the angle between the movement trajectory and the vertical direction of the video information display interface based on the coordinates of the touch operation event's movement trajectory, and to determine whether this angle is less than a preset angle threshold, but also to determine whether the ending position of the touch operation event falls within the area of ​​the video information description content. That is, it is determined whether the movement trajectory of this touch operation event meets the requirements under the condition of magnified compatibility angle, and whether movement has occurred. If the angle between the movement trajectory and the vertical direction of the video information display interface is less than the compatibility angle threshold, and the ending position of the touch operation event is outside the area of ​​the video information description content, then step S250 can be executed directly. If the angle between the movement trajectory and the vertical direction of the video information display interface is greater than the compatibility angle threshold, then the process can be directly terminated, and the touch operation event is processed as a click event of a hash tag. When the angle between the movement trajectory and the vertical direction of the video information display interface is less than the compatibility angle threshold, and the ending position of the touch operation event is within the location of the video information description content, then step S230 is executed.

[0057] S230. When the termination position of the touch operation event is at the location of the video information description content, determine whether the hash code value of the starting position and the hash code value of the termination position are the same.

[0058] This step checks whether the start and end positions of the touch operation event's movement trajectory are at different hash tag positions. Specifically, when a hash tag is touched, its hash code is identified and obtained. The hash code is used to determine if it is the same hash tag. If it is the same, a hash tag click event is triggered, and the process is initiated. Otherwise, step S240 can be executed.

[0059] S240. When the included angle is less than the preset included angle threshold, and the hash code value of the starting position and the hash code value of the ending position are different, and the duration of the touch operation event is less than the preset time threshold, the touch operation event is determined to be a swipe operation event.

[0060] Specifically, duration refers to the time difference between when a user presses down on a video information interface with their finger or other tool and when they lift it. A further criterion for determining this time difference is to consider accidental touches caused by swiping, as both the swipe distance and swipe time are often quite short. A preset time threshold could be set, for example, to 500ms. If the duration exceeds 500ms, a click event is processed.

[0061] S250. When it is determined that the touch operation event is a sliding operation event, a video switching command is triggered according to the sliding parameters of the touch operation event to complete the video switching.

[0062] The technical solution of this disclosure, upon receiving a touch operation event on the video information display interface, determines whether the starting position of the touch operation event is located at a preset characteristic position prone to accidental touches. When the starting position of the touch operation event is located at the preset characteristic position where the video information description content is located, a corresponding sliding operation recognition strategy is adopted. This strategy determines whether the touch operation event is a sliding operation event by considering multiple angles, including the angle between the sliding trajectory of the touch operation event and the vertical direction of the interface, the ending position of the touch operation, and the duration of the touch operation. Finally, when the touch operation event is determined to be a sliding operation event based on the corresponding sliding operation recognition strategy, a video switching command is triggered according to the sliding parameters of the touch operation event to complete the video switching. The technical solution disclosed in this disclosure solves the problems of low accuracy and high error rate in recognizing user operations on the video information display interface in the prior art. It reduces the probability of accidental operation events caused by non-standard sliding gestures, improves the accuracy of user operation intent recognition, and enhances the user experience.

[0063] Example 3

[0064] Figure 8 This is a schematic diagram of a video switching device according to Embodiment 3 of this disclosure. The video switching device provided in this embodiment is suitable for scenarios involving video stream data switching, and is particularly suitable for situations where video stream switching operations are performed on short video playback platforms.

[0065] like Figure 8 As shown, the video switching device includes: an operation position confirmation module 310, a sliding event determination module 320, and a video switching module 330.

[0066] The operation position confirmation module 310 is used to acquire touch operation events of the video information display interface and determine whether the starting position of the touch operation event is at a preset feature position; the slide event determination module 320 is used to determine whether the touch operation event is a slide operation event based on a slide operation recognition strategy that matches the preset feature position when the starting position of the touch operation event is at the preset feature position; the video switching module 330 is used to trigger a video switching command according to the slide parameters of the touch operation event when it is determined that the touch operation event is a slide operation event, and complete the video switching.

[0067] The technical solution of this disclosure, upon receiving a touch operation event on the video information display interface, determines whether the starting position of the touch operation event is located at a preset characteristic position prone to accidental touches. If the starting position of the touch operation event is at the preset characteristic position, a corresponding swipe operation recognition strategy is matched to determine whether the touch operation event is a swipe operation event. Finally, when the touch operation event is determined to be a swipe operation event based on the corresponding swipe operation recognition strategy, a video switching command is triggered according to the swipe parameters of the touch operation event to complete the video switching. This technical solution solves the problems of low accuracy and high error rate in recognizing user operations on the video information display interface in the prior art, reducing the probability of accidental operation events caused by non-standard swipe gestures, improving the accuracy of user operation intent recognition, and enhancing the user experience.

[0068] In some optional implementations, the preset feature location includes the location of the preset interactive function button and the location of the video information description content on the video information display interface.

[0069] In some optional implementations, when the preset feature position is the location of a preset interactive function button, the sliding event determination module 320 is specifically used for:

[0070] The angle between the movement trajectory and the vertical direction of the video information display interface is determined based on the coordinate position of the movement trajectory of the touch operation event.

[0071] When the included angle is less than a preset included angle threshold, the touch operation event is determined to be a swipe operation event, wherein the preset included angle threshold is greater than the default swipe angle threshold in the scenario of using the preset view page turning toolkit.

[0072] In some optional implementations, when the preset feature position is the location of the video information description content, the sliding event determination module 320 is specifically used for:

[0073] When determining whether the termination position of the touch operation event is located at the position of the video information description content;

[0074] When the termination position of the touch operation event is at the location of the video information description content, determine whether the hash code value of the starting position and the hash code value of the termination position are the same;

[0075] When the included angle is less than the preset included angle threshold, and the hash code values ​​of the starting position and the ending position are different, and the duration of the touch operation event is less than the preset time threshold, the touch operation event is determined to be a swipe operation event.

[0076] In some alternative implementations, the video switching device includes a non-video switching event processing module, used for:

[0077] When the included angle is greater than the preset included angle threshold, the touch operation event is passed to the view layer to which the preset interactive function button belongs;

[0078] Determine whether the touch operation event is a button click event based on the movement range of the touch operation event;

[0079] If so, the target interactive function button will be triggered, and the button click operation will be performed.

[0080] In some optional implementations, the non-video switching event handling module may also be used for:

[0081] When the included angle is greater than the preset included angle threshold, or when the hash code value of the starting position is the same as the hash code value of the ending position, or when the duration of the touch operation event is greater than the preset time threshold, the touch operation event is passed to the view layer to which the video information description content belongs.

[0082] The touch operation event is determined to be a video information description content click event, and the video information description content at the termination position is taken as the click object of the video information description content click event.

[0083] In some optional implementations, the video switching module 330 is specifically used for:

[0084] During the execution of the sliding operation event, when the moving distance of the video information display interface is greater than the first moving distance reference value, or when the moving distance of the video information display interface is greater than the second moving distance reference value and the moving speed is greater than the preset speed reference value, a video switching command is triggered to complete the video switching.

[0085] The video switching device provided in this disclosure can execute the video switching method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.

[0086] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0087] Example 4

[0088] The following is for reference. Figure 9It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 9 The diagram below shows the structure of the terminal device or server 400. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0089] like Figure 9 As shown, electronic device 400 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 406 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of electronic device 400. The processing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.

[0090] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0091] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 406, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the video switching method of embodiments of this disclosure.

[0092] The electronic device provided in this embodiment and the video switching method provided in the above embodiments belong to the same disclosed concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0093] Example 5

[0094] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the video switching method provided in the above embodiments.

[0095] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory (FLASH), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0096] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0097] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0098] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0099] The system acquires touch operation events from the video information display interface and determines whether the starting position of the touch operation event is at a preset feature position.

[0100] When the starting position of the touch operation event is at a preset feature position, it is determined whether the touch operation event is a sliding operation event based on a sliding operation recognition strategy that matches the preset feature position.

[0101] When the touch operation event is determined to be a swipe operation event, a video switching command is triggered according to the swipe parameters of the touch operation event to complete the video switching.

[0102] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0104] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the units and modules do not necessarily limit the specific unit or module; for example, a data generation module can also be described as a "video data generation module".

[0105] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Parts (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), and so on.

[0106] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0107] According to one or more embodiments of this disclosure, [Example 1] provides a video switching method, the method comprising:

[0108] The system acquires touch operation events from the video information display interface and determines whether the starting position of the touch operation event is at a preset feature position.

[0109] When the starting position of the touch operation event is at a preset feature position, it is determined whether the touch operation event is a sliding operation event based on a sliding operation recognition strategy that matches the preset feature position.

[0110] When the touch operation event is determined to be a swipe operation event, a video switching command is triggered according to the swipe parameters of the touch operation event to complete the video switching.

[0111] According to one or more embodiments of this disclosure, [Example 2] provides a video switching method, which further includes:

[0112] In some optional implementations, the preset feature location includes the location of the preset interactive function button and the location of the video information description content on the video information display interface.

[0113] According to one or more embodiments of this disclosure, [Example 3] provides a video switching method, which further includes:

[0114] In some optional implementations, when the preset feature position is the location of a preset interactive function button, determining whether the touch operation event is a swipe operation event based on a swipe operation recognition strategy matching the preset feature position includes:

[0115] The angle between the movement trajectory and the vertical direction of the video information display interface is determined based on the coordinate position of the movement trajectory of the touch operation event.

[0116] When the included angle is less than a preset included angle threshold, the touch operation event is determined to be a swipe operation event, wherein the preset included angle threshold is greater than the default swipe angle threshold in the scenario of using the preset view page turning toolkit.

[0117] According to one or more embodiments of this disclosure, [Example 4] provides a video switching method, which further includes:

[0118] In some optional implementations, when the preset feature position is the location of the video information description content, the step of determining whether the touch operation event is a swipe operation event based on a swipe operation recognition strategy matching the preset feature position further includes:

[0119] When determining whether the termination position of the touch operation event is located at the position of the video information description content;

[0120] When the termination position of the touch operation event is at the location of the video information description content, determine whether the hash code value of the starting position and the hash code value of the termination position are the same;

[0121] When the included angle is less than the preset included angle threshold, and the hash code values ​​of the starting position and the ending position are different, and the duration of the touch operation event is less than the preset time threshold, the touch operation event is determined to be a swipe operation event.

[0122] According to one or more embodiments of this disclosure, [Example 5] provides a video switching method, which further includes:

[0123] In some optional implementations, when the included angle is greater than the preset included angle threshold, the touch operation event is passed to the view layer to which the preset interactive function button belongs;

[0124] Determine whether the touch operation event is a button click event based on the movement range of the touch operation event;

[0125] If so, the target interactive function button will be triggered, and the button click operation will be performed.

[0126] According to one or more embodiments of this disclosure, [Example Six] provides a video switching method, further comprising:

[0127] In some optional implementations, when the included angle is greater than the preset included angle threshold, or when the hash code value of the starting position is the same as the hash code value of the ending position, or when the duration of the touch operation event is greater than the preset time threshold, the touch operation event is passed to the view layer to which the video information description content belongs.

[0128] The touch operation event is determined to be a video information description content click event, and the video information description content at the termination position is taken as the click object of the video information description content click event.

[0129] According to one or more embodiments of this disclosure, [Example Seven] provides a video switching method, further comprising:

[0130] In some optional implementations, triggering a video switching command based on the sliding parameters of the sliding operation event to complete the video switching includes:

[0131] During the execution of the sliding operation event, when the moving distance of the video information display interface is greater than the first moving distance reference value, or when the moving distance of the video information display interface is greater than the second moving distance reference value and the moving speed is greater than the preset speed reference value, a video switching command is triggered to complete the video switching.

[0132] According to one or more embodiments of this disclosure, [Example Eight] provides a video switching device, further comprising:

[0133] The operation position confirmation module is used to acquire touch operation events of the video information display interface and determine whether the starting position of the touch operation event is at a preset feature position.

[0134] The swipe event determination module is used to determine whether the touch operation event is a swipe operation event based on a swipe operation recognition strategy that matches the preset feature position when the starting position of the touch operation event is at a preset feature position.

[0135] The video switching module is used to trigger a video switching command based on the sliding parameters of the touch operation event when the touch operation event is determined to be a sliding operation event, thereby completing the video switching.

[0136] According to one or more embodiments of this disclosure, [Example Nine] provides a video switching device, further comprising:

[0137] In some optional implementations, the preset feature location includes the location of the preset interactive function button and the location of the video information description content on the video information display interface.

[0138] According to one or more embodiments of this disclosure, [Example 10] provides a video switching device, further comprising:

[0139] In some optional implementations, when the preset feature position is the location of a preset interactive function button, the sliding event determination module is specifically used for:

[0140] The angle between the movement trajectory and the vertical direction of the video information display interface is determined based on the coordinate position of the movement trajectory of the touch operation event.

[0141] When the included angle is less than a preset included angle threshold, the touch operation event is determined to be a swipe operation event, wherein the preset included angle threshold is greater than the default swipe angle threshold in the scenario of using the preset view page turning toolkit.

[0142] According to one or more embodiments of this disclosure, [Example 11] provides a video switching device, further comprising:

[0143] In some optional implementations, when the preset feature position is the location of the video information description content, the sliding event determination module is specifically used for:

[0144] When determining whether the termination position of the touch operation event is located at the position of the video information description content;

[0145] When the termination position of the touch operation event is at the location of the video information description content, determine whether the hash code value of the starting position and the hash code value of the termination position are the same;

[0146] When the included angle is less than the preset included angle threshold, and the hash code values ​​of the starting position and the ending position are different, and the duration of the touch operation event is less than the preset time threshold, the touch operation event is determined to be a swipe operation event.

[0147] According to one or more embodiments of this disclosure, [Example Twelve] provides a video switching device, further comprising:

[0148] In some alternative implementations, the video switching device includes a non-video switching event processing module, used for:

[0149] When the included angle is greater than the preset included angle threshold, the touch operation event is passed to the view layer to which the preset interactive function button belongs;

[0150] Determine whether the touch operation event is a button click event based on the movement range of the touch operation event;

[0151] If so, the target interactive function button will be triggered, and the button click operation will be performed.

[0152] According to one or more embodiments of this disclosure, [Example Thirteen] provides a video switching device, further comprising:

[0153] In some optional implementations, the non-video switching event handling module may also be used for:

[0154] When the included angle is greater than the preset included angle threshold, or when the hash code value of the starting position is the same as the hash code value of the ending position, or when the duration of the touch operation event is greater than the preset time threshold, the touch operation event is passed to the view layer to which the video information description content belongs.

[0155] The touch operation event is determined to be a video information description content click event, and the video information description content at the termination position is taken as the click object of the video information description content click event.

[0156] According to one or more embodiments of this disclosure, [Example Fourteen] provides a video switching device, further comprising:

[0157] In some optional implementations, the video switching module is specifically used for:

[0158] During the execution of the sliding operation event, when the moving distance of the video information display interface is greater than the first moving distance reference value, or when the moving distance of the video information display interface is greater than the second moving distance reference value and the moving speed is greater than the preset speed reference value, a video switching command is triggered to complete the video switching.

[0159] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0160] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0161] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A video switching method, characterized in that, include: The system acquires touch operation events from the video information display interface and determines whether the starting position of the touch operation event is at a preset feature position. When the starting position of the touch operation event is at a preset feature position, it is determined whether the touch operation event is a sliding operation event based on a sliding operation recognition strategy that matches the preset feature position; the preset feature position includes the location of the preset interactive function button on the video information display interface; When the touch operation event is determined to be a swipe operation event, a video switching command is triggered according to the swipe parameters of the touch operation event to complete the video switching; When the preset feature position is the location of the preset interactive function button, the step of determining whether the touch operation event is a swipe operation event based on the swipe operation recognition strategy matching the preset feature position includes: The angle between the movement trajectory and the vertical direction of the video information display interface is determined based on the coordinate position of the movement trajectory of the touch operation event. When the included angle is less than a preset included angle threshold, the touch operation event is determined to be a swipe operation event, wherein the preset included angle threshold is greater than the default swipe angle threshold in the scenario of using the preset view page turning toolkit.

2. The method according to claim 1, characterized in that, The preset feature location also includes the location of the video information description content on the video information display interface.

3. The method according to claim 1 or 2, characterized in that, When the preset feature position is the location of the video information description content, the step of determining whether the touch operation event is a swipe operation event based on the swipe operation recognition strategy matching the preset feature position further includes: When determining whether the termination position of the touch operation event is located at the position of the video information description content; When the termination position of the touch operation event is at the location of the video information description content, determine whether the hash code value of the starting position and the hash code value of the termination position are the same; When the included angle is less than the preset included angle threshold, and the hash code values ​​of the starting position and the ending position are different, and the duration of the touch operation event is less than the preset time threshold, the touch operation event is determined to be a swipe operation event.

4. The method according to claim 1, characterized in that, The method further includes: When the included angle is greater than the preset included angle threshold, the touch operation event is passed to the view layer to which the preset interactive function button belongs; Determine whether the touch operation event is a button click event based on the movement range of the touch operation event; If so, the target interactive function button will be triggered, and the button click operation will be performed.

5. The method according to claim 3, characterized in that, The method further includes: When the included angle is greater than the preset included angle threshold, or when the hash code value of the starting position is the same as the hash code value of the ending position, or when the duration of the touch operation event is greater than the preset time threshold, the touch operation event is passed to the view layer to which the video information description content belongs. The touch operation event is determined to be a video information description content click event, and the video information description content at the termination position is taken as the click object of the video information description content click event.

6. The method according to claim 1, characterized in that, The step of triggering a video switching command based on the sliding parameters of the sliding operation event to complete the video switching includes: During the execution of the sliding operation event, when the moving distance of the video information display interface is greater than the first moving distance reference value, or when the moving distance of the video information display interface is greater than the second moving distance reference value and the moving speed is greater than the preset speed reference value, a video switching command is triggered to complete the video switching.

7. A video switching device, characterized in that, include: The operation position confirmation module is used to acquire touch operation events of the video information display interface and determine whether the starting position of the touch operation event is at a preset feature position. The swipe event determination module is used to determine whether the touch operation event is a swipe operation event based on a swipe operation recognition strategy that matches the preset feature position when the starting position of the touch operation event is at a preset feature position; the preset feature position includes the location of the preset interactive function button on the video information display interface; The video switching module is used to trigger a video switching command based on the sliding parameters of the touch operation event when the touch operation event is determined to be a sliding operation event, and to complete the video switching. The sliding event determination module is specifically used to determine the angle between the movement trajectory and the vertical direction of the video information display interface based on the coordinate position of the movement trajectory of the touch operation event when the preset feature position is the location of the preset interactive function button. When the included angle is less than a preset included angle threshold, the touch operation event is determined to be a swipe operation event, wherein the preset included angle threshold is greater than the default swipe angle threshold in the scenario of using the preset view page turning toolkit.

8. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the video switching method as described in any one of claims 1-6.

9. A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the video switching method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Input method and input equipment

    CN102033682A

  • Video switching method and device, electronic equipment and storage medium

    CN111770384A