A method, device, equipment and medium for reporting client learning progress

By setting up a progress reporting queue on the client and using strategies with different time intervals to store and report the progress reporting tasks, the problems of excessive server bearing pressure and excessive resource consumption in the existing technology are solved, and more efficient task reporting and resource management are achieved.

CN119788921APending Publication Date: 2025-04-08GEEKBANG TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411901308.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, the viewing progress is obtained and reported every 1 second, resulting in excessive load pressure on the server, and when the number of users is large, it is easy to reach the traffic limit and stop the service; at the same time, frequent local database writing and updates occupy a large amount of storage space, consume CPU resources, and lead to delays in other tasks.

Method used

By setting up a progress reporting queue, storing and reporting progress reporting tasks at different time intervals, improving task reporting efficiency, reducing server load pressure, and reducing resource consumption. The specific method includes obtaining viewing information and creating progress reporting tasks based on the first time interval, and obtaining multiple tasks from the queue based on the second time interval and reporting them.

Benefits of technology

It improves the efficiency of task reporting, reduces server load pressure, reduces resource consumption, and avoids the problems of service stoppage and excessive storage space occupied due to frequent reporting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788921A_ABST
    Figure CN119788921A_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, equipment and medium for reporting learning progress on a client. The method includes: obtaining viewing information of candidate audio and video based on a first time interval, and determining the progress reporting information of the candidate audio and video based on the viewing information; creating a candidate progress reporting task for the progress reporting information of the candidate audio and video, and storing the candidate progress reporting task in a progress reporting queue; obtaining multiple target progress reporting tasks from the progress reporting queue based on a second time interval, and reporting the target progress reporting task to the target server, while recording the reporting status of the target progress reporting task; wherein the second time interval is greater than the first time interval. The technical solution can store and report progress reporting tasks at different time intervals with the help of the progress reporting queue, thereby improving the efficiency of task reporting, reducing the server load pressure, and reducing resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a method, device, equipment and medium for reporting learning progress on a client. Background Art

[0002] When watching and learning audio and video, it is very important to report the progress synchronously. By reporting the viewing progress to the server, users can continue to learn and watch audio and video content on any device. At this time, there is no need to remember the progress of watching audio and video, nor do you need to manually drag the progress bar to find the position when watching next time.

[0003] In the related technology, the viewing progress is obtained and reported to the server every 1 second, which causes too much pressure on the server. If the number of users is slightly more, the traffic limit will be reached and the service will be stopped. In addition, when there is no network and when downloading for offline viewing, the local database will be written and updated every second, resulting in too many local threads and too much data accumulation, which takes up a lot of valuable storage space. Therefore, the reporting and storage tasks every 1 second consume CPU resources unnecessarily, causing delays in many other tasks. Summary of the invention

[0004] The present invention provides a method, device, equipment and medium for reporting learning progress on a client, which can store and report progress reporting tasks by setting different time intervals with the help of a progress reporting queue, thereby improving task reporting efficiency, reducing server load pressure and reducing resource consumption.

[0005] According to one aspect of the present invention, a method for reporting learning progress of a client is provided, the method comprising:

[0006] Acquire viewing information of the candidate audio and video based on the first time interval, and determine the progress reporting information of the candidate audio and video according to the viewing information; wherein the viewing information includes the audio and video source, the audio and video content, the audio and video viewing object, and the audio and video viewing attributes;

[0007] Creating a candidate progress reporting task for the progress reporting information of the candidate audio and video, and storing the candidate progress reporting task in a progress reporting queue;

[0008] Based on a second time interval, a plurality of target progress reporting tasks are obtained from the progress reporting queue, and the target progress reporting tasks are reported to a target server, while recording the reporting status of the target progress reporting tasks; wherein the second time interval is greater than the first time interval.

[0009] According to another aspect of the present invention, a device for reporting learning progress on a client is provided, the device comprising:

[0010] A progress reporting information determination module, configured to obtain viewing information of a candidate audio or video based on a first time interval, and determine the progress reporting information of the candidate audio or video according to the viewing information; wherein the viewing information includes an audio or video source, an audio or video content, an audio or video viewing object, and an audio or video viewing attribute;

[0011] A progress reporting task creation module, used to create a candidate progress reporting task for the progress reporting information of the candidate audio and video, and store the candidate progress reporting task in a progress reporting queue;

[0012] The progress reporting task reporting module is used to obtain multiple target progress reporting tasks from the progress reporting queue based on a second time interval, and report the target progress reporting tasks to the target server, while recording the reporting status of the target progress reporting tasks; wherein the second time interval is greater than the first time interval.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and,

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the client learning progress reporting method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the client learning progress reporting method described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention obtains the viewing information of the candidate audio and video based on the first time interval, and determines the progress reporting information of the candidate audio and video according to the viewing information; wherein the viewing information includes the audio and video source, audio and video content, audio and video viewing object and audio and video viewing attributes; creates a candidate progress reporting task for the progress reporting information of the candidate audio and video, and stores the candidate progress reporting task in the progress reporting queue; obtains multiple target progress reporting tasks from the progress reporting queue based on the second time interval, and reports the target progress reporting task to the target server, and records the reporting status of the target progress reporting task at the same time; wherein the second time interval is greater than the first time interval. This technical solution can set different time intervals for storing and reporting progress reporting tasks with the help of the progress reporting queue, thereby improving the efficiency of task reporting, reducing the load pressure on the server, and reducing resource consumption.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 This is a flowchart of a method for reporting learning progress of a client provided according to Embodiment 1 of the present invention;

[0022] Figure 2 This is a flowchart of a method for reporting learning progress on a client provided according to Embodiment 2 of the present invention;

[0023] Figure 3 This is a structural diagram of a device for reporting learning progress on a client provided according to Embodiment 3 of the present invention;

[0024] Figure 4 It is a structural schematic diagram of an electronic device for implementing a method for reporting learning progress of a client according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] Embodiment 1

[0028] Figure 1 This is a flow chart of a method for reporting client learning progress provided in the first embodiment of the present invention. This embodiment is applicable to the case of efficiently reporting client learning progress. The method can be executed by a client learning progress reporting device. The client learning progress reporting device can be implemented in the form of hardware and / or software. The client learning progress reporting device can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes:

[0029] S110: Acquire viewing information of the candidate audio and video based on the first time interval, and determine progress reporting information of the candidate audio and video according to the viewing information.

[0030] Among them, the first time interval may refer to the time interval for obtaining the candidate audio and video viewing information pre-set according to actual needs. The candidate audio and video can be understood as any audio or video that needs to report the viewing progress. Exemplarily, the first time interval can be set to 1 second. Among them, the viewing information of the candidate audio and video includes the audio and video source, audio and video content, audio and video viewing object and audio and video viewing attributes. Specifically, the audio and video source can be used to indicate which client device (such as a mobile phone, tablet or computer, etc.) the candidate audio and video comes from, and can be distinguished by the device ID; the audio and video viewing object can be used to indicate which user watches the candidate audio and video, and can be distinguished by the user ID. Exemplarily, the audio and video viewing attributes may include audio and video identification (such as ID or name), viewing start time, viewing end time, viewing duration (that is, the time interval between the viewing end time and the viewing start time) and viewing type (used to indicate whether the viewing content is audio or video). The progress reporting information can be understood as standard format information that needs to be reported for viewing progress. It should be noted that due to the restrictions of network transmission on data formats, the obtained candidate audio and video viewing information cannot be directly transmitted over the network, so it needs to be converted into a standard data format supported by network transmission, such as jsonString format.

[0031] In this embodiment, firstly, viewing information of the candidate audio and video is obtained based on the first time interval, and then the progress reporting information of the candidate audio and video is determined according to the viewing information. Optionally, determining the progress reporting information of the candidate audio and video according to the viewing information includes: converting the viewing information into standard format information based on a preset data structure; and performing asymmetric encryption processing on the standard format information to obtain the progress reporting information.

[0032] Among them, the preset data structure may refer to a standard data structure pre-set according to actual needs, which can be used to unify the data structure of audio and video viewing information. It should be noted that due to the different data formats of audio and video, and the variety of audio and video information, it is necessary to determine the progress reporting information based on the viewing type, which will result in numerous and confusing fields for the progress reporting information. In order to reduce the difficulty of determining the progress reporting information, a unified data structure (i.e., a preset data structure) is set in this embodiment, and the progress reporting information of the candidate audio and video is determined based on the unified data structure, without distinguishing the data formats of different viewing types.

[0033] Exemplarily, the preset data structure may include three parts: public fields, content fields, and standard data formats. Among them, public fields may include title (header information), start_time (start time), end_time (end time), total_time (total duration), and type (type), which correspond to the various parameters in the audio and video viewing attributes respectively; the content field may include device ID, user ID, and audio and video content. The standard data format may refer to a data format that is pre-set according to actual needs and can be directly transmitted over the network. Exemplarily, the standard data format can be set to jsonString format.

[0034] In addition, there may be a risk of information being intercepted and tampered with during network transmission, which may easily lead to information leakage, resulting in the inability to report information or reporting errors. Therefore, in order to improve information security during network transmission, after converting the viewing information into standard format information based on a preset data structure, an asymmetric encryption algorithm can be used to asymmetrically encrypt the standard format information and encrypt it into a fixed-length string to obtain progress reporting information. After the progress reporting information is successfully reported to the target server, the progress reporting information can be parsed by the target server using a private key. Among them, the target server can be used to indicate which server to report the progress reporting information to.

[0035] Through such a setting, this solution reduces the difficulty of determining progress reporting information based on a unified data structure (no need to distinguish data formats of different viewing types), and can effectively ensure information security during network transmission through asymmetric encryption processing.

[0036] S120: Create a candidate progress reporting task for the progress reporting information of the candidate audio and video, and store the candidate progress reporting task in a progress reporting queue.

[0037] The candidate progress reporting task may refer to the progress reporting task corresponding to the progress reporting information, and may be used to instruct to report the progress reporting information to the target server. The progress reporting queue may be used to store the created candidate progress reporting tasks.

[0038] In this embodiment, after determining the progress reporting information of the candidate audio and video according to the viewing information, it is necessary to create a corresponding progress reporting task for the progress reporting information to obtain the candidate progress reporting task, and store the candidate progress reporting task in the progress reporting queue. It should be noted that only the candidate progress reporting task is recorded and stored here, and the task reporting has not started.

[0039] S130, obtaining multiple target progress reporting tasks from the progress reporting queue based on a second time interval, and reporting the target progress reporting tasks to the target server, while recording the reporting status of the target progress reporting tasks; wherein the second time interval is greater than the first time interval.

[0040] Among them, the second time interval may refer to the time interval for reporting candidate progress reporting tasks that is pre-set according to the requirements, and the second time interval is greater than the first time interval, that is, the reporting time interval of the candidate progress reporting tasks is greater than the storage time interval, that is, a larger time interval can be used to simultaneously report multiple candidate progress reporting tasks to the target server, thereby effectively reducing the load pressure of the target server. Exemplarily, the second time interval can be set to 3 seconds or 5 seconds, which can be set according to the actual reporting requirements. The target progress reporting task can be understood as the candidate progress reporting task that needs to be reported this time, which can be determined based on the first time interval and the second time interval. For example, assuming that the first time interval is 1 second and the second time interval is 3 seconds, the target progress reporting task is the candidate progress reporting task within 3 seconds before the current moment in the progress reporting queue, and the number of target progress reporting tasks is 3. Exemplarily, the reporting status may include reporting, reporting completion (i.e., reporting success), reporting failure, and reporting retry.

[0041] In this embodiment, based on a preset second time interval, multiple candidate progress reporting tasks can be taken out from the progress reporting queue at one time as target progress reporting tasks, and each target progress reporting task can be reported to the target server separately. It should be noted that in order to improve the reporting efficiency, a thread manager can be used to perform synchronous upload operations on each target progress reporting task. Among them, the thread manager has a lazy loading feature, that is, only the threads required for the synchronization task are created, and a new synchronization task will only be created when the current thread is not enough. It should be noted that the maximum number of synchronization tasks is limited by the maximum number of threads of the thread manager, that is, when the number of synchronization tasks is less than or equal to the maximum number of threads, all tasks can be executed synchronously; when the number of synchronization tasks is greater than the maximum number of threads, the maximum number of tasks that can be executed synchronously is the maximum number of threads, and the remaining tasks need to wait until there is a thread idle before starting to execute. In addition, in the process of reporting the target progress reporting task to the target server, it is necessary to record the reporting status of each target progress reporting task so as to clarify the execution result of each target progress reporting task (i.e., whether it is successfully uploaded).

[0042] The technical solution of the embodiment of the present invention obtains the viewing information of the candidate audio and video based on the first time interval, and determines the progress reporting information of the candidate audio and video according to the viewing information; wherein the viewing information includes the audio and video source, audio and video content, audio and video viewing object and audio and video viewing attributes; creates a candidate progress reporting task for the progress reporting information of the candidate audio and video, and stores the candidate progress reporting task in the progress reporting queue; obtains multiple target progress reporting tasks from the progress reporting queue based on the second time interval, and reports the target progress reporting task to the target server, and records the reporting status of the target progress reporting task at the same time; wherein the second time interval is greater than the first time interval. This technical solution can independently store and report the progress reporting tasks by setting different time intervals with the help of the progress reporting queue, thereby improving the task reporting efficiency, reducing the load pressure on the server, and reducing resource consumption.

[0043] In this embodiment, optionally, the method further includes: if the reporting status of the target progress reporting task is reporting completed, clearing the target progress reporting task from the progress reporting queue.

[0044] In this embodiment, if it is determined that the reporting status of the target progress reporting task is reporting completed, it means that the target progress reporting task has been successfully reported to the target server. At this time, in order to release the storage resources in the progress reporting queue, the target progress reporting task can be completely cleared from the progress reporting queue in real time or in batches. The real-time clearing method means that once it is detected that the reporting status of the target progress reporting task is reporting completed, the target progress reporting task is immediately cleared from the progress reporting queue; the batch clearing method means that all target progress reporting tasks with reporting completed status are cleared from the progress reporting queue at one time based on a preset period.

[0045] Through such a setting, this solution clears the target progress reporting task when it is detected that the reporting status is reporting completion, which can effectively release the storage resources in the progress reporting queue to reduce the waste of storage resources.

[0046] In this embodiment, optionally, the method also includes: if the reporting status of the target progress reporting task is reporting failure, migrating the target progress reporting task from the progress reporting queue to the retry queue; obtaining multiple retry progress reporting tasks from the retry queue based on the second time interval, and reporting the retry progress reporting task to the target server, and recording the reporting status of the retry progress reporting task.

[0047] It should be noted that the target progress reporting task may fail to be reported due to network reasons and other reasons. If the target progress reporting task that failed to be uploaded is retained in the progress reporting queue, this will block the normal reporting task, resulting in low efficiency in task reporting. In view of the above situation, a retry queue is pre-set in this embodiment. When it is determined that the reporting status of the target progress reporting task is a reporting failure, the target progress reporting task is migrated from the progress reporting queue to the retry queue. The retry queue will open up a new synchronization operation to report the task separately, which will not affect and block the tasks in the progress reporting queue. Specifically, multiple target progress reporting tasks can be obtained from the retry queue based on the second time interval and determined as retry progress reporting tasks, and the retry progress reporting tasks can be reported to the target server in parallel to improve the reporting efficiency of the retry progress reporting tasks. At the same time, the reporting status of the retry progress reporting task is recorded. If the reporting status of the retry progress reporting task is reporting completion, the retry progress reporting task will be cleared from the retry queue; if the reporting status of the retry progress reporting task is reporting failure, the retry progress reporting task will be retained in the retry queue and wait for the next report until the report is completed.

[0048] It should be noted that the tasks in the progress reporting queue and the retry queue are executed independently and do not interfere with each other. In addition, the progress reporting queue and the retry queue can be managed through a unified thread manager for task reporting. Specifically, if the total number of synchronous tasks in the progress reporting queue and the retry queue is less than or equal to the maximum number of threads of the thread manager, the target progress reporting task from the progress reporting queue and the retry progress reporting task from the retry queue can be synchronously reported, thereby improving the task reporting efficiency; if the total number of synchronous tasks in the progress reporting queue and the retry queue is greater than the maximum number of threads of the thread manager, the target progress reporting task from the progress reporting queue is reported first, and then the remaining threads are used to report the retry progress reporting task from the retry queue.

[0049] Through such a setting, when the reporting status is detected as reporting failure, this solution will migrate the target progress reporting task from the progress reporting queue to the retry queue that performs task reporting separately, and report the retry progress reporting task based on the retry queue. This will not affect or block normal tasks in the progress reporting queue, and will help improve task reporting efficiency.

[0050] In this embodiment, optionally, the method also includes: if the viewing environment of the candidate audio and video is a network-free environment, then after creating a candidate progress reporting task for the progress reporting information of the candidate audio and video, the candidate progress reporting task is stored in the corresponding client local database; when it is detected that the current network status is that there is a network, the candidate progress reporting task is obtained from the client local database and stored in a retry queue; based on a second time interval, multiple retry progress reporting tasks are obtained from the retry queue, and the retry progress reporting task is reported to the target server, and the reporting status of the retry progress reporting task is recorded at the same time.

[0051] In this embodiment, when the user watches offline audio and video content without a network, it is impossible to report the task, because the task report requires network support, that is, the task report is performed through network transmission. At this time, the candidate progress reporting task can be stored in the corresponding client local database, and there is no need to report the task. When it is detected that the current network state is that there is a network, that is, when the current network is in an available state, the candidate progress reporting task is obtained from the client local database and stored in the retry queue. Then, based on the second time interval, multiple retry progress reporting tasks are obtained from the retry queue, and the retry progress reporting task is reported to the target server, and the reporting status of the retry progress reporting task is recorded at the same time. If the reporting status of the retry progress reporting task is reporting completion, the retry progress reporting task is cleared from the retry queue; if the reporting status of the retry progress reporting task is reporting failure, the retry progress reporting task is retained in the retry queue, waiting for the next report until the report is completed.

[0052] Through such a setting, this solution can effectively handle the situation of watching audio and video offline without network, thereby avoiding the phenomenon of task loss and underreporting, and ensuring the accuracy and completeness of task reporting.

[0053] Embodiment 2

[0054] Figure 2 A flowchart of a client learning progress reporting method provided in the second embodiment of the present invention, this embodiment is optimized based on the above embodiment. The specific optimization is: after obtaining multiple target progress reporting tasks from the progress reporting queue based on the second time interval, it also includes: determining whether multiple target progress reporting tasks can be merged according to the audio and video viewing object and the audio and video viewing attributes; if so, merging the multiple target progress reporting tasks, and reporting the merged target progress reporting tasks to the target server; otherwise, reporting multiple target progress reporting tasks to the target server in parallel.

[0055] like Figure 2 As shown, the method of this embodiment specifically includes the following steps:

[0056] S210: Obtain viewing information of the candidate audio and video based on the first time interval, and determine progress reporting information of the candidate audio and video according to the viewing information.

[0057] The viewing information includes the audio and video source, audio and video content, audio and video viewing object and audio and video viewing attributes.

[0058] S220: Create a candidate progress reporting task for the progress reporting information of the candidate audio and video, and store the candidate progress reporting task in a progress reporting queue.

[0059] S230: Acquire multiple target progress reporting tasks from the progress reporting queue based on the second time interval, and determine whether the multiple target progress reporting tasks can be merged according to the audio and video viewing object and the audio and video viewing attribute.

[0060] It should be noted that synchronizing the reporting task to the server consumes network resources. The more tasks that need to be reported, the more network resources need to be consumed. Therefore, in order to save network resources, a task merging mechanism is set in this embodiment, and the continuous reporting tasks (here continuous refers to the continuous viewing time) of the same audio and video watched by the same viewing object are merged and processed as one task for reporting to reduce the number of reported tasks. In other words, when multiple target progress reporting tasks correspond to different viewing objects, or multiple target progress reporting tasks correspond to different audio and video, or multiple target progress reporting tasks are not continuous reporting tasks, multiple target progress reporting tasks cannot be merged. Exemplarily, when the user manually changes the viewing progress by dragging and clicking the progress bar (fast forward or rewind), or when the user switches from the currently watched audio and video to other audio and video by clicking, it will cause the reporting task to be discontinuous.

[0061] In this embodiment, optionally, determining whether multiple target progress reporting tasks can be merged is performed based on the audio and video viewing objects and the audio and video viewing attributes, including: determining whether the same audio and video viewing objects exist in the multiple target progress reporting tasks; if so, determining the target progress reporting tasks corresponding to the same audio and video viewing objects as reference progress reporting tasks, and determining whether the reference progress reporting tasks are continuous progress reporting tasks for the same audio and video based on the audio and video viewing attributes; if so, determining that the reference progress reporting tasks can be merged, otherwise determining that the reference progress reporting tasks cannot be merged; if not, determining that the target progress reporting tasks cannot be merged.

[0062] Specifically, first determine whether there are the same audio and video viewing objects in multiple target progress reporting tasks, that is, whether there are multiple target progress reporting tasks corresponding to the same audio and video viewing object. If so, each target progress reporting task corresponding to the same audio and video viewing object is determined as a reference progress reporting task, and determine whether the reference progress reporting task is a continuous progress reporting task for the same audio and video; if not, it can be directly determined that the target progress reporting task cannot be merged. When determining whether the reference progress reporting task is a continuous progress reporting task for the same audio and video, it can be first determined based on the audio and video identifier whether there are multiple reference progress reporting tasks corresponding to the same audio and video (the same audio and video identifier indicates that they correspond to the same audio and video). If so, then determine whether the multiple reference progress reporting tasks corresponding to the same audio and video are continuous progress reporting tasks (that is, whether they are continuous in viewing time) according to the viewing start time and viewing end time. If so, it can be determined that the reference progress reporting task can be merged, otherwise it is determined that the reference progress reporting task cannot be merged. Among them, if the viewing end time of the previous task is consistent with the viewing end time of the next task, it can be determined that the two tasks are continuous tasks. It should be noted that when determining whether multiple target progress reporting tasks can be merged, there is no need to pay attention to the audio and video source (ie, device ID).

[0063] Through such a setting, this solution can quickly determine whether multiple target progress reporting tasks can be merged according to the audio and video viewing objects and audio and video viewing attributes, thereby judging whether task merging operations need to be performed later.

[0064] S240: If yes, multiple target progress reporting tasks are merged and processed, and the merged target progress reporting tasks are reported to the target server.

[0065] Exemplarily, assuming that the first time interval and the second time interval are 1 second and 3 seconds respectively, 3 target progress reporting tasks are reported each time. If these 3 target progress reporting tasks have the same audio and video viewing object and correspond to the same audio and video, when they correspond to 1-2 seconds, 2-3 seconds and 3-4 seconds of viewing content respectively, they can be merged and the result is: the start time is the 1st second, the end time is the 4th second, the total duration is 3 seconds, the audio and video content is the content corresponding to 1-4 seconds, and the rest of the information (such as user ID, header information, type, etc.) remains unchanged.

[0066] Furthermore, although it is not necessary to pay attention to the audio and video sources when judging whether multiple target progress reporting tasks can be merged, after completing the task synchronization of the target server, it is still necessary to synchronize tasks for different audio and video sources, otherwise the local viewing progress of the device will be inconsistent with the viewing progress of the target server. For example, the same user watches video a for 10 minutes on device A, and then watches video a for 8 minutes on device B. At this time, the local viewing progress of device A stops at the end of the 10th minute of video a, but the viewing progress of the target server stops at the end of the 18th minute of video a, so the viewing progress of device A is inconsistent with that of the target server. Therefore, after reporting the merged target progress reporting task to the target server, it is also necessary to synchronize the latest viewing progress corresponding to the target progress reporting task to the audio and video sources corresponding to each target progress reporting task that can be merged through the target server, so as to achieve synchronous update of the viewing progress of multiple audio and video sources.

[0067] S250: Otherwise, multiple target progress reporting tasks are reported to the target server in parallel.

[0068] The technical solution of the embodiment of the present invention, after obtaining multiple target progress reporting tasks from the progress reporting queue based on the second time interval, further determines whether the multiple target progress reporting tasks can be merged according to the audio and video viewing object and the audio and video viewing attribute; if so, the multiple target progress reporting tasks are merged and the merged target progress reporting tasks are reported to the target server; otherwise, the multiple target progress reporting tasks are reported to the target server in parallel. This technical solution can effectively save network resources and improve task reporting efficiency by setting a task merging mechanism.

[0069] Embodiment 3

[0070] Figure 3 This is a schematic diagram of the structure of a client learning progress reporting device provided in the third embodiment of the present invention. The device can execute the client learning progress reporting method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Figure 3 As shown, the device comprises:

[0071] The progress reporting information determining module 310 is used to obtain the viewing information of the candidate audio and video based on the first time interval, and determine the progress reporting information of the candidate audio and video according to the viewing information; wherein the viewing information includes the audio and video source, the audio and video content, the audio and video viewing object and the audio and video viewing attribute;

[0072] The progress reporting task creation module 320 is used to create a candidate progress reporting task for the progress reporting information of the candidate audio and video, and store the candidate progress reporting task in a progress reporting queue;

[0073] The progress reporting task reporting module 330 is used to obtain multiple target progress reporting tasks from the progress reporting queue based on a second time interval, and report the target progress reporting tasks to the target server, while recording the reporting status of the target progress reporting tasks; wherein the second time interval is greater than the first time interval.

[0074] Optionally, the progress reporting information determining module 310 is specifically configured to:

[0075] Converting the viewing information into standard format information based on a preset data structure;

[0076] The standard format information is asymmetrically encrypted to obtain progress reporting information.

[0077] Optionally, the device further includes: a task merging processing module, configured to:

[0078] After acquiring a plurality of target progress reporting tasks from the progress reporting queue based on a second time interval, determining whether the plurality of target progress reporting tasks can be merged according to the audio and video viewing object and the audio and video viewing attribute;

[0079] If yes, the multiple target progress reporting tasks are merged and the merged target progress reporting tasks are reported to the target server;

[0080] Otherwise, the multiple target progress reporting tasks are reported to the target server in parallel.

[0081] Optionally, the task merging processing module is further used to:

[0082] Determine whether there is a same audio and video viewing object in the multiple target progress reporting tasks;

[0083] If so, the target progress reporting task corresponding to the same audio and video viewing object is determined as the reference progress reporting task, and whether the reference progress reporting task is a continuous progress reporting task of the same audio and video is determined according to the audio and video viewing attribute;

[0084] If yes, it is determined that the reference progress reporting task can be merged, otherwise it is determined that the reference progress reporting task cannot be merged;

[0085] If it does not exist, it is determined that the target progress reporting task cannot be merged.

[0086] Optionally, the device further includes: a reporting completion processing module, configured to:

[0087] If the reporting status of the target progress reporting task is reporting completion, the target progress reporting task is cleared from the progress reporting queue.

[0088] Optionally, the device further includes: a reporting failure processing module, configured to:

[0089] If the reporting status of the target progress reporting task is reporting failure, the target progress reporting task is migrated from the progress reporting queue to the retry queue;

[0090] Based on the second time interval, a plurality of retry progress reporting tasks are obtained from the retry queue, and the retry progress reporting tasks are reported to the target server, while recording the reporting status of the retry progress reporting tasks.

[0091] Optionally, the device further includes: a non-network viewing processing module, configured to:

[0092] If the viewing environment of the candidate audio and video is a non-network environment, after creating a candidate progress reporting task for the progress reporting information of the candidate audio and video, the candidate progress reporting task is stored in a corresponding client local database;

[0093] When it is detected that the current network state is that there is a network, the candidate progress reporting task is obtained from the local database of the client and stored in the retry queue;

[0094] Based on the second time interval, a plurality of retry progress reporting tasks are obtained from the retry queue, and the retry progress reporting tasks are reported to the target server, while recording the reporting status of the retry progress reporting tasks.

[0095] A client learning progress reporting device provided by an embodiment of the present invention can execute a client learning progress reporting method provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0096] Embodiment 4

[0097] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0098] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0099] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0100] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the client learning progress reporting method.

[0101] In some embodiments, the client learning progress reporting method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the client learning progress reporting method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the client learning progress reporting method in any other appropriate manner (for example, by means of firmware).

[0102] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0103] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0104] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0105] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0106] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0107] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0108] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0109] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for reporting learning progress of a client, characterized in that: The method comprises: Acquire viewing information of the candidate audio and video based on the first time interval, and determine the progress reporting information of the candidate audio and video according to the viewing information; wherein the viewing information includes the audio and video source, the audio and video content, the audio and video viewing object, and the audio and video viewing attributes; Creating a candidate progress reporting task for the progress reporting information of the candidate audio and video, and storing the candidate progress reporting task in a progress reporting queue; Based on a second time interval, a plurality of target progress reporting tasks are obtained from the progress reporting queue, and the target progress reporting tasks are reported to a target server, while recording the reporting status of the target progress reporting tasks; wherein the second time interval is greater than the first time interval.

2. The method according to claim 1, characterized in that Determining the progress reporting information of the candidate audio and video according to the viewing information includes: Converting the viewing information into standard format information based on a preset data structure; The standard format information is asymmetrically encrypted to obtain progress reporting information.

3. The method according to claim 1, characterized in that After acquiring a plurality of target progress reporting tasks from the progress reporting queue based on the second time interval, the method further includes: Determining whether the multiple target progress reporting tasks can be merged according to the audio and video viewing object and the audio and video viewing attribute; If yes, the multiple target progress reporting tasks are merged and the merged target progress reporting tasks are reported to the target server; Otherwise, the multiple target progress reporting tasks are reported to the target server in parallel.

4. The method according to claim 3, characterized in that Determining whether the multiple target progress reporting tasks can be merged according to the audio and video viewing object and the audio and video viewing attribute includes: Determine whether there is a same audio and video viewing object in the multiple target progress reporting tasks; If so, the target progress reporting task corresponding to the same audio and video viewing object is determined as the reference progress reporting task, and whether the reference progress reporting task is a continuous progress reporting task of the same audio and video is determined according to the audio and video viewing attribute; If yes, it is determined that the reference progress reporting task can be merged, otherwise it is determined that the reference progress reporting task cannot be merged; If it does not exist, it is determined that the target progress reporting task cannot be merged.

5. The method according to claim 1, characterized in that The method further comprises: If the reporting status of the target progress reporting task is reporting completion, the target progress reporting task is cleared from the progress reporting queue.

6. The method according to claim 1, characterized in that The method further comprises: If the reporting status of the target progress reporting task is reporting failure, the target progress reporting task is migrated from the progress reporting queue to the retry queue; Based on the second time interval, a plurality of retry progress reporting tasks are obtained from the retry queue, and the retry progress reporting tasks are reported to the target server, while recording the reporting status of the retry progress reporting tasks.

7. The method according to claim 1, characterized in that The method further comprises: If the viewing environment of the candidate audio and video is a non-network environment, after creating a candidate progress reporting task for the progress reporting information of the candidate audio and video, the candidate progress reporting task is stored in a corresponding client local database; When it is detected that the current network state is that there is a network, the candidate progress reporting task is obtained from the local database of the client and stored in the retry queue; Based on the second time interval, a plurality of retry progress reporting tasks are obtained from the retry queue, and the retry progress reporting tasks are reported to the target server, while recording the reporting status of the retry progress reporting tasks.

8. A client learning progress reporting device, characterized in that: The device comprises: A progress reporting information determination module, configured to obtain viewing information of a candidate audio or video based on a first time interval, and determine the progress reporting information of the candidate audio or video according to the viewing information; wherein the viewing information includes an audio or video source, an audio or video content, an audio or video viewing object, and an audio or video viewing attribute; A progress reporting task creation module, used to create a candidate progress reporting task for the progress reporting information of the candidate audio and video, and store the candidate progress reporting task in a progress reporting queue; The progress reporting task reporting module is used to obtain multiple target progress reporting tasks from the progress reporting queue based on a second time interval, and report the target progress reporting tasks to the target server, while recording the reporting status of the target progress reporting tasks; wherein the second time interval is greater than the first time interval.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the client learning progress reporting method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the client learning progress reporting method according to any one of claims 1 to 7 when executed.