Video playing method and device, electronic equipment and storage medium
By determining the target device set and the placement of each device when multiple devices play videos together, the problem of device playback progress synchronization is solved, and user experience and operability is improved.
Patent Information
- Application Number
- CN202510171877.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-16
AI Technical Summary
When multiple devices play videos together, it is difficult to synchronize the playback progress of all devices, resulting in poor user experience and poor operability.
By determining the target device set corresponding to the target video and determining the playback screen information during co-playing according to the placement of each device, this information is sent to each device to make it co-play the video.
It realizes the synchronous playback progress of videos when multi-device plays together, improving user experience and operability.
Smart Images

Figure CN120017897A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video playback technology, and in particular to a video playback method, device, electronic device and storage medium. Background Art
[0002] Limited by the size of the display panel of a single device, collaborative video playback between multiple devices is becoming more and more popular.
[0003] In the related art, for collaborative playback between multiple devices, each device usually plays the same video content, and the playback progress between the devices needs to be synchronized, that is, all devices play the same video content in the same time period.
[0004] However, when all devices play the same video content, it is difficult to synchronize the playback progress between all devices, resulting in poor user experience and poor operability. Summary of the invention
[0005] In view of this, in order to solve the above-mentioned technical problems or part of the technical problems, the embodiments of the present application provide a video playback method, device, electronic device and storage medium.
[0006] In a first aspect, the present application provides a video playback method, comprising:
[0007] When it is determined that a target video needs to be played, a target device set corresponding to the target video is determined, and all target devices in the target device set are used to collaboratively play the target video;
[0008] Determine a display position corresponding to each of the target devices in the target device set;
[0009] Determining, according to the display positions corresponding to all the target devices in the target device set, playback screen information corresponding to when each of the target devices in the target device set collaboratively plays the target video;
[0010] Each of the playback screen information is sent to the corresponding target device in the target device set, so that all the target devices in the target device set play the target video in coordination.
[0011] In an optional implementation, the determining the display position corresponding to each target device in the target device set includes:
[0012] Determine the sum of the numbers of all the target devices in the target device set to obtain a first number;
[0013] Determine, according to the first number, a target number of rows and a target number of columns required for all the target devices in the target device set to collaboratively play the target video;
[0014] All the target devices in the target device set are arranged based on the target number of rows and the target number of columns to determine a display position corresponding to each target device in the target device set.
[0015] In an optional implementation, the target device set includes a master target device and a plurality of slave target devices;
[0016] The determining, according to the first number, a target number of rows and a target number of columns required for all the target devices in the target device set to collaboratively play the target video includes:
[0017] Determining, according to the first quantity, a target value that satisfies a first preset condition, wherein the first preset condition includes that the first quantity is less than or equal to the square of the target value and the first quantity is closest to the square of the target value;
[0018] The target values are respectively used as the target number of rows and the target number of columns required for all the target devices in the target device set to collaboratively play the target video;
[0019] The arranging all the target devices in the target device set based on the target number of rows and the target number of columns to determine a display position corresponding to each of the target devices in the target device set includes:
[0020] Taking the main target device as a starting device, arranging the target devices in the target device set in sequence according to the target number of rows and the target number of columns, so as to obtain an arrangement order among all the target devices in the target device set;
[0021] According to the arrangement sequence, a display position corresponding to each target device in the target device set is determined.
[0022] In an optional implementation, determining, based on the display positions corresponding to all the target devices in the target device set, the playback screen information corresponding to when each of the target devices in the target device set collaboratively plays the target video includes:
[0023] Determining a target resolution corresponding to collaboratively playing the target video according to the display positions corresponding to all the target devices in the target device set;
[0024] For each of the target devices in the target device set, determining a screen ratio corresponding to the target device co-playing the target video according to the target resolution and the display position corresponding to the target device;
[0025] For each of the target devices in the target device set, the playback screen information corresponding to when the target device collaboratively plays the target video is determined according to the screen ratio corresponding to the target device.
[0026] In an optional implementation, the display position includes the row where the target device is located and the column where the target device is located;
[0027] The determining, according to the display positions corresponding to all the target devices in the target device set, a target resolution corresponding to the coordinated playback of the target video includes:
[0028] According to the rows and columns of the target devices corresponding to all the target devices in the target device set, determining the sum of the lengths of all the target devices included in each row to obtain a first length corresponding to each row, and determining the sum of the widths of all the target devices included in each column to obtain a first width corresponding to each row;
[0029] Determine the largest first length from the first lengths corresponding to all rows, and determine the largest first width from the first widths corresponding to all columns;
[0030] The largest first width and the largest first length are used as the target resolution corresponding to the coordinated playback of the target video.
[0031] In an optional implementation, the target device set includes a master target device and a plurality of slave target devices;
[0032] After executing the step of all the target devices in the target device set collaboratively playing the target video, the method further includes:
[0033] In the process of all the target devices in the target device set collaboratively playing the target video, if a trigger operation for the target video played by the main target device is detected, a target request corresponding to the trigger operation is generated;
[0034] The target request is sent to each of the slave target devices in the target device set, so that each of the slave target devices executes a control operation corresponding to the trigger operation, thereby completing the playback control of the cooperatively played target video.
[0035] In an optional implementation, the target device set includes a master target device and a plurality of slave target devices;
[0036] The determining a target device set corresponding to the target video includes:
[0037] If all preset devices in the preset device set have enabled the collaborative playback function and are connected to the same wireless network, any preset device in the preset device set is selected as the main target device, and the main target device establishes a link with each preset device in the preset device set except the main target device through the wireless network, and all the preset devices in the preset device set are used to collaboratively play the target video;
[0038] Determine all the preset devices that have successfully established a link with the master target device, and determine each of the preset devices that have successfully established a link with the master target device as a slave target device;
[0039] The main target device and all the determined slave target devices are determined as a target device set corresponding to the target video.
[0040] In a second aspect, the present application provides a video playback device, comprising:
[0041] A device determination module, used to determine a target device set corresponding to the target video when it is determined that the target video needs to be played, and all target devices in the target device set are used to collaboratively play the target video;
[0042] A position determination module, used to determine a display position corresponding to each target device in the target device set;
[0043] A screen determination module, configured to determine, according to the display positions corresponding to all the target devices in the target device set, playback screen information corresponding to when each of the target devices in the target device set collaboratively plays the target video;
[0044] The playing module is used to send each of the playing picture information to the corresponding target device in the target device set, so that all the target devices in the target device set can play the target video in coordination.
[0045] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, wherein the processor is used to execute a video playback program stored in the memory to implement the video playback method as described above.
[0046] In a fourth aspect, the present application further provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the video playback method as described above.
[0047] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art. The method provided by the embodiment of the present application includes: when determining that a target video needs to be played, determining the target device set corresponding to the target video, and all target devices in the target device set are used to collaboratively play the target video; determining the display position corresponding to each target device in the target device set; according to the display positions corresponding to all target devices in the target device set, determining the playback screen information corresponding to each target device in the target device set when the target video is collaboratively played; sending each playback screen information to the corresponding target device in the target device set, so that all target devices in the target device set collaboratively play the target video. In the above manner, when multiple devices collaboratively play the target video, the embodiment of the present application determines the display position of each device that collaboratively plays the target video, so as to determine the playback screen information corresponding to each device when the target video is collaboratively played according to the display position of each device, thereby sending each determined playback screen information to the corresponding device, so as to realize the collaborative playback of the target video through each device, avoiding the problem that it is difficult to synchronize when each device plays the same target video at the same time, and improving the user experience and operability. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0050] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0051] Figure 1 A schematic diagram of a flow chart of a video playback method provided in an embodiment of the present application;
[0052] Figure 2 A flowchart of another video playback method provided in an embodiment of the present application;
[0053] Figure 3 A schematic diagram of the structure of a video playback device provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0055] In the above attached figure:
[0056] 10. Device determination module; 20. Position determination module; 30. Picture determination module; 40. Playback module;
[0057] 400, electronic device; 401, processor; 402, memory; 4021, operating system; 4022, application; 403, user interface; 404, network interface; 405, bus system. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0059] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0060] refer to Figure 1 , Figure 1 A video playback method provided in this embodiment includes the following steps:
[0061] S101: When it is determined that a target video needs to be played, a target device set corresponding to the target video is determined.
[0062] In this embodiment, the target device set includes multiple target devices, and all target devices in the target device set are used to collaboratively play the target video. The multiple target devices include a master target device and multiple slave target devices. The above method is applied to the master target device. The master target device and the multiple slave target devices are connected to the same wireless network. Among them, collaboratively playing the target video can be understood as each target device in the target device set only playing part of the screen of the target video. After all the target devices in the target device set are spliced, the complete playback of the target video can be achieved.
[0063] It should be noted that the target device in the target device set can be a TV, a tablet computer, etc. The specific form of the target device can be selected according to actual needs, and the specific form of the target device is not limited in this embodiment. The master target device and the slave target device in the target device set can be set according to actual needs, and the setting method of the master target device and the slave target device is not limited in this embodiment.
[0064] S102: Determine a placement position corresponding to each target device in the target device set.
[0065] In this embodiment, the display position can be understood as the position of each target device in the target device set after all target devices in the target device set are spliced. By determining the display position corresponding to each target device in the target device set, it is easy to determine which part of the screen of the target video should be played by each target device in the target device set, so that all target devices in the target device set can play the target video in coordination, avoiding the problem of asynchrony of the screen when multiple devices play the target video at the same time, and improving the user experience.
[0066] The main target device in the target device set may determine the display position corresponding to each target device in the target device set in the following manner, as follows:
[0067] When each target device in the target device set is movable, the target number of rows and target number of columns required for all target devices in the target device set to collaboratively play the target video can be determined, so that all target devices in the target device set can be arranged according to the target number of rows and target number of columns, thereby determining the display position corresponding to each target device in the target device set based on the arrangement results of all target devices in the target device set.
[0068] The master target device in the target device set can also determine the placement corresponding to each target device in the target device set in the following manner:
[0069] When the target devices in the target device set are fixed, the display positions corresponding to the target devices in the target device set can be pre-set. After the target device set corresponding to the target video is determined, the display position corresponding to each target device in the target device set can be determined based on the correspondence between the target devices and the display positions.
[0070] S103: Determine, according to the display positions corresponding to all the target devices in the target device set, the playback screen information corresponding to the target video when each target device in the target device set collaboratively plays the target video.
[0071] In this embodiment, after determining the display position corresponding to each target device in the target device set, for each target device in the target device set, it is possible to determine which part of the target video should be played by the target device when co-playing the target video according to the display position corresponding to the target device, thereby obtaining the playback screen information corresponding to the target device when co-playing the target video, and then enabling the target device to achieve co-playing of the target video based on the playback screen information, thereby avoiding the problem of asynchrony of the screen when multiple devices play the target video at the same time, thereby improving the user experience.
[0072] S104: Send each playback screen information to a corresponding target device in the target device set, so that all target devices in the target device set play the target video in coordination.
[0073] In this embodiment, after determining the playback screen information corresponding to the collaborative playback of the target video by each target device in the target device set, the master target device in the target device set sends the playback screen information corresponding to the collaborative playback of the target video by each slave target device to the corresponding slave target device, thereby enabling the master target device and each slave target device in the target device set to achieve collaborative playback of the target video based on their respective corresponding playback screen information.
[0074] A video playback method provided in this embodiment determines the display position of each device that collaboratively plays the target video when multiple devices collaboratively play the target video, and determines the playback screen information corresponding to each device when the target video is collaboratively played according to the display position of each device, thereby sending the determined playback screen information to the corresponding device to achieve collaborative playback of the target video through each device, avoiding the problem of difficulty in achieving synchronization when each device plays the same target video at the same time, and improving user experience and operability.
[0075] refer to Figure 2 , Figure 2 A schematic diagram of another video playback method provided in an embodiment of the present application. A video playback method provided in this embodiment includes the following steps:
[0076] S201: When it is determined that a target video needs to be played, a target device set corresponding to the target video is determined.
[0077] In this embodiment, all target devices in the target device set are used to collaboratively play the target video. Among them, multiple preset devices can be pre-set to form a preset device set. All preset devices in the preset device set are used to collaboratively play the target video. The preset device can be a TV, a tablet computer, etc. The specific form of the preset device can be selected according to actual needs. The specific form of the preset device is not limited in this embodiment. In order to achieve collaborative playback of the target video by multiple devices, when it is determined that the target video needs to be played, a main target device and multiple slave target devices can be determined from the pre-set preset device set to determine the main target device and the multiple slave target devices as the target device set, so as to achieve collaborative playback of the target devices using the main target device and the multiple slave target devices in the target device set.
[0078] Specifically, the master target device is used to control multiple slave target devices, and the master target device and multiple slave target devices realize the coordinated playback of the target video. When selecting the master target device from the preset device set, if the collaborative playback function has been turned on for each preset device in the preset device set, at this time, a first control may be displayed in each preset device with the collaborative playback function turned on. The first control is used to select whether the preset device is used as the master target device. After one of the preset devices is used as the master target device, the other preset devices that are successfully linked to the master target device and have the collaborative playback function turned on are automatically used as slave target devices. After the master target device and multiple slave target devices are determined, in order not to affect the collaborative playback of the target video by multiple target devices and to improve the user experience, the master target device can send a message to multiple slave target devices to set the playback controls of multiple slave target devices to a hidden state, so that when multiple slave target devices are collaboratively playing the target video, the user cannot operate the multiple slave target devices.
[0079] In this embodiment, determining the target device set corresponding to the target video in step S201 specifically includes:
[0080] If all preset devices in the preset device set have enabled the collaborative playback function and are connected to the same wireless network, any preset device in the preset device set is selected as the main target device, and the main target device establishes a link with each preset device in the preset device set except the main target device through the wireless network;
[0081] Determine all preset devices that successfully establish a link with the master target device, and determine all preset devices that successfully establish a link with the master target device as slave target devices;
[0082] The main target device and all the determined slave target devices are determined as a target device set corresponding to the target video.
[0083] Among them, the collaborative playback function can be understood as that the preset device is used to collaboratively play the target video. The specific method of selecting any preset device from the preset device set as the main target device can refer to the above description, and will not be repeated in this embodiment. After the main target device is determined from the preset device set, the main target device can send a message to each preset device in the preset device set that has turned on the collaborative playback function and is connected to the same wireless network, so that the main target device establishes a link with other preset devices in the preset device set, and each preset device that successfully establishes a link with the main target device is determined as a slave target device, thereby determining the main target device and each determined slave target device as a target device set.
[0084] S202: Determine the sum of the numbers of all target devices in the target device set to obtain a first number.
[0085] S203: Determine, according to the first number, the target number of rows and the target number of columns required for all target devices in the target device set to collaboratively play the target device.
[0086] S204: Arrange all target devices in the target device set based on the target number of rows and the target number of columns to determine a display position corresponding to each target device in the target device set.
[0087] With respect to the above-mentioned steps S202 to S204, after determining the target device set corresponding to the target video, the main target device queries each preset device that has successfully established a link with the main target device, and determines the sum of the number of the main target device and each preset device as the first number, that is, assuming that the sum of the number of all preset devices that have successfully established a link with the main target device is N, then the first number is N+1. After obtaining the first number, in order to ensure the aesthetics of all target devices in the target device set cooperating to play the target video, all target devices in the target device set are divided based on the first number to determine the target number of rows and target number of columns required for all target devices in the target device set to co-play the target video, and then all target devices in the target device set are arranged based on the target number of rows and target number of columns to determine the display position corresponding to each target device in the target device set. The target number of rows can be understood as the number of rows of the target device when all target devices in the target device set are divided, and the target number of columns can be understood as the number of columns of the target device when all target devices in the target device set are divided.
[0088] In the above, in step S203, determining the target number of rows and the target number of columns required for all target devices in the target device set to collaboratively play the target device according to the first number includes:
[0089] Determining a target value that satisfies a first preset condition according to the first quantity, wherein the first preset condition includes that the first quantity is less than or equal to the square of the target value and the first quantity is closest to the square of the target value;
[0090] The target values are respectively used as the target number of rows and the target number of columns required for all target devices in the target device set to collaboratively play the target video.
[0091] In the above, in step S204, all target devices in the target device set are arranged based on the target number of rows and the target number of columns to determine the display position corresponding to each target device in the target device set, including:
[0092] Taking the main target device as the starting device, arranging each target device in the target device set according to the target row number and the target column number, so as to obtain an arrangement order among all the target devices in the target device set;
[0093] According to the arrangement order, the display position corresponding to each target device in the target device set is determined.
[0094] Among them, in order to further ensure the aesthetics of the target video played by all target devices in the target device set in cooperation, based on the first number, a target value that meets the first preset condition is determined, so that the target values are respectively used as the target number of rows and the target number of columns required for all target devices in the target device set to play the target video in cooperation. For example, when the first number is 8, the target value is 3, and when the first number is 15, the target number is 4. After determining the target number of rows and the target number of columns required for all target devices in the target device set to play the target video in cooperation, the master target device sequentially numbers the master target device and each slave target device according to the order in which the link is successfully established with each slave target device. The master target device arranges the other slave target devices in the target device set according to the target number of rows and the target number of columns based on the number of the master target device and each slave target device, with the master target device as the starting device, to obtain the arrangement order between the master target device and each slave target device. Based on the arrangement order between the master target device and each slave target device, the display position corresponding to each target device in the target device set can be determined.
[0095] Specifically, when the target device set includes N+1 target devices, the main target device can be numbered D1, and the other slave target devices in the target device set are numbered in sequence according to the order in which the link with the main target device is successfully established, that is, D2, D3, ..., DN+1. The display position includes the row where the target device is located and the column where the target device is located. For example, when the target device is the main target device, the row where the main target device is located is the first row and the column where the main target device is located is the first column. It should be noted that when arranging the target devices in the target device set, a row that does not meet the requirements can be left empty. For example, when N+1 is 8, the 9th position can be left empty.
[0096] More specifically, when the target device set includes 9 target devices, the target number of rows and the target number of columns are 3, and all the target devices in the target device set can be numbered as D1, D2, D3, D4, D5, D6, D7, D8 and D9, then the first row includes target devices D1, D2 and D3, the second row includes target devices D4, D5 and D6, the third row includes target devices D7, D8 and D9, the first column includes target devices D1, D4 and D7, the second column includes target devices D2, D6 and D8, and the third column includes target devices D3, D6 and D9. From the above, we can know the arrangement order of each target device in the target device set, and thus the display position of each target device in the target device set (i.e. the row and column of the target device) can be obtained based on the arrangement order.
[0097] S205: Determine, according to the display positions corresponding to all the target devices in the target device set, the playback screen information corresponding to the target video when each target device in the target device set collaboratively plays the target video.
[0098] In this embodiment, after obtaining the row and column of the target device corresponding to all the target devices in the target device set, for each target device in the target device set, the percentage of the screen of the target video played by the target device when all the target devices in the target device set cooperate to play the target video can be determined based on the row and column of the target device corresponding to the target device and the length and width of the target device. Therefore, based on the corresponding percentage of each target device, the corresponding playback screen information of each target device when the target video is played cooperatively is determined, and the playback screen information can be understood as the screen content in the screen of the target video being played.
[0099] Among them, in step S205, according to the display positions corresponding to all target devices in the target device set, the corresponding playback screen information when each target device in the target device set collaboratively plays the target video is determined, including:
[0100] Determine the target resolution corresponding to the collaboratively played target video according to the display positions corresponding to all target devices in the target device set;
[0101] For each target device in the target device set, determine the screen ratio corresponding to the target device co-playing the target video according to the target resolution and the display position corresponding to the target device;
[0102] For each target device in the target device set, the playback screen information corresponding to the target device when the target device collaboratively plays the target video is determined according to the screen ratio corresponding to the target device.
[0103] Specifically, the display position includes the row where the target device is located and the column where the target device is located. After determining the display position corresponding to each target device in the target device set, the length of each row of target devices and the width of each column of target devices can be determined according to the display positions corresponding to all target devices, thereby determining the target resolution when all target devices in the target device set collaboratively play the target video according to the length of each row of target devices and the width of each column of target devices. After obtaining the target resolution and the display position corresponding to each target device, the corresponding width and length can be determined based on the device properties of each target device, thereby determining the screen ratio corresponding to the collaborative playback of the target video by each target device according to the target resolution, the display position corresponding to each target device, and the width and length corresponding to each target device, and then determining the playback screen information corresponding to the collaborative playback of the target video by each target device based on the correspondence between the preset screen ratio and the playback screen information.
[0104] Wherein, determining the target resolution corresponding to the target video to be played according to the display positions corresponding to all target devices in the target device set includes:
[0105] According to the target device rows and target device columns corresponding to all target devices in the target device set, determine the sum of lengths of all target devices included in each row to obtain a first length corresponding to each row, and determine the sum of widths of all target devices included in each column to obtain a first width corresponding to each row;
[0106] Determine the largest first length from the first lengths corresponding to all rows, and determine the largest first width from the first widths corresponding to all columns;
[0107] The largest first width and the largest first length are used as the target resolution corresponding to the target video being played.
[0108] Specifically, the width and length corresponding to each target device in the target device set can be determined according to the device attributes of each target device in the target device set. Since the row and column of the target device corresponding to each target device in the target device set are determined, all target devices included in each row and all target devices included in each column can be determined when all target devices in the target device set cooperate to play the target video. After determining all target devices included in each row and all target devices included in each column, for each row, the length and length of all target devices in the row can be determined to obtain a first length, and for each column, the width and length of all target devices in the column can be determined to obtain a first width, and all the first lengths obtained are compared to obtain the maximum first length, and all the first widths obtained are compared to obtain the maximum first width, so that the maximum first length and the maximum first width are used as the target resolution corresponding to the target video.
[0109] S206: Send each playback screen information to the corresponding target device in the target device set, so that all target devices in the target device set play the target video in coordination.
[0110] In this embodiment, after determining the playback screen information corresponding to the collaborative playback of the target video by each target device in the target device set, the master target device in the target device set sends the playback screen information corresponding to the collaborative playback of the target video by each slave target device to the corresponding slave target device, thereby enabling the master target device and each slave target device in the target device set to achieve collaborative playback of the target video based on their respective corresponding playback screen information.
[0111] Specifically, after all target devices in the target device set play the target video in coordination, relevant personnel can splice the images played by each target device in the target device set to ensure the integrity of the played target video and increase the fun of the interaction.
[0112] The video playback method provided in this embodiment further includes the following steps after executing step S206:
[0113] In the process of all target devices in the target device set cooperating to play the target video, if a trigger operation for the target video played by the main target device is detected, a target request corresponding to the trigger operation is generated;
[0114] The target request is sent to each slave target device in the target device set, so that each slave target device performs a control operation corresponding to the trigger operation, thereby completing the playback control of the cooperatively played target video.
[0115] Among them, in order to ensure the consistency of the target video played in the target device set, in the process of all target devices in the target device set playing the target video in a coordinated manner, if the main target device detects the trigger operation of the target video played by the main target device, a target request corresponding to the trigger operation is generated. The trigger operation can be a pause operation, a fast forward operation, and a rewind operation, etc. The target request can be a pause request corresponding to the pause operation, a fast forward request corresponding to the fast forward operation, and a rewind request corresponding to the rewind operation, etc. After the main target device generates the target request corresponding to the trigger operation, the main target device can send the target request to other slave target devices in the target device set, so that each slave target device performs the control operation corresponding to the trigger operation, thereby completing the playback control of the target video played in a coordinated manner, thereby ensuring the consistency of the target video played in the target device set. Specifically, when the trigger operation is a pause operation, the control operation corresponding to the trigger operation is a pause operation; when the trigger operation is a fast forward operation, the control operation corresponding to the trigger operation is a fast forward operation; when the trigger operation is a rewind operation, the control operation corresponding to the trigger operation is a rewind operation.
[0116] A video playback method provided in this embodiment determines the display position of each device that collaboratively plays the target video when multiple devices collaboratively play the target video, and determines the playback screen information corresponding to each device when the target video is collaboratively played according to the display position of each device, thereby sending the determined playback screen information to the corresponding device to achieve collaborative playback of the target video through each device, avoiding the problem of difficulty in achieving synchronization when each device plays the same target video at the same time, and improving user experience and operability.
[0117] refer to Figure 3 , Figure 3 A structural diagram of a video playback device provided in an embodiment of the present application. A video playback device provided in an embodiment of the present application includes: a device determination module 10, a position determination module 20, a screen determination module 30 and a playback module 40. Among them, the device determination module 10 is used to determine the target device set corresponding to the target video when determining that the target video needs to be played, and all target devices in the target device set are used to collaboratively play the target video; the position determination module 20 is used to determine the display position corresponding to each of the target devices in the target device set; the screen determination module 30 is used to determine the playback screen information corresponding to each of the target devices in the target device set when the target video is collaboratively played according to the display position corresponding to all the target devices in the target device set; the playback module 40 is used to send each of the playback screen information to the corresponding target device in the target device set, so that all the target devices in the target device set collaboratively play the target video.
[0118] In this embodiment, the location determination module 20 is further used for:
[0119] Determine the sum of the numbers of all the target devices in the target device set to obtain a first number;
[0120] Determine, according to the first number, a target number of rows and a target number of columns required for all the target devices in the target device set to collaboratively play the target video;
[0121] All the target devices in the target device set are arranged based on the target number of rows and the target number of columns to determine a display position corresponding to each target device in the target device set.
[0122] In this embodiment, the target device set includes a master target device and a plurality of slave target devices; the location determination module 20 is further used for:
[0123] Determining, according to the first quantity, a target value that satisfies a first preset condition, wherein the first preset condition includes that the first quantity is less than or equal to the square of the target value and the first quantity is closest to the square of the target value;
[0124] The target values are respectively used as the target number of rows and the target number of columns required for all the target devices in the target device set to collaboratively play the target video.
[0125] In this embodiment, the location determination module 20 is further used for:
[0126] Taking the main target device as a starting device, arranging the target devices in the target device set in sequence according to the target number of rows and the target number of columns, so as to obtain an arrangement order among all the target devices in the target device set;
[0127] According to the arrangement sequence, a display position corresponding to each target device in the target device set is determined.
[0128] In this embodiment, the picture determination module 30 is further used for:
[0129] Determining a target resolution corresponding to collaboratively playing the target video according to the display positions corresponding to all the target devices in the target device set;
[0130] For each of the target devices in the target device set, determining a screen ratio corresponding to the target device co-playing the target video according to the target resolution and the display position corresponding to the target device;
[0131] For each of the target devices in the target device set, the playback screen information corresponding to when the target device collaboratively plays the target video is determined according to the screen ratio corresponding to the target device.
[0132] In this embodiment, the display position includes the row where the target device is located and the column where the target device is located; the picture determination module 30 is further used to:
[0133] According to the rows and columns of the target devices corresponding to all the target devices in the target device set, determining the sum of the lengths of all the target devices included in each row to obtain a first length corresponding to each row, and determining the sum of the widths of all the target devices included in each column to obtain a first width corresponding to each row;
[0134] Determine the largest first length from the first lengths corresponding to all rows, and determine the largest first width from the first widths corresponding to all columns;
[0135] The largest first width and the largest first length are used as the target resolution corresponding to playing the target video.
[0136] In this embodiment, the target device set includes a master target device and multiple slave target devices, and the playback module 40 is further used for:
[0137] In the process of all the target devices in the target device set collaboratively playing the target video, if a trigger operation for the target video played by the main target device is detected, a target request corresponding to the trigger operation is generated;
[0138] The target request is sent to each of the slave target devices in the target device set, so that each of the slave target devices executes a control operation corresponding to the trigger operation, thereby completing the playback control of the cooperatively played target video.
[0139] In this embodiment, the device determination module 10 is further configured to:
[0140] If all preset devices in the preset device set have enabled the collaborative playback function and are connected to the same wireless network, any preset device in the preset device set is selected as the main target device, and the main target device establishes a link with each preset device in the preset device set except the main target device through the wireless network, and all the preset devices in the preset device set are used to collaboratively play the target video;
[0141] Determine all the preset devices that have successfully established a link with the master target device, and determine each of the preset devices that have successfully established a link with the master target device as a slave target device;
[0142] The main target device and all the determined slave target devices are determined as a target device set corresponding to the target video.
[0143] A video playback device provided in this embodiment determines the display position of each device that collaboratively plays the target video when multiple devices collaboratively play the target video, and determines the playback screen information corresponding to each device when the target video is collaboratively played according to the display position of each device, thereby sending the determined playback screen information to the corresponding device to achieve collaborative playback of the target video through each device, thereby avoiding the problem of difficulty in achieving synchronization when each device plays the same target video at the same time, and improving user experience and operability.
[0144] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 The electronic device 400 shown includes: at least one processor 401, a memory 402, at least one network interface 404 and other user interfaces 403. The various components in the electronic device 400 are coupled together via a bus system 405. It is understood that the bus system 405 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 405 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 405 is not shown in FIG. Figure 4 Various buses are labeled as bus system 405 .
[0145] The user interface 403 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0146] It can be understood that the memory 402 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 402 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0147] In some implementations, the memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 4021 and application programs 4022 .
[0148] Among them, the operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 4022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 4022.
[0149] In the embodiment of the present application, by calling the program or instructions stored in the memory 402, specifically, the program or instructions stored in the application 4022, the processor 401 is used to execute the method steps provided by each method embodiment.
[0150] The method disclosed in the above embodiment of the present application can be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 401 or the instruction in the form of software. The above processor 401 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 402, and the processor 401 reads the information in the memory 402 and completes the steps of the above method in combination with its hardware.
[0151] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0152] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0153] The electronic device provided in this embodiment may be Figure 4 The electronic device shown in FIG. 1 may perform the following steps: Figure 1 and Figure 2 All steps of the video playback method in the Figure 1 and Figure 2 For technical effects of the video playback method shown, please refer to Figure 1 and Figure 2 For the sake of brevity, the relevant description is not repeated here.
[0154] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0155] When one or more programs in the storage medium can be executed by one or more processors, the video playback method executed on the video playback device side can be implemented.
[0156] The processor is used to execute the video playback program stored in the memory to implement the following steps of the video playback method executed on the video playback device side.
[0157] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0158] It should be noted that the phrases "one implementation", "an embodiment", "an exemplary embodiment", "some embodiments", etc. mentioned in the specification indicate that the described embodiments may include certain features, structures or characteristics, but not every embodiment may include the certain features, structures or characteristics. In addition, such phrases do not necessarily refer to the same embodiment. In addition, when describing certain features, structures or characteristics in conjunction with an embodiment, it is within the knowledge of those skilled in the art to implement such features, structures or characteristics in conjunction with other embodiments, whether explicitly or not explicitly described.
[0159] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0160] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A video playback method, characterized in that: include: When it is determined that a target video needs to be played, a target device set corresponding to the target video is determined, and all target devices in the target device set are used to collaboratively play the target video; Determine a display position corresponding to each of the target devices in the target device set; Determining, according to the display positions corresponding to all the target devices in the target device set, playback screen information corresponding to when each of the target devices in the target device set collaboratively plays the target video; Each of the playback screen information is sent to the corresponding target device in the target device set, so that all the target devices in the target device set can collaboratively play the target video.
2. The method according to claim 1, characterized in that The determining a placement position corresponding to each of the target devices in the target device set includes: Determine the sum of the numbers of all the target devices in the target device set to obtain a first number; Determine, according to the first number, a target number of rows and a target number of columns required for all the target devices in the target device set to collaboratively play the target video; All the target devices in the target device set are arranged based on the target number of rows and the target number of columns to determine a display position corresponding to each target device in the target device set.
3. The method according to claim 2, characterized in that The target device set includes a master target device and a plurality of slave target devices; The determining, according to the first number, a target number of rows and a target number of columns required for all the target devices in the target device set to collaboratively play the target video includes: Determining, according to the first quantity, a target value that satisfies a first preset condition, wherein the first preset condition includes that the first quantity is less than or equal to the square of the target value and the first quantity is closest to the square of the target value; The target values are respectively used as the target number of rows and the target number of columns required for all the target devices in the target device set to collaboratively play the target video; The arranging all the target devices in the target device set based on the target number of rows and the target number of columns to determine a display position corresponding to each of the target devices in the target device set includes: Taking the main target device as a starting device, arranging the target devices in the target device set in sequence according to the target number of rows and the target number of columns, so as to obtain an arrangement order among all the target devices in the target device set; According to the arrangement sequence, a display position corresponding to each target device in the target device set is determined.
4. The method according to claim 1, characterized in that: The determining, according to the display positions corresponding to all the target devices in the target device set, the playback screen information corresponding to when each of the target devices in the target device set collaboratively plays the target video includes: Determining a target resolution corresponding to collaboratively playing the target video according to the display positions corresponding to all the target devices in the target device set; For each of the target devices in the target device set, determining a screen ratio corresponding to the target device co-playing the target video according to the target resolution and the display position corresponding to the target device; For each of the target devices in the target device set, the playback screen information corresponding to when the target device collaboratively plays the target video is determined according to the screen ratio corresponding to the target device.
5. The method according to claim 4, characterized in that The display position includes the row where the target device is located and the column where the target device is located; The determining, according to the display positions corresponding to all the target devices in the target device set, a target resolution corresponding to the coordinated playback of the target video includes: According to the rows and columns of the target devices corresponding to all the target devices in the target device set, determining the sum of the lengths of all the target devices included in each row to obtain a first length corresponding to each row, and determining the sum of the widths of all the target devices included in each column to obtain a first width corresponding to each row; Determine the largest first length from the first lengths corresponding to all rows, and determine the largest first width from the first widths corresponding to all columns; The largest first width and the largest first length are used as the target resolution corresponding to the coordinated playback of the target video.
6. The method according to claim 1, characterized in that The target device set includes a master target device and a plurality of slave target devices; After executing the step of all the target devices in the target device set collaboratively playing the target video, the method further includes: In the process of all the target devices in the target device set collaboratively playing the target video, if a trigger operation for the target video played by the main target device is detected, a target request corresponding to the trigger operation is generated; The target request is sent to each of the slave target devices in the target device set, so that each of the slave target devices executes a control operation corresponding to the trigger operation, thereby completing the playback control of the cooperatively played target video.
7. The method according to claim 1, characterized in that The target device set includes a master target device and a plurality of slave target devices; The determining a target device set corresponding to the target video includes: If all preset devices in the preset device set have enabled the collaborative playback function and are connected to the same wireless network, any preset device in the preset device set is selected as the main target device, and the main target device establishes a link with each preset device in the preset device set except the main target device through the wireless network, and all the preset devices in the preset device set are used to collaboratively play the target video; Determine all the preset devices that have successfully established a link with the master target device, and determine each of the preset devices that have successfully established a link with the master target device as a slave target device; The main target device and all the determined slave target devices are determined as a target device set corresponding to the target video.
8. A video playback device, characterized in that: include: A device determination module, used to determine a target device set corresponding to the target video when it is determined that the target video needs to be played, and all target devices in the target device set are used to collaboratively play the target video; A position determination module, used to determine a display position corresponding to each target device in the target device set; A screen determination module, configured to determine, according to the display positions corresponding to all the target devices in the target device set, playback screen information corresponding to when each of the target devices in the target device set collaboratively plays the target video; The playing module is used to send each of the playing picture information to the corresponding target device in the target device set, so that all the target devices in the target device set can play the target video in coordination.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a video playback program stored in the memory to implement the video playback method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the video playback method according to any one of claims 1 to 7.