Off-line safe operation method and device of physical simulation personalized learning system
By comparing local versions and managing resources, personalized questions are recommended based on user answers, and data is uploaded in encrypted form when the network is connected. This solves the problem of insufficient personalization in offline learning systems in existing technologies, and improves accuracy and security.
Patent Information
- Application Number
- CN202611370476.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-04
- Publication Date
- 2026-11-20
AI Technical Summary
Existing physics simulation learning systems cannot dynamically adjust the difficulty of questions and the distribution of knowledge points based on the user's actual performance when offline, resulting in poor personalized learning outcomes.
Through local version comparison and resource package management, simulation resources are dynamically updated. Personalized questions are recommended based on user answers and historical incorrect answers. Answers are encrypted and uploaded when the network is connected to ensure data security and integrity.
It achieves accuracy and personalization of questions in offline mode, ensures normal operation of the system in the absence of network environment, and guarantees the security and integrity of learning data.
Smart Images

Figure CN123138485A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of system operation technology, and more specifically, it relates to an offline secure operation method and device for a physical simulation personalized learning system. Background Technology
[0002] Physics simulation learning systems typically acquire and update simulation resources in real time via the network to meet the dynamic needs of different users for experimental scenarios and question bank content. However, users often face unstable network environments when using such systems, especially offline, where the system can only rely on locally stored simulation resources and question bank data for learning activities. Existing systems, in offline scenarios, usually only provide a fixed question bank for users to practice, unable to dynamically adjust the subsequently displayed questions based on the user's actual performance. This results in a homogenization of question difficulty and knowledge point distribution among users of different levels, making it difficult to achieve targeted training for individual weaknesses and limiting the personalized learning effect in offline learning scenarios. Therefore, how to improve the accuracy and personalized adaptability of physics simulation learning systems recommending questions to users in offline scenarios has become an urgent problem to be solved. Summary of the Invention
[0003] This application provides an offline secure operation method and apparatus for a personalized physics simulation learning system, in order to improve the accuracy and personalization of the physics simulation learning system's recommendations to users in offline mode.
[0004] According to one aspect of the embodiments of this application, an offline secure operation method for a personalized learning system for physical simulation is provided, comprising: For each resource package, based on the comparison results between the local version information and the server version information, it is determined whether the resource package needs to be updated. When an update is deemed necessary, the resource package is downloaded and locally decompressed and replaced to obtain usable simulation resources. If an exception is triggered during the download, decompression, or replacement process, a version rollback operation is performed to restore the resources to their state before the update. In offline mode, load available simulation resources or existing resources from the previous state. If an exception is triggered during loading, load the pre-set backup resource data to build the virtual simulation scene. In response to user actions on physical objects in the virtual simulation scene, generate interactive commands and update the scene rendering state based on the interactive commands; In response to the user's answering operation on the local question bank, the system generates answering results; based on the answering results and the local historical wrong question records, it determines the user's weak knowledge points data, selects recommended questions from the local question bank according to the weak knowledge points data, and updates the display priority of the local question bank with recommended questions so that the recommended questions are displayed first when answering questions in the future; The answer results are bound to the current timestamp data, stored in the local database, and marked as data to be synchronized; In response to network connectivity, the system extracts the answer results marked as data to be synchronized from the local database, encrypts the data to be synchronized to obtain encrypted synchronized data, and uploads the encrypted synchronized data to the server.
[0005] According to one aspect of the embodiments of this application, an offline secure operation device for a personalized learning system for physical simulation is provided, comprising: The version comparison module is used to determine whether a resource package needs to be updated based on the comparison results between the local version information and the server version information for each resource package. The resource update and rollback module is used to download the resource package and perform local decompression and replacement when an update is determined to be needed, so as to obtain usable simulation resources; if an exception is triggered during the download, decompression or replacement process, a version rollback operation is performed to restore the resources to the state before the update. The scenario building module is used to load available simulation resources or existing resources in the previous state when offline. If an exception is triggered during the loading process, the pre-set backup resource data is loaded to build a virtual simulation scenario. The simulation interaction module is used to respond to user operations on physical objects in the virtual simulation scene, generate interaction commands, and update the scene rendering state based on the interaction commands; The personalized recommendation module is used to respond to the user's answering operation in the local question bank and generate answering results; based on the answering results and the local historical wrong question records, it determines the user's weak knowledge point data, selects recommended questions from the local question bank according to the weak knowledge point data, and updates the display priority of the local question bank with the recommended questions so that the recommended questions are displayed first when answering questions in the future; The local storage module is used to bind the answer results with the current timestamp data, store them in the local database, and mark them as data to be synchronized; The encrypted synchronization module is used to respond to network connectivity, extract the answer results marked as data to be synchronized from the local database, encrypt the data to be synchronized to obtain encrypted synchronized data, and upload the encrypted synchronized data to the server.
[0006] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the offline secure operation method of the above-described physical simulation personalized learning system.
[0007] According to one aspect of the embodiments of this application, the computer program product includes a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the offline secure operation method of the described physical simulation personalized learning system.
[0008] The technical solutions provided in this application embodiment may have the following beneficial effects: This application embodiment performs version comparison independently for each resource package, and only performs download and replacement when it is determined that an update is needed, thus avoiding unnecessary network traffic consumption; by triggering version rollback due to an anomaly to restore the resources to the state before the update, and by loading pre-set backup resource data when a loading anomaly occurs, the reliability of virtual simulation scene construction in offline environment is ensured, so that the system can still start and run normally in a network-free environment.
[0009] This application's embodiments break through the limitation of fixed question bank content in offline scenarios. By generating answer results in response to answering operations and combining them with local historical incorrect answer records to determine the user's weak knowledge points, it then selects recommended questions from the local question bank based on these weak knowledge points, updating the display priority of the local question bank so that subsequent answering sessions prioritize the display of questions strongly related to the weak knowledge points. This mechanism completes the personalized adaptation process from answer data collection and weak point discovery to dynamic updates of recommended content locally in a closed loop without relying on the server, effectively solving the problem that it is difficult to train on individual weak areas due to fixed question bank content.
[0010] This application embodiment ensures the security and integrity of user learning data generated offline by binding and storing answer results with timestamps and marking them as requiring synchronization. When the network is connected, the data to be synchronized is extracted and encrypted before uploading, thus guaranteeing its security during transmission. Therefore, this application embodiment can improve the accuracy and personalized adaptability of the physics simulation learning system's question recommendations to users in offline states. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating the offline secure operation method of the physical simulation personalized learning system provided in this application embodiment; Figure 2 A structural block diagram of the offline secure operation device for the physical simulation personalized learning system provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0014] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0015] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0016] Figure 1 This is a flowchart illustrating the offline secure operation method of the physical simulation personalized learning system provided in this application embodiment. The method is executed by an electronic device and may include: S101: For each resource package, based on the comparison results between the local version information and the server version information, determine whether the resource package needs to be updated.
[0017] In this embodiment, the local version information includes the resource identifier, local version number, local file hash value, and local timestamp of each local resource package; the server version information includes the resource identifier, server version number, server file hash value, and server timestamp of each server resource package. For each resource package, based on the comparison between local version information and server version information, determine whether the resource package needs to be updated, including: Using the resource identifier as the matching key, compare whether the local version number with the server version number that has the same resource identifier is consistent; If the local version number is inconsistent with the server version number, the resource package is directly determined to need to be updated; If the local version number is the same as the server version number, then compare the local file hash value with the server file hash value that have the same resource identifier. If the local file hash value is inconsistent with the server file hash value, the resource package needs to be updated. If the local file hash value is consistent with the server file hash value, calculate the time difference between the local timestamp and the server timestamp with the same resource identifier, and compare whether the time difference is greater than or equal to the preset validity period threshold. If the time difference is greater than or equal to the preset validity period threshold, the resource package is determined to need to be updated. If the time difference is less than the preset validity period threshold, the resource package is determined not to need to be updated, and the existing local resources can be used directly.
[0018] In this embodiment, before performing version comparison, for each resource package, the resource identifier, local version number, local file hash value, and local timestamp are read from local storage and combined to form the local version information of the resource package. The resource identifier is a unique code that distinguishes different resource packages, such as the resource package name PhysicsModel_v2. The local version number is, for example, 2.1.0. The local file hash value is a fixed-length string obtained by hashing the content of the local resource package file, such as the hash string obtained by performing a SHA-256 hash calculation on the entire resource package file. The local timestamp is the last modification time of the local resource package file, such as 10:00 AM on August 1, 2026.
[0019] A version query request is sent to the server, carrying the resource identifier of the resource package. The server retrieves a record matching the resource identifier from its resource version database and returns the corresponding server version number, server file hash value, and server timestamp as the server version information for the resource package. For example, the server version number might be 2.2.0. The server file hash value is a hash string calculated by the server using the same hash algorithm on the resource package file content when the package was published. For example, the server timestamp might be August 15, 2026, at 2 PM.
[0020] After obtaining the local and server version information, the system compares the local version number with the server version number that has the same resource identifier using the resource identifier as the matching key. If the local version number 2.1.0 is lower than the server version number 2.2.0, i.e., they are inconsistent, the system directly determines that the resource package needs to be updated and adds the resource package to the update list.
[0021] If the local version number matches the server version number, for example, both are 2.2.0, then the second level of judgment is executed: the local resource package file is re-hash-calculated to obtain the current local file hash value, which is then compared with the server file hash value. If the two are inconsistent, it indicates that the local resource package file has undergone data changes after downloading or during storage, and the resource package needs to be updated.
[0022] If the local file hash value matches the server file hash value, the third-level judgment is executed, calculating the absolute value of the time difference between the local and server timestamps. The time difference is the absolute value of the difference between the local and server timestamps. For example, if the local timestamp is August 1, 2026, at 10:00 AM and the server timestamp is August 15, 2026, at 2:00 PM, the time difference is fourteen days and four hours. This time difference is compared with a preset validity period threshold. The preset validity period threshold is a pre-set maximum time difference value used to determine whether the resource package content is still valid. It is pre-configured by the administrator according to the resource type and stored in a local configuration file. For example, the preset validity period threshold for question bank resources is thirty days. If the time difference is greater than or equal to the preset validity period threshold, the resource package needs to be updated. If the time difference is less than the preset validity period threshold, the resource package does not need to be updated, and the existing local resources are directly used.
[0023] This embodiment uses a three-tiered progressive approach—version number, file hash value, and timestamp—to sequentially identify resource version iterations, file integrity, and content timeliness issues. Compared to single-dimensional judgment, this embodiment detects file corruption or tampering through hash value verification when version numbers match, and detects outdated content through timestamp verification when both version number and hash value match. This ensures that simulation resources loaded in offline environments meet usability requirements in terms of version correctness, file integrity, and content timeliness, effectively preventing simulation scene loading anomalies or learning content failures caused by undetected file corruption or outdated content, thereby improving the guarantee capability for secure resource operation in offline scenarios.
[0024] S102: When it is determined that an update is needed, download the resource package and perform local decompression and replacement to obtain usable simulation resources; if an exception is triggered during the download, decompression or replacement process, perform a version rollback operation to restore the resources to the state before the update.
[0025] In this embodiment, the resource package is locally decompressed and replaced to obtain usable simulation resources, including: Create a temporary directory in local storage, unzip the resource package to the temporary directory, and obtain temporary resource files; Perform integrity verification on temporary resource files, generate temporary resource verification values, and compare the temporary resource verification values with the preset standard verification values in the resource package; If the comparison matches, the current resource directory pointer is switched from the original local resource directory to the temporary directory, and the temporary resource file is used as a usable simulation resource. If the comparison is inconsistent or an exception is triggered during the switching process, the original local resource directory will be retained, and the resource files in the original local resource directory will be used as available simulation resources.
[0026] In this embodiment, after determining that an update is needed, the resource package is downloaded from the server to the local machine. After downloading, a temporary directory is created in local storage. This temporary directory is a temporary storage location created in local storage to temporarily store the decompressed resource files, such as a subdirectory under the system temporary folder. This temporary directory is independent of the currently used existing local resource directory. The existing local resource directory is the resource directory currently in use before the update. For example, a subdirectory named "Temp" is created as a temporary directory in the same directory as the existing local resource directory. The downloaded resource package is decompressed to this temporary directory. During decompression, each resource file is restored according to the directory structure within the resource package to obtain temporary resource files. These temporary resource files are the resource files after being decompressed to the temporary directory.
[0027] After decompression, the temporary resource files undergo integrity verification. Integrity verification verifies whether the temporary resource files are complete and undamaged. Specifically, each resource file in the temporary directory is traversed, and a hash calculation is performed on each one to obtain a temporary resource checksum for each file. The temporary resource checksum is a checksum string obtained after hashing the temporary resource file. This temporary resource checksum is then compared with a pre-defined standard checksum in the resource package. The standard checksum is a pre-defined checksum string in the resource package, used as the comparison benchmark. The standard checksum is the checksum data encapsulated within the resource package after the server performs a hash calculation on each resource file during the packaging process. If the temporary resource checksums of all resource files match the standard checksum, the integrity verification passes.
[0028] After successful verification, a directory switch operation is performed. The resource directory pointer is a reference to the currently effective resource directory, such as a resource path recorded in a configuration file or an operating system symbolic link. The current resource directory pointer is switched from the original local resource directory to a temporary directory, and the temporary resource files in the temporary directory are used as available simulation resources. The original local resource directory is retained and not deleted. If the integrity verification fails (i.e., the temporary resource verification value of any resource file is inconsistent with the standard verification value), the temporary directory is abandoned, the directory switch is not performed, the original local resource directory is retained, and the resource files in the original local resource directory are used as available simulation resources. If an exception is triggered during the directory switch process, such as a failure to write the resource directory pointer or insufficient permissions, the original local resource directory is also retained, and the resource files in the original local resource directory are used as available simulation resources.
[0029] In this embodiment, performing a version rollback operation to restore resources to their pre-update state includes: Get the local version information before the update. The local version information before the update records the file path of each resource file and its corresponding version number before the update. For each resource package that has been decompressed or replaced, restore the resource files in the corresponding path to the previous version according to the file list recorded in the local version information before the update. If any resource file fails to be restored during the recovery process, the rollback operation of the current resource package will be paused and the resource package will be marked as an abnormal resource package. In response to the user's restart command, the rollback operation is re-executed on the abnormal resource package until all files in the resource package are successfully restored to the previous version.
[0030] In this embodiment, when an exception is triggered during the download, decompression, or replacement process, the local version information before the update is obtained. The local version information before the update is a data set recording the file paths and corresponding version numbers of each resource file before the update. The file path is the location of the resource file in local storage. This information is backed up to a local configuration file before each resource update starts, recording the file paths and corresponding version numbers of each resource file before the update. On a resource package basis, for each resource package that has completed the decompression or replacement operation, the file list recorded in the local version information before the update is read one by one, and the resource files under the corresponding paths are restored to the version before the update according to the file paths in the file list.
[0031] During the recovery process, if the recovery of a resource file fails (e.g., due to file write failure or insufficient storage space), the rollback operation for the current resource package is paused, and that resource package is marked as an abnormal resource package. An abnormal resource package is one that is marked as abnormal due to file recovery failure during the rollback process. Files within the current resource package that have not yet been recovered remain in their current state. When the user restarts the system, in response to the user's restart command, the resource package marked as abnormal is identified, and the rollback operation for that abnormal resource package is re-executed until all files within that resource package are successfully restored to their pre-update version. The user restart command is the command signal triggered when the user restarts the system. Rollback operations for other resource packages will not be executed until all resource packages marked as abnormal have been successfully recovered.
[0032] This embodiment ensures that the original resource directory remains intact and usable in the event of any anomalies during decompression or replacement by unpacking the resource package to a temporary directory independent of the original resource directory and only switching the directory pointer after successful verification. During the version rollback phase, atomic rollback is performed on a per-resource-package basis. If the recovery of any file fails, the rollback operation of the current resource package is paused and marked, avoiding a "dirty" state where some files have been recovered while others have not. These designs collectively ensure that the system always has a usable and complete resource version during resource updates and rollbacks, thereby guaranteeing the safe operation of the system in offline environments when resource anomalies occur.
[0033] S103: In offline mode, load available simulation resources or existing resources in the previous state. If an exception is triggered during loading, load the preset backup resource data to build a virtual simulation scene.
[0034] In this embodiment, the backup resource data is pre-built simulation resource data used to replace the main resource when the main resource fails to load. Examples include reduced-precision 3D model files, compressed texture files, or simplified scene configuration files. These are stored in a pre-defined directory in local storage during system installation or initial startup and do not need to be retrieved from the server. The virtual simulation scene is a virtual space constructed based on 3D graphics technology to simulate a physical experimental environment.
[0035] After the system starts offline, it first attempts to load available simulation resources. These available simulation resources are the main resources obtained during the aforementioned decompression and replacement process, or, if an exception is triggered during decompression and replacement, resource files in the existing local resource directory. If the update process does not trigger any exceptions, the available simulation resources are the latest version of the resources; if the update process triggers an exception and performs a version rollback, the available simulation resources are the rolled-back resources.
[0036] During the loading process, each resource file in the available simulation resources is read into memory one by one. If all resource files are successfully read and parsed, the loading is complete, and a virtual simulation scene is constructed using the available simulation resources.
[0037] If an exception occurs during loading, such as file corruption, format incompatibility, or memory allocation failure preventing the loading operation from completing normally, the loading of available simulation resources is abandoned. In this case, backup resource data is loaded from a pre-configured directory in local storage. Backup resource data consists of simplified simulation resources pre-built into the system installation package, such as reduced-precision 3D models, compressed textures, and simplified scene configuration data. Its data volume is smaller than the main resources, requiring less storage space and memory, and resulting in a higher loading success rate. When loading backup resource data, each backup resource file is loaded sequentially according to the scene configuration file within the backup resource data. After loading is complete, a virtual simulation scene is constructed using the backup resource data. Simultaneously, the current resource degradation state is recorded in the local log for subsequent troubleshooting or user feedback.
[0038] If an exception is also triggered during the loading of backup resource data, the startup process will be paused, a prompt message will be displayed on the user interface to inform the user that the current resource status is abnormal, and a system restart or reinstallation will be recommended.
[0039] This embodiment automatically switches to preset backup resource data when the main resource fails to load, enabling the system to build virtual simulation scenarios even when the main resource is unavailable in an offline environment, thus avoiding system unavailability due to the failure to load a single resource. Combined with the atomic decompression and replacement and version rollback mechanism in step S102, this step further provides a second layer of fault tolerance in the loading process. Therefore, anomaly handling measures are in place for all three stages: resource update, resource storage, and resource loading, improving the availability and robustness of the system in offline scenarios.
[0040] S104: In response to user operations on physical objects in the virtual simulation scene, generate interactive commands and update the scene rendering state based on the interactive commands.
[0041] In this embodiment, the virtual simulation scene is a virtual space constructed based on 3D graphics technology to simulate a physical experimental environment. A 3D physical experimental environment is built within the virtual simulation scene, containing multiple interactive physical objects. These physical objects are interactive models representing physical entities in the virtual simulation scene, such as battery components, resistors, switches, wires, and light bulbs in a circuit experiment. Each physical object is pre-bound with a set of operable types; for example, resistors support dragging and parameter adjustment, wires support connection and disconnection, and switches support clicking to toggle on / off states. Operations are actions performed by the user on the physical objects, such as dragging, clicking, rotating, connecting wires, or adjusting parameters.
[0042] The system captures user interaction input in a 3D scene in real time via input devices, such as mouse dragging, clicking, or touchscreen swiping. When a user performs an operation on a physical object, it captures the operation type, operation location, and object identifier.
[0043] Based on the captured operation information, corresponding interactive instructions are generated. These interactive instructions are control signals describing the user's operation and its target object. They are structured data containing an operation type field, an operation object identifier field, and an operation parameter field. For example, when a user drags a resistor, the operation type field is "drag," the operation object identifier field is the resistor's unique number, and the operation parameter fields are the drag start position and drag offset. When a user connects a wire, the operation type field is "wire connection," the operation object identifier field is the wire number, and the operation parameter fields are the starting and ending pins of the connection. When a user clicks a switch, the operation type field is "switch toggle," the operation object identifier field is the switch number, and the operation parameter field is empty.
[0044] After generating the interaction command, it is passed to the physics engine. The physics engine invokes the corresponding physical simulation calculation logic based on the operation type and object identifier fields in the interaction command. If the interaction command is a drag-and-drop type, the physics engine calculates the new position coordinates of the physical object in 3D space and checks whether this position collides with other physical objects in the scene. If a collision occurs, the position is adjusted according to the collision response rules. If the interaction command is a wire connection type, the physics engine updates the circuit topology and recalculates the current path and voltage distribution in the circuit. If the interaction command is a switch toggle type, the physics engine updates the switch's on / off state and recalculates the conduction state of the entire circuit.
[0045] After the physics simulation is completed, the physics engine outputs updated position, orientation, and circuit status data for each physical object. The scene rendering state is a collection of visual presentation parameters for each physical object in the virtual simulation scene, including its position, orientation, visibility, material properties, and circuit on / off status in 3D space. Updating the scene rendering state based on the data output by the physics engine adjusts the display position, rotation angle, material highlighting status, and visual representation of circuit on / off states for each physical object in 3D space, such as turning a light bulb on or off. The updated scene rendering state is displayed in real-time in the user interface, allowing the user to observe the simulation results after their actions.
[0046] This embodiment utilizes a local closed-loop processing chain, encompassing operation capture, interactive command generation, physical simulation calculation, and scene rendering state updates, to ensure that user actions on physical objects in an offline environment are instantly reflected in the visual representation of the virtual simulation scene, achieving real-time interactive response without server-side intervention. The physics engine performs physical simulation calculations based on interactive commands, ensuring the physical realism of the operation results and providing users with an immersive simulation experiment experience. This mechanism operates completely offline, without relying on network transmission, thus avoiding the latency issues common in online interactions.
[0047] S105: In response to the user's answering operation on the local question bank, generate the answering result; based on the answering result and the local historical wrong question record, determine the user's weak knowledge point data, select recommended questions from the local question bank according to the weak knowledge point data, and update the display priority of the local question bank with the recommended questions so that the recommended questions can be displayed first when answering questions in the future.
[0048] In this embodiment, based on the answer results and local historical wrong answer records, the user's weak knowledge point data is determined, including: Obtain the local pre-set knowledge point tag system, which contains the mapping relationship between each knowledge point tag and each question in the question bank; Label the incorrect answers with knowledge point tags and determine the corresponding knowledge point tags for each incorrect answer. The historical wrong question frequency of each knowledge point tag is obtained from the local historical wrong question record. Based on the wrong question frequency of that knowledge point tag in the current quiz, the cumulative wrong question frequency of each knowledge point tag is updated. Knowledge points whose cumulative frequency of incorrect answers is greater than or equal to a preset frequency threshold are identified as weak knowledge points.
[0049] In this embodiment, a local pre-built knowledge point tagging system is used. This system is a data structure that maps each knowledge point tag to a question in the question bank. Knowledge point tags are classification markers used to identify the knowledge content tested in a question, such as Ohm's law or series circuits. The knowledge point tagging system is stored locally as a structured data file, recording the knowledge point tags corresponding to each question. A question can correspond to one or more knowledge point tags; for example, a question testing series circuit calculations corresponds to the two knowledge point tags: series circuits and Ohm's law.
[0050] After a user completes an answer to a question, a result is generated. The result is data recorded by the system regarding the user's performance on that question, including whether the answer was correct, the user's selected options, and the correct answer. The result includes the question identifier, the user's selected options, a correct / incorrect flag, and the standard answer. Knowledge point tags are then added to the result. Based on the question identifier in the result, the system searches for the corresponding knowledge point tag in the knowledge point tag system to determine the tag to which the question belongs. The question identifier in the result is then associated with and stored with the found knowledge point tag. If the correct / incorrect flag in the result is "incorrect," meaning the user answered incorrectly, the system retrieves the historical error frequency for each knowledge point tag from the local historical error record. The local historical error record is a collection of historical data on incorrectly answered questions from all past answers in the local database. The error frequency is the number of times an incorrect question corresponding to a specific knowledge point tag has appeared. The system adds one more time to the historical error frequency for each knowledge point tag corresponding to the current incorrect question to obtain the updated cumulative error frequency for each knowledge point tag. The cumulative frequency of incorrect answers is the sum of the number of times a specific knowledge point tag appears in the local historical incorrect answer record since its first recording. The updated cumulative frequency of incorrect answers is written back to the local historical incorrect answer record for persistent storage.
[0051] After updating the frequency of this quiz, for each knowledge point tag in the knowledge point tag system, the cumulative frequency of incorrect answers corresponding to that knowledge point tag is read and compared with a preset frequency threshold. The preset frequency threshold is a pre-set minimum cumulative frequency of incorrect answers, used to determine whether a knowledge point tag constitutes a weak knowledge point. It is pre-configured by the administrator based on teaching experience; for example, it is set to three, meaning that if the same knowledge point tag has three cumulative incorrect answers, it is determined to be a weak knowledge point. Knowledge point tags with a cumulative frequency of incorrect answers greater than or equal to the preset frequency threshold are identified as weak knowledge point data. Weak knowledge point data is a set of knowledge point tags that users have insufficient mastery of, determined jointly by the quiz results and local historical incorrect answer records; it is a single knowledge point tag set.
[0052] In this embodiment, recommended questions are selected from the local question bank based on data on weak knowledge points, including: Retrieve the knowledge point tags and difficulty level of each question in the local question bank; Using the tags of each knowledge point in the weak knowledge point data as the matching key, a set of candidate questions matching any tag of a weak knowledge point is selected from the local question bank; For each candidate question in the candidate question set, calculate the comprehensive matching degree between the candidate question and the weak knowledge point data. The comprehensive matching degree is determined by the first ratio of the number of weak knowledge points hit by the candidate question to the total number of weak knowledge points in the weak knowledge point data, and the sum of the cumulative wrong question frequencies of the weak knowledge points hit by the candidate question in the local historical wrong question records. Based on the difficulty level of each candidate question and the average accuracy rate of users in the local historical wrong question records, the first subset with difficulty level greater than the difficulty threshold corresponding to the average accuracy rate and the second subset with difficulty level less than the difficulty threshold corresponding to the average accuracy rate are filtered out from the candidate question set to obtain the difficulty-adapted question set. For each question in the difficulty-matched question set, sort them from high to low according to their overall matching degree, and determine a predetermined number of questions at the top of the ranking as recommended questions.
[0053] In this embodiment, the recommended questions are selected from the local question bank based on the data of weak knowledge points for users to practice first; the difficulty level is a numerical value that indicates the difficulty of the question and is pre-labeled in the question data, for example, using integers from one to five to represent five levels from easy to difficult.
[0054] Using the tags of each knowledge point in the weak knowledge point data as matching keys, we iterate through each question in the local question bank. If a question's knowledge point tag matches any knowledge point tag in the weak knowledge point data, then the question is added to the candidate question set. The candidate question set is a collection of questions that match any knowledge point tag in the weak knowledge point data.
[0055] The overall matching degree is a numerical value that measures the strength of the association between candidate questions and the weak knowledge point data. First, the number of knowledge point tags in the candidate question that belong to the weak knowledge point data is counted, i.e., the number of weak knowledge points matched. The proportion of this number to the total number of weak knowledge points in the weak knowledge point data is calculated as the first ratio. The first ratio is the proportion of the number of weak knowledge points matched by the candidate question to the total number of weak knowledge points in the weak knowledge point data. Then, the cumulative frequency of each knowledge point tag matched by the candidate question is obtained in the local historical wrong question record, and the sum of the cumulative wrong question frequencies is calculated. The first ratio is added to the sum of the cumulative wrong question frequencies to obtain the overall matching degree of the candidate question.
[0056] The system retrieves the average accuracy rate of users from their local historical incorrect answer records. This average accuracy rate is calculated by dividing the number of correct answers by the total number of answers. A corresponding difficulty threshold is determined based on the average accuracy rate. This threshold is a critical value for the difficulty level corresponding to the average accuracy rate. For example, the pre-defined correspondence between accuracy rate and difficulty threshold is: accuracy below 40% corresponds to difficulty threshold level two; accuracy between 40% and 70% corresponds to difficulty threshold level three; and accuracy above 70% corresponds to difficulty threshold level four. Questions with a difficulty level greater than the threshold corresponding to the average accuracy rate (i.e., overly difficult) are filtered from the candidate question set, resulting in the first subset. Simultaneously, questions with a difficulty level less than the threshold corresponding to the average accuracy rate (i.e., overly easy) are filtered, resulting in the second subset. The first subset contains questions with a difficulty level greater than the threshold corresponding to the average accuracy rate, and the second subset contains questions with a difficulty level less than the threshold corresponding to the average accuracy rate. Questions with a difficulty level equal to or close to the threshold corresponding to the average accuracy rate are retained, resulting in a difficulty-appropriate question set. The difficulty-fit question set is the set of questions remaining after removing the first and second subsets from the candidate question set.
[0057] This embodiment identifies weak knowledge points by comparing the cumulative frequency of incorrect answers with a preset frequency threshold. This avoids the interference of random fluctuations in a single answer session on the judgment results, ensuring that the judgment results for weak knowledge points converge with the statistical characteristics of the user's long-term answer performance, thus possessing higher reliability. Through a combined screening mechanism of comprehensive matching degree ranking and difficulty adaptation filtering, the recommended questions are both focused on weak knowledge points and adapted to the user's current ability level, avoiding ineffective practice caused by recommended questions that are too difficult or too easy, and improving the accuracy and training efficiency of personalized recommendations in offline scenarios.
[0058] S106: Bind the answer results to the current timestamp data, store them in the local database, and mark them as data to be synchronized.
[0059] In this embodiment, the local database is a data storage system stored locally on the device. It can be a database file using the SQLite relational database storage engine, created in advance in a designated directory of local storage during system installation or initial startup. The database contains a question record table, which predefines the following fields: record identifier, user identifier, question identifier, user answer, correct answer, correct / not correct, answer timestamp, and synchronization status. The record identifier field is an auto-incrementing primary key used to uniquely identify each question record. The user identifier field stores the unique ID of the currently logged-in user. The question identifier field stores the unique ID of the question answered by the user. The user answer field stores the user's submitted options. The correct answer field stores the standard answer to the question. The correct / not correct field stores whether the question was answered correctly, with values such as yes or no. The answer timestamp field stores the time value when the question was completed. The synchronization status field stores the synchronization status identifier of the record. The synchronization status identifier is a record field; for example, a status value of "pending synchronization" indicates that the record has not yet been uploaded, and a status value of "synchronized" indicates that the record has been successfully uploaded to the server.
[0060] After a user completes an answer to a question, the current time value is retrieved from the system clock as the current timestamp. The current timestamp is the time value corresponding to the current moment, such as 14:30 on August 18, 2026, accurate to the second. Binding storage involves storing the answer result and the current timestamp together in the database in a related manner. Each field in the answer result is combined with the current timestamp to form an answer record, and data is written to the corresponding fields in the answer record table. For the synchronization status field, a "to be synchronized" status value is written, such as the number zero indicating pending synchronization. Marking data as pending synchronization involves adding a synchronization status identifier to the stored record in the local database to distinguish between data that has not yet been uploaded to the server and data that has already been uploaded. After the data writing is complete, the database transaction is committed, completing this storage operation.
[0061] Each answer record is stored as an independent data row. Each answer operation corresponds to the addition of a new data row, without overwriting historical data. Historical answer records that have been stored but not yet synchronized are stored together with the newly added answer records in the same data table, and are distinguished by the value of the synchronization status field.
[0062] This embodiment achieves persistent storage and status tracking of answer results in an offline environment by binding and storing the answer results with the current timestamp data and marking them as data to be synchronized, thus avoiding data loss due to lack of storage.
[0063] S107: In response to network connectivity, extract the answer results marked as data to be synchronized from the local database, encrypt the data to be synchronized to obtain encrypted synchronized data, and upload the encrypted synchronized data to the server.
[0064] In this embodiment, the data to be synchronized is encrypted to obtain encrypted synchronization data, and the encrypted synchronization data is uploaded to the server, including: Obtain the generation timestamp and unique identifier of the user device for the data to be synchronized; A dynamic encryption key is generated using a combination of the generated timestamp and the user equipment's unique identifier as the key factor; The answer result data in the data to be synchronized is symmetrically encrypted using a dynamic encryption key to obtain encrypted synchronization data. The encrypted synchronization data is divided into multiple data blocks, and a block sequence number is assigned to each data block; Each data block is uploaded to the server sequentially according to its block number, and the block number that has been successfully uploaded is recorded during the upload process. If the network is interrupted during the upload process, the sequence number of the block that has been successfully uploaded will be saved as the upload progress breakpoint. In response to network recovery, based on the upload progress breakpoint, upload continues from the last unsuccessfully uploaded data block until all data blocks are uploaded; In response to the completion of all data block uploads, an upload completion flag is sent to the server so that the server can merge and restore the data blocks to obtain the data to be synchronized.
[0065] In this embodiment, in response to network connectivity—that is, when the device detects that a network connection with the server has been established—it extracts the answer records marked as pending synchronization from the local database using the synchronization status field. Each extracted record to be synchronized includes a question identifier, user answer, correct answer, correct / incorrect status indicator, and answer timestamp fields.
[0066] The generated timestamp is the current time value, obtained from the system clock. The unique identifier for the user equipment is the device's hardware serial number or a globally unique identifier assigned by the system, such as the serial number written when the device leaves the factory. A dynamic encryption key is generated using the combination of the generated timestamp and the unique identifier for the user equipment as a key factor. For example, the combination method involves concatenating the timestamp string and the device identifier string as input, and then calculating the dynamic encryption key using a key derivation function.
[0067] During encryption, the AES symmetric encryption algorithm is used in CBC mode. The fields in the data to be synchronized are concatenated into a plaintext string, which is then encrypted using a dynamic encryption key. The output is binary ciphertext data, serving as the encrypted synchronization data. The data block size is, for example, 256KB. The encrypted synchronization data is sequentially divided from beginning to end, with the last block potentially smaller than the preset size. Block numbers start from 0 and increment. For each data block, an HTTP POST request is sent to the server, containing the binary data and block number in the request body. Upon receiving the data block, the server temporarily stores it in a temporary storage area and records the received block number.
[0068] If the network is interrupted during the upload process, such as due to a disconnection of the Wi-Fi signal or loss of mobile network connection, the sequence number of the block that has been successfully uploaded is saved as the upload progress breakpoint, and the upload progress breakpoint is written to the local configuration file for persistent storage. After the network interruption, subsequent data blocks that have not yet been uploaded remain in an unuploaded state, while data blocks that have already been uploaded to the server continue to be stored in the server's temporary storage area and are not discarded due to the interruption.
[0069] In response to network recovery, based on the upload progress breakpoint, uploads resume from the last unsuccessfully uploaded data block until all data blocks are uploaded. The upload progress breakpoint is read from the local configuration file, incremented by one to serve as the starting block number for resumed uploads, and the remaining data blocks are uploaded sequentially starting from the data block corresponding to that number.
[0070] In response to the completion of all data block uploads, an upload completion flag is sent to the server. This flag is a specific formatted HTTP request, with the request body containing a list of record flags for the data to be synchronized. Upon receiving the flag, the server sorts and concatenates the data blocks according to their block sequence numbers, reconstructing the complete encrypted synchronization data. This data is then decrypted using a dynamic encryption key to restore the plaintext data to be synchronized. After merging, the server deletes the temporarily stored data blocks.
[0071] This embodiment encrypts the data to be synchronized using a dynamic encryption key, ensuring that the encryption key is different for each synchronization, thus avoiding the risk of all data being decrypted due to the leakage of a single key. Through chunked upload and breakpoint resume mechanisms, only incomplete data chunks are resumed after network interruption, avoiding the duplication of successfully uploaded data and reducing network bandwidth consumption. These mechanisms collectively enhance the security and reliability of offline learning data during transmission, making data synchronization recoverable in unstable network scenarios.
[0072] As can be seen from the above, the embodiments of this application perform version comparison independently for each resource package, and only perform download and replacement when it is determined that an update is needed, thus avoiding unnecessary network traffic consumption; by triggering version rollback due to an anomaly to restore the resources to the state before the update, and by loading pre-set backup resource data when a loading anomaly occurs, the reliability of the virtual simulation scene construction in the offline environment is ensured, so that the system can still start and run normally in the absence of network.
[0073] This application's embodiments break through the limitation of fixed question bank content in offline scenarios. By generating answer results in response to answering operations and combining them with local historical incorrect answer records to determine the user's weak knowledge points, it then selects recommended questions from the local question bank based on these weak knowledge points, updating the display priority of the local question bank so that subsequent answering sessions prioritize the display of questions strongly related to the weak knowledge points. This mechanism completes the personalized adaptation process from answer data collection and weak point discovery to dynamic updates of recommended content locally in a closed loop without relying on the server, effectively solving the problem that it is difficult to train on individual weak areas due to fixed question bank content.
[0074] This application embodiment ensures the security and integrity of user learning data generated offline by binding and storing answer results with timestamps and marking them as requiring synchronization. When the network is connected, the data to be synchronized is extracted and encrypted before uploading, thus guaranteeing its security during transmission. Therefore, this application embodiment can improve the accuracy and personalized adaptability of the physics simulation learning system's question recommendations to users in offline states.
[0075] Corresponding to the offline secure operation method of the physical simulation personalized learning system in the above embodiment, Figure 2 This is a structural block diagram of an offline secure operation device for a personalized physics simulation learning system according to an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 2 The offline secure operation device 20 of the physical simulation personalized learning system includes: a version comparison module 21, a resource update and rollback module 22, a scene construction module 23, a simulation interaction module 24, a personalized recommendation module 25, a local storage module 26, and an encrypted synchronization module 27.
[0076] Among them, the version comparison module 21 is used to determine whether the resource package needs to be updated based on the comparison results between the local version information and the server version information for each resource package. The resource update and rollback module 22 is used to download the resource package and perform local decompression and replacement when it is determined that an update is needed, so as to obtain usable simulation resources; if an exception is triggered during the download, decompression or replacement process, a version rollback operation is performed to restore the resources to the state before the update. The scenario building module 23 is used to load available simulation resources or existing resources in the previous state when offline. If an exception is triggered during the loading process, the preset backup resource data is loaded to build a virtual simulation scenario. The simulation interaction module 24 is used to respond to the user's operation on physical objects in the virtual simulation scene, generate interaction commands, and update the scene rendering state based on the interaction commands; The personalized recommendation module 25 is used to respond to the user's answering operation on the local question bank and generate answering results; based on the answering results and the local historical wrong question records, it determines the user's weak knowledge point data, selects recommended questions from the local question bank according to the weak knowledge point data, and updates the display priority of the local question bank with the recommended questions so that the recommended questions can be displayed first when answering questions in the future; Local storage module 26 is used to bind the answer results with the current timestamp data and store them in the local database and mark them as data to be synchronized; The encrypted synchronization module 27 is used to respond to network connectivity, extract the answer results marked as data to be synchronized from the local database, encrypt the data to be synchronized to obtain encrypted synchronized data, and upload the encrypted synchronized data to the server.
[0077] In one embodiment of this application, the local version information includes the resource identifier, local version number, local file hash value, and local timestamp of each local resource package; the server version information includes the resource identifier, server version number, server file hash value, and server timestamp of each server resource package; the version comparison module 21 is specifically used for: Using the resource identifier as the matching key, compare whether the local version number with the server version number that has the same resource identifier is consistent; If the local version number is inconsistent with the server version number, the resource package is directly determined to need to be updated; If the local version number is the same as the server version number, then compare the local file hash value with the server file hash value that have the same resource identifier. If the local file hash value is inconsistent with the server file hash value, the resource package needs to be updated. If the local file hash value is consistent with the server file hash value, calculate the time difference between the local timestamp and the server timestamp with the same resource identifier, and compare whether the time difference is greater than or equal to the preset validity period threshold. If the time difference is greater than or equal to the preset validity period threshold, the resource package is determined to need to be updated. If the time difference is less than the preset validity period threshold, the resource package is determined not to need to be updated, and the existing local resources can be used directly.
[0078] In one embodiment of this application, the resource update and rollback module 22 is specifically used for: Create a temporary directory in local storage, unzip the resource package to the temporary directory, and obtain temporary resource files; Perform integrity verification on temporary resource files, generate temporary resource verification values, and compare the temporary resource verification values with the preset standard verification values in the resource package; If the comparison matches, the current resource directory pointer is switched from the original local resource directory to the temporary directory, and the temporary resource file is used as a usable simulation resource. If the comparison is inconsistent or an exception is triggered during the switching process, the original local resource directory will be retained, and the resource files in the original local resource directory will be used as available simulation resources.
[0079] In one embodiment of this application, the resource update and rollback module 22 is specifically used for: Get the local version information before the update. The local version information before the update records the file path of each resource file and its corresponding version number before the update. For each resource package that has been decompressed or replaced, restore the resource files in the corresponding path to the previous version according to the file list recorded in the local version information before the update. If any resource file fails to be restored during the recovery process, the rollback operation of the current resource package will be paused and the resource package will be marked as an abnormal resource package. In response to the user's restart command, the rollback operation is re-executed on the abnormal resource package until all files in the resource package are successfully restored to the previous version.
[0080] In one embodiment of this application, the personalized recommendation module 25 is specifically used for: Obtain the local pre-set knowledge point tag system, which contains the mapping relationship between each knowledge point tag and each question in the question bank; Label the incorrect answers with knowledge point tags and determine the corresponding knowledge point tags for each incorrect answer. The historical wrong question frequency of each knowledge point tag is obtained from the local historical wrong question record. Based on the wrong question frequency of that knowledge point tag in the current quiz, the cumulative wrong question frequency of each knowledge point tag is updated. Knowledge points whose cumulative frequency of incorrect answers is greater than or equal to a preset frequency threshold are identified as weak knowledge points.
[0081] In one embodiment of this application, the personalized recommendation module 25 is specifically used for: Retrieve the knowledge point tags and difficulty level of each question in the local question bank; Using the tags of each knowledge point in the weak knowledge point data as the matching key, a set of candidate questions matching any tag of a weak knowledge point is selected from the local question bank; For each candidate question in the candidate question set, calculate the comprehensive matching degree between the candidate question and the weak knowledge point data. The comprehensive matching degree is determined by the first ratio of the number of weak knowledge points hit by the candidate question to the total number of weak knowledge points in the weak knowledge point data, and the sum of the cumulative wrong question frequencies of the weak knowledge points hit by the candidate question in the local historical wrong question records. Based on the difficulty level of each candidate question and the average accuracy rate of users in the local historical wrong question records, the first subset with difficulty level greater than the difficulty threshold corresponding to the average accuracy rate and the second subset with difficulty level less than the difficulty threshold corresponding to the average accuracy rate are filtered out from the candidate question set to obtain the difficulty-adapted question set. For each question in the difficulty-matched question set, sort them from high to low according to their overall matching degree, and determine a predetermined number of questions at the top of the ranking as recommended questions.
[0082] In one embodiment of this application, the encryption synchronization module 27 is specifically used for: Obtain the generation timestamp and unique identifier of the user device for the data to be synchronized; A dynamic encryption key is generated using a combination of the generated timestamp and the user equipment's unique identifier as the key factor; The answer result data in the data to be synchronized is symmetrically encrypted using a dynamic encryption key to obtain encrypted synchronization data. The encrypted synchronization data is divided into multiple data blocks, and a block sequence number is assigned to each data block; Each data block is uploaded to the server sequentially according to its block number, and the block number that has been successfully uploaded is recorded during the upload process. If the network is interrupted during the upload process, the sequence number of the block that has been successfully uploaded will be saved as the upload progress breakpoint. In response to network recovery, based on the upload progress breakpoint, upload continues from the last unsuccessfully uploaded data block until all data blocks are uploaded; In response to the completion of all data block uploads, an upload completion flag is sent to the server so that the server can merge and restore the data blocks to obtain the data to be synchronized.
[0083] It should be noted that the specific limitations of the offline secure operation device 20 of the above-mentioned personalized physical simulation learning system can be found in the limitations of the offline secure operation method of the personalized physical simulation learning system described above, and will not be repeated here. Each module of the above-mentioned device can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in the processor of the electronic device in hardware form or independent of the processor, or it can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.
[0084] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of this application.
[0085] In one alternative embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The illustrated electronic device 300 includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302. Optionally, the electronic device 300 may further include a transceiver 304, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 304 is not limited to one type, and the structure of this electronic device 300 does not constitute a limitation on the embodiments of this application.
[0086] Processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0087] Bus 302 may include a pathway for transmitting information between the aforementioned components. Bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 302 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0088] The memory 303 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0089] The memory 303 is used to store computer programs that execute the embodiments of this application, and the execution is controlled by the processor 301. The processor 301 is used to execute the computer programs stored in the memory 303 to implement the steps shown in the foregoing method embodiments.
[0090] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one computer program that is loaded and executed by a processor of a computer device to enable the computer to implement the offline secure operation method of any of the above-described physical simulation personalized learning systems.
[0091] In one possible implementation, the aforementioned computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a solid-state drive (SSD), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc. The random access memory can include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).
[0092] In an exemplary embodiment, a computer program or computer program product is also provided, which includes computer instructions loaded and executed by a processor to enable the computer to implement the offline secure operation method of any of the above-described physical simulation personalized learning systems.
[0093] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0094] In other words, the data collection and processing in this application should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0095] It should be further noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The implementation methods described in the above exemplary embodiments do not represent all implementation methods consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0096] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0097] Furthermore, the step numbers described herein are merely illustrative of one possible execution order between steps. In some other embodiments, the steps may not be executed in the order of their numbers, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0098] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. Optionally, the program is stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0099] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for the secure offline operation of a physical simulation personalized learning system, characterized in that, include: For each resource package, based on the comparison results between the local version information and the server version information, it is determined whether the resource package needs to be updated. When an update is determined to be needed, the resource package is downloaded and locally decompressed and replaced to obtain usable simulation resources; if an exception is triggered during the download, decompression or replacement process, a version rollback operation is performed to restore the resources to the state before the update. In offline mode, the available simulation resources or existing resources in the previous state are loaded. If an exception is triggered during loading, the preset backup resource data is loaded to construct a virtual simulation scene. In response to the user's operation on physical objects in the virtual simulation scene, an interaction command is generated and the scene rendering state is updated based on the interaction command; In response to the user's answering actions on the local question bank, generate the answer results; Based on the answer results and local historical wrong answer records, the user's weak knowledge points data are determined. Recommended questions are selected from the local question bank according to the weak knowledge point data, and the display priority of the local question bank is updated with the recommended questions so that the recommended questions are displayed first when answering questions in the future. The answer results are bound to the current timestamp data, stored in the local database, and marked as data to be synchronized; In response to network connectivity, the system extracts the answer results marked as the data to be synchronized from the local database, encrypts the data to be synchronized to obtain encrypted synchronized data, and uploads the encrypted synchronized data to the server.
2. The offline secure operation method of the physical simulation personalized learning system as described in claim 1, characterized in that, The local version information includes the resource identifier, local version number, local file hash value, and local timestamp of each local resource package; the server version information includes the resource identifier, server version number, server file hash value, and server timestamp of each server resource package. For each resource package, determining whether the resource package needs updating based on the comparison between local version information and server version information includes: Using the resource identifier as the matching key, compare whether the local version number with the server version number that has the same resource identifier is consistent; If the local version number is inconsistent with the server version number, it is determined that the resource package needs to be updated. If the local version number is the same as the server version number, then compare whether the hash value of the local file with the server file has the same resource identifier. If the local file hash value is inconsistent with the server file hash value, the resource package needs to be updated. If the local file hash value is consistent with the server file hash value, then calculate the time difference between the local timestamp and the server timestamp with the same resource identifier, and compare whether the time difference is greater than or equal to a preset validity period threshold. If the time difference is greater than or equal to the preset validity period threshold, then the resource package needs to be updated. If the time difference is less than the preset validity period threshold, it is determined that the resource package does not need to be updated and the existing local resources can be used directly.
3. The offline secure operation method of the physical simulation personalized learning system as described in claim 1, characterized in that, The process of locally decompressing and replacing the resource package to obtain usable simulation resources includes: Create a temporary directory in local storage, and unzip the resource package to the temporary directory to obtain temporary resource files; The integrity of the temporary resource file is verified, a temporary resource verification value is generated, and the temporary resource verification value is compared with the preset standard verification value in the resource package; If the comparison matches, the current resource directory pointer is switched from the original local resource directory to the temporary directory, and the temporary resource file is used as the available simulation resource. If the comparison is inconsistent or an exception is triggered during the switching process, the original local resource directory will be retained, and the resource files in the original local resource directory will be used as the available simulation resources.
4. The offline secure operation method of the physical simulation personalized learning system as described in claim 1, characterized in that, The rollback operation, which restores resources to their pre-update state, includes: Obtain the local version information before the update, which records the file path of each resource file and its corresponding version number before the update. For each resource package that has been decompressed or replaced, the resource files under the corresponding path are restored to the version before the update, one by one, according to the file list recorded in the local version information before the update. If any resource file fails to be restored during the recovery process, the rollback operation of the current resource package will be paused and the resource package will be marked as an abnormal resource package. In response to the user's restart command, the rollback operation is re-executed on the abnormal resource package until all files in the resource package are successfully restored to the previous version.
5. The offline secure operation method of the physical simulation personalized learning system as described in claim 1, characterized in that, The process of determining the user's weak knowledge points based on the answer results and local historical wrong answer records includes: Obtain a locally pre-set knowledge point tag system, which includes the mapping relationship between each knowledge point tag and each question in the question bank; The incorrect questions in the answer results are labeled with knowledge point tags to determine the knowledge point tags corresponding to each incorrect question; The historical wrong question frequency of each knowledge point tag is obtained from the local historical wrong question record. Based on the wrong question frequency of the knowledge point tag in the current quiz, the cumulative wrong question frequency of each knowledge point tag is updated. The knowledge point tags whose cumulative frequency of incorrect answers is greater than or equal to a preset frequency threshold are identified as the weak knowledge point data.
6. The offline secure operation method of the physical simulation personalized learning system as described in claim 1, characterized in that, The step of selecting recommended questions from the local question bank based on the data of weak knowledge points includes: Obtain the knowledge point tags and difficulty level of each question in the local question bank; Using the tags of each knowledge point in the data of weak knowledge points as matching keys, a set of candidate questions that match any of the tags of weak knowledge points is selected from the local question bank; For each candidate question in the candidate question set, the comprehensive matching degree between the candidate question and the weak knowledge point data is calculated. The comprehensive matching degree is determined by the first ratio of the number of weak knowledge points hit by the candidate question to the total number of weak knowledge points in the weak knowledge point data, and the sum of the cumulative wrong question frequencies of the weak knowledge points hit by the candidate question in the local historical wrong question record. Based on the difficulty level of each candidate question and the average accuracy rate of users in the local historical wrong question records, a first subset with a difficulty level greater than the difficulty threshold corresponding to the average accuracy rate and a second subset with a difficulty level less than the difficulty threshold corresponding to the average accuracy rate are filtered out from the candidate question set to obtain a difficulty-adapted question set. For each question in the difficulty-matched question set, sort them from high to low according to the overall matching degree, and determine a predetermined number of questions at the top of the sorted list as the recommended questions.
7. The offline secure operation method of the physical simulation personalized learning system as described in claim 1, characterized in that, The process of encrypting the data to be synchronized to obtain encrypted synchronized data and uploading the encrypted synchronized data to the server includes: Obtain the generation timestamp and unique identifier of the user equipment for the data to be synchronized; A dynamic encryption key is generated using the combination of the generated timestamp and the unique identifier of the user equipment as a key factor; The answer result data in the data to be synchronized is symmetrically encrypted using the dynamic encryption key to obtain encrypted synchronization data. The encrypted synchronization data is divided into multiple data blocks, and a block number is assigned to each data block; Each data block is uploaded to the server in sequence according to the block number, and the block number that has been successfully uploaded is recorded during the upload process; If the network is interrupted during the upload process, the sequence number of the block that has been successfully uploaded will be saved as the upload progress breakpoint. In response to network recovery, based on the upload progress breakpoint, upload continues from the last unsuccessfully uploaded data block until all data blocks are uploaded; In response to the completion of all data block uploads, an upload completion flag is sent to the server so that the server can merge and restore the data blocks to obtain the data to be synchronized.
8. An offline secure operation device for a physical simulation personalized learning system, characterized in that, include: The version comparison module is used to determine whether a resource package needs to be updated based on the comparison results between the local version information and the server version information for each resource package. The resource update and rollback module is used to download the resource package and perform local decompression and replacement when it is determined that an update is needed, so as to obtain usable simulation resources; if an exception is triggered during the download, decompression or replacement process, a version rollback operation is performed to restore the resources to the state before the update. The scenario building module is used to load the available simulation resources or the existing resources in the state before the update in an offline state. If an exception is triggered during the loading process, the preset backup resource data is loaded to build a virtual simulation scenario. The simulation interaction module is used to respond to the user's operation on physical objects in the virtual simulation scene, generate interaction commands, and update the scene rendering state based on the interaction commands; The personalized recommendation module is used to generate answer results in response to the user's answering actions on the local question bank; Based on the answer results and local historical wrong answer records, the user's weak knowledge points data are determined. Recommended questions are selected from the local question bank according to the weak knowledge point data, and the display priority of the local question bank is updated with the recommended questions so that the recommended questions are displayed first when answering questions in the future. The local storage module is used to bind the answer results with the current timestamp data, store them in the local database, and mark them as data to be synchronized; The encrypted synchronization module is used to, in response to network connectivity, extract the answer results marked as the data to be synchronized from the local database, encrypt the data to be synchronized to obtain encrypted synchronized data, and upload the encrypted synchronized data to the server.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing a computer program, which is loaded and executed by the processor to implement the offline secure operation method of the physical simulation personalized learning system as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the offline secure operation method of the physical simulation personalized learning system as described in any one of claims 1 to 7.
