CN115203222A - Media resource updating method and device, electronic equipment and storage medium - Google Patents

Media resource updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115203222A
CN115203222A CN202210841516.3A CN202210841516A CN115203222A CN 115203222 A CN115203222 A CN 115203222A CN 202210841516 A CN202210841516 A CN 202210841516A CN 115203222 A CN115203222 A CN 115203222A
Authority
CN
China
Prior art keywords
time
resource
update
user account
media
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210841516.3A
Other languages
Chinese (zh)
Inventor
张哲�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Amusement Starcraft Beijing Technology Co ltd
Original Assignee
Amusement Starcraft Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Amusement Starcraft Beijing Technology Co ltd filed Critical Amusement Starcraft Beijing Technology Co ltd
Priority to CN202210841516.3A priority Critical patent/CN115203222A/en
Publication of CN115203222A publication Critical patent/CN115203222A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data

Abstract

The disclosure relates to a media resource updating method, a media resource updating device, electronic equipment and a storage medium, relates to the technical field of computers, and solves the problems that the efficiency is low and resources are wasted when a resource segment to be updated is determined in the related art. The method comprises the following steps: the media resources comprise at least one resource segment to be updated to the user account, and when the operation of viewing the media resources by the user account is received, the first time of viewing the media resources by the user account for the first time is obtained; determining a number of update cycles included between a first time and a current time; and determining a target resource segment to be updated to the user account in the media resources at the current time according to the number of the updating periods and the number of preset updating segments corresponding to each updating period between the first time and the current time.

Description

Media resource updating method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for updating media resources, an electronic device, and a storage medium.
Background
Currently, a user usually uses application software installed in a user device to view various media resources such as video, audio, or images. The media assets may include a number of asset segments, for example, a series episode including a multi-episode series. Media resource updating refers to putting media resources or resource segments thereof on an application software platform for users to watch. In order to make the media resource update more reasonable, each resource segment has a preset update time, that is, for each resource segment, it cannot be viewed by the user until the current time reaches its preset update time, and it is likely to be viewed by the user only after the current time reaches its preset update time.
In the related technology, the time for the user account to check the media resources recorded in the database is polled regularly, and when the time for the user account to check the media resources is updated, the resource segments to be updated are determined by comparing the latest checking time with the preset updating time of each resource segment.
However, in the above-mentioned timed polling method, if the polling interval is small, multiple invalid query operations will be generated, which wastes resources and is inefficient, and may stress the database, and if the polling interval is large, the query result error will be large.
Disclosure of Invention
The present disclosure provides a method, an apparatus, an electronic device and a storage medium for updating media resources, so as to at least solve the problems of low efficiency, resource waste and/or large error in determining a resource segment to be updated in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a media resource updating method, where a media resource includes at least one resource segment to be updated to a user account, the method includes: when receiving an operation of viewing media resources by a user account, acquiring the first time of viewing the media resources by the user account; determining a number of update cycles included between a first time and a current time; and determining a target resource segment to be updated to the user account in the media resource at the current time according to the number of the updating periods and the number of the preset updating segments corresponding to each updating period between the first time and the current time.
In a possible implementation manner, each update cycle corresponds to the same preset update time; determining a number of update cycles included between a first time and a current time, comprising: and determining the number of updating periods included between the first time and the current time according to the early-late relationship between the first time and the preset updating time and the early-late relationship between the current time and the preset updating time.
In another possible implementation, determining the number of update cycles included between the first time and the current time according to the early-late relationship between the first time and the preset update time and the early-late relationship between the current time and the preset update time includes: determining that a first number of update cycles are included between the first time and the current time under the condition that the first time is later than or equal to the preset update time and the current time is earlier than the preset update time; determining that a second number of update cycles are included between the first time and the current time under the condition that 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 the first time is earlier than the preset update time and the current time is earlier than the preset update time; determining that a third number of update cycles are included between the first time and the current time under the condition that the first time is earlier than the preset update time and the current time is later than or equal to the preset update time; wherein the difference between the second quantity and the first quantity is 1, and the difference between the third quantity and the second quantity is 1.
In another possible implementation manner, determining a target resource segment to be updated to a user account in media resources at a current time according to the number of update cycles and the number of preset update segments corresponding to each update cycle between a first time and the current time includes: determining the number N of target resource segments according to the number of the 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 is less than or equal to the number of resource segments included in the media resource; under the condition that a plurality of resource segments in the media resource are arranged according to a preset updating sequence, determining the first N resource segments in the plurality of resource segments as target resource segments.
In another possible implementation manner, after determining a target resource segment to be updated to the user account in the media resource at the current time according to the number of the update cycles, 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, wherein the media resource page data comprises a state identifier of each resource segment in the media resource, the state identifier of the target resource segment represents that the target resource segment is in an updated state, and the state identifiers of the other resource segments represent that the other resource segments are in an un-updated state; and returning the media resource page data to the electronic equipment at the user account side.
In another possible implementation, the obtaining a first time when the user account first views the plurality of resource segments includes: acquiring anchor point identifications corresponding to a user account and a media resource; and determining the first time when the user account first views the media resource according to the anchor point identification.
In another possible implementation, before obtaining the anchor point identifier corresponding to the user account and the media resource, the method further includes: acquiring time of one or more operations of viewing the media resource, which are executed by the user account; determining the earliest time in the time of the one or more operations as the first time for the user account to view the plurality of resource segments; and generating anchor point identifications corresponding to the user account and the media resources, and establishing a corresponding relation between the first time when the user account first views the plurality of resource segments and the anchor point identifications.
According to a second aspect of the embodiments of the present disclosure, there is provided a media resource updating apparatus, where a media resource includes at least one resource segment to be updated to a user account, the apparatus includes: the acquisition unit is configured to execute first time for the user account to view the media resource when receiving operation of the user account to view the media resource; a first determination unit configured to perform a determination of a number of update cycles included between a first time and a current time; and the second determining unit is configured to determine a target resource segment to be updated to the user account in the media resource at the current time according to the number of the update cycles and the number of preset update segments corresponding to each update cycle between the first time and the current time.
In a possible implementation, each update period corresponds to the same preset update time; a first determination unit configured to specifically perform: and determining the number of updating periods included between the first time and the current time according to the early-late relationship between the first time and the preset updating time and the early-late relationship between the current time and the preset updating time.
In another possible implementation, the first determining unit is configured to specifically perform: determining that a first number of update cycles are included between the first time and the current time under the condition that the first time is later than or equal to the preset update time and the current time is earlier than the preset update time; determining that a second number of update cycles are included between the first time and the current time under the condition that 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 the first time is earlier than the preset update time and the current time is earlier than the preset update time; determining that a third number of update cycles are included between the first time and the current time under the condition that the first time is earlier than the preset update time and the current time is later than or equal to the preset update time; wherein, the difference between the second quantity and the first quantity is 1, and the difference between the third quantity and the second quantity is 1.
In another possible implementation, the second determining unit is configured to specifically perform: determining the number N of target resource segments according to the number of the 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 is less than or equal to the number of resource segments included in the media resource; under the condition that a plurality of resource segments in the media resource are arranged according to a preset updating sequence, determining the first N resource segments in the plurality of resource segments as target resource segments.
In another possible implementation manner, after determining a target resource segment to be updated to the user account in the media resource at the current time according to the number of the update cycles, the preset number of update segments corresponding to each update cycle between the first time and the current time, the apparatus further includes: the updating unit is configured to specifically execute generating of media resource page data, and the media resource page data includes a state identifier of each resource segment in the media resource, wherein the state identifier of the target resource segment represents that the target resource segment is in an updated state, and the state identifiers of the other resource segments represent that the other resource segments are in an un-updated state; and returning the media resource page data to the electronic equipment at the user account side.
In another possible implementation, the obtaining unit is configured to specifically perform: acquiring an anchor point identification corresponding to a user account and a media resource; and determining the first time when the user account firstly views the media resource according to the anchor point identification.
In another possible implementation, before obtaining the anchor point identifier corresponding to the user account and the media resource, the apparatus further includes: a creating unit configured to execute a time to acquire one or more operations of viewing a media resource that a user account has executed; determining the earliest time in the time of the one or more operations as the first time for the user account to view the plurality of resource segments; and generating anchor point identifications corresponding to the user account and the media resources, and establishing a corresponding relation between the first time when the user account first views the plurality of resource segments and the anchor point identifications.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the media asset updating method as described in the first aspect and any one of its possible embodiments.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a media resource updating method as in the first aspect and any one of its possible implementations; or when the instructions in the computer readable storage medium are executed by the media asset updating device, to enable the media asset updating device to perform the media asset updating method as described in the first aspect and any possible implementation manner thereof.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program or instructions for execution by a processor of a media asset updating method as in the first aspect and any one of its possible implementations.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: the media resource is divided into a plurality of resource segments, wherein the server updates the media resource (resource segment) for the user account according to the update cycle. When the user account views a plurality of resource segments, the server responds to the viewing operation of the user account and acquires the first time of the viewing operation of the user account for the media resource. The server then determines how many update cycles, i.e., the number of update cycles, are included between the time span of the first time and the current time. And then determining a target resource segment to be updated to the user account in the plurality of resource segments according to the number of the updating periods and the number of the updating segments preset in each updating period.
Through the above embodiment, when a user account views a certain media resource, the recorded first time when the user account views the media resource for the first time is obtained, and a resource segment (i.e., a target resource segment) to be updated to the user account in the media resource at the current time is determined according to the number of update cycles existing between the first time and the current time (i.e., the time when the user account views the media resource at this time). Because the database does not need to be polled regularly, the processing resources can be saved, the efficiency is improved, and the accuracy of resource updating is ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram illustrating a media asset update system according to an exemplary embodiment;
FIG. 2 is a diagram illustrating a target resource fragment system displayed on a terminal device in accordance with an illustrative embodiment;
FIG. 3 is a flow diagram illustrating a method for media asset update according to an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating a media asset update scenario in accordance with an exemplary embodiment;
FIG. 5 is a flow diagram illustrating another method of media asset update according to an example embodiment;
FIG. 6 is a flow diagram illustrating another method of media asset update according to an example embodiment;
FIG. 7 is a flow diagram illustrating another method of media asset update according to an example embodiment;
FIG. 8 is a flow chart illustrating another method of media asset update according to an exemplary embodiment;
FIG. 9 is a flow diagram illustrating another method of media asset update according to an example embodiment;
FIG. 10 is a flow chart illustrating another method of media asset update according to an exemplary embodiment;
FIG. 11 is a flow chart illustrating another method of media asset update according to an exemplary embodiment;
FIG. 12 is a block diagram illustrating another media asset updating apparatus in accordance with an illustrative embodiment;
FIG. 13 is a schematic diagram illustrating an electronic device in accordance with an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Before describing the media resource updating method provided by the embodiment of the present disclosure in detail, a brief description is given to an application context and an implementation environment related to the embodiment of the present disclosure.
First, a brief introduction is made to an application background to which the present disclosure relates.
Currently, a user usually uses application software installed in a user device to view various media resources such as video, audio, or images. A media asset may comprise a certain number of asset segments. For example, a television play set includes a multi-episode television play. Media resource updating refers to putting media resources or resource segments thereof on an application software platform for users to watch. In order to make the media resource update more reasonable, each resource segment has a preset update time, that is, for each resource segment, it cannot be viewed by the user until the current time reaches its preset update time, and it is likely to be viewed by the user only after the current time reaches its preset update time.
In some embodiments, the server updates a certain number of resource segments at each update time, and the user account has the right to view the resource segments. Therefore, the application software can determine the maximum number of the resource segments which can be viewed by the user account according to the current time of viewing the media resource by the user account and the unlocking time of each resource segment. Taking a media resource as a television show as an example, if M sets of television shows of N sets of television shows are unlocked (N is greater than or equal to M) on the user equipment, the maximum number of television shows that the user can watch the television shows is M.
In the related technology, the time for viewing the media resources by the user account recorded in the database is polled at regular time, and when the time for viewing the media resources by the user account is updated, the resource segments to be updated are determined by comparing the latest viewing time with the preset updating time of each resource segment.
However, in the above-mentioned timed polling method, if the polling interval is small, multiple invalid query operations will be generated, which wastes resources and causes low efficiency, and the database will be stressed, and if the polling interval is large, the query result will have a large error. That is to say, the above-mentioned invalid query operation is executed for a plurality of times for the database, and then one valid query operation can be completed, and the resource segment to be updated can be determined according to the obtained latest viewing time. Wherein, the effective query operation refers to an operation of querying the latest viewing time.
Therefore, in the related art, when the time of the effective query operation is not consistent with the latest viewing time, that is, the query is not timely, there is a certain error in the amount of resources updated for the user account. For example, 18. It can be seen that when the time of the effective query operation is inconsistent with the latest viewing time, the resource segment cannot be updated accurately in real time.
In view of the above problem, the present disclosure provides a media resource updating method, in which a media resource is divided into a plurality of resource segments, and a server updates the media resource to a user account according to a preset update period. When the user account views a plurality of resource segments, the server responds to the viewing operation of the user account and acquires the first time of the viewing operation of the user account for the media resource. The server then determines how many update cycles, i.e., the number of update cycles, are included between the time span of the first time and the current time. And then determining a target resource segment to be updated to the user account in the plurality of resource segments according to the number of the updating periods and the number of the updating segments preset in each updating period.
By the media resource updating method, when the user account checks the plurality of resource segments, the target resource segment to be updated can be determined in real time according to the number of the updating periods included between the current time and the time when the user account checks the plurality of resource segments for the first time. Compared with the related technology, the method saves the operation of regularly polling the time of viewing the media resources by the user account recorded in the database, occupies fewer database resources and has higher efficiency; meanwhile, the target media resource to be updated can be accurately determined for the user account in real time according to the current time of the user account checking resource, namely, the problem that the resource segment cannot be accurately updated in real time when the time of effective query operation is inconsistent with the latest checking time in the related technology is solved.
Next, the implementation architecture related to the present disclosure is briefly described below.
Fig. 1 is a schematic diagram of a media resource updating system provided by the present disclosure. As shown in fig. 1, the media resource update system includes a server 101 and a terminal device 102, and the server 101 may establish a connection with the terminal device 102 through a wired network or a wireless network.
In the present disclosure, the server 101 may include a plurality of media resource application service platforms, where each media resource application service platform corresponds to an application program. The application is installed on the terminal device 102, and displays the media resource on the content display interface of the terminal device 102. The user object logs in the application program by using the user account, and then the application program on the terminal device 102 can be operated by using the user account, and the terminal device 102 responds to the operation of the user account and displays media resources for the user account on the content display interface.
The server 101 stores a plurality of different media assets, wherein each media asset is stored in the server in the form of a plurality of asset fragments. When the server 101 receives a viewing operation of a user account for a certain media resource sent by the terminal device 102, the server 101 first obtains a first viewing time when the user account first views the media resource. And determining a target resource fragment to be updated to the user account currently in the plurality of resource fragments according to the number of the updating periods included between the first viewing time and the current time and the preset number of the updating fragments in each updating period.
The server 101 further modifies the state of the target resource segment from the locked state to the unlocked state, and then the terminal device 102 of the user account determines the target resource segment in the unlocked state according to the server 101, and displays the target resource segment in the unlocked state on the terminal device 102, for example, a target resource segments in the unlocked state, that is, the target resource segment 1 to the target resource segment a, and resource segments in the locked state, that is, the resource segments a +1 to the resource segment m, as shown in fig. 2 are displayed on the terminal device 102. The locking state is an un-updated state, and the unlocking state is an updated state.
It should be noted that, when the target resource segment displayed by the terminal device 102 is in the unlocked state, and the user account only needs to perform an operation on any target resource segment in the unlocked state, the terminal device may display the corresponding resource segment content. When the resource segment displayed by the terminal device 102 is in the locked state, and the user account performs an operation on any resource segment in the locked state, the terminal device will not display the corresponding resource segment content.
In some embodiments, the server 101 includes or is connected to a database, and the multimedia resources of the multimedia resource service platform may be stored in the database. The terminal 102 may implement an access operation to the multimedia resource in the database through the server 101.
In other embodiments, the server 101 may be a single server, or may be a server cluster composed of a plurality of servers. In some embodiments, the server cluster may also be a distributed cluster. The present disclosure is also not limited to a specific implementation of the server 101.
The terminal device 102 may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) Virtual Reality (VR) device, and the like, which can install and use a content community application (e.g., a fast hand), and the specific form of the terminal is not particularly limited by the present disclosure. The system can be used for man-machine interaction with a user through one or more modes of a keyboard, a touch pad, a touch screen, a remote controller, voice interaction or handwriting equipment and the like.
Alternatively, in the media resource updating system shown in fig. 1, the server 101 may be connected to at least one terminal device 102. The present disclosure is not limited to the number or type of terminal devices 102.
The media resource updating method provided by the embodiment of the disclosure can be applied to the server in fig. 1. For the sake of understanding, the media resource updating method provided by the present disclosure is specifically described below with reference to the accompanying drawings.
Fig. 3 is a flowchart illustrating a media resource updating method according to an exemplary embodiment, and when the media resource updating method is applied to a server in the media resource updating system, as shown in fig. 3, the method includes the following steps:
step S31, when the server receives the operation of viewing the media resource by the user account, the first time of viewing the media resource by the user account is obtained. The operation of viewing the media resource by the user account may be an operation of clicking a media resource identifier displayed on the terminal device by the user account, and the operation of viewing the media resource by the user account may also be an operation of clicking an information identifier displayed on the terminal device and associated with the media resource by the user account, where the information identifier may be a comment information identifier or a bullet screen information identifier.
The media resource comprises a plurality of resource segments, and the resource segments comprise at least one resource segment to be updated to the user account. For example, the plurality of resource segments includes at least one resource segment in a locked state.
The server stores the first viewing time of the user account executing the first viewing operation aiming at the media resource. When the user account views the resource segments on the electronic device again, the server acquires the first viewing time of the resource segments by the user account.
Step S32, determining the number of updating cycles included between the first time when the user account first views the plurality of resource segments and the current time.
The server updates a certain number of resource segments for the user account according to the update period, that is, the certain number of resource segments can be updated every other update period. The starting time and the ending time of the update period may be specifically set according to specific requirements, for example, specifically set according to the playing heat of the media resource, the playing time of each resource segment, or the total playing time of the media resource segment.
And the server determines the time span of the current time of viewing the media resource by the user account and the first viewing time of viewing the media resource by the user account according to the current time of viewing the media resource by the user account and the acquired first viewing time of viewing the media resource by the user account.
Illustratively, taking one week as an update cycle and 6 pm per monday night (i.e., 18 pm per monday) as an example, the first time when the user account first views the media resource is set to 6 pm of the first week (assumed to be 6 pm 1), and if the user account views the media resource at 10 pm of the second week (i.e., according to the assumed pm 1 pm 6, the current time is 22 pm 1/3), the number of update cycles included in the two time spans is one. If the user account views the media asset at 5 monday morning of the second week (i.e., the current time is at 53 days 1 month), then the two time spans include zero update cycles. If the user account views the media asset at 7 am on friday and morning on the third week (i.e., 7 am on the third week at 14 th of 1 month), then the two time spans include 2 update cycles. If the user account views the media asset at 5 am on the third week (i.e., 5 am on the third week, i.e., 1 month, 10 days), then the two time spans include 1 number of update cycles.
And step S33, determining target resource segments to be updated to the user account in the media resources at the current time according to the number of the updating periods and the number of preset updating segments corresponding to each updating period between the first time and the current time.
It should be noted that the preset number of update segments in each update period may be the same or different, for example, the preset number of update segments in the first update period is 3, and the preset number of update segments in the second update period may be 3, or may be 4, 5, or 6 except 3. The present disclosure does not specifically limit this.
Illustratively, the preset number of update segments per update period is 3. If the number of the included update cycles is 2, the target resource segment to be updated is the first 3 × 2=6 resource segments in the plurality of resource segments.
In another example, the number of update cycles and the target resource segment have a mapping relationship, for example, if the number of update cycles is 2, the target resource segment corresponding to 2 update cycles is 7 resource segments with a front bit order of the plurality of resource segments.
In the above embodiment, the media resource is divided into a plurality of resource segments, wherein the server updates the media resource for the user account according to the update cycle. When the user account views a plurality of resource segments, the server responds to the viewing operation of the user account and acquires the first time of the viewing operation of the user account for the media resource. The server then determines how many update cycles, i.e., the number of update cycles, are included between the time span of the first time and the current time. And then determining a target resource segment to be updated to the user account in the plurality of resource segments according to the number of the updating periods and the number of the updating segments preset in each updating period. Therefore, when the user account checks the plurality of resource segments, the implementation method can determine the target resource segment to be updated in real time according to the number of the updating periods included between the current time and the time when the user account checks the plurality of resource segments for the first time. Compared with the related technology, the method omits the operation of regularly polling the time of the user account recorded in the database to check the media resources, occupies fewer database resources and has higher efficiency; meanwhile, the target media resource to be updated can be accurately determined for the user account in real time according to the current time of the user account checking resource, namely, the problem that the quantity of the resource updated for the user account is inaccurate when the effective query operation is inconsistent with the latest checking time in the related technology is solved.
Through the above embodiment, when a user account views a certain media resource, the recorded first time when the user account views the media resource for the first time is obtained, and a resource segment (i.e., a target resource segment) to be updated to the user account in the media resource at the current time is determined according to the number of update cycles existing between the first time and the current time (i.e., the time when the user account views the media resource this time). Because the database does not need to be polled regularly, the processing resources can be saved, the efficiency is improved, and the accuracy of resource updating is ensured.
In one embodiment, each update period is preset with the same preset update time, wherein one preset update time corresponds to one update period. Step S32 is embodied in the following manner.
And the server determines the number of the update cycles included between the first time and the current time according to the early-late relationship between the first time and the preset update time and the early-late relationship between the current time and the preset update time.
It should be noted that, based on the application scenario in which the update period is preset with the same preset update time, the number of update periods included between the first time and the current time may be understood as the preset number of update times included between the first time and the current time.
The preset updating time preset in each updating period can be set according to experience values of setting personnel, can also be set according to user data (such as watching time, viewing times and the like) of a user account, and can also be set according to resource categories (such as literature resources, life resources, sports resources and the like) of media resources. In this regard, the present disclosure is not particularly limited.
In this embodiment, the preset update time is preset in the update cycle, so that the states of the plurality of resource segments can be allowed to be updated only after the preset update time in each update cycle, so that the server can determine the target resource segment to be updated to the user account by using the preset update time as a time limit node for allowing the states of the plurality of resource segments to be updated, and the purpose of reasonably allocating the plurality of resource segments is achieved.
By the embodiment, in order to make the updating process of the media resource more reasonable, the resource segments in the media resource can be updated after the preset updating time corresponding to a certain updating period. Since the resource segments in the media resource can be updated only after the preset update time corresponding to a certain update period, when determining the number of update periods included between the first time and the current time, the early-late relationship between the first time and the preset update time and the early-late relationship between the current time and the preset update time need to be considered, thereby ensuring the accuracy of the determined number of update periods.
In one embodiment, as shown in fig. 4, in the application scenario where the update period corresponds to the same preset update time, the first time may be earlier than the preset update time or later than the preset update time, and similarly, the current update time may be earlier than the preset update time or later than the preset update time. According to the difference of the early-late relationship of time, different numbers of update cycles can be determined, and assuming that T represents the cycle difference between the ith update cycle to which the current time belongs and the 1 st 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 are 4 cases as shown in (a), (b), (c), (d) of fig. 4: in the first case where the first time is later than or equal to the preset update time and the current time is earlier than the preset update time as shown in fig. 4 (a), T-1 (i.e., the first number) update cycles may be determined. In the second case where 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 as shown in fig. 4 (b), T (i.e., the second number) update cycles may be determined. In a third case where the first time is earlier than the preset update time and the current time is earlier than the preset update time as shown in (c) of fig. 4, T (i.e., the second number) update periods may be determined. In a fourth case where the first time is earlier than the preset update time and the current time is later than or equal to the preset update time as shown in fig. 4 (d), T +1 (i.e., the third number) update cycles may be determined. The realization mode ensures the reasonability of the mode of determining the number of the updating periods, thereby ensuring the accuracy of the number of the updating periods.
Specifically, in an embodiment, as shown in fig. 5, based on an application scenario in which a preset update time is preset in an update cycle, the step S32 may specifically include:
step S51, setting the updating period of the first time as the first updating period; and determining the updating period to which the current time belongs as the current updating period.
Specifically, the authority of the plurality of resource segments in the server to be allowed to be updated is opened every other update period, that is, regardless of whether the user account performs an operation on the plurality of resource segments, the server allows the states of the plurality of resource segments to be updated after the user account performs the operation every other update period in sequence according to a time sequence. Therefore, the server can determine the time period corresponding to each updating period, so as to respectively determine the first updating period to which the time for the user account to view the resource segments for the first time belongs and the current updating period to which the current time belongs.
For example, taking one week as an update cycle, the time period corresponding to the update cycle is set to 0 o 'clock of one week to 23 o' clock of one week, 59 o 'clock and 59 s of one week, or may be expressed in several o' clock and several seconds of several months and several days. For example, if the time 1 month 1 day 10 when the user account first views the plurality of resource segments is within the time period 1 month 1 day 0 corresponding to the second update cycle to 1 month 7 day 23 within 59 minutes 59 seconds, the time when the user account first views the plurality of resource segments is within the second update cycle, that is, the first update cycle is the second update cycle. For another example, if the current time is 1 month, 10 days and 10 hours, and belongs to the time period corresponding to the third update cycle, from 1 month, 8 days and 0 to 1 month, 14 days and 23 days, and the time for the user account to view the plurality of resource segments for the first time belongs to the third update cycle within 59 minutes and 59 seconds.
Optionally, the server may determine, according to a period difference between the time when the user account first views the plurality of resource segments and the current time, that the current update period to which the current time belongs to the several update periods, with an update period to which the time when the user account first views the plurality of resource segments belongs as a reference.
In the method, the times of first viewing and updating of the updating period of the server in the user account can be ignored, and the updating period to which the time for first viewing of the plurality of resource segments by the user account belongs is directly set as the first updating period.
Illustratively, the time period of the update cycle corresponding to the time 1 month, 1 day and 10 points when the user account first views the plurality of resource segments is within 59 minutes and 59 seconds from 0 point 1 month, 1 day and 7 days 1 month, and then the time when the user account first views the plurality of resource segments belongs to the 1 st update cycle, that is, the first update cycle is the 1 st update cycle. And if the current time is from 1 month, 10 days and 10 points to the time period corresponding to the second updating period, from 1 month, 8 days and 0 points to 1 month, 14 days and 23 points, 59 minutes and 59 seconds, the time for the user account to check the resource segments for the first time belongs to the second updating period.
The following is a detailed description of a scenario in which the first time is later than or equal to the first update period.
Step S52, under the condition that the first time is later than or equal to the preset updating time of the first updating period, if the current time is earlier than the preset updating time of the current updating period, determining a first number of updating periods according to the first updating period and the current updating period; and if the current time is later than or equal to the preset updating time of the current updating period, determining a second number of updating periods according to the first updating period and the current updating period.
Wherein the difference between the second number and the first number is 1.
In detail, under the condition that the first time for viewing the media resources by the user account is later than or equal to the preset updating time of the first updating period, if the current time is earlier than the preset updating time of the current updating period, the difference value of the period difference between the current updating period and the first updating period is differed from 1, and the differed difference value is determined as the first quantity. The number of update cycles included between the time the user account first viewed the plurality of resource segments and the current time is a first number of update cycles.
And if the current time is later than or equal to the preset updating time of the current updating period, determining the difference value of the period difference between the current updating period and the first updating period as a second number, and determining the number of the updating periods included between the time of the user account for firstly checking the plurality of resource fragments and the current time as the second number of updating periods.
For example, a week is used as the update cycle (0 o ' clock monday per week to 23 o ' clock 59 minutes 59 seconds per weekday), and 6 o ' clock morning per monday is used as the update cycle. Setting the first time for the user account to view the media resource for the first time as 6 am on friday and morning of the first updating period (assuming that 6 am on 1 month and 1 day, the first updating period is the first updating period), and as a result, the first time is later than or equal to the preset updating time of the first updating period.
If the user account views the media resource at 10 monday night of the second update cycle (i.e. according to the assumed 1 month, 1 day and 6 points, the current update cycle is the second update cycle, and the current time is 1 month, 3 days and 22 points), because the current time is 1 month, 3 days and 22 points are later than the preset update time of the current update cycle, 1 month, 3 days and 6 points, the difference between the cycle difference of the current update cycle and the first update cycle is: the difference between the second update period and the first update period is 1.
If the user account is set to check the media resource at 5 monday morning of the second update period (the current update period is the second update period, and the current time is 1 month, 3 days and 5 o ' clock), because the current time is 1 month, 3 days and 5 o ' clock is earlier than the preset update time of the current update period, 1 month, 3 days and 6 o ' clock, the difference between the period difference between the current update period and the first update period is 1: the difference between the second update period and the first update period is different from 1, i.e. the difference after difference is 0, i.e. the number of included update periods is zero.
The following is a detailed description of the scenario where the first time is earlier than the first update period.
Step S53, under the condition that the first time is earlier than the preset updating time of the first updating period, if the current time is earlier than the preset updating time of the current updating period, determining a second number of updating periods according to the first updating period and the current updating period; and if the current time is later than or equal to the preset updating time of the current updating period, determining the preset updating time of a third number of updating periods according to the first updating period and the current updating period.
Wherein the difference between the third number and the second number is 1.
In detail, under the condition that the first time of viewing the media resource by the user account is earlier than the preset updating time of the first updating period, if the current time is earlier than the preset updating time of the current updating period, the difference value of the period difference between the current updating period and the first updating period is determined as the second quantity. The number of update cycles included between the time the user account first viewed the plurality of resource segments and the current time is the second number of update cycles.
And if the current time is later than or equal to the preset updating time of the current updating period, summing the difference value of the period difference between the current updating period and the first updating period and 1, and determining the summed value as a third quantity, wherein the quantity of the updating periods included between the time of the user account for checking the plurality of resource fragments for the first time and the current time is the third quantity of updating periods.
For example, taking one week as an update cycle (0 o 'clock monday per week to 23 o' clock 59 minutes 59 seconds per weekday week), five 18 o 'clock 00 o' clock per week as an example. Setting the first time for the user account to view the media resource for the first time as 6 am on friday and morning of the first updating period (assuming that 6 am on 1 month and 1 day, the first updating period is the first updating period), and as a result, the first time is earlier than the preset updating time of the first updating period.
If the user account views the media resource at friday 22 of the second update cycle (i.e. according to the assumed 1 month, 1 day and 6 points, the current update cycle is the second update cycle, and the current time is 1 month and 3 days and 22 points), because the current time is 1 month and 3 days and 22 points are later than the preset update time of the current update cycle, 1 month and 3 days and 18 points, the sum of the difference value of the cycle difference between the current update cycle and the first update cycle and 1 is: and the sum of the difference value of the second updating period and the first updating period and 1, wherein the difference value is 1, the sum value is 2, and the number of the updating periods is 2.
If the user account is set to view the media resource at 5 monday morning of the second update period (the current update period is the second update period, and the current time is 51 month and 3 days), because the 5 o 'clock of the current time 1 month and 3 days is earlier than the 18 o' clock of the preset update time 1 month and 3 days of the current update period, the difference value of the period difference between the current update period and the first update period is: the difference between the second update period and the first update period is 1, i.e. the number of update periods involved is 1.
In combination with practical applications, there are two different setting modes of the preset update time. The following describes the determination of the number of update cycles for different settings.
First, the start time of each update period and the preset update time of the resource segments are set to be the same, that is, the preset update time and the start time are the same, for example, one update period is one week, the update period is from 0 o 'clock of monday to 23 o' clock of monday 59 minutes 59 seconds, the start time is zero point of monday, and the preset update time is also zero point of monday. The setting mode can also be understood as that the states of a plurality of resource segments can be updated when the updating period enters the next updating period from one updating period.
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 time is earlier than the preset update time of the first update cycle. Due to the particularity of the setting mode, when the preset updating time is the same as the starting time, the current time, the preset updating time and the first time do not need to be judged. The number of update cycles can be determined by directly using the cycle difference. Wherein each update period comprises a start time and an end time of each update period, i.e. one update period from the start time to the end time.
Specifically, determining a first updating period to which the first time belongs; determining the current updating period of the current time; and determining the number of the updating periods according to the period difference between the current updating period and the first updating period.
And secondly, setting the preset updating time of the resource segments as the time except the starting time of the updating period in the updating period. For example, a week is a refresh cycle, the refresh cycle is from 0 monday to 23 monday, 59 minutes and 59 seconds, the starting time is zero on monday, but the preset refresh time is 18 points 00 per saturday. The setting may also be understood as that after an update cycle enters a next update cycle, the states of the resource segments can be updated at or after a preset update time of the next update cycle.
It should be noted that, in the setting mode of the preset update time, the determined number of update cycles is the same as the embodiment of determining the number of update cycles in the application scenario preset with the same preset update time based on the update cycle, and therefore, no further description is given here.
In one embodiment, the step S33 shown in fig. 6 can be implemented according to the following steps:
in step S331, a target resource segment number N is determined according to the number of update cycles and the number of update segments preset per update cycle.
Wherein N is an integer greater than or equal to 0 and N is less than or equal to the number of the plurality of resource segments.
The server prestores the number of the updating periods, the preset number of the updating fragments in each updating period and the mapping relation of the number of the target resource fragments, and determines the number of the target resource fragments according to the mapping relation of the number of the updating periods, the preset number of the updating fragments in each updating period and the number of the target resource fragments. The mapping relationship may be specifically stored in a table, and the mapping relationship may be obtained by table lookup or may be a model formula.
In an example, if the number of the update cycles is 3 and the preset number of update fragments per update cycle is 5, the corresponding number of target resource fragments obtained by table lookup is 17.
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, the following model formula is substituted: the target resource segment number = a preset first view number + an update cycle number + a preset update segment number per update cycle, that is, 5+3 + 5=20, then the target resource segment number is 20.
Step S332, determining the first N resource segments of the plurality of resource segments as target resource segments when the plurality of resource segments are arranged according to the preset updating order.
Illustratively, the 40 resource segments are arranged from 1 st to 40 th according to a preset updating sequence. When the number of the target resource segments is determined to be 17, the 17 resource segments with the bit sequence from 1 st to 17 th are determined as the target resource segments. In this embodiment, the plurality of resource segments are arranged according to a preset update sequence, so that the server obtains the target resource segments directly according to the arrangement sequence of the resource segments after determining the number of the target resource segments.
Through the implementation mode, the N resource segments with the resource segment bit sequence of the first N in the plurality of resource segments are directly determined as the target resource segments, and the target resource segments do not need to be screened through comparison one by one, so that the time for screening the target resource segments is reduced, and the efficiency for determining the target resource segments is improved.
In one embodiment, in conjunction with fig. 3, after the target resource segment is determined, i.e., after step S33, as shown in fig. 7, the following steps may also be performed to unlock the state of the target resource segment.
Step S34, generating media resource page data, wherein the media resource page data comprises the state identifier of each resource segment in the media resource.
The media resource page data is used for indicating that the target resource segment is displayed on a certain display page of the electronic equipment of the user account. The state identification of each resource segment comprises the state identification of the target resource segment and the state identifications of the rest resource segments. The state identification of the target resource segment represents that the target resource segment is in an updated state, and the state identifications of the rest resource segments represent that the rest resource segments are in an un-updated state.
In some embodiments, the updated state may be an unlocked state and the un-updated state may be a locked state.
It should be noted that the updated status identifier of the target resource segment is used for displaying the content of the target resource to the user account by the electronic device corresponding to the user account when the user account triggers the viewing operation for the target resource segment. The non-updated state identifier of the remaining resource segment is used for not displaying the content of the remaining resource segment to the user account by the electronic device corresponding to the user account when the user account triggers the viewing operation for the remaining resource segment.
And step S35, returning the media resource page data to the electronic equipment on the user account side. The server returns the state identifier of the target resource segment and the state identifiers of the other resource segments, which are included in 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 aiming at the state identifier of the target resource segment, the electronic device displays the resource content of the target resource segment to the user account.
It should be noted that, when the number N of the target resource segments is equal to the number of the multiple resource segments, it indicates that all the multiple resource segments are in the updated state. Further, after the states of the plurality of resource segments are all in the updated state, when the user account performs the viewing operation on the media resource again, the server controls the electronic device to directly display all the plurality of resource segments to the user account.
For example, when the number N of the target resource segments is equal to the number of the plurality of resource segments, the state of the target resource segment is updated from the locked state to the unlocked state, that is, the states of the plurality of resource segments are all updated to the unlocked state, and then the plurality of resource segments do not include the resource segment to be updated to the user account. Therefore, after the states of the resource segments are all updated to the unlocked states, when the user account performs the viewing operation on the media resource again, the server controls the electronic device to directly show the resource segments in all the unlocked states to the user account.
In some embodiments, the target resource segment in the updated state and the remaining resource segments in the non-updated state are marked with different identifiers to distinguish the content of the resource segment displayed from the content of the resource segment not displayed, thereby prompting the user which resource segments can display the corresponding content and which resource segments can not display the corresponding content.
In this embodiment, the state of the target resource segment and the states of the remaining resource segments are respectively identified, and the state identifiers are set in the media resource page data, so that the electronic device can distinguish the states of the resource segments according to the state identifiers of the resource segments, thereby displaying the target resource segment and the remaining resource segments in different manners.
In an embodiment, referring to fig. 3, as shown in fig. 8, the step S31 may be further embodied by the following embodiment to obtain a time when the user account first views the plurality of resource segments.
Step S311, obtain an anchor point identifier corresponding to the user account and the media resource.
Step S312, according to the anchor point identification, determining the time when the user account first views the media resource.
Wherein the anchor point identification is used to associate or indicate a first time at which the user account first views the media resource.
In this embodiment, the first time when the user account associated with the anchor point identifier first views the media resource is determined by the anchor point identifier. Therefore, the first time for the user account to view the media resource for the first time is determined through the anchor point identification, the query times of invalid query and non-first-view time are reduced, the speed of determining the first time is improved, and the efficiency of determining the target resource segment is improved.
In one embodiment, as shown in fig. 9 in conjunction with fig. 8, the following steps may also be performed before step S311.
Step S91, acquiring a time when the user account has performed one or more operations of viewing the media resource.
And step S92, determining the earliest time in the time of one or more operations as the time when the user account views the resource segments for the first time.
In particular, an earliest in time operation in time of one or more operations performed by the user account to view the media asset is determined. And aggregating the time of the one or more operations into the time of an earliest operation, wherein the time of the earliest operation is determined as the time when the user account firstly views the plurality of resource segments.
And step S93, generating anchor point identifications corresponding to the user account and the media resources, and establishing a corresponding relation between the first time when the user account first views the media resources and the anchor point identifications.
In this embodiment, the earliest time in the time of the one or more operations is determined as the first time when the user account first views the media resource, so that the first time when the user account is acquired is more accurate. And meanwhile, the anchor point identifications corresponding to the user account and the media resources are correspondingly associated with the first-time viewing time, so that the time for the user account to view a plurality of resource segments for the first time can be acquired more accurately and quickly through the anchor point identifications.
In one embodiment, as shown in fig. 10, the following is a specific construction flow of anchor point identification.
(1) And acquiring data of the user account from the historical record of the user account.
(2) And judging whether the data of the user account comprises data of the user account executing operation aiming at the media resource.
(3) And if the data of the user account does not include the data of the user account executing the operation on the media resource, finishing the construction of the anchor point identification.
(4) And if the data of the user account comprises the data of the user account executing the operation aiming at the media resource, aggregating the data of the user account executing the operation aiming at the media resource, and determining the time corresponding to the operation with the earliest time as the first time.
(5) And constructing an anchor point identification, and associating the first time of the anchor point identification with the user account and the media resource.
As a specific embodiment, as shown in fig. 11, a specific construction process of the anchor point identifier is as follows.
Step S11, when the server receives an operation of checking a plurality of resource segments by a user account sent by the electronic equipment, determining whether the plurality of resource segments comprise resource segments in a locked state; if so, the process proceeds to step S13, otherwise, the process proceeds to step S12.
And step S12, the server returns the resource segments in all the unlocking states to the electronic equipment.
And S13, acquiring the first time when the user account views the plurality of resource segments for the first time.
Step S14, determining the number of updating cycles included between the first time when the user account first views the plurality of resource segments and the current time.
And S15, determining a target resource segment to be updated to the user account currently from the plurality of resource segments according to the number of the updating periods and the preset number of the updating segments in each updating period between the first time and the current time.
In the embodiment, whether a plurality of resource segments are in all unlocked states is determined; and further determining a target resource segment in the plurality of resource segments. By the method, the process of repeatedly executing the target resource fragment determination on the resource fragments in all the unlocked states is avoided, and the efficiency of displaying the resource fragments in all the unlocked states for the user account is improved.
In order to realize the functions, the media resource updating device comprises a hardware structure and/or a software module which are used for executing the corresponding functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
An embodiment of the present disclosure further provides a media resource updating apparatus 12 as shown in fig. 12, where a media resource includes multiple resource segments, and the multiple resource segments include at least one resource segment to be updated to a user account, the apparatus includes: an acquisition unit 120, a first determination unit 121, a second determination unit 122, an update unit 123, and a creation unit 124.
The media resource comprises at least one resource segment to be updated to the user account, and the device comprises: the obtaining unit 120 is configured to, when receiving an operation of viewing a media resource by a user account, obtain a first time when the user account views the media resource for the first time; a first determining unit 121 configured to perform determining the number of update cycles included between the first time and the current time; the second determining unit 122 is configured to determine, according to the number of the update cycles and the preset number of update segments corresponding to each update cycle between the first time and the current time, a target resource segment to be updated to the user account in the media resource at the current time.
In a possible implementation, each update period corresponds to the same preset update time; a first determining unit 121 configured to specifically perform: and determining the number of updating periods included between the first time and the current time according to the early-late relationship between the first time and the preset updating time and the early-late relationship between the current time and the preset updating time.
In another possible implementation, the first determining unit 121 is configured to specifically perform: determining that a first number of update cycles are included between the first time and the current time under the condition that the first time is later than or equal to the preset update time and the current time is earlier than the preset update time; determining that a second number of update cycles are included between the first time and the current time under the condition that 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 the first time is earlier than the preset update time and the current time is earlier than the preset update time; determining that a third number of update cycles are included between the first time and the current time under the condition that the first time is earlier than the preset update time and the current time is later than or equal to the preset update time; wherein the difference between the second quantity and the first quantity is 1, and the difference between the third quantity and the second quantity is 1.
In another possible implementation, the second determining unit 122 is configured to specifically perform: determining the number N of target resource segments according to the number of the 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 is less than or equal to the number of resource segments included in the media resource; under the condition that a plurality of resource segments in the media resource are arranged according to a preset updating sequence, determining the first N resource segments in the plurality of resource segments as target resource segments.
In another possible implementation manner, after determining a target resource segment to be updated to the user account in the media resource at the current time according to the number of the update cycles, the preset number of update segments corresponding to each update cycle between the first time and the current time, the apparatus further includes: the updating unit 123 is configured to specifically execute generating media resource page data, where the media resource page data includes a state identifier of each resource segment in the media resource, where the state identifier of the target resource segment indicates that the target resource segment is in an updated state, and the state identifiers of the remaining resource segments indicate that the remaining resource segments are in an un-updated state; and returning the media resource page data to the electronic equipment at the user account side.
In another possible implementation, the obtaining unit 120 is configured to specifically perform: acquiring anchor point identifications corresponding to a user account and a media resource; and determining the first time when the user account firstly views the media resource according to the anchor point identification.
In another possible implementation, before obtaining the anchor point identifier corresponding to the user account and the media resource, the apparatus further includes: a creating unit 124 configured to perform a time to acquire one or more operations of viewing the media asset that the user account has performed; determining the earliest time in the time of the one or more operations as the first time for the user account to view the plurality of resource segments; and generating anchor point identifications corresponding to the user account and the media resources, and establishing a corresponding relation between the first time when the user account first views the plurality of resource segments and the anchor point identifications.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Fig. 13 is a schematic diagram of an electronic device provided by the present disclosure. As in fig. 13, the electronic device 50 may include at least one processor 501 and a memory 503 for storing processor-executable instructions. Wherein the processor 501 is configured to execute instructions in the memory 503 to implement the media asset updating method in the following embodiments.
Additionally, the electronic device 50 may also include a communication bus 502, at least one communication interface 504, an input device 506, and an output device 505.
Processor 501 may be a Central Processing Unit (CPU), a micro-processing unit, an ASIC, or one or more integrated circuits for controlling the execution of programs in accordance with the disclosed aspects.
The communication bus 502 may include a path that conveys information between the aforementioned components.
The communication interface 504 may be any device, such as a transceiver, for communicating with other devices or communication networks, such as an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), etc.
An input device 506 is used to receive input signals and an output device 505 is used to output signals.
The memory 503 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact-disc-read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory may be self-contained and connected to the processing unit by a bus. The memory may also be integrated with the processing unit.
The memory 503 is used for storing instructions for executing the disclosed solution, and is controlled by the processor 501. The processor 501 is configured to execute instructions stored in the memory 503 to implement the functions of the disclosed method.
In particular implementations, processor 501 may include one or more CPUs, such as CPU0 and CPU1 in fig. 13, as one embodiment.
In particular implementations, an electronic device may include multiple processors, such as processor 501 and processor 507 in fig. 13, for example, as an embodiment. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
The electronic device includes, as shown in fig. 13: a processor 501 and a memory 503 for storing instructions executable by the processor 501; wherein the processor 501 is configured to execute executable instructions to implement the media resource updating method according to any one of the possible embodiments. And the same technical effect can be achieved, and in order to avoid repetition, the description is omitted here.
The embodiments of the present disclosure also provide a computer-readable storage medium, where instructions in the computer-readable storage medium, when executed by a processor of a media resource updating apparatus or an electronic device, enable the media resource updating apparatus or the electronic device to perform the media resource updating method according to any one of the above-mentioned possible embodiments. And the same technical effect can be achieved, and in order to avoid repetition, the description is omitted.
Embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions, where the computer program or instructions are executed by a processor to perform the media resource updating method according to any one of the above possible embodiments. And the same technical effect can be achieved, and in order to avoid repetition, the description is omitted.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A method for updating a media resource, wherein the media resource comprises at least one resource segment to be updated to a user account, the method comprising:
when receiving the operation of viewing the media resource by the user account, acquiring the first time of viewing the media resource by the user account;
determining a number of update cycles included between the first time and a current time;
and determining a target resource segment to be updated to the user account in the media resources at the current time according to the number of the update cycles and the number of preset update segments corresponding to each update cycle between the first time and the current time.
2. The method according to claim 1, wherein each of the update periods corresponds to a same preset update time; the determining the number of update cycles included between the first time and the current time includes:
and determining the number of updating periods included between the first time and the current time according to the early-late relationship between the first time and the preset updating time and the early-late relationship between the current time and the preset updating time.
3. The method according to claim 2, wherein the determining the number of update cycles included between the first time and the current time according to the early-late relationship between the first time and the preset update time and the early-late relationship between the current time and the preset update time comprises:
determining that a first number of update cycles are included between the first time and the current time when the first time is later than or equal to the preset update time and the current time is earlier than the preset update time;
determining that a second number of update cycles are included between the first time and the current 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 the first time is earlier than the preset update time and the current time is earlier than the preset update time;
determining that a third number of update cycles are included between the first time and the current time under the condition that the first time is earlier than the preset update time and the current time is later than or equal to the preset update time;
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.
4. The method for updating a media resource according to claim 1, wherein the determining, according to 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, a target resource segment to be updated to the user account in the media resource at the current time includes:
determining the number N of the target resource segments according to the number of the 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 is less than or equal to the number of resource segments included in the media resource;
and under the condition that a plurality of resource segments in the media resource are arranged according to a preset updating sequence, determining the first N resource segments in the plurality of resource segments as the target resource segments.
5. The method for updating media resources according to any one of claims 1 to 4, wherein after determining a target resource segment to be updated to the user account in the media resources at the current time according to 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, the method further comprises:
generating media resource page data, wherein the media resource page data comprises a state identifier of each resource segment in the media resource, the state identifier of the target resource segment represents that the target resource segment is in an updated state, and the state identifiers of the other resource segments represent that the other resource segments are in an un-updated state;
and returning the media resource page data to the electronic equipment at the user account side.
6. The media resource updating method according to any one of claims 1 to 4, wherein the obtaining the first time when the user account first views the plurality of resource segments comprises:
acquiring an anchor point identification corresponding to the user account and the media resource;
and determining the first time when the user account first views the media resource according to the anchor point identification.
7. The media resource updating method of claim 6, wherein prior to the obtaining of the anchor point identification corresponding to the user account and the media resource, the method further comprises:
obtaining a time at which one or more operations to view the media resource have been performed by the user account;
determining an earliest time in the time of the one or more operations as a first time when the plurality of resource segments are viewed by the user account for the first time;
generating anchor point identifications corresponding to the user account and the media resources, and establishing a corresponding relation between the first time when the user account first views the plurality of resource segments and the anchor point identifications.
8. A media asset updating apparatus, wherein the media asset comprises at least one asset segment to be updated to a user account, the apparatus comprising:
the obtaining unit is configured to execute first time for the user account to view the media resource when receiving operation of the user account to view the media resource;
a first determination unit configured to perform determining a number of update cycles included between the first time and a current time;
and the second determining unit is configured to determine a target resource segment to be updated to the user account in the media resources at the current time according to the number of the update cycles and the number of preset update segments corresponding to each update cycle between the first time and the current time.
9. An electronic device, comprising:
a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the media asset updating method of any of claims 1 to 7.
10. A computer-readable storage medium having instructions thereon which, when executed by a processor of an electronic device, enable the electronic device to perform the media asset updating method of any of claims 1 to 7.
11. A computer program product comprising a computer program or instructions, wherein the computer program or instructions, when executed by a processor, implement the media asset updating method of any of claims 1 to 7.
CN202210841516.3A 2022-07-18 2022-07-18 Media resource updating method and device, electronic equipment and storage medium Pending CN115203222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210841516.3A CN115203222A (en) 2022-07-18 2022-07-18 Media resource updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210841516.3A CN115203222A (en) 2022-07-18 2022-07-18 Media resource updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115203222A true CN115203222A (en) 2022-10-18

Family

ID=83581187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210841516.3A Pending CN115203222A (en) 2022-07-18 2022-07-18 Media resource updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115203222A (en)

Similar Documents

Publication Publication Date Title
US10320638B1 (en) Method and system for determining workload availability in a multi-tenant environment
US9942355B2 (en) Device context monitoring
JP7357042B2 (en) Method and apparatus for tracking, capturing, and synchronizing activity data across multiple devices
CN110008694A (en) A kind of application security control method, device, equipment and readable storage medium storing program for executing
CN112837154A (en) Method and device for registering and executing timing intelligent contract in block chain
CN113778652A (en) Task scheduling method and device, electronic equipment and storage medium
CN114185489A (en) Data synchronization method and device, electronic equipment and storage medium
US20180218415A1 (en) Data center and information processing device
US11500663B1 (en) Predictive virtual machine launch-based capacity management
CN114650320A (en) Task scheduling method and device, storage medium and electronic equipment
CN113705179A (en) Document collaborative editing method and device and electronic equipment
CN115203222A (en) Media resource updating method and device, electronic equipment and storage medium
CN107220815A (en) Agenda managing method, device, system and storage medium
CN116502869A (en) Task allocation method, device, electronic equipment and computer readable medium
CN115660344A (en) User scheduling method and device, electronic equipment and storage medium
CN115695210A (en) Cloud server deployment method and device, electronic equipment and storage medium
CN113541976B (en) Tissue creation method and device, electronic equipment and storage medium
CN114036917A (en) Report generation method and device, computer equipment and storage medium
US11301442B2 (en) Method and system for using array level time buckets to efficiently calculate top contributors using relevant performance metric
CN111580942A (en) Method and device for processing timing task of distributed system and storage medium
CN111311014A (en) Service data processing method and device, computer equipment and storage medium
CN109726972A (en) Enterprise computer assets management method, device, equipment and readable storage medium storing program for executing
CN116760505B (en) Time synchronization method based on open source hong Monte distributed data object
CN114495363B (en) Target equipment locking method and device, electronic equipment and storage medium
CN114816172B (en) Personnel scheduling interaction processing method and device and electronic equipment

Legal Events

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