A method, apparatus, device and medium for loading courseware
Patent Information
- Application Number
- CN202111040201.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-06
- Publication Date
- 2026-08-11
- Estimated Expiration
- 2041-09-06
AI Technical Summary
但是上述课件加载的方式会显式的占用用户时间,在网络较差时,往往会下载很久,加上后续加载耗时,总耗时会很高,导致用户体验不佳
[0015]本公开实施例提供的技术方案与现有技术相比具有如下优点:本公开实施例提供的课件加载方案,获取课程开始时间和课件资源信息;当基于第一系统时间和课程开始时间确定目标课件满足下载条件时,则基于课件资源信息下载目标课件的课件预加载资源;当基于第二系统时间和课程开始时间确定目标课件满足加载条件时,则基于课件预加载资源加载目标课件,第二系统时间为课件预加载资源下载完成的系统时间。采用上述技术方案,在课件满足下载条件时下载件预加载资源并且在课件满足加载条件时加载课件,既可以降低加载耗时,又可以有效降低用户显示感受到的加载耗时,进而提升了用户的体验效果。
Smart Images

Figure CN115795204B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of Internet technology, and in particular to a method, apparatus, device and medium for loading courseware. Background Technology
[0002] In online education scenarios, electronic courseware serves as an important information carrier, providing accurate and abundant teaching materials.
[0003] Currently, courseware loading is usually done by fetching the courseware in real time, or by forcing the download of courseware before the user enters the classroom to reduce loading time. However, these methods of loading courseware explicitly consume user time. When the network is poor, the download often takes a long time. Combined with the subsequent loading time, the total time is very high, resulting in a poor user experience. Summary of the Invention
[0004] To solve the above-mentioned technical problems, or at least partially solve them, this disclosure provides a courseware loading method, apparatus, device, and medium.
[0005] This disclosure provides a courseware loading method, the method comprising:
[0006] Get course start time and courseware resource information;
[0007] When the target courseware meets the download conditions based on the first system time and the course start time, the pre-loaded resources of the target courseware are downloaded based on the courseware resource information.
[0008] When the target courseware meets the loading conditions based on the second system time and the course start time, the target courseware is loaded based on the courseware preloaded resources. The second system time is the system time when the courseware preloaded resources are downloaded.
[0009] This disclosure also provides a courseware loading device, the device comprising:
[0010] The information acquisition module is used to acquire course start time and courseware resource information;
[0011] The first preloading module is used to download the preloaded resources of the target courseware based on the courseware resource information when the target courseware meets the download conditions based on the first system time and the course start time.
[0012] The loading module is used to load the target courseware based on the pre-loaded courseware resources when the target courseware meets the loading conditions based on the second system time and the course start time. The second system time is the system time when the pre-loaded courseware resources are downloaded.
[0013] This disclosure also provides an electronic device, which includes: a processor; a memory for storing processor-executable instructions; and a processor for reading executable instructions from the memory and executing the instructions to implement the courseware loading method provided in this disclosure.
[0014] This disclosure also provides a computer-readable storage medium storing a computer program for executing the courseware loading method provided in this disclosure.
[0015] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The courseware loading scheme provided in this disclosure obtains the course start time and courseware resource information; when it is determined that the target courseware meets the download conditions based on the first system time and the course start time, the pre-loaded resources of the target courseware are downloaded based on the courseware resource information; when it is determined that the target courseware meets the loading conditions based on the second system time and the course start time, the target courseware is loaded based on the pre-loaded resources, where the second system time is the system time when the pre-loaded resources are downloaded. By adopting the above technical solution, downloading pre-loaded resources when the courseware meets the download conditions and loading the courseware when the courseware meets the loading conditions can reduce loading time and effectively reduce the loading time perceived by the user, thereby improving the user experience. Attached Figure Description
[0016] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0017] Figure 1 A flowchart illustrating a courseware loading method provided in this embodiment of the disclosure;
[0018] Figure 2 A flowchart illustrating another courseware loading method provided in this embodiment of the disclosure;
[0019] Figure 3 A flowchart illustrating another courseware loading method provided in this embodiment of the disclosure;
[0020] Figure 4 This is a schematic diagram of the structure of a courseware loading device provided in an embodiment of the present disclosure;
[0021] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0022] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0023] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0024] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0025] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0026] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0027] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0028] In online education, electronic courseware serves as an important information carrier, providing accurate and abundant teaching materials. With the expansion of the online education audience and the increasing prevalence of younger users, who demand more interest and diversity in their knowledge, courseware must not only provide instructional knowledge but also ensure interactivity and diversity. It should be engaging and entertaining, enhancing students' hands-on skills and reinforcing their understanding of new knowledge.
[0029] Currently, courseware loading typically involves real-time fetching or, to reduce loading time, forcing users to download courseware before they enter the classroom. However, these methods explicitly consume user time, often resulting in long download times, especially with poor network connectivity. Combined with subsequent loading time, the total loading time becomes very high, leading to a poor user experience. To address these issues, this disclosure provides a courseware loading method, which will be described below with reference to specific embodiments.
[0030] Figure 1 This is a flowchart illustrating a courseware loading method provided in an embodiment of this disclosure. The method can be executed by a courseware loading device, which can be implemented using software and / or hardware, and is generally integrated into an electronic device. Figure 1 As shown, the method includes:
[0031] Step 101: Obtain the course start time and courseware resource information.
[0032] The course start time can be the start time of all courses for the current user within a certain period, with no limit on the number of courses. The courseware resource information can include download links for pre-loaded resources related to all courses for the current user within a certain period.
[0033] The courseware can be electronic; this embodiment uses Cocos courseware as an example. In a live classroom scenario, Cocos courseware can be a webpage with its own engine, typically around 20MB in size. It needs to load quickly after students enter the classroom and synchronize all teacher operations with low latency during class to ensure stability. Based on the Cocos game engine, Cocos courseware emphasizes rich touch gestures and realistic 3D displays, empowering the live classroom. Unlike typical static courseware and drawing tools, Cocos courseware offers interactive, drag-and-drop, and automatic grading functions, making it more suitable for student comprehension.
[0034] In this embodiment of the disclosure, obtaining course start time and courseware resource information may include: sending an information acquisition request to the server at a preset time, and receiving course start time and courseware resource information of at least one course included within a preset time period sent by the server.
[0035] The preset timing can be a pre-set time for requesting course and courseware information, and can be set before the start of each course. In this embodiment of the disclosure, the preset timing may include at least one of the following: application cold start, switching to the course page, and application foreground / background switching.
[0036] Users' courses typically have a certain cycle, such as two classes per week. Generally, it's best to download the course materials to the local machine as early as possible for direct use during class. However, in reality, instructors may modify the content of the course materials before class. Downloading the materials in advance can actually cause content conflicts and inaccuracies. Therefore, the preset time can be set based on factors such as the average modification frequency of the course. For example, the preset time could be set to 24 hours, meaning it retrieves relevant information about the course and course materials within the current 24 hours.
[0037] Specifically, the user's client can send an information retrieval request to the server at a preset time to obtain the course start time and courseware resource information of at least one course included within a preset time period sent by the server, for later use.
[0038] Step 102: When the target courseware meets the download conditions based on the first system time and the course start time, download the pre-loaded resources of the target courseware based on the courseware resource information.
[0039] The first system time can be real-time world time. Download conditions can be criteria used to determine when to download pre-loaded courseware resources. Pre-loaded courseware resources can be understood as the resource packages required by the electronic courseware during the actual loading process; for example, pre-loaded courseware resources may include audio resources, video resources, and operational resources. The target courseware can be one of multiple courseware that meets the download conditions.
[0040] In this embodiment of the disclosure, determining that the target courseware meets the download conditions based on the first system time and the course start time may include: if the first time interval between the first system time and the course start time is greater than a first time threshold, then the target courseware is determined to meet the download conditions, wherein the first time threshold is determined based on device information and network information. The first time interval may be the time period between the first system time and the course start time.
[0041] The first time threshold can be a threshold for a specific time period, which can be set according to actual conditions. For example, the first time threshold can be 15 seconds. Furthermore, since the download time of pre-loaded courseware resources is affected by changes in device and network information (device information can include data representing device performance, and network information can include network speed and network stability), the aforementioned first time threshold can be determined and dynamically adjusted based on the average download time of pre-loaded courseware resources. In other words, it can be dynamically adjusted based on device and network information to improve compatibility with devices and networks.
[0042] Specifically, the user's client can compare the first time interval between the first system time and the start time of each course with a first time threshold. If the first time interval is greater than the first time threshold, the target courseware is determined to meet the download conditions. Then, the pre-loaded resources of the target courseware can be downloaded based on the download address in the courseware resource information.
[0043] When user network conditions are poor or resource services are unstable, downloading pre-loaded courseware resources can take a long time. If users download these resources close to the start of class, the download must be stopped immediately upon their arrival in the classroom, resulting in wasted resources. The solution described above, which only downloads pre-loaded resources when the time remaining before the class start time is determined to be greater than a certain amount of time, improves the timing of resource pre-loading and avoids resource waste.
[0044] Step 103: When the target courseware meets the loading conditions based on the second system time and the course start time, the target courseware is loaded based on the courseware preloaded resources. The second system time is the system time when the courseware preloaded resources are downloaded.
[0045] The second system time can be the system time when the pre-loaded courseware resources are downloaded. The loading condition can be a condition used to determine when to load the courseware.
[0046] In this embodiment of the disclosure, determining that the target courseware meets the loading conditions based on the second system time and the course start time may include: when the second time interval between the second system time and the course start time is less than a second time threshold, it is determined that the target courseware meets the loading conditions, wherein the second time threshold is determined based on device information and network information.
[0047] The second time interval can be the period between the second system time and the course start time. The second time threshold can be a threshold for a time period, which can be set according to the actual situation; for example, the second time threshold can be 20 minutes. Similar to the first time interval mentioned above, the second time interval can be determined and dynamically adjusted based on the average time taken to load the courseware, that is, dynamically adjusted based on device information and network information.
[0048] Specifically, the user's client can compare the second time interval between the second system time and the start time of each course with a second time threshold. If the second time interval is less than the second time threshold, the target courseware is deemed to meet the loading conditions. Afterward, the client can initialize a WebView object, i.e., create a WebView object, and load the target courseware using pre-downloaded local courseware pre-load resources. The WebView object can be used to embed the web page content of the courseware within the application.
[0049] The above solution optimizes the timing of WebView object creation and courseware loading, avoiding the waste of resources caused by premature WebView object creation being destroyed by user-killed programs or other operations.
[0050] The courseware loading scheme provided in this embodiment obtains the course start time and courseware resource information. When it is determined that the target courseware meets the download conditions based on the first system time and the course start time, the pre-loaded resources of the target courseware are downloaded based on the courseware resource information. When it is determined that the target courseware meets the loading conditions based on the second system time and the course start time, the target courseware is loaded based on the pre-loaded resources. The second system time is the system time when the pre-loaded resources are downloaded. By adopting the above technical solution, downloading the pre-loaded resources of the target courseware when the download conditions are met and loading the courseware when the loading conditions are met can reduce loading time and effectively reduce the loading time perceived by the user, thereby improving the user experience.
[0051] In some embodiments, the courseware loading method may further include: when it is determined based on the first system time and the course start time that the target courseware does not meet the download conditions, then loading the target courseware using network resources after detecting that a user has entered the classroom.
[0052] In other embodiments, the courseware loading method may further include: when it is determined based on the second system time and the course start time that the target courseware does not meet the loading conditions, the target courseware is loaded based on local courseware preloading resources after the user is detected to have entered the classroom.
[0053] After detecting that a user has entered the classroom, a WebView object is created and the target courseware is loaded.
[0054] Specifically, if the user's client determines that the first time interval between the first system time and the start time of each course is less than or equal to a first time threshold, then the target courseware does not meet the download conditions. In this case, a WebView object can be created using network resources and the target courseware can be loaded after the user enters the classroom. Alternatively, if the second time interval between the second system time and the course start time is greater than or equal to a second time threshold, then the target courseware does not meet the loading conditions. In this case, the WebView object is not created in advance. Since the courseware pre-loaded resources have already been downloaded locally, the WebView object can be created after the user enters the classroom and the target courseware can be loaded based on the local pre-loaded resources.
[0055] In the above solution, when the current time is close to the start time of the class, the courseware can be loaded directly from the network when the user enters the classroom. This avoids the extra display waiting time caused by preloading courseware resources before class, thus reducing the user's display waiting time and improving the user experience. Furthermore, regarding the loading of courseware, when the current time is far from the start time of the class, the WebView object is not created in advance. Instead, the WebView object is created when the user enters the classroom to load the courseware, avoiding the waste caused by the WebView object being easily destroyed if created too early before the start time.
[0056] In some embodiments, the courseware loading method may further include: during the process of downloading courseware pre-loading resources based on courseware resource information, if a user is detected entering the classroom, the download of pre-loading resources is stopped, and the target courseware is loaded using network resources. By stopping the download of pre-loading resources if a user is detected entering the classroom, and using network resources to create a webview object and load the target courseware in real time, the explicit courseware loading time perceived by the user can be effectively reduced, achieving a balance between the early download of pre-loading resources and the actual user experience.
[0057] In some embodiments, after loading the target courseware based on the courseware preload resources, the courseware loading method may further include: sending target parameters to the courseware client so that the courseware client performs a link operation based on the target parameters, wherein the target parameters include at least one of classroom identifier and token.
[0058] The target parameters can be parameters required for functions within the courseware that depend on the classroom environment. In this embodiment, the target parameters may include classroom identifiers, tokens, and other relevant parameters. Link operations may include operations related to the classroom environment, such as establishing long links.
[0059] Specifically, after the user's client loads the target courseware, it can send the target parameters to the courseware client via JSBridge. This allows the courseware client to build a long link based on the target parameters. JSBridge can serve as a bridge for communication between the client (or other native devices) and WebView, as well as other web technologies. The client can proactively notify the courseware client that it has successfully entered the online classroom, ensuring the normal functionality of the courseware client.
[0060] Figure 2 This is a flowchart illustrating another courseware loading method provided in this embodiment of the present disclosure. Based on the above embodiments, this embodiment provides a detailed description of the courseware loading method. Figure 2 As shown, the method includes:
[0061] Step 201: Obtain the course start time and courseware resource information.
[0062] Optionally, obtaining course start time and courseware resource information may include: sending an information retrieval request to the server at a preset time, and receiving course start time and courseware resource information for at least one course within a preset time period from the server. Optionally, the preset time may include at least one of the following: application cold start, switching to the course page, and application foreground / background switching.
[0063] Step 201: Determine whether the first time interval between the first system time and the course start time is greater than the first time threshold. If yes, proceed to step 203; otherwise, proceed to step 207.
[0064] The first time threshold is determined based on device information and network information.
[0065] Step 203: Determine if the target courseware meets the download conditions, and download the pre-loaded resources corresponding to the target courseware based on the courseware resource information.
[0066] Step 204: Determine whether the second time interval between the second system time and the course start time is less than the second time threshold. If yes, proceed to step 205; otherwise, proceed to step 206.
[0067] The second system time is the system time when the pre-loaded courseware resources are downloaded. The second time threshold is determined based on device and network information.
[0068] Step 205: Determine that the target courseware meets the loading conditions, and load the target courseware based on the courseware preload resources.
[0069] Step 206: Determine that the target courseware does not meet the loading conditions. After detecting that the user has entered the classroom, load the target courseware based on the local courseware preloading resources.
[0070] If it is determined that the second time interval between the second system time and the course start time is greater than or equal to the second time threshold, and the target courseware does not meet the loading conditions, a webview object can be created and the target courseware loaded based on local courseware preload resources after the user is detected to have entered the classroom.
[0071] Step 207: Determine whether the target courseware meets the download conditions. After detecting that a user has entered the classroom, load the target courseware using network resources.
[0072] If it is determined that the first time interval between the first system time and the course start time is less than or equal to the first time threshold, and the target courseware does not meet the download conditions, the target courseware will be loaded using network resources after the user is detected to have entered the classroom.
[0073] Optionally, the courseware loading method in this embodiment may further include: during the process of downloading the courseware preloading resources of the target courseware based on the courseware resource information, when a user is detected entering the classroom, the download of the preloading resources is stopped, and the target courseware is loaded using network resources.
[0074] Optionally, after loading the target courseware based on the preloaded resources, the courseware loading method may further include: sending target parameters to the courseware client so that the courseware client can perform classroom-related operations based on the target parameters, the target parameters including classroom status parameters.
[0075] The courseware loading method of this disclosure embodiment will be specifically described next through an example. For example, Figure 3 This is a flowchart illustrating another courseware loading method provided in an embodiment of the present disclosure, as shown below. Figure 3As shown, assuming the courseware is Cocos courseware, the courseware loading process can include: Step 301: Access the student client. Step 302: Retrieve all course information and courseware information for the day. That is, obtain the start time and courseware resource information for all courses within the past 24 hours. Step 303: Check if the time remaining before class is greater than 15 seconds. If yes, proceed to step 304; otherwise, proceed to step 306. That is, determine if the first time interval between the first system time and the course start time is greater than 15 seconds. If yes, proceed to step 304; otherwise, proceed to step 306. Step 304: Download the pre-loaded resources of the Cocos courseware. Specifically, download the pre-loaded resources of the Cocos courseware from the download address in the courseware resource information. Step 305: Check if the time remaining before class is less than 20 minutes. If yes, proceed to step 307; otherwise, proceed to step 306. That is, determine if the second time interval between the second system time and the course start time is less than 20 minutes. If yes, proceed to step 307; otherwise, proceed to step 306. The second system time is the system time when the pre-loaded resources of the Cocos courseware are downloaded. Step 306: Load the courseware after the user enters the classroom. That is, load the courseware using network resources after waiting for the user to enter the classroom. Step 308 can be executed after step 306. Step 307: Warm up and initialize the WebView object and load the courseware. Step 308: Display the courseware after the user enters the classroom. Step 309: Inform the Cocos courseware client of the classroom status parameters and other necessary parameters via JSBridge. Step 310: Courseware loading is complete.
[0076] This solution can optimize the timing of downloading preloaded resources for courseware, the timing of creating the webview object for courseware, and the timing of loading courseware.
[0077] Regarding the timing of downloading pre-loaded courseware resources, while downloading them in advance generally improves loading speed compared to pure network loading for most users, this technology has the following problems: Instructors typically modify courseware content before class, so downloading pre-loaded resources in advance can cause content conflicts; long download times result in low actual usage, especially with poor network conditions or unstable resource services. If a user triggers the pre-loading function close to class time and needs to load the courseware immediately upon entering the classroom, the download task must be stopped, wasting resources; forcing users to download pre-loaded resources before entering the classroom creates additional explicit waiting time, which is particularly unfriendly to users who are late.
[0078] This solution can be tailored to specific business scenarios. Starting at 00:00 on the day of class, the server distributes the download addresses and course information for all pre-loaded courseware resources for the user's courses that day, thus avoiding conflicts in courseware content. Users are only allowed to download pre-loaded courseware resources when the time remaining before class is greater than a certain threshold. If the time remaining is less than the threshold, the courseware is loaded directly via the network when the user enters the classroom. This allows for reasonable configuration of the download timing of pre-loaded resources based on business needs, minimizing the explicit waiting time for users.
[0079] Regarding the timing of WebView object creation and courseware loading for courseware, related technologies place the loading of courseware entirely within the classroom. This requires competing for CPU and bandwidth resources with other classroom components during the classroom initialization phase. Even if the local courseware pre-loaded resources are fully loaded, users still need to wait additional time. If the WebView object is created too early before class time, it is easily destroyed by user actions such as killing the program, resulting in waste.
[0080] In this solution, when the user enters the application less than the second time threshold before class, the WebView object is initialized directly. The user will be unaware that the courseware is prepared in advance, avoiding waste. If the courseware for the current course already has pre-loaded resources, the WebView object will use the local pre-loaded resources to load the courseware; otherwise, it will attempt to download the pre-loaded resources and load the courseware if successful. After the user enters the classroom, it checks whether there is a WebView object corresponding to the courseware for the current course in memory. If there is, it will be displayed directly; otherwise, the WebView object will be initialized, the courseware will be loaded normally, and displayed. If the courseware contains functions that depend on the classroom environment, such as the establishment of long links, the student's client will actively notify the courseware side of successful entry into the classroom by carrying the necessary parameters through JSBridge after entering the classroom, to ensure that all functions are normal.
[0081] This solution can effectively reduce the time users perceive when loading courseware, and dynamically adjust the control threshold. Different devices can be assigned more suitable thresholds, which solves the compatibility problem of some low-performance devices and low network environments, and achieves a balance between low courseware loading time and actual user experience.
[0082] The courseware loading scheme provided in this embodiment obtains the course start time and courseware resource information. When it is determined that the target courseware meets the download conditions based on the first system time and the course start time, the pre-loaded resources of the target courseware are downloaded based on the courseware resource information. When it is determined that the target courseware meets the loading conditions based on the second system time and the course start time, the target courseware is loaded based on the pre-loaded resources. The second system time is the system time when the pre-loaded resources are downloaded. By adopting the above technical solution, downloading the pre-loaded resources of the target courseware when the download conditions are met and loading the courseware when the loading conditions are met can reduce loading time and effectively reduce the loading time perceived by the user, thereby improving the user experience.
[0083] Figure 4 This is a schematic diagram of a courseware loading device provided in an embodiment of the present disclosure. The device can be implemented by software and / or hardware, and is generally integrated into an electronic device. Figure 4 As shown, the device includes:
[0084] Information acquisition module 401 is used to acquire course start time and courseware resource information;
[0085] The preloading module 402 is used to download the preloaded resources of the target courseware based on the courseware resource information when the target courseware meets the download conditions based on the first system time and the course start time.
[0086] The first loading module 403 is used to load the target courseware based on the pre-loaded courseware resources when the target courseware meets the loading conditions based on the second system time and the course start time. The second system time is the system time when the pre-loaded courseware resources are downloaded.
[0087] The courseware loading device provided in this embodiment can acquire course start time and courseware resource information. When it is determined that the target courseware meets the download conditions based on a first system time and course start time, the pre-loaded resources of the target courseware are downloaded based on the courseware resource information. When it is determined that the target courseware meets the loading conditions based on a second system time and course start time, the target courseware is loaded based on the pre-loaded resources. The second system time is the system time when the pre-loaded resources are downloaded. By adopting the above technical solution, downloading the pre-loaded resources of the target courseware when the download conditions are met and loading the courseware when the loading conditions are met can reduce loading time and effectively reduce the loading time perceived by the user, thereby improving the user experience.
[0088] Optionally, this preload module is specifically used for:
[0089] If the first time interval between the first system time and the course start time is greater than the first time threshold, the target courseware is determined to meet the download conditions. The first time threshold is determined based on device information and network information.
[0090] Optionally, this first loading module is specifically used for:
[0091] If the second time interval between the second system time and the course start time is less than the second time threshold, then the target courseware is determined to meet the loading conditions, wherein the second time threshold is determined based on device information and network information.
[0092] Optionally, this information acquisition module is used for:
[0093] Send an information retrieval request to the server at a preset time, and receive course start time and courseware resource information of at least one course within a preset time period sent by the server.
[0094] Optionally, the preset timing includes at least one of the following: application cold start, switching to the course page, and application foreground / background switching.
[0095] Optionally, the device further includes a second loading module for:
[0096] If it is determined based on the first system time and the course start time that the target courseware does not meet the download conditions, then the target courseware will be loaded using network resources after the user is detected to have entered the classroom.
[0097] Optionally, the device also includes a third loading module for:
[0098] If it is determined based on the second system time and the course start time that the target courseware does not meet the loading conditions, then the target courseware will be loaded based on the local courseware preloading resources after the user is detected to have entered the classroom.
[0099] Optionally, the device also includes a fourth loading module for:
[0100] During the process of downloading the pre-loaded resources of the target courseware based on the courseware resource information, when a user is detected entering the classroom, the download of the pre-loaded resources is stopped, and the target courseware is loaded using network resources.
[0101] Optionally, the device also includes a parameter module for: after loading the target courseware based on the courseware pre-loading resources,
[0102] Send target parameters to the courseware client so that the courseware client can perform a link operation based on the target parameters. The target parameters include at least one of classroom identifier and token.
[0103] The courseware loading device provided in this disclosure can execute the courseware loading method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.
[0104] This disclosure also provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the courseware loading method provided in any embodiment of this disclosure.
[0105] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. See below for details. Figure 5 The diagram illustrates a structural schematic suitable for implementing the electronic device 500 in the embodiments of this disclosure. The electronic device 500 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0106] like Figure 5 As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0107] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0108] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the courseware loading method of embodiments of this disclosure.
[0109] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0110] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0111] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0112] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the electronic device to: acquire the course start time and courseware resource information; when it is determined based on the first system time and the course start time that the target courseware meets the download conditions, download the courseware pre-loaded resources of the target courseware based on the courseware resource information; when it is determined based on the second system time and the course start time that the target courseware meets the loading conditions, load the target courseware based on the courseware pre-loaded resources, wherein the second system time is the system time when the courseware pre-loaded resources are downloaded.
[0113] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0115] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0116] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0117] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0118] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0119] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0120] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for loading courseware, characterized in that, include: Get course start time and courseware resource information; When the first time interval between the first system time and the course start time is greater than the first time threshold, it is determined that the target courseware meets the download conditions. Then, based on the courseware resource information, the courseware preloaded resources corresponding to the target courseware are downloaded. The first time threshold is dynamically adjusted based on device information and network information. The first system time is real-time world time. When the second time interval between the second system time and the course start time is less than the second time threshold, it is determined that the target courseware meets the loading conditions. Then, the target courseware is loaded based on the courseware preloaded resources. The second system time is the system time when the courseware preloaded resources are downloaded. The second time threshold is dynamically adjusted based on device information and network information.
2. The method according to claim 1, characterized in that, The process of obtaining the course start time and courseware resource information includes: At a preset time, an information retrieval request is sent to the server, and the server sends the course start time and courseware resource information of at least one course within a preset time period.
3. The method according to claim 2, characterized in that, The preset timing includes at least one of the following: application cold start, switching to the course page, and application foreground / background switching.
4. The method according to claim 1, characterized in that, The method further includes: If it is determined based on the first system time and the course start time that the target courseware does not meet the download conditions, then the target courseware will be loaded using network resources after the user is detected to have entered the classroom.
5. The method according to claim 1, characterized in that, The method further includes: If it is determined based on the second system time and the course start time that the target courseware does not meet the loading conditions, then the target courseware will be loaded based on the local courseware preloading resources after the user is detected to have entered the classroom.
6. The method according to claim 1, characterized in that, The method further includes: During the process of downloading the pre-loaded resources of the target courseware based on the courseware resource information, when a user is detected entering the classroom, the download of the pre-loaded resources is stopped, and the target courseware is loaded using network resources.
7. The method according to claim 1, characterized in that, After loading the target courseware based on the preloaded courseware resources, the method further includes: Send target parameters to the courseware client so that the courseware client can perform a link operation based on the target parameters, wherein the target parameters include at least one of classroom identifier and token.
8. A courseware loading device, characterized in that, include: The information acquisition module is used to acquire course start time and courseware resource information; The preloading module is used to download the preloaded resources of the target courseware based on the courseware resource information when the first time interval between the first system time and the course start time is greater than the first time threshold, and the target courseware meets the download conditions. The first time threshold is dynamically adjusted based on device information and network information, and the first system time is real-time world time. The first loading module is used to determine that the target courseware meets the loading conditions when the second time interval between the second system time and the course start time is less than the second time threshold. Then, it loads the target courseware based on the courseware pre-loaded resources. The second system time is the system time when the courseware pre-loaded resources are downloaded. The second time threshold is dynamically adjusted based on device information and network information.
9. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the courseware loading method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which is used to execute the courseware loading method according to any one of claims 1-7.
Citation Information
Patent Citations
Courseware loading method and system and electronic equipment
CN112714199A