Video publishing method and device, medium, electronic equipment and program product
Patent Information
- Application Number
- CN202510565255.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2026-10-30
AI Technical Summary
其中,有些情况下的尝试执行可能是无效的,这样,不仅无法保证视频成功发布,多次尝试还会占用大量资源
[0009]在上述技术方案中,当第一视频的发布流程中的第一流程节点执行失败时,获取当前网络状态,若当前网络状态为无网状态,则重复执行获取当前网络状态的步骤,直到当前网络状态从无网状态切换为有网状态时为止,之后,若第一流程节点的重新执行次数小于预设执行次数阈值,则重新执行上述第一流程节点。这样,可以在无网状态时,暂停重新执行依赖于网络的第一流程节点,而是等到网络恢复时再重新执行第一流程节点,由此,可以避免无网状态下第一流程节点的无效重试,从而提升网络异常状态下视频发布的成功率,增强用户体验,并且,可以避免多次无效重试导致的资源占用。另外,限制第一流程节点的重新执行次数,可以避免视频发布时长过长而影响用户体验的问题。
Smart Images

Figure CN123020920A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a video publishing method, apparatus, medium, electronic device, and program product. Background Technology
[0002] In video-based social applications, the publishing process typically involves multiple nodes, such as the composition node, the authentication (authkey) node, the upload node, and the distribution node. Some nodes, such as the authkey, upload, and distribution nodes, often attempt to be re-executed multiple times if they fail. In some cases, these attempts may be ineffective, thus not only failing to guarantee successful video publishing but also consuming significant resources with repeated attempts. Summary of the Invention
[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] Firstly, this disclosure provides a video publishing method, including: In response to the detection that the first process node in the publishing process of the first video has failed, the current network status is obtained, wherein the execution of the first process node depends on the network. If the current network state is no network, the step of obtaining the current network state is repeated until the current network state changes from no network to network. If the current network state switches from the no-network state to the network-enabled state, then the first process node is re-executed if the number of re-executions of the first process node is less than the preset execution number threshold corresponding to the first process node.
[0005] Secondly, this disclosure provides a video publishing device, including: The first acquisition module is used to acquire the current network status in response to the detection that the first process node in the publishing process of the first video has failed to execute, wherein the execution of the first process node depends on the network. The first triggering module is used to trigger the first acquisition module to acquire the current network status if the current network status is a no-network status, until the current network status switches from the no-network status to the network-enabled status; The control module is configured to re-execute the first process node if the current network state switches from the no-network state to the network-enabled state, and the number of times the first process node is re-executed is less than the preset execution number threshold corresponding to the first process node.
[0006] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the video publishing method provided in the first aspect of this disclosure.
[0007] Fourthly, this disclosure provides an electronic device, comprising: A storage device on which computer programs are stored; A processing device is configured to execute the computer program in the storage device to implement the steps of the video publishing method provided in the first aspect of this disclosure.
[0008] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the video publishing method provided in the first aspect of this disclosure.
[0009] In the above technical solution, when the first process node in the first video publishing process fails, the current network status is obtained. If the current network status is offline, the step of obtaining the current network status is repeated until the current network status changes from offline to online. Afterward, if the number of re-executions of the first process node is less than a preset execution threshold, the first process node is re-executed. This allows for pausing the re-execution of network-dependent first process nodes when there is no network, waiting until the network is restored before re-executing them. This avoids invalid retries of the first process node in offline conditions, thereby improving the success rate of video publishing under abnormal network conditions, enhancing user experience, and avoiding resource consumption caused by multiple invalid retries. Furthermore, limiting the number of re-executions of the first process node can prevent the video publishing time from becoming too long and affecting user experience.
[0010] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0011] 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. In the drawings: Figure 1 This is a schematic diagram of the video publishing process in related technologies.
[0012] Figure 2 This is a diagram based on video publishing scenarios in related technologies.
[0013] Figure 3 This is a flowchart illustrating a video publishing method according to an exemplary embodiment.
[0014] Figure 4 This is a schematic diagram illustrating offline video publishing according to an exemplary embodiment.
[0015] Figure 5 This is a schematic diagram illustrating video publishing during a cold restart retry according to an exemplary embodiment.
[0016] Figure 6 This is a diagram illustrating the process of canceling video publishing in related technologies.
[0017] Figure 7 This is a schematic diagram illustrating the cancellation of video publishing according to an exemplary embodiment.
[0018] Figure 8 This is a flowchart illustrating a video publishing method according to another exemplary embodiment.
[0019] Figure 9 This is a block diagram illustrating a video publishing device according to an exemplary embodiment.
[0020] Figure 10 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment. Detailed Implementation
[0021] 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.
[0022] 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.
[0023] 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.
[0024] 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.
[0025] 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".
[0026] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0027] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0028] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0029] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0030] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0031] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0032] In video-based social applications, the video posting process typically includes multiple steps, such as... Figure 1 As shown, the video publishing process includes a synthesis node, an authentication (authkey) node, an upload node, and a distribution node. The synthesis node combines user videos or images; the authkey node requests upload information and authentication to confirm which server the video will be uploaded to and obtains the key of the server receiving the video upload; the upload node uploads images or videos to the server; and the distribution node distributes the upload results, where the upload result is the link address of the currently published video.
[0033] Among them, the authkey process node, upload process node, and distribution process node are all network-dependent process nodes. This disclosure refers to the network-dependent process node as the first process node. That is, the execution of the first process node depends on the network. When the first process node fails to execute, it typically attempts to re-execute (i.e., retry) multiple times (e.g., ...). Figure 1 (As shown in the diagram, 5 times), and retrying is still performed even without a network connection. If any first-process node exceeds the retry limit, that first-process node will fail, causing the video publishing to fail and ending the entire video publishing process. Figure 1 and Figure 2 As shown, when video publishing fails, a failure pop-up window can be displayed, allowing the user to click the retry button to try re-execute the first video publishing process. However, when there is no network connection, retrying the first process node is ineffective and will consume retry attempts. Exceeding the retry limit will not only cause video publishing to fail, but multiple attempts will also consume a large amount of resources.
[0034] In view of this, the present disclosure provides a video publishing method, apparatus, medium, electronic device and program product.
[0035] Figure 3 This is a flowchart illustrating a video publishing method according to an exemplary embodiment. Figure 3 As shown, the video publishing method may include the following S101~S107.
[0036] In S101, in response to the detection that the first process node in the first video publishing process has failed, the current network status is obtained.
[0037] In this disclosure, the video publishing method described above can be applied to terminal devices such as tablets and smartphones. The publishing process of the first video to be published includes multiple process nodes, wherein the first process node is the process node that depends on the network for execution among the multiple process nodes. The first video may include one video frame (i.e., one image) or multiple video frames; this disclosure does not specifically limit this. The first process node can be... Figure 1 The above describes any one of the following process nodes: authkey, upload, and distribution. The upload process node is used to upload the first video to the server. The distribution process node is used to distribute the link address of the first video on the server. The authkey process node is used to request the upload information and authentication of the first video to confirm which server the first video was uploaded to and to obtain the key of the server receiving the first video upload.
[0038] In S102, determine whether the current network status is a no-network state.
[0039] The current network status can include both connected and disconnected states. For example... Figure 4 and Figure 8 As shown, if the current network status is offline, to avoid invalid retries in the offline state, a offline retry hold logic can be executed. This means pausing the retry of the first process node and waiting for the network to recover before re-executing the first process node to continue publishing the video. Specifically, the current network status is continuously monitored until it switches from offline to online, i.e., executing S103 and S104 below. When the first process node fails, if the current network status is online, to avoid excessively long video publishing times affecting user experience, the number of re-executions of the first process node (i.e., the number of retries) can be limited. In this case, S105 below can be executed.
[0040] In S103, obtain the current network status.
[0041] In S104, it is determined whether the current network state has switched from no network state to network state.
[0042] If the current network status is still offline, that is, the current network status has not switched from offline to online, then continue to monitor the current network status, that is, return to S103 above; when the current network status switches from offline to online, in order to avoid the video publishing time being too long and affecting the user experience, the number of times the first process node is re-executed (i.e., the number of retries) can be limited. At this time, the following S105 can be executed.
[0043] In S105, it is determined whether the number of times the first process node is re-executed is less than the preset execution number threshold corresponding to the first process node.
[0044] In S106, the first process node is re-executed.
[0045] In S107, the first video release ended.
[0046] like Figure 8 As shown, when the execution of the first process node fails, a no-network retry hold logic can be executed. Specifically, it first determines whether there is a network connection, i.e., whether the current network status is a network connection. If the current network status is a network connection, the number of times the first process node can be re-executed can be obtained. Then, it is determined whether the number of times the first process node can be re-executed is less than the preset execution count threshold corresponding to the first process node. If the number of times the first process node can be re-executed is less than the preset execution count threshold corresponding to the first process node ( Figure 8 (Taking 5 retry attempts as an example), the first process node can be re-executed, i.e., S106 is executed. If the number of retry attempts for the first process node is equal to the preset execution threshold for the first process node, it indicates that the retry limit has been exceeded. In this case, the first video publishing ends, i.e., S107 is executed. If the current network status is no network, wait for the network to recover and then obtain the number of retry attempts for the first process node. If the number of retry attempts for the first process node is less than the preset execution threshold for the first process node, the first process node can be re-executed, i.e., S106 is executed. If the number of retry attempts for the first process node is equal to the preset execution threshold for the first process node, it indicates that the retry limit has been exceeded. In this case, the first video publishing ends, i.e., S107 is executed.
[0047] Additionally, the timing for attempting to re-execute can be determined based on the current network status, i.e., executing the above-mentioned S101; if the number of re-executions of the first process node is equal to the preset execution count threshold corresponding to the first process node, then the first video publishing ends. Different preset execution count thresholds can be set for different first process nodes. For example, the preset execution count threshold for the upload process node is 5 times, and the preset execution count threshold for the distribution process node is preset to 6 times. Alternatively, the preset execution count threshold for each first process node can be set to the same value; this disclosure does not impose specific limitations.
[0048] In the above technical solution, when the first process node in the first video publishing process fails, the current network status is obtained. If the current network status is offline, the step of obtaining the current network status is repeated until the current network status changes from offline to online. Afterwards, if the number of re-executions of the first process node is less than a preset execution threshold, the first process node is re-executed. This allows for pausing the re-execution of network-dependent first process nodes when there is no network, waiting until the network is restored before re-executing them. This avoids invalid retries of the first process node in offline conditions, thereby improving the success rate of video publishing under abnormal network conditions, enhancing user experience, and avoiding resource consumption caused by multiple invalid retries. Furthermore, limiting the number of re-executions of the first process node can prevent the video publishing time from becoming too long and affecting user experience.
[0049] When the first process node mentioned above is an upload process node, the video publishing method may also include the following steps: In response to the detection of upload process node execution failure, obtain the first reason for the upload process node execution failure; If the first reason is a preset reason, then increase the preset execution number threshold corresponding to the upload process node to obtain a new preset execution number threshold; At this point, the step of re-executing the first process node if the number of re-executions is less than the preset execution threshold corresponding to the first process node may include: If the number of re-executions is less than the new preset execution threshold, then the step of re-executing the first process node will be executed.
[0050] In weak network conditions, the upload process takes longer, and unstable network connections can lead to increased upload failures and fewer retries, impacting video publishing success rates. To address this, when the upload failure reason is a preset reason, the threshold for the number of executions corresponding to that node can be appropriately increased to improve the video publishing success rate. Preset reasons can include network fluctuations, server malfunctions, etc.
[0051] Specifically, the preset execution count threshold corresponding to the upload process node can be increased in various ways to obtain a new preset execution count threshold. In one implementation, regardless of which preset cause the first cause belongs to, the preset execution count threshold corresponding to the upload process node is increased by a preset number (e.g., 5 times).
[0052] In another implementation, to improve the flexibility and success rate of video publishing, different threshold adjustment values can be set for different reasons. Specifically, a first adjustment value corresponding to the first reason can be determined based on a pre-established correspondence between reasons and adjustment values, wherein the adjustment value is a natural number not less than 1; then, the preset execution count threshold corresponding to the upload process node is increased by the first adjustment value to obtain a new preset execution count threshold.
[0053] like Figure 2 As shown, if the video publishing time is long, the user can exit the video publishing application (i.e., the first application below) or the first application may crash before the video publishing result appears. In this case, the publishing process of the first video is interrupted. Afterwards, the user can cold restart and retry publishing the video. Then, the publishing process of the first video will enter the publishing progress before exiting the first application. In related technologies, the number of cold restart retries of the first application (i.e., the number of times the first application is cold started) is counted in the number of retries (i.e., the number of re-executions) of the upload process node. This may reduce the success rate of video publishing. In order to improve the success rate of video publishing, such as Figure 5 and Figure 8 As shown, the number of cold start retries and the number of retries at each node in the upload process can be calculated separately. This increases the probability that users will see the video being published. Specifically, the above video publishing method may also include the following steps: If a cold start of the first application is detected during the execution of the first video's publishing process, then the number of cold starts of the first application during the execution of the publishing process is obtained; If the number of cold starts of the first application during the release process is less than the preset cold start threshold, then the first application is controlled to execute the second process node, wherein the second process node is the process node that the first application was executing before the cold start.
[0054] like Figure 8 As shown, if the number of cold starts of the first application during the execution of the release process is equal to the preset cold start threshold, then the first video release will end.
[0055] The first application is the application upon which the publishing process of the first video relies. If the number of cold starts of the first application during the publishing process is less than a preset cold start threshold, the publishing process of the first video can continue, i.e., the first application can execute the process nodes that were being executed before the cold start. Or, as... Figure 8 As shown, if the number of cold starts of the first application during the execution of the release process is less than the preset cold start threshold, the release process of the first video can be restarted.
[0056] To allow users to track the release progress of their first video in real time, the release progress can be displayed during the video's publication process. Specifically, the above video publishing method can also include the following steps: During the first video release process, a release indicator is displayed in real time.
[0057] The publishing identifier is used to indicate the publishing progress of the first video, such as an identifier indicating that the first video is being published but has not yet finished publishing, such as a publishing icon, a "Publishing" identifier, a "Publishing Now" identifier, and / or the publishing progress value of the first video (e.g., Figure 4 and Figure 5 (as shown in the image) etc.
[0058] like Figure 6 As shown, after the first video publishing begins, if a user wants to cancel the publishing process, the video publishing duration must exceed a preset duration, and the current process node must be a prerequisite node for the upload process node, meaning the current video process node is an authentication process node, indicating that the first video publishing process has not yet entered the upload process. Thus, after video publishing begins, it is difficult for users to cancel the publishing process. If the user repeatedly exits the first application or clears its data, the publishing status will be lost, affecting the user's video publishing experience. To improve the user's video publishing experience, in the scenario of cold restarting and retrying video publishing, users can be allowed to directly cancel the publishing. Specifically, the above video publishing method can also include the following steps: In response to receiving an operation instruction for the publishing identifier, determine whether the first application has experienced a cold start during the publishing process of the first video; If a cold start occurs during the execution of the first application's first video publishing process, a first pop-up window is generated, which includes a control for canceling the publishing of the first video. If the first application has not experienced a cold start during the execution of the first video publishing process, a second pop-up window is generated. The second pop-up window is used to prompt the user that the current publishing process cannot be canceled.
[0059] During the video publishing process, such as Figure 7 and Figure 8 As shown, if a user wants to cancel the publishing process of the first video, they can do so by clicking or double-clicking the publishing identifier 11. This will trigger an operation command for the publishing identifier 11. After receiving the operation command, the terminal device can first determine whether the first application has experienced a cold start during the execution of the publishing process of the first video. If the first application has experienced a cold start during the execution of the publishing process of the first video, the first pop-up window 12 will be displayed directly. At this time, the user can click the "Yes" button in the first pop-up window 12 to cancel the video publishing.
[0060] In related technologies, if the upload process node succeeds but the distribution process node fails, the upload process node will still be re-executed during the next retry, which undoubtedly increases the user's network cost and reduces the probability of successful retry. To reduce network failures and improve the success rate and efficiency of video publishing, the upload result can be cached after the first video upload is successful. This way, if the distribution process node fails or succeeds, the upload process node can be skipped, and the distribution process node can be executed directly. Specifically, when the first process node is the distribution process node, the above video publishing method can also include the following steps: In response to receiving a link address from the server, cache the link address, which is sent by the server when the first video is successfully uploaded to the server; The above S106 may include: Retrieve the cached link address; Based on the cached link address, the distribution process node is re-executed.
[0061] Figure 9 This is a block diagram illustrating a video publishing device according to an exemplary embodiment. Figure 9 As shown, the video publishing device 300 includes: The first acquisition module 301 is used to acquire the current network status in response to the detection that the first process node in the publishing process of the first video has failed to execute, wherein the execution of the first process node depends on the network. The first triggering module 302 is used to trigger the first acquisition module 301 to acquire the current network status if the current network status is a no-network status, until the current network status switches from the no-network status to the network-enabled status; The control module 303 is configured to re-execute the first process node if the current network state switches from the no-network state to the network-enabled state, and the number of re-executions of the first process node is less than the preset execution number threshold corresponding to the first process node.
[0062] In the above technical solution, when the first process node in the first video publishing process fails, the current network status is obtained. If the current network status is offline, the step of obtaining the current network status is repeated until the current network status changes from offline to online. Afterward, if the number of re-executions of the first process node is less than a preset execution threshold, the first process node is re-executed. This allows for pausing the re-execution of network-dependent first process nodes when there is no network, waiting until the network is restored before re-executing them. This avoids invalid retries of the first process node in offline conditions, thereby improving the success rate of video publishing under abnormal network conditions, enhancing user experience, and avoiding resource consumption caused by multiple invalid retries. Furthermore, limiting the number of re-executions of the first process node can prevent the video publishing time from becoming too long and affecting user experience.
[0063] Optionally, the control module 303 is further configured to re-execute the first process node if the current network state is the network-enabled state and the number of re-executions is less than the preset execution count threshold.
[0064] Optionally, the first process node is an upload process node, wherein the upload process node is used to upload the first video to the server; The video publishing device 300 also includes: The second acquisition module is used to acquire the first reason for the failure of the upload process node in response to the detection that the upload process node has failed. The threshold adjustment module is used to increase the preset execution count threshold if the first reason belongs to a preset reason, so as to obtain a new preset execution count threshold. The second triggering module is used to execute the step of re-executing the first process node if the number of re-executions is less than the new preset execution number threshold.
[0065] Optionally, the threshold adjustment module includes: The determination submodule is used to determine the first adjustment value corresponding to the first cause based on the pre-established correspondence between the cause and the adjustment value, wherein the adjustment value is a natural number not less than 1; The adjustment submodule is used to increase the preset execution count threshold by the first adjustment value to obtain the new preset execution count threshold.
[0066] Optionally, the video publishing device 300 further includes: The third acquisition module is used to acquire the number of times the first application has been cold-started during the execution of the release process if a cold start of the first application is detected during the execution of the release process, wherein the first application is the application on which the release process is based; The control module 303 is further configured to control the first application to execute a second process node if the number of cold starts is less than a preset cold start threshold, wherein the second process node is the process node that the first application was executing before the cold start.
[0067] Optionally, the video publishing device 300 further includes: During the first video publishing process, a publishing indicator is displayed in real time, wherein the publishing indicator is used to indicate the publishing progress of the first video.
[0068] Optionally, the video publishing device 300 further includes: The determination module is configured to, in response to receiving an operation instruction for the release identifier, determine whether the first application has experienced a cold start during the execution of the release process, wherein the first application is the application on which the release process relies; The generation module is configured to generate a first pop-up window if the first application experiences a cold start during the execution of the publishing process, wherein the first pop-up window includes a control for canceling the publishing of the first video.
[0069] Optionally, the first process node is a distribution process node, wherein the distribution process node is used to distribute the link address of the first video on the server. The video publishing device 300 also includes: A caching module is configured to cache the link address in response to receiving the link address sent by the server, wherein the link address is sent by the server when the first video is successfully uploaded to the server; The control module 303 includes: The `get` submodule is used to retrieve the cached link address; The control submodule is used to re-execute the distribution process node based on the link address.
[0070] This disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the video publishing method described above.
[0071] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the video publishing method described above.
[0072] The following is for reference. Figure 9 The diagram illustrates a structural schematic of an electronic device (e.g., a terminal device) 600 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure 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), in-vehicle terminals (e.g., in-vehicle navigation terminals), and 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.
[0073] like Figure 9 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0074] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 An electronic device 600 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.
[0075] 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 a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0076] 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), 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 conjunction 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. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can 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.
[0077] In some implementations, the client 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), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0078] 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.
[0079] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device: in response to detecting that the execution of a first process node in the first video publishing process has failed, obtains the current network status, wherein the execution of the first process node depends on the network; if the current network status is a no-network state, the step of obtaining the current network status is repeated until the current network status switches from the no-network state to the network state; if the current network status switches from the no-network state to the network state, the first process node is re-executed if the number of re-executions of the first process node is less than a preset execution number threshold corresponding to the first process node.
[0080] 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).
[0081] 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.
[0082] The modules described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the modules do not necessarily limit the module itself; for example, the first acquisition module can also be described as "a module that acquires the current network status in response to detecting a failure in the execution of a first process node in the publishing process of the first video."
[0083] 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 arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0084] 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.
[0085] According to one or more embodiments of this disclosure, Example 1 provides a video publishing method, including: In response to the detection that the first process node in the publishing process of the first video has failed, the current network status is obtained, wherein the execution of the first process node depends on the network. If the current network state is no network, the step of obtaining the current network state is repeated until the current network state changes from no network to network. If the current network state switches from the no-network state to the network-enabled state, then the first process node is re-executed if the number of re-executions of the first process node is less than the preset execution number threshold corresponding to the first process node.
[0086] According to one or more embodiments of this disclosure, Example 2 provides the method of Example 1, the method further comprising: If the current network status is "on network", then the first process node is re-executed when the number of re-executions is less than the preset execution number threshold.
[0087] According to one or more embodiments of this disclosure, Example 3 provides the method of Example 1, wherein the first process node is an upload process node, and the upload process node is used to upload the first video to the server; The method further includes: In response to the detection that the upload process node has failed, the first reason for the failure of the upload process node is obtained; If the first reason is a preset reason, then the preset execution count threshold is increased to obtain a new preset execution count threshold; The step of re-executing the first process node if the number of re-executions is less than the preset execution number threshold corresponding to the first process node includes: If the number of re-executions is less than the new preset execution number threshold, then the step of re-executing the first process node is performed.
[0088] According to one or more embodiments of this disclosure, Example 4 provides the method of Example 3, wherein increasing the preset execution count threshold to obtain a new preset execution count threshold includes: Based on the pre-established correspondence between causes and adjustment values, a first adjustment value corresponding to the first cause is determined, wherein the adjustment value is a natural number not less than 1; The preset execution count threshold is increased by the first adjustment value to obtain the new preset execution count threshold.
[0089] According to one or more embodiments of this disclosure, Example 5 provides the method of Example 1, the method further comprising: If a cold start of the first application is detected during the execution of the release process, the number of cold starts of the first application during the execution of the release process is obtained, wherein the first application is the application on which the release process is based; If the number of cold starts is less than a preset cold start threshold, then the first application is controlled to execute a second process node, wherein the second process node is the process node that the first application was executing before the cold start.
[0090] According to one or more embodiments of this disclosure, Example 6 provides the method of Example 1, the method further comprising: During the first video publishing process, a publishing indicator is displayed in real time, wherein the publishing indicator is used to indicate the publishing progress of the first video.
[0091] According to one or more embodiments of this disclosure, Example 7 provides the method of Example 6, the method further comprising: In response to receiving an operation instruction for the release identifier, determine whether the first application has experienced a cold start during the execution of the release process, wherein the first application is the application on which the release process relies; If the first application experiences a cold start during the execution of the publishing process, a first pop-up window is generated, wherein the first pop-up window includes a control for canceling the publishing of the first video.
[0092] According to one or more embodiments of this disclosure, Example 8 provides the method of Example 1, wherein the first process node is a distribution process node, and the distribution process node is used to distribute the link address of the first video on the server. The method further includes: In response to receiving the link address sent by the server, the link address is cached, wherein the link address is sent by the server when the first video is successfully uploaded to the server; The re-execution of the first process node includes: Retrieve the cached link address; Based on the link address, the distribution process node is re-executed.
[0093] According to one or more embodiments of this disclosure, Example 9 provides a video publishing apparatus, including: The first acquisition module is used to acquire the current network status in response to the detection that the first process node in the publishing process of the first video has failed to execute, wherein the execution of the first process node depends on the network. The first triggering module is used to trigger the first acquisition module to acquire the current network status if the current network status is a no-network status, until the current network status switches from the no-network status to the network-enabled status; The control module is configured to re-execute the first process node if the current network state switches from the no-network state to the network-enabled state, and the number of times the first process node is re-executed is less than the preset execution number threshold corresponding to the first process node.
[0094] According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the steps of the method described in any one of Examples 1-8.
[0095] According to one or more embodiments of this disclosure, Example 11 provides an electronic device, including: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of any one of the methods in Examples 1-8.
[0096] According to one or more embodiments of the present disclosure, Example 12 provides a computer program product including a computer program that, when executed by a processor, implements the steps of the method described in any one of Examples 1-8.
[0097] 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.
[0098] 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.
[0099] 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 forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
Claims
1. A video publishing method, characterized in that, include: In response to the detection that the first process node in the publishing process of the first video has failed, the current network status is obtained, wherein the execution of the first process node depends on the network. If the current network state is no network, the step of obtaining the current network state is repeated until the current network state changes from no network to network. If the current network state switches from the no-network state to the network-enabled state, then the first process node is re-executed if the number of re-executions of the first process node is less than the preset execution number threshold corresponding to the first process node.
2. The method according to claim 1, characterized in that, The method further includes: If the current network status is "on network", then the first process node is re-executed when the number of re-executions is less than the preset execution number threshold.
3. The method according to claim 1, characterized in that, The first process node is an upload process node, wherein the upload process node is used to upload the first video to the server; The method further includes: In response to the detection that the upload process node has failed, the first reason for the failure of the upload process node is obtained; If the first reason is a preset reason, then the preset execution count threshold is increased to obtain a new preset execution count threshold; The step of re-executing the first process node if the number of re-executions is less than the preset execution number threshold corresponding to the first process node includes: If the number of re-executions is less than the new preset execution threshold, then the first process node is re-executed.
4. The method according to claim 3, characterized in that, Increasing the preset execution count threshold to obtain a new preset execution count threshold includes: Based on the pre-established correspondence between causes and adjustment values, a first adjustment value corresponding to the first cause is determined, wherein the adjustment value is a natural number not less than 1; The preset execution count threshold is increased by the first adjustment value to obtain the new preset execution count threshold.
5. The method according to claim 1, characterized in that, The method further includes: If a cold start of the first application is detected during the execution of the release process, the number of cold starts of the first application during the execution of the release process is obtained, wherein the first application is the application on which the release process is based; If the number of cold starts is less than a preset cold start threshold, then the first application is controlled to execute a second process node, wherein the second process node is the process node that the first application was executing before the cold start.
6. The method according to claim 1, characterized in that, The method further includes: During the first video publishing process, a publishing indicator is displayed in real time, wherein the publishing indicator is used to indicate the publishing progress of the first video.
7. The method according to claim 6, characterized in that, The method further includes: In response to receiving an operation instruction for the release identifier, determine whether the first application has experienced a cold start during the execution of the release process, wherein the first application is the application on which the release process relies; If the first application experiences a cold start during the execution of the publishing process, a first pop-up window is generated, wherein the first pop-up window includes a control for canceling the publishing of the first video.
8. The method according to claim 1, characterized in that, The first process node is a distribution process node, wherein the distribution process node is used to distribute the link address of the first video on the server. The method further includes: In response to receiving the link address sent by the server, the link address is cached, wherein the link address is sent by the server when the first video is successfully uploaded to the server; The re-execution of the first process node includes: Retrieve the cached link address; Based on the link address, the distribution process node is re-executed.
9. A video publishing device, characterized in that, include: The first acquisition module is used to acquire the current network status in response to the detection that the first process node in the publishing process of the first video has failed to execute, wherein the execution of the first process node depends on the network. The first triggering module is used to trigger the first acquisition module to acquire the current network status if the current network status is a no-network status, until the current network status switches from the no-network status to the network-enabled status; The control module is configured to re-execute the first process node if the current network state switches from the no-network state to the network-enabled state, and the number of re-executions of the first process node is less than the preset execution number threshold corresponding to the first process node.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processing device, the computer program performs the steps of the method according to any one of claims 1-8.
11. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-8.
