Media resource updating methods, devices, electronic equipment and storage media
By obtaining the user's first viewing time and the number of update cycles, the media resource segments to be updated are determined, which solves the problems of low efficiency and large error in the existing technology and achieves efficient and accurate media resource updates.
Patent Information
- Application Number
- CN202210841516.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-07-18
AI Technical Summary
Existing technologies have low efficiency in updating media resources, and waste resources and have large errors. The timed polling method wastes resources when the polling interval is small, and the query results have large errors when the interval is large.
By obtaining the first time a user account views a media resource, the number of update cycles between the first time and the current time is determined. Based on the number of update cycles and the preset number of update segments in each cycle, the target resource segments to be updated are determined, and media resource page data is generated, identifying updated and non-updated resource segments.
It improves the efficiency of media resource updates, reduces database resource consumption, ensures the accuracy and real-time nature of resource updates, and avoids the waste and errors caused by timed polling.
Smart Images

Figure CN115203222B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to methods, apparatus, electronic devices and storage media for updating media resources. Background Technology
[0002] Currently, users typically use application software installed on their devices to watch various media resources such as videos, audio, or images. Media resources can include a certain number of resource segments; for example, a TV series includes multiple episodes. Media resource updates refer to the delivery of media resources or their segments to application software platforms for users to watch. To make media resource updates more efficient, each resource segment has a preset update time. This means that for each resource segment, it cannot be viewed by the user before its preset update time, and it may only be viewed after its preset update time.
[0003] In related technologies, the database is periodically polled for the times when user accounts view media resources. When an update is found in the polled data, the resource segment to be updated is determined by comparing the latest viewing time with the preset update time for each resource segment.
[0004] However, in the above-mentioned timed polling method, if the polling interval is too small, multiple invalid query operations will be generated, which will waste resources, be inefficient, and put pressure on the database. If the polling interval is too large, the query results will have a large error. Summary of the Invention
[0005] This disclosure provides a media resource updating method, apparatus, electronic device, and storage medium to at least solve the problems of low efficiency, resource waste, and / or large errors in determining the resource segment to be updated in related technologies. The technical solution of this disclosure is as follows:
[0006] According to a first aspect of the present disclosure, a media resource update method is provided. The media resource includes at least one resource segment to be updated to a user account. The method includes: when receiving an operation from a user account to view the media resource, obtaining the first time when the user account first viewed the media resource; determining the number of update cycles between the first time and the current time; and determining the target resource segment to be updated to the user account in the media resource at the current time based on the number of update cycles and a preset number of update segments corresponding to each update cycle between the first time and the current time.
[0007] In one possible implementation, each update cycle corresponds to the same preset update time; determining the number of update cycles between the first time and the current time includes: determining the number of update cycles between the first time and the current time based on the relationship between the first time and the preset update time, and the relationship between the current time and the preset update time.
[0008] In another possible implementation, the number of update cycles between the first time and the current time is determined based on the relationship between the initial time and the preset update time, and the relationship between the current time and the preset update time. This includes: determining that the first time and the current time include a first number of update cycles when the initial time is later than or equal to the preset update time and the current time is earlier than the preset update time; determining that the first time and the current time include a second number of update cycles when the initial time is later than or equal to the preset update time and the current time is later than or equal to the preset update time, or when the initial time is earlier than the preset update time and the current time is earlier than the preset update time; and determining that the first time and the current time include a third number of update cycles when the initial time is earlier than the preset update time and the current time is later than or equal to the preset update time. The difference between the second number and the first number is 1, and the difference between the third number and the second number is 1.
[0009] In another possible implementation, the target resource segment to be updated to the user account in the media resource at the current time is determined based on the number of update cycles and the preset number of update segments corresponding to each update cycle between the first time and the current time. This includes: determining the number N of target resource segments based on the number of update cycles and the preset number of update segments corresponding to each update cycle, where N is an integer greater than or equal to 0 and N is less than or equal to the number of resource segments included in the media resource; and when multiple resource segments in the media resource are arranged in a preset update order, the first N of the multiple resource segments are determined as target resource segments.
[0010] In another possible implementation, after determining the target resource segment to be updated to the user account in the media resource at the current time based on the number of update cycles and the preset number of update segments corresponding to each update cycle between the first time and the current time, the method further includes: generating media resource page data, the media resource page data including the status identifier of each resource segment in the media resource, wherein the status identifier of the target resource segment indicates that the target resource segment is in an updated state, and the status identifiers of the other resource segments indicate that the other resource segments are in an unupdated state; and returning the media resource page data to the electronic device on the user account side.
[0011] Another possible implementation involves obtaining the first time when a user account first views multiple resource segments, including: obtaining anchor identifiers corresponding to the user account and media resources; and determining the first time when the user account first views the media resources based on the anchor identifiers.
[0012] In another possible implementation, before obtaining the anchor identifiers corresponding to the user account and media resources, the method further includes: obtaining the time of one or more operations performed by the user account to view media resources; determining the earliest time among the times of the one or more operations as the first time when the user account first views multiple resource segments; generating anchor identifiers corresponding to the user account and media resources, and establishing a correspondence between the first time when the user account first views multiple resource segments and the anchor identifiers.
[0013] According to a second aspect of the present disclosure, a media resource updating apparatus is provided. The media resource includes at least one resource segment to be updated to a user account. The apparatus includes: an acquisition unit configured to acquire the first time when the user account first views the media resource upon receiving an operation from the user account viewing the media resource; a first determining unit configured to determine the number of update cycles between the first time and the current time; and a second determining unit configured to determine the target resource segment to be updated to the user account in the media resource at the current time based on the number of update cycles and a preset number of update segments corresponding to each update cycle between the first time and the current time.
[0014] In one possible implementation, each update cycle corresponds to the same preset update time; the first determining unit is configured to specifically perform: determining the number of update cycles included between the first time and the current time based on the relationship between the first time and the preset update time, and the relationship between the current time and the preset update time.
[0015] In another possible implementation, the first determining unit is configured to specifically perform: if the first time is later than or equal to a preset update time and the current time is earlier than the preset update time, determine that the time between the first time and the current time includes a first number of update cycles; if the first time is later than the preset update time and the current time is later than or equal to the preset update time, or if the first time is earlier than the preset update time and the current time is earlier than the preset update time, determine that the time between the first time and the current time includes a second number of update cycles; if the first time is earlier than the preset update time and the current time is later than or equal to the preset update time, determine that the time between the first time and the current time includes a third number of update cycles; wherein the difference between the second number and the first number is 1, and the difference between the third number and the second number is 1.
[0016] In another possible implementation, the second determining unit is configured to specifically perform: determining the number N of target resource segments based on the number of update cycles and the preset number of update segments corresponding to each update cycle, wherein N is an integer greater than or equal to 0 and N is less than or equal to the number of resource segments included in the media resource; and when multiple resource segments in the media resource are arranged in a preset update order, determining the first N of the multiple resource segments as target resource segments.
[0017] In another possible implementation, after determining the target resource segment to be updated to the user account in the media resource at the current time based on the number of update cycles and the preset number of update segments corresponding to each update cycle between the first time and the current time, the device further includes: an update unit configured to specifically execute the generation of media resource page data, the media resource page data including the status identifier of each resource segment in the media resource, wherein the status identifier of the target resource segment indicates that the target resource segment is in an updated state, and the status identifiers of the other resource segments indicate that the other resource segments are in an unupdated state; and returning the media resource page data to the electronic device on the user account side.
[0018] In another possible implementation, the acquisition unit is configured to specifically perform: acquiring the anchor identifier corresponding to the user account and the media resource; and determining the first time when the user account first viewed the media resource based on the anchor identifier.
[0019] In another possible implementation, before obtaining the anchor identifiers corresponding to the user account and media resources, the device further includes: a creation unit configured to perform the time of obtaining one or more operations performed by the user account to view media resources; determining the earliest time among the one or more operations as the first time when the user account first views multiple resource segments; generating anchor identifiers corresponding to the user account and media resources, and establishing a correspondence between the first time when the user account first views multiple resource segments and the anchor identifiers.
[0020] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement a media resource updating method as described in the first aspect and any possible implementation thereof.
[0021] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided such that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to perform a media resource update method as described in the first aspect and any possible implementation thereof; or when the instructions in the computer-readable storage medium are executed by a media resource update apparatus, the media resource update apparatus is able to perform a media resource update method as described in the first aspect and any possible implementation thereof.
[0022] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which are executed by a processor as a media resource updating method as described in the first aspect and any possible implementation thereof.
[0023] The technical solution provided by the embodiments of this disclosure offers at least the following beneficial effects: Media resources are divided into multiple resource fragments, wherein the server updates the media resources (resource fragments) for user accounts according to an update cycle. When a user account views multiple resource fragments, the server responds to the user account's viewing operation and obtains the first time of the user account's first viewing operation for that media resource. The server then determines how many update cycles, i.e., the number of update cycles, are included between the first time and the current time. Based on the number of update cycles and the preset number of update fragments in each update cycle, the target resource fragment to be updated to the user account is determined from among the multiple resource fragments.
[0024] Through the above implementation method, when a user account views a media resource, the system obtains the recorded first time the user account first viewed the media resource. Based on the number of update cycles between the first time and the current time (i.e., the time the user account currently views the media resource), it determines the resource segment (i.e., the target resource segment) in the media resource that needs to be updated to the user account at the current time. Since there is no need to periodically poll the database, processing resources can be saved, efficiency can be improved, and the accuracy of resource updates can be guaranteed.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0027] Figure 1 This is a schematic diagram illustrating a media resource updating system according to an exemplary embodiment;
[0028] Figure 2This is a schematic diagram illustrating a target resource fragment system displayed on a terminal device according to an exemplary embodiment;
[0029] Figure 3 This is a flowchart illustrating a media resource updating method according to an exemplary embodiment;
[0030] Figure 4 This is a schematic diagram illustrating a media resource update scenario according to an exemplary embodiment;
[0031] Figure 5 This is a flowchart illustrating another media resource updating method according to an exemplary embodiment;
[0032] Figure 6 This is a flowchart illustrating another media resource updating method according to an exemplary embodiment;
[0033] Figure 7 This is a flowchart illustrating another media resource updating method according to an exemplary embodiment;
[0034] Figure 8 This is a flowchart illustrating another media resource updating method according to an exemplary embodiment;
[0035] Figure 9 This is a flowchart illustrating another media resource updating method according to an exemplary embodiment;
[0036] Figure 10 This is a flowchart illustrating another media resource updating method according to an exemplary embodiment;
[0037] Figure 11 This is a flowchart illustrating another media resource updating method according to an exemplary embodiment;
[0038] Figure 12 This is a block diagram illustrating another media resource updating apparatus according to an exemplary embodiment;
[0039] Figure 13 This is a schematic diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0040] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0041] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0042] Before providing a detailed description of the media resource updating method provided in the embodiments of this disclosure, a brief introduction to the application background and implementation environment involved in the embodiments of this disclosure is given.
[0043] First, a brief introduction to the application background involved in this disclosure will be given.
[0044] Currently, users typically use application software installed on their devices to watch various media resources such as videos, audio, or images. Media resources can include a certain number of resource segments. For example, a TV series consists of multiple episodes. Media resource updates refer to the delivery of media resources or their segments to application software platforms for users to watch. To make media resource updates more efficient, each resource segment has a preset update time. This means that for each resource segment, it cannot be viewed by the user before its preset update time, and it may only be viewed by the user after its preset update time.
[0045] In some embodiments, a user account is only authorized to view resource segments after the server updates a certain number of resource segments at various update times. Therefore, the application software determines the maximum number of resource segments a user account can view based on the current time when the user account views the media resource and the unlocking time of each resource segment. Taking a TV series as an example, if M episodes out of N episodes of a TV series are unlocked (N is greater than or equal to M) on the user's device, then the maximum number of TV series the user can watch is M.
[0046] In related technologies, the database is periodically polled for the times when user accounts view media resources. When an update is found in the polled data, the resource segment to be updated is determined by comparing the latest viewing time with the preset update time for each resource segment.
[0047] However, in the aforementioned timed polling method, if the polling interval is too small, multiple invalid query operations will occur, wasting resources, resulting in low efficiency and putting pressure on the database. If the polling interval is too large, the query results will have significant errors. In other words, multiple invalid query operations must be performed on the database before a single valid query operation can be completed, allowing the determination of the resource fragment to be updated based on the latest viewing time. Here, the valid query operation refers to the operation that retrieves the latest viewing time.
[0048] Therefore, in related technologies, when the time of a valid query operation and the latest viewing time are inconsistent—that is, when the query is not timely—there will be a certain error in the number of resources updated for the user account. For example, if a series unlocks at 18:00 daily, and a query task is executed every 10 minutes, and the last query task was executed at 17:55 (i.e., the time of an invalid query operation), then the next query task will be executed at 18:05 (i.e., the time of a valid query operation). Thus, if a user account is waiting to watch at 18:00, they will not be able to see the series that unlocked and updated at 18:00 immediately; they will only be able to see the updated series after the query task is executed at 18:05. It is evident that when the time of a valid query operation and the latest viewing time are inconsistent, resource segments cannot be updated accurately and in real time.
[0049] To address the aforementioned issues, this disclosure provides a media resource updating method. The media resource is divided into multiple resource fragments, and the server updates the media resource to the user account according to a preset update cycle. When a user account views multiple resource fragments, the server responds to the user account's viewing operation by obtaining the first time the user account first performed the viewing operation on that media resource. The server then determines how many update cycles, i.e., the number of update cycles, are included between the first time and the current time. Based on the number of update cycles and the preset number of update fragments in each update cycle, the target resource fragment to be updated to the user account is determined from among the multiple resource fragments.
[0050] The media resource update method described above can determine the target resource segment to be updated in real time based on the number of update cycles between the current time and the time when the user first viewed multiple resource segments, when the user account is viewing multiple resource segments. Compared with related technologies, this method eliminates the need for periodically polling the database to record the time the user account viewed media resources, thus consuming fewer database resources and being more efficient. Furthermore, it can accurately determine the target media resource to be updated for the user account in real time based on the current time of the resource viewing, overcoming the problem in related technologies where resource segments cannot be updated accurately in real time when the effective query time and the latest viewing time are inconsistent.
[0051] Secondly, the implementation architecture involved in this disclosure will be briefly introduced below.
[0052] Figure 1 This is a schematic diagram of a media resource updating system publicly provided. For example... Figure 1 As shown, the media resource update system includes a server 101 and a terminal device 102. The server 101 can establish a connection with the terminal device 102 through a wired network or a wireless network.
[0053] In this disclosure, server 101 may include multiple media resource application service platforms, each corresponding to an application. This application is installed on terminal device 102 and displays media resources on the content display interface of terminal device 102. Users log in to the application using a user account, and can then use the user account to operate the application on terminal device 102. Terminal device 102 responds to the user account's operations by displaying media resources for the user account on the content display interface.
[0054] Server 101 stores multiple different media resources, each of which is stored in the server as multiple resource fragments. When server 101 receives a user account's viewing operation for a certain media resource from terminal device 102, server 101 first obtains the first viewing time of the media resource by the user account. Then, based on the number of update cycles between the first viewing time and the current time and the preset number of update fragments in each update cycle, server 101 determines the target resource fragment that needs to be updated to the user account from among the multiple resource fragments.
[0055] Server 101 further changes the status of the target resource fragment from locked to unlocked. Then, the user account's terminal device 102, based on the target resource fragment determined by server 101, displays the unlocked target resource fragment on terminal device 102. For example, terminal device 102 displays... Figure 2 The diagram shows 'a' target resource fragments in the unlocked state, i.e., target resource fragment 1 to target resource fragment a, and 'a' resource fragments in the locked state, i.e., resource fragment a+1 to resource fragment m. The locked state is the unupdated state, and the unlocked state is the updated state.
[0056] It should be noted that when the target resource fragment displayed on the terminal device 102 is in an unlocked state, the terminal device will display the corresponding resource fragment content when the user account performs an operation on any target resource fragment in the unlocked state. When the resource fragment displayed on the terminal device 102 is in a locked state, the terminal device will not display the corresponding resource fragment content when the user account performs an operation on any resource fragment in the locked state.
[0057] In some embodiments, server 101 includes or is connected to a database, and the multimedia resources of the multimedia resource service platform can be stored in the database. Terminal 102 can access the multimedia resources in the database through server 101.
[0058] In other embodiments, server 101 may be a single server, or it may be a server cluster consisting of multiple servers. In some embodiments, the server cluster may also be a distributed cluster. This disclosure does not limit the specific implementation of server 101.
[0059] Terminal device 102 can be a mobile phone, tablet computer, desktop, laptop, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc., that can install and use content community applications (such as Kuaishou). This disclosure does not impose any special restrictions on the specific form of the terminal. It can interact with users through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction, or handwriting devices.
[0060] Optionally, the above Figure 1 In the media resource update system shown, server 101 can be connected to at least one terminal device 102. This disclosure does not limit the number or type of terminal devices 102.
[0061] The media resource updating method provided in this disclosure can be applied to the aforementioned... Figure 1 The server in the document. For ease of understanding, the media resource update method provided in this disclosure will be described in detail below with reference to the accompanying drawings.
[0062] Figure 3 This is a flowchart illustrating a media resource updating method according to an exemplary embodiment, such as... Figure 3 As shown, when this media resource update method is applied to the server in the aforementioned media resource update system, it includes the following steps:
[0063] Step S31: When the server receives an operation from a user account to view media resources, it obtains the first time the user account first viewed the media resources. The operation of the user account to view media resources can be an operation of the user account clicking on the media resource icon displayed on the terminal device, or an operation of the user account clicking on the information icon associated with the media resource displayed on the terminal device. This information icon can be a comment information icon or a bullet screen information icon.
[0064] A media resource may consist of multiple resource segments, and these resource segments may include at least one resource segment to be updated to a user account. For example, the multiple resource segments may include at least one resource segment that is in a locked state.
[0065] The server stores the first viewing time of a user account when it first viewed a media resource. When the user account views multiple resource segments again on an electronic device, the server retrieves the first viewing time of that resource segment.
[0066] Step S32: Determine the number of update cycles between the first time a user account views multiple resource fragments and the current time.
[0067] The server updates a certain number of resource fragments for user accounts according to an update cycle. That is, a certain number of resource fragments can only be updated every update cycle. The start and end times of the update cycle can be set according to specific needs, such as based on the playback popularity of media resources, the playback duration of each resource fragment, or the total playback duration of media resource fragments.
[0068] The server determines how many update cycles the time span includes by comparing the current time when the user account is currently viewing the media resource with the first time the user account first viewed the media resource.
[0069] For example, taking a weekly update cycle with updates every Monday at 6 PM (i.e., every Monday at 6 PM), let's assume a user account first views the media resource at 6 AM on Friday of the first week (assuming 6 AM on January 1st). If the user account views the media resource at 10 PM on Monday of the second week (i.e., based on the assumed 6 AM on January 1st, the current time is 10 PM on January 3rd), then the number of update cycles spanned by the two time spans is one. If the user account views the media resource at 5 AM on Monday of the second week (i.e., the current time is 5 AM on January 3rd), then the number of update cycles spanned by the two time spans is zero. If the user account views the media resource at 7 AM on Friday of the third week (i.e., the third week is 7 AM on January 14th), then the number of update cycles spanned by the two time spans is two. If the user account views the media resource at 5 AM on Monday of the third week (i.e., the third week is 5 AM on January 10th), then the number of update cycles spanned by the two time spans is one.
[0070] Step S33: Based on the number of update cycles and the number of preset update segments corresponding to each update cycle between the first time and the current time, determine the target resource segment to be updated to the user account in the media resource at the current time.
[0071] It should be noted that the number of update segments preset for each update cycle can be the same or different. For example, the number of update segments preset for the first update cycle is 3, while the number of update segments preset for the second update cycle can be 3, or it can be a number other than 3, such as 4, 5, or 6. This disclosure does not impose specific limitations on this.
[0072] For example, the preset number of update fragments for each update cycle is set to 3. If the number of update cycles is 2, then the target resource fragments to be updated are the first 3*2=6 resource fragments among the multiple resource fragments.
[0073] In another example, there is a mapping relationship between the number of update cycles and the target resource fragments. For example, if the number of update cycles is 2, then the target resource fragments corresponding to the 2 update cycles are the 7 resource fragments with the highest position among multiple resource fragments.
[0074] In the above implementation, media resources are divided into multiple resource segments, and the server updates the media resources for user accounts according to an update cycle. When a user account views multiple resource segments, the server responds to the user account's viewing operation and obtains the first time the user account first performed the viewing operation on that media resource. The server then determines how many update cycles are included between the first time and the current time, i.e., the number of update cycles. Based on the number of update cycles and the preset number of update segments in each update cycle, the server determines the target resource segment among the multiple resource segments to be updated to the user account. Therefore, this implementation method can determine the target resource segment to be updated in real time when a user account views multiple resource segments, based on the number of update cycles included between the current time and the time when the user account first viewed the multiple resource segments. Compared to related technologies, the above method eliminates the need for periodically polling the database to record the time when user accounts viewed media resources, thus consuming fewer database resources and being more efficient. At the same time, it can accurately determine the target media resources to be updated for user accounts in real time based on the current time when the user account viewed the resources. In other words, it also overcomes the problem in related technologies where the number of resources updated for user accounts is inaccurate when the effective query operation and the latest viewing time are inconsistent.
[0075] Through the above implementation method, when a user account views a media resource, the system obtains the recorded first time the user account first viewed the media resource. Based on the number of update cycles between the first time and the current time (i.e., the time the user account currently views the media resource), it determines the resource segment (i.e., the target resource segment) in the media resource that needs to be updated to the user account at the current time. Since there is no need to periodically poll the database, processing resources can be saved, efficiency can be improved, and the accuracy of resource updates can be guaranteed.
[0076] In one implementation, each update cycle has the same preset update time, wherein one preset update time corresponds to one update cycle. Step S32 is implemented in the following manner.
[0077] The server determines the number of update cycles between the first time and the current time based on the relationship between the initial time and the preset update time, as well as the relationship between the current time and the preset update time.
[0078] It should be noted that, in application scenarios where the same preset update time is used for the same update cycle, the number of update cycles between the first time and the current time can be understood as the number of preset update times between the first time and the current time.
[0079] The preset update time for each update cycle can be set based on the experience of the administrator, user data (such as viewing time, number of views, etc.), or the resource category of the media resource (such as arts and culture resources, lifestyle resources, sports resources, etc.). This disclosure does not impose specific limitations on this.
[0080] In this implementation, the update cycle is preset with the same preset update time so that the state of multiple resource fragments can only be updated after the preset update time in each update cycle. This allows the server to determine the target resource fragment to be updated to the user account based on the preset update time as the time limit node for allowing the state of multiple resource fragments to be updated, thereby achieving the purpose of reasonably allocating multiple resource fragments.
[0081] In this implementation method, to make the media resource update process more reasonable, resource segments in the media resource can only be updated after a preset update time corresponding to a certain update cycle. Since resource segments in the media resource can only be updated after the preset update time corresponding to a certain update cycle, when determining the number of update cycles included between the first time and the current time, it is necessary to consider the chronological relationship between the first time and the preset update time, as well as the chronological relationship between the current time and the preset update time, thereby ensuring the accuracy of the determined number of update cycles.
[0082] In one implementation, such as Figure 4 As shown, in application scenarios where update cycles correspond to the same preset update time, the first update time may be earlier or later than the preset update time. Similarly, the current update time may be earlier or later than the preset update time. Based on the different time relationships, different numbers of update cycles can be determined. Let T represent the cycle difference between the i-th update cycle to which the current time belongs and the first update cycle to which the first time belongs, i.e., T = i - 1 (i is a positive integer greater than or equal to 1). There exist... Figure 4 The four cases shown in (a), (b), (c), and (d) are: the first case, such as Figure 4 In case (a), the initial update time is later than or equal to the preset update time, and the current time is earlier than the preset update time. In this case, T-1 (i.e., the first number) update cycles can be determined. The second case is as follows... Figure 4 As shown in (b), if the first update time is later than or equal to the preset update time, and the current time is later than or equal to the preset update time, then T update cycles (i.e., the second number) can be determined. The third case is as follows... Figure 4 As shown in (c), the initial time is earlier than the preset update time, and the current time is earlier than the preset update time. In this case, T (i.e., the second number) update cycles can be determined. The fourth case is as follows... Figure 4 As shown in (d), if the initial update time is earlier than the preset update time, and the current time is later than or equal to the preset update time, then T+1 (i.e., the third number) update cycles can be determined. This implementation method ensures the rationality of the method for determining the number of update cycles, thereby guaranteeing the accuracy of the number of update cycles.
[0083] Specifically, in one implementation, such as Figure 5 As shown, in an application scenario where a preset update time is preset based on the update cycle, the above S32 may specifically include:
[0084] Step S51: The update period to which the first time belongs is designated as the first update period; and the update period to which the current time belongs is designated as the current update period.
[0085] Specifically, the permissions to update the states of multiple resource fragments on the server are enabled every update cycle. This means that regardless of whether a user account performs any operations on these resource fragments, the server sequentially allows the states of these resource fragments to be updated after the user account performs an operation, according to chronological order, every update cycle. Therefore, the server can determine the time periods corresponding to each update cycle, thereby determining the first update cycle to which the user account first viewed the multiple resource fragments and the current update cycle to which the current time belongs.
[0086] For example, taking a one-week update cycle as an example, the time period corresponding to the update cycle can be set as 0:00 on Monday to 23:59:59 on Sunday, or it can be expressed in the form of month, day, hour, minute, and second. For example, if a user account first viewed multiple resource clips at 10:00 on January 1st, which falls within the time period of the second update cycle (0:00 on January 1st to 23:59:59 on January 7th), then the user account's first viewing of multiple resource clips belongs to the second update cycle, i.e., the first update cycle is the second update cycle. Similarly, if the current time is 10:00 on January 10th, which falls within the time period of the third update cycle (0:00 on January 8th to 23:59:59 on January 14th), then the user account's first viewing of multiple resource clips belongs to the third update cycle.
[0087] Optionally, taking the update cycle to which the user account first viewed multiple resource fragments as the first update cycle as a reference, the server can determine which update cycle the current time belongs to based on the cycle difference between the user account's first viewing time of multiple resource fragments and the current time.
[0088] In this method, the number of times the server updates the update cycle when the user account first views the resource fragments can be ignored, and the update cycle to which the user account first views the multiple resource fragments can be directly set as the first update cycle.
[0089] For example, if the update period corresponding to the user account's first viewing of multiple resource fragments at 10:00 AM on January 1st is between 0:00 AM on January 1st and 11:59:59 PM on January 7th, then the user account's first viewing of multiple resource fragments belongs to the first update period, i.e., the first update period is the first update period. If the current time, 10:00 AM on January 10th, belongs to the second update period, between 0:00 AM on January 8th and 11:59:59 PM on January 14th, then the user account's first viewing of multiple resource fragments belongs to the second update period.
[0090] The following is a detailed explanation of scenarios where the first update occurs later than or equal to the first update cycle.
[0091] Step S52: If the first time is later than or equal to the preset update time of the first update cycle, and the current time is earlier than the preset update time of the current update cycle, then a first number of update cycles are determined based on the first update cycle and the current update cycle; if the current time is later than or equal to the preset update time of the current update cycle, then a second number of update cycles are determined based on the first update cycle and the current update cycle.
[0092] The difference between the second quantity and the first quantity is 1.
[0093] Specifically, if the first time a user account views media resources is later than or equal to the preset update time of the first update cycle, and the current time is earlier than the preset update time of the current update cycle, then the difference between the current update cycle and the first update cycle is subtracted from 1, and this difference is determined as the first quantity. Therefore, the number of update cycles between the time the user account first views multiple resource segments and the current time is the first quantity of update cycles.
[0094] If the current time is later than or equal to the preset update time of the current update cycle, the difference between the current update cycle and the first update cycle is determined as the second number. Then, the number of update cycles between the time when the user account first views multiple resource fragments and the current time is the second number of update cycles.
[0095] For example, taking a weekly update cycle (from 00:00 on Monday to 23:59:59 on Sunday), with updates occurring every Monday at 6:00 AM, the first time a user account views this media resource is set to 6:00 AM on Friday of the first update cycle (assuming it's 6:00 AM on January 1st, and the first update cycle is the first update cycle). It's clear that the first viewing time is later than or equal to the preset update time of the first update cycle.
[0096] If a user account views the aforementioned media resource at 10 PM on Monday of the second update cycle (i.e., assuming 6 AM on January 1st, the current update cycle is the second update cycle, and the current time is 10 PM on January 3rd), since the current time 10 PM on January 3rd is later than the preset update time of 6 AM on January 3rd for the current update cycle, the difference between the current update cycle and the first update cycle is: the difference between the second update cycle and the first update cycle, i.e., the difference is 1.
[0097] If a user account is set to view the aforementioned media resources at 5:00 AM on Monday of the second update cycle (the current update cycle is the second update cycle, and the current time is 5:00 AM on January 3rd), since the current time of 5:00 AM on January 3rd is earlier than the preset update time of 6:00 AM on January 3rd for the current update cycle, the difference between the current update cycle and the first update cycle is subtracted from 1. The difference between the second update cycle and the first update cycle is subtracted from 1, which results in a difference of 0, meaning that the number of update cycles included is zero.
[0098] The following is a detailed explanation of scenarios where the first update occurs earlier than the first update cycle.
[0099] Step S53: If the first time is earlier than the preset update time of the first update cycle, and if the current time is earlier than the preset update time of the current update cycle, then determine the second number of update cycles based on the first update cycle and the current update cycle; if the current time is later than or equal to the preset update time of the current update cycle, then determine the preset update time of the third number of update cycles based on the first update cycle and the current update cycle.
[0100] The difference between the third quantity and the second quantity is 1.
[0101] Specifically, if the first time a user account views a media resource is earlier than the preset update time of the first update cycle, and the current time is earlier than the preset update time of the current update cycle, then the difference between the current update cycle and the first update cycle is determined as the second number. Therefore, the number of update cycles between the time the user account first views multiple resource segments and the current time is the second number of update cycles.
[0102] If the current time is later than or equal to the preset update time of the current update cycle, the difference between the current update cycle and the first update cycle is added to 1, and the sum is determined as the third quantity. Then, the number of update cycles between the time when the user account first views multiple resource fragments and the current time is the third quantity of update cycles.
[0103] For example, taking a weekly update cycle (from 00:00 on Monday to 23:59:59 on Sunday), with updates every Friday at 18:00, the first time a user account views this media resource is set to 6:00 AM on Friday of the first update cycle (assuming it's 6:00 AM on January 1st, and the first update cycle is the first update cycle). It's clear that the first viewing time is earlier than the preset update time for the first update cycle.
[0104] If a user account views the aforementioned media resource at 22:00 on Friday of the second update cycle (i.e., based on the assumption of 6:00 on January 1st, the current update cycle is the second update cycle, and the current time is 22:00 on January 3rd), since the current time of 22:00 on January 3rd is later than the preset update time of 18:00 on January 3rd for the current update cycle, the sum of the difference between the current update cycle and the first update cycle and 1 is: the sum of the difference between the second update cycle and the first update cycle and 1, where the difference is 1 and the sum is 2, that is, the number of update cycles is 2.
[0105] If a user account is set to view the aforementioned media resources at 5:00 AM on Monday of the second update cycle (the current update cycle is the second update cycle, and the current time is 5:00 AM on January 3rd), since the current time of 5:00 AM on January 3rd is earlier than the preset update time of 6:00 PM on January 3rd for the current update cycle, the difference between the current update cycle and the first update cycle is: the difference between the second update cycle and the first update cycle is 1, that is, the number of update cycles included is 1.
[0106] In practical applications, there are two different ways to set the preset update time. The following explains in detail how the number of update cycles is determined for each of the different setting methods.
[0107] Firstly, the start time of each update cycle is set to be the same as the preset update time of multiple resource fragments. That is, the preset update time is the same as the start time. For example, if one week is an update cycle, and the update cycle is from Monday 00:00 to Sunday 23:59:59, the start time is Monday 00:00, and the preset update time is also Monday 00:00. This setting method can also be understood as the state of multiple resource fragments being updated as the update cycle transitions from one update cycle to the next.
[0108] It should be noted that because the preset update time is the same as the start time, the current time can only be later than the preset update time of the current update cycle, and the first update time can only be earlier than the preset update time of the first update cycle. Due to the special nature of this setting method, when the preset update time and the start time are the same, there is no need to compare the current time, the preset update time, and the first update time. The number of update cycles can be determined directly using the cycle difference. Each update cycle includes the start time and the end time of each update cycle; that is, the period from the start time to the end time constitutes one update cycle.
[0109] Specifically, determine the first update cycle to which the first time belongs; and determine the current update cycle to which the current time belongs; and determine the number of update cycles based on the cycle difference between the current update cycle and the first update cycle.
[0110] Secondly, the preset update time for multiple resource fragments is set to a time other than the start time of the update cycle. For example, if a week is an update cycle from 00:00 on Monday to 23:59:59 on Sunday, the start time is 00:00 on Monday, but the preset update time is 18:00 on Saturday. This setting can also be understood as follows: after one update cycle begins, the state of multiple resource fragments can only be updated at or after the preset update time of the next update cycle.
[0111] It should be noted that the method of setting the preset update time is equivalent to the method of determining the number of update cycles in the application scenario with the same preset update time based on the update cycle, so it will not be described again here.
[0112] In one implementation, such as Figure 6 The above step S33 can be implemented in specific ways according to the following steps:
[0113] Step S331: Determine the number of target resource fragments N based on the number of update cycles and the preset number of update fragments for each update cycle.
[0114] Where N is an integer greater than or equal to 0 and N is less than or equal to the number of multiple resource fragments.
[0115] The server pre-stores a mapping relationship between the number of update cycles, the preset number of update fragments per update cycle, and the target number of resource fragments. The target number of resource fragments is determined based on this mapping relationship. Specifically, the mapping relationship can be stored in a table, which can be obtained through table lookup, or it can be derived from a model formula.
[0116] In one example, if the number of update cycles is 3 and the preset number of update fragments per update cycle is 5, then the corresponding number of target resource fragments obtained by looking up the table is 17.
[0117] In another example, if the number of update cycles is 3, the preset number of update fragments per update cycle is 5, and the preset number of first views is 5, then substituting into the following model formula: Target resource fragment count = preset number of first views + number of update cycles * preset number of update fragments per update cycle, that is, 5 + 3 * 5 = 20, so the target resource fragment count is 20.
[0118] Step S332: When multiple resource fragments are arranged in a preset update order, the first N of the multiple resource fragments are determined as the target resource fragments.
[0119] For example, 40 resource fragments are arranged from the 1st to the 40th according to a preset update order. When the target resource fragment quantity is determined to be 17, the 17 resource fragments ranked from the 1st to the 17th are identified as the target resource fragments. In this embodiment, multiple resource fragments are arranged according to a preset update order so that after determining the target resource fragment quantity, the server can directly obtain the target resource fragments based on their arrangement order.
[0120] This implementation method directly identifies the top N resource fragments in the resource fragment order from multiple resource fragments as the target resource fragments, eliminating the need for individual comparison and screening. This reduces the time required for screening target resource fragments and improves the efficiency of identifying target resource fragments.
[0121] In one implementation, combined with Figure 3 ,like Figure 7 As shown, after the target resource fragment is determined, i.e. after step S33, the following steps can be performed to unlock the state of the target resource fragment.
[0122] Step S34: Generate media resource page data, which includes the status identifier of each resource segment in the media resource.
[0123] The media resource page data is used to instruct a user's account to display a target resource segment on a specific display page of their electronic device. The status identifier for each resource segment includes the status identifier for the target resource segment and the status identifiers for the remaining resource segments. The status identifier for the target resource segment indicates that it is updated, while the status identifiers for the remaining resource segments indicate that they are not updated.
[0124] In some implementations, the updated state can be the unlocked state, and the unupdated state can be the locked state.
[0125] It should be noted that the updated status indicator for the target resource fragment is used to display the content of the target resource fragment to the user account when the user account triggers a viewing action for that target resource fragment on the electronic device. The unupdated status indicator for other resource fragments is used to prevent the electronic device corresponding to the user account from displaying the content of the other resource fragments to the user account when the user account triggers a viewing action for those other resource fragments.
[0126] Step S35: The media resource page data is returned to the electronic device on the user account side. The server returns the status identifier of the target resource segment and the status identifiers of the remaining resource segments, including the media resource page data, to the electronic device of the user account, so that when the user account performs a viewing operation on the target resource segment based on the status identifier of the target resource segment, the electronic device displays the resource content of the target resource segment to the user account.
[0127] It should be noted that when the number of target resource fragments N equals the number of multiple resource fragments, it means that all multiple resource fragments are in an updated state. Furthermore, after multiple resource fragments are in an updated state, when a user account performs a viewing operation on the media resource again, the server controls the electronic device to directly display all multiple resource fragments to the user account.
[0128] For example, when the number of target resource fragments N equals the number of multiple resource fragments, the status of the target resource fragments is updated from locked to unlocked, meaning the status of all multiple resource fragments is updated to unlocked. This does not include the resource fragments to be updated to the user account. Therefore, after all multiple resource fragments have been updated to unlocked, when the user account performs a viewing operation on the media resource again, the server controls the electronic device to directly display all unlocked resource fragments to the user account.
[0129] In some embodiments, the target resource fragment in the updated state and the remaining resource fragments in the unupdated state are marked with different identifiers to distinguish between displaying the content of the resource fragments and not displaying the content of the resource fragments, thereby prompting the user account which resource fragments can display the corresponding content and which resource fragments cannot display the corresponding content.
[0130] In this embodiment, the status of the target resource fragment and the status of the remaining resource fragments are identified separately, and the status identifiers are set in the media resource page data so that the electronic device can distinguish the status of the resource fragments according to their status identifiers, thereby displaying the target resource fragment and the remaining resource fragments in different ways.
[0131] In one implementation, combined with Figure 3 ,like Figure 8As shown, step S31 above can also be implemented in the following ways to obtain the time when a user account first views multiple resource fragments.
[0132] Step S311: Obtain the anchor identifier corresponding to the user account and media resource.
[0133] Step S312: Determine the time when the user account first viewed the media resource based on the anchor point identifier.
[0134] Anchor markers are used to associate or indicate the first time a user account views a media resource.
[0135] In this implementation, a common anchor identifier is used for both the user account and the media resource. This anchor identifier determines the first time the associated user account views the media resource. Therefore, determining the first time a user account views a media resource using an anchor identifier reduces the number of invalid queries for non-first-view times, increases the speed of determining the first time, and thus improves the efficiency of identifying the target resource segment.
[0136] In one implementation, combined with Figure 8 ,like Figure 9 As shown, the following steps may also be performed before step S311.
[0137] Step S91: Obtain the time of one or more operations performed by the user account to view media resources.
[0138] Step S92: Determine the earliest time among the times of one or more operations as the time when the user account first viewed multiple resource fragments.
[0139] Specifically, determine the earliest of one or more actions performed by the user account to view media resources. Aggregate the times of one or more actions into the earliest time of that action, which is then determined as the time when the user account first viewed multiple resource segments.
[0140] Step S93: Generate anchor identifiers corresponding to user accounts and media resources, and establish the correspondence between the first time a user account views a media resource and the first time the anchor identifier is generated.
[0141] In this implementation, the earliest time among one or more operations is determined as the first time a user account views a media resource, making the acquisition of the user account's first viewing time more accurate. Simultaneously, anchor markers corresponding to user accounts and media resources are associated with the first viewing time, allowing for more accurate and rapid acquisition of the time when a user account first viewed multiple resource segments through the anchor markers.
[0142] In one implementation, such as Figure 10 As shown, the following is the specific construction process of anchor point identifiers.
[0143] (1) Obtain user account data from the user account's history.
[0144] (2) Determine whether the data of the above user account includes data on the user account's operations on media resources.
[0145] (3) If the user account data does not include data on the user account's actions performed on media resources, then the construction of the anchor identifier is terminated.
[0146] (4) If the user account data includes data on user account operations performed on media resources, then aggregate the user account data on user account operations performed on media resources and determine the earliest time corresponding to the operation as the first time.
[0147] (5) Construct anchor point identifiers and associate the first time of the anchor point identifier with the user account and media resources.
[0148] As one specific implementation method, such as Figure 11 As shown, the following is the specific construction process of anchor point identifiers.
[0149] Step S11: When the server receives an operation from an electronic device to allow a user account to view multiple resource fragments, it determines whether the multiple resource fragments include resource fragments in a locked state; if so, proceed to step S13; otherwise, proceed to step S12.
[0150] In step S12, the server returns all the resource fragments in the unlocked state to the electronic device.
[0151] Step S13: Obtain the first time when the user account first viewed multiple resource fragments.
[0152] Step S14: Determine the number of update cycles between the first time a user account views multiple resource fragments and the current time.
[0153] Step S15: Based on the number of update cycles and the number of update segments preset for each update cycle between the first time and the current time, determine the target resource segment to be updated to the user account from multiple resource segments.
[0154] In this implementation, it is first determined whether multiple resource fragments are in a fully unlocked state; then, the target resource fragment among the multiple resource fragments is further determined. This method avoids repeatedly performing the target resource fragment determination process for resource fragments that are already in a fully unlocked state, thus improving the efficiency of displaying fully unlocked resource fragments to the user account.
[0155] To achieve the above functions, the media resource updating device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art will readily recognize that, based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0156] This disclosure also provides an embodiment such as Figure 12 The media resource update device 12 shown includes multiple resource segments, and the multiple resource segments include at least one resource segment to be updated to a user account. The device includes: an acquisition unit 120, a first determination unit 121, a second determination unit 122, an update unit 123, and a creation unit 124.
[0157] The media resource includes at least one resource segment to be updated to a user account. The device includes: an acquisition unit 120 configured to acquire the first time when the user account first views the media resource upon receiving an operation from the user account to view the media resource; a first determination unit 121 configured to determine the number of update cycles between the first time and the current time; and a second determination unit 122 configured to determine the target resource segment to be updated to the user account in the media resource at the current time based on the number of update cycles and a preset number of update segments corresponding to each update cycle between the first time and the current time.
[0158] In one possible implementation, each update cycle corresponds to the same preset update time; the first determining unit 121 is configured to specifically perform: determining the number of update cycles included between the first time and the current time based on the relationship between the first time and the preset update time, and the relationship between the current time and the preset update time.
[0159] In another possible implementation, the first determining unit 121 is configured to specifically perform: if the first time is later than or equal to the preset update time and the current time is earlier than the preset update time, determine that the time between the first time and the current time includes a first number of update cycles; if the first time is later than the preset update time and the current time is later than or equal to the preset update time, or if the first time is earlier than the preset update time and the current time is earlier than the preset update time, determine that the time between the first time and the current time includes a second number of update cycles; if the first time is earlier than the preset update time and the current time is later than or equal to the preset update time, determine that the time between the first time and the current time includes a third number of update cycles; wherein the difference between the second number and the first number is 1, and the difference between the third number and the second number is 1.
[0160] In another possible implementation, the second determining unit 122 is configured to specifically perform: determining the number N of target resource segments based on the number of update cycles and the number of preset update segments corresponding to each update cycle, wherein N is an integer greater than or equal to 0 and N is less than or equal to the number of resource segments included in the media resource; and when multiple resource segments in the media resource are arranged in a preset update order, determining the first N of the multiple resource segments as target resource segments.
[0161] In another possible implementation, after determining the target resource segment to be updated to the user account in the media resource at the current time based on the number of update cycles and the preset number of update segments corresponding to each update cycle between the first time and the current time, the device further includes: an update unit 123, configured to specifically execute the generation of media resource page data, the media resource page data including the status identifier of each resource segment in the media resource, wherein the status identifier of the target resource segment indicates that the target resource segment is in an updated state, and the status identifiers of the other resource segments indicate that the other resource segments are in an unupdated state; and returning the media resource page data to the electronic device on the user account side.
[0162] In another possible implementation, the acquisition unit 120 is configured to specifically perform: acquiring the anchor identifier corresponding to the user account and the media resource; and determining the first time when the user account first viewed the media resource based on the anchor identifier.
[0163] In another possible implementation, before obtaining the anchor identifiers corresponding to the user account and media resources, the device further includes: a creation unit 124, configured to perform the following: obtaining the time of one or more operations performed by the user account to view media resources; determining the earliest time among the one or more operations as the first time when the user account first views multiple resource segments; generating anchor identifiers corresponding to the user account and media resources; and establishing a correspondence between the first time when the user account first views multiple resource segments and the anchor identifiers.
[0164] Regarding the apparatus in the above embodiments, the specific manner in which each unit module performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0165] Figure 13 This is a schematic diagram of an electronic device provided in this disclosure. (For example...) Figure 13 The electronic device 50 may include at least one processor 501 and a memory 503 for storing processor-executable instructions. The processor 501 is configured to execute the instructions in the memory 503 to implement the media resource update method in the following embodiments.
[0166] In addition, electronic device 50 may also include communication bus 502, at least one communication interface 504, input device 506 and output device 505.
[0167] Processor 501 may be a processor (central processing unit, CPU), microprocessor unit, ASIC, or one or more integrated circuits for controlling the execution of programs according to the present disclosure.
[0168] The communication bus 502 may include a path for transmitting information between the aforementioned components.
[0169] Communication interface 504 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0170] Input device 506 is used to receive input signals and output device 505 is used to output signals.
[0171] Memory 503 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory may exist independently and be connected to the processing unit via a bus. Memory may also be integrated with the processing unit.
[0172] The memory 503 stores instructions for executing the present invention, and the processor 501 controls the execution of these instructions. The processor 501 executes the instructions stored in the memory 503 to implement the functions of the method disclosed herein.
[0173] In a specific implementation, as one example, the processor 501 may include one or more CPUs, for example... Figure 13 CPU0 and CPU1 in the CPU.
[0174] In a specific implementation, as one example, an electronic device may include multiple processors, for example... Figure 13 Processors 501 and 507 are shown in the diagram. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0175] The electronic device is as follows Figure 13 The diagram includes a processor 501 and a memory 503 for storing executable instructions of the processor 501; wherein the processor 501 is configured to execute executable instructions to implement the media resource update method as described in any of the possible embodiments above. And it can achieve the same technical effect, so to avoid repetition, it will not be described again here.
[0176] This disclosure also provides a computer-readable storage medium, which, when executed by a processor of a media resource updating device or electronic device, enables the media resource updating device or electronic device to perform a media resource updating method as described in any of the possible embodiments above. The same technical effects can be achieved, and to avoid repetition, further details are omitted here.
[0177] This disclosure also provides a computer program product, including a computer program or instructions, which are executed by a processor as a media resource update method according to any of the possible implementations described above. The same technical effects can be achieved, and to avoid repetition, further details are omitted here.
[0178] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0179] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for updating media resources, characterized in that, The media resource includes at least one resource fragment to be updated to a user account, and the method includes: When the user account is received to view the media resource, the time of the first time the user account first viewed the media resource is obtained; If the first update time is later than or equal to a preset update time, and the current time is earlier than the preset update time, it is determined that there are a first number of update cycles between the first update time and the current time; each of the update cycles corresponds to the same preset update time. If the first time is later than or equal to the preset update time and the current time is later than or equal to the preset update time, or if the first time is earlier than the preset update time and the current time is earlier than the preset update time, then it is determined that the first time and the current time include a second number of update cycles. If the first update time is earlier than the preset update time, and the current time is later than or equal to the preset update time, it is determined that there are a third number of update cycles between the first update time and the current time; the difference between the second number and the first number is 1, and the difference between the third number and the second number is 1. Based on the number of update cycles and the number of preset update segments corresponding to each update cycle between the first time and the current time, the target resource segments to be updated to the user account in the media resources at the current time are determined.
2. The media resource updating method according to claim 1, characterized in that, The step of determining the target resource segment to be updated to the user account in the media resource at the current time based on the number of update cycles and the preset number of update segments corresponding to each update cycle between the first time and the current time includes: The number of target resource segments N is determined based on the number of update cycles and the number of preset update segments corresponding to each update cycle, wherein N is an integer greater than or equal to 0 and N is less than or equal to the number of resource segments included in the media resource; When multiple resource segments in the media resource are arranged in a preset update order, the first N of the multiple resource segments are determined as the target resource segment.
3. The media resource updating method according to any one of claims 1 to 2, characterized in that, After determining the target resource segment to be updated to the user account in the media resource at the current time based on the number of update cycles and the preset number of update segments corresponding to each update cycle between the first time and the current time, the method further includes: Generate media resource page data, wherein the media resource page data includes the status identifier of each resource segment in the media resource, wherein the status identifier of the target resource segment indicates that the target resource segment is in an updated state, and the status identifiers of the other resource segments indicate that the other resource segments are in an unupdated state; The media resource page data is returned to the electronic device on the user account side.
4. The media resource updating method according to any one of claims 1 to 2, characterized in that, The step of obtaining the first time the user account viewed the media resource includes: Obtain the anchor identifier corresponding to the user account and the media resource; Based on the anchor point identifier, determine the first time when the user account first viewed the media resource.
5. The media resource updating method according to claim 4, characterized in that, Before obtaining the anchor identifier corresponding to the user account and the media resource, the method further includes: Get the time when the user account has performed one or more operations to view the media resource; The earliest time among the times of the one or more operations is determined as the first time when the user account first viewed the multiple resource fragments; Anchor point identifiers corresponding to the user account and the media resources are generated, and a correspondence is established between the first time the user account views the multiple resource segments and the anchor point identifiers.
6. A media resource updating device, characterized in that, The media resource includes at least one resource segment to be updated to a user account, and the device includes: The acquisition unit is configured to acquire the first time when the user account first views the media resource upon receiving an operation from the user account viewing the media resource; The first determining unit is configured to, when the first time is later than or equal to a preset update time and the current time is earlier than the preset update time, determine that the time between the first time and the current time includes a first number of update cycles; each update cycle corresponds to the same preset update time; when the first time is later than or equal to the preset update time and the current time is later than or equal to the preset update time, or when the first time is earlier than the preset update time and the current time is earlier than the preset update time, determine that the time between the first time and the current time includes a second number of update cycles; when the first time is earlier than the preset update time and the current time is later than or equal to the preset update time, determine that the time between the first time and the current time includes a third number of update cycles; the difference between the second number and the first number is 1, and the difference between the third number and the second number is 1. The second determining unit is configured to determine, based on the number of update cycles and the number of preset update segments corresponding to each update cycle between the first time and the current time, the target resource segment to be updated to the user account in the media resource at the current time.
7. An electronic device, characterized in that, include: A processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the media resource update method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the media resource update method as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the media resource update method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Game resource processing method and device, storage medium and electronic equipment
CN112221158A
Method and device for updating associated information of guide point
CN114356951A