Mobile device online examination method, system, electronic device and storage medium

By monitoring multiple events and constructing rules to distinguish cheating behavior, combined with heartbeat packets and encrypted storage, the cross-platform adaptation and data loss issues of mobile device online examination systems have been resolved. This achieves full-coverage monitoring and zero data loss, thus improving the reliability of online examinations.

CN121309561BActive Publication Date: 2026-05-22BEIJING BIAOYANG CROSSING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING BIAOYANG CROSSING TECH CO LTD
Filing Date
2025-10-09
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing online examination systems face challenges such as difficulty in cross-platform adaptation on mobile devices, incomplete monitoring of cheating behavior, and a high risk of data loss due to abnormal submissions. In particular, the differences between iOS and Android systems result in insufficient anti-cheating capabilities and a lack of data protection mechanisms.

Method used

By monitoring multiple events, rules are built to distinguish between normal student operations and cheating behavior, achieving full-coverage monitoring; heartbeat packets are sent during background operation to ensure data synchronization, and encrypted emergency submission is performed in abnormal situations, combining cross-platform frameworks and native plugins to adapt to platform differences.

Benefits of technology

It achieves full coverage monitoring of cheating behaviors unique to mobile devices, reduces the false positive rate, ensures a unified submission logic across platforms, prevents data loss in abnormal situations, and improves the reliability and recovery success rate of the exam.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121309561B_ABST
    Figure CN121309561B_ABST
Patent Text Reader

Abstract

The application discloses a kind of mobile equipment online examination methods, comprising: the behavior information of triggering at least two events in first event, second event, third event;According to two behavior information, output warning information;Examination program triggers pause event, and examination program is switched to background suspension operation;Heartbeat packet is sent to server;According to whether success of heartbeat packet reception, determine the data submission state of examination program;The data indicated by the input operation of user is sent to server and is stored in local answer database with encryption;When current examination program state is submission failure, supplement in local answer database is identified;Login current examination program, and the data in local answer database is uploaded according to version number.The application not only realizes full coverage monitoring to online examination cheating behavior, but also improves recovery success rate in abnormal submission scene.The application also discloses a system, electronic equipment and storage medium for implementing the above method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer data processing technology, and in particular to an online examination method, system, electronic device, and storage medium for mobile devices. Background Technology

[0002] With the widespread adoption of internet technology and mobile devices, online examination systems have been widely used in educational institutions (such as school final exams and professional qualification certifications), corporate training (such as employee performance evaluations), and recruitment scenarios (such as campus recruitment written tests). Especially with the high penetration of mobile terminals (such as smartphones and tablets), it has become commonplace for candidates to participate in online examinations via mobile phones or tablets—their portability, flexibility, and low cost make mobile devices the core platform for online examinations.

[0003] However, the open nature of mobile terminals (such as support for multitasking, installation of third-party applications, and connection to external devices) and the differentiated designs of operating systems (such as iOS's strict background restrictions and Android's fragmented adaptation) pose significant challenges to online examination systems in terms of cross-platform adaptation, anti-cheating capabilities, and anomaly handling. While existing systems can meet basic examination procedures (such as question display and answer submission), they reveal significant shortcomings in dealing with covert cheating, ensuring the continuity of the examination process, and maintaining cross-platform consistency. These shortcomings manifest in the following three ways:

[0004] I. Incomplete Anti-Cheating Monitoring Coverage: Traditional monitoring methods only focus on the single behavior of "screen switching," failing to cover cheating scenarios unique to mobile devices such as floating windows (e.g., Android's floating ball, iOS's picture-in-picture), multi-gesture operations (e.g., three-finger screenshot, multi-finger swipe to switch applications), and pull-down status bars (adjusting brightness / network). Furthermore, the monitoring strategies are not adapted to the characteristics of mobile systems, easily leading to the problem of "legal operations being mistakenly judged as cheating" (e.g., pulling down the status bar to view the time).

[0005] Second, significant differences in cross-platform system behavior: Web-based systems are easily exploited by users who can switch tabs or open external software to cheat; while native apps can obtain more system permissions, there are fundamental differences in the background operation mechanisms of iOS and Android—when an iOS app enters the background (i.e., the App Switcher interface), it quickly switches from an active state to an inactive→suspended state, allowing only limited background tasks such as BGTaskScheduler to execute, while regular business code is completely suspended; when an Android app enters the background, it is initially in a paused state, but still has a brief (usually 10-30 seconds) code execution window. This difference directly makes it difficult to implement a unified cross-platform submission logic, and some candidates mistakenly trigger submission due to system differences, leading to disputes in the examination process.

[0006] Third, there is a high risk of data loss due to abnormal submissions: When abnormalities such as network interruption, application crash, or device power failure occur during the examination, the existing system lacks an effective data protection mechanism. The data of the candidates' answers is often lost because it is not stored in real time or the submission fails. This not only affects the candidate's experience, but may also invalidate the examination results. Summary of the Invention

[0007] To address the aforementioned problems in the prior art, this invention provides an online examination method, system, electronic device, and storage medium for mobile devices. The technical problem to be solved by this invention is achieved through the following technical solution:

[0008] The first aspect of this invention provides an online examination method for mobile devices, comprising the following steps:

[0009] In response to triggering at least two of the first, second, and third events, at least two corresponding behavioral information are obtained; wherein, the first event includes the activation of the lifecycle state of the current examination program, the second event includes obtaining a preset gesture and the corresponding screen coordinates, and the third event includes the current examination program losing focus, physical button feedback, floating window opening, screenshot event, and / or application switching.

[0010] When the number of activations between the two types of behavioral information is greater than the number threshold, it is determined whether the time interval between the two types of behavioral information is less than the first time threshold.

[0011] If the value is less than the specified value, a warning message will be output and stored in the log.

[0012] In response to a pause event triggered by the current examination program, switch the current examination program to run in the background.

[0013] Send heartbeat packets to the server at a preset frequency;

[0014] In response to feedback information regarding whether the heartbeat packet sent by the server was successfully received, the data submission status of the examination program running in the background is determined;

[0015] In response to a user's input operation, the data indicated by the input operation is sent to the server while being encrypted and stored in the local answer database in the form of an incrementing local version number.

[0016] When the current examination program status is "submission failed", the status of the local examination state machine is updated to "failed", and a resubmission mark is added to the local answer database.

[0017] In response to logging into the current exam program, data from the local answer database is uploaded to the server based on the local version number and the answer version number of the server.

[0018] In one embodiment of the present invention, determining the data submission status of the background-running examination program in response to feedback information regarding whether the heartbeat packet sent by the server was successfully received includes:

[0019] In response to the feedback message sent by the server after a first preset number of heartbeat packets, the connection between the examination program running in the background and the server is maintained, and the data submission status is determined to be unsubmitted.

[0020] In response to feedback information indicating that the heartbeat packet sending has failed after a second preset number of attempts, the data in the local answer database of the exam program running in the background is sent to the server, and the data submission status is determined to be submitted.

[0021] In one embodiment of the present invention, the method further includes:

[0022] In response to the examination program running in the background being switched to the current running program, the data submission status is retrieved;

[0023] If the data submission status is "not submitted", the examination program will remain running.

[0024] When the data submission status is "submitted", the examination program will terminate.

[0025] In one embodiment of the present invention, in response to logging into the current examination program, data from the local answer database is uploaded to the server according to the current local version number and the answer version number of the server, including:

[0026] In response to logging into the current exam program, determine whether the current local version number is less than the answer version number of the server;

[0027] If not, then upload the data from the local answer database to the server;

[0028] If so, the data corresponding to the answer version number is obtained from the server and stored in the local answer database.

[0029] A second aspect of this invention provides an online examination system for mobile devices, comprising:

[0030] The acquisition module is used to acquire at least two kinds of behavioral information in response to triggering at least two of the first, second and third events; wherein, the first event includes the activation of the life cycle state of the current examination program, the second event includes acquiring a preset gesture and the corresponding screen coordinates, and the third event includes the current examination program losing focus, physical button feedback, floating window opening, screenshot event and / or application switching.

[0031] The judgment module is used to determine whether the time interval between the two behavioral information is less than a first time threshold when the number of activations between the two behavioral information is greater than a number threshold.

[0032] The output module is used to output a warning message and store it in the log if the value is less than the specified value.

[0033] The switching module is used to switch the current examination program to background operation in response to a pause event triggered by the current examination program.

[0034] The sending module is used to send heartbeat packets to the server at a preset frequency;

[0035] The determination module is used to determine the data submission status of the examination program running in the background in response to feedback information on whether the heartbeat packet sent by the server was successfully received.

[0036] The storage module is used to respond to user input operations by sending the data indicated by the input operation to the server while simultaneously encrypting and storing it in the local answer database in the form of an incrementing local version number;

[0037] The update module is used to update the status of the local examination state machine to "failed" when the current examination program status is "submission failed", and to add a resubmission flag in the local answer database.

[0038] The recovery module is used to upload data from the local answer database to the server in response to logging into the current exam program, based on the local version number and the answer version number of the server.

[0039] In one embodiment of the present invention, determining the data submission status of the background-running examination program in response to feedback information regarding whether the heartbeat packet sent by the server was successfully received includes:

[0040] In response to the feedback message sent by the server after a first preset number of heartbeat packets, the connection between the examination program running in the background and the server is maintained, and the data submission status is determined to be unsubmitted.

[0041] In response to feedback information indicating that the heartbeat packet sending has failed after a second preset number of attempts, the data in the local answer database of the exam program running in the background is sent to the server, and the data submission status is determined to be submitted.

[0042] In one embodiment of the present invention, it further includes: a verification module, configured to obtain the data submission status in response to the background suspended examination program switching to the current running state; if the data submission status is not submitted, the examination program is kept running in the current state; if the data submission status is submitted, the examination program is terminated.

[0043] In one embodiment of the present invention, in response to logging into the current examination program, data from the local answer database is uploaded to the server according to the current local version number and the answer version number of the server, including:

[0044] In response to logging into the current exam program, determine whether the current local version number is less than the answer version number of the server;

[0045] If not, then upload the data from the local answer database to the server;

[0046] If so, the data corresponding to the answer version number is obtained from the server and stored in the local answer database.

[0047] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement an online examination method for a mobile device provided in the first aspect of the present invention.

[0048] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a mobile device online examination method provided in the first aspect of the present invention.

[0049] The beneficial effects of this invention are:

[0050] This invention, by monitoring multiple events and coordinating rules built around these events, accurately distinguishes between normal student operations (such as pulling down the status bar or accidentally pressing the multitasking button) and cheating behavior. It achieves full coverage monitoring of cheating behaviors specific to mobile devices, reducing the false positive rate. Furthermore, normal brief background operations by students (such as pulling down the notification bar to view messages or accidentally pressing the multitasking button to return to the home screen) are completely undetectable, without affecting the smoothness of the exam. It implements a unified submission logic across iOS and Android platforms, remaining undetected by normal background operations (such as pulling down the status bar), and allowing for emergency submission within 30 seconds in case of malicious screen switching. In case of abnormal heartbeat, it automatically triggers encrypted emergency submission, achieving zero data loss and abnormal recovery through real-time encrypted storage and version comparison. This ensures no loss of answer data, improves the success rate of recovery in abnormal submission scenarios, and solves the problem of score loss due to abnormalities. This invention implements core business logic (such as event listening and data processing) based on the Flutter cross-platform framework. It adapts to platform differences through native plugins (iOS / Android), which not only retains the efficiency of cross-platform development, but also ensures the reliability of the system in complex mobile environments through deep integration of native capabilities (such as BGTaskScheduler and AccessibilityService).

[0051] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.

[0052] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0053] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0054] Figure 1 A flowchart illustrating an online examination method for mobile devices provided in an embodiment of the present invention;

[0055] Figure 2 This is a block diagram of an online examination system for mobile devices provided in an embodiment of the present invention. Detailed Implementation

[0056] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0057] like Figure 1As shown, the first aspect of this invention provides an online examination method for mobile devices, comprising the following steps:

[0058] Step 11: In response to triggering at least two of the first, second, and third events, obtain at least two corresponding behavioral information.

[0059] The first event includes the activation of the current examination program's lifecycle state; the second event includes obtaining the preset gesture and its corresponding screen coordinates; and the third event includes the loss of focus of the current examination program, physical button feedback, opening of the floating window, screenshot event, and / or application switching.

[0060] Step 12: When the number of activations between the two types of behavioral information is greater than the number threshold, determine whether the time interval between the two types of behavioral information is less than the first time threshold.

[0061] Step 13: If the value is less than the given value, output a warning message and store it in the log.

[0062] Step 14: In response to the pause event triggered by the current examination program, switch the current examination program to run in the background.

[0063] Step 15: Send heartbeat packets to the server at a preset frequency.

[0064] Step 16: In response to feedback from the server regarding whether the heartbeat packet was successfully received, determine the data submission status of the exam program running in the background.

[0065] Step 17: In response to the user's input operation, the data indicating the input operation is sent to the server and simultaneously encrypted and stored in the local answer database in the form of an incrementing local version number.

[0066] Step 18: When the current examination program status is "submission failed", update the status of the local examination state machine to "failed" and add a resubmission flag in the local answer database.

[0067] Step 19: In response to logging into the current exam program, upload data from the local answer database to the server based on the local version number and the server's answer version number.

[0068] This invention, by monitoring multiple events and coordinating rules built around these events, accurately distinguishes between normal student operations (such as pulling down the status bar or accidentally pressing the multitasking button) and malicious cheating behavior. It achieves full coverage monitoring of cheating behaviors specific to mobile devices, reducing the false positive rate. Furthermore, normal brief background operations by students (such as pulling down the notification bar to view messages or accidentally pressing the multitasking button to return to the home screen) are completely undetectable, without affecting the smoothness of the exam. It implements a unified submission logic across iOS and Android platforms, remaining undetected by normal background operations (such as pulling down the status bar), and allowing for emergency submission within 30 seconds in case of malicious screen switching. In case of abnormal heartbeat, it automatically triggers encrypted emergency submission, achieving zero data loss and abnormal recovery through real-time encrypted storage and version comparison. This ensures no loss of answer data, improves the success rate of recovery in abnormal submission scenarios, and solves the problem of score loss due to abnormalities. This invention implements core business logic (such as event listening and data processing) based on the Flutter cross-platform framework. It adapts to platform differences through native plugins (iOS / Android), which not only retains the efficiency of cross-platform development, but also ensures the reliability of the system in complex mobile environments through deep integration of native capabilities (such as BGTaskScheduler and AccessibilityService).

[0069] This invention is based on a cross-platform online examination system built using the Flutter framework. Building upon the first aspect of this invention, the second aspect further details a mobile device online examination method. This second aspect provides a mobile device online examination method applied to mobile devices, comprising the following steps:

[0070] Step 21: In response to triggering at least two of the first, second, and third events, obtain at least two corresponding behavioral information.

[0071] The first event includes the activation of the current examination program's lifecycle state; the second event includes obtaining the preset gesture and its corresponding screen coordinates; and the third event includes the loss of focus of the current examination program, physical button feedback, opening of the floating window, screenshot event, and / or application switching.

[0072] In this step, the exam application is installed on a mobile device. Flutter's `WidgetsBindingObserver` listens to the lifecycle states of the current exam application. These lifecycle states include: inactive, paused, and resumed. `resumed` indicates the application is running in the foreground and the user is interacting with it (equivalent to Android's `onResume` or iOS's `applicationDidBecomeActive`). `inactive` indicates the application is inactive, still running but not receiving user input, such as incoming calls, pulling down the control center / notification center, or a multitasking preview. `paused` indicates the application is invisible and not receiving user input, meaning it's running in the background (equivalent to Android's `onPause` but not completely stopped, or iOS's `applicationWillResignActive`). When one of the current exam application's lifecycle states is activated, it indicates the first event has been triggered. If the first event is triggered, the behavior information that triggered it is obtained (behavior information can also be understood as the operations performed on the application). For example, when the application is running in the foreground, pulling down the control center, notification center, or an incoming call pop-up will trigger `inactive`. After triggering, this application behavior information is obtained. For example, application behavior information could be obtained when the current exam program is switched to another application. At this point, the current exam program is no longer visible and has entered the background running state, no longer receiving user input. This will trigger paused, and after the paused state, the application behavior information of switching to another application can be obtained.

[0073] In this step, the global touch coordinates and gestures of the mobile device screen are monitored simultaneously (such as swiping from top to bottom, three-finger tap, etc.). When the user performs a gesture operation, the gesture and screen coordinates are obtained. At this time, the second event (obtaining the preset gesture and corresponding screen coordinates) is triggered. At this time, the behavior information is obtained. The behavior information here may include, but is not limited to, specific gesture information and screen coordinates.

[0074] In this step, native (Android / iOS) capabilities are simultaneously invoked through the Flutter Platform Channel. Specifically, on the Android side: listen for onWindowFocusChanged (application focus loss / recovery) and KeyEvent (physical button trigger, such as the back button, multitasking button, etc.), and use AccessibilityService to detect if other applications have enabled floating window permissions; on the iOS side: listen for UIApplication.userDidTakeScreenshotNotification (screenshot event), didEnterBackgroundNotification / didBecomeActiveNotification (background entry / foreground recovery), etc. When at least one of these events is triggered, it is considered that a third event has been triggered, and the corresponding behavior information is obtained, such as the Home button being triggered, the multitasking interface being opened, or the floating window being opened.

[0075] Step 22: When the number of activations between the two types of behavioral information is greater than the number threshold, determine whether the time interval between the two types of behavioral information is less than the first time threshold.

[0076] In this step, it is first determined whether the number of activations of the two behavioral information corresponding to any two triggered events is greater than the number threshold, that is, whether the two behavioral information are multiple operations, such as switching between two behavioral information multiple times, that is, the two behavioral information are generated and captured multiple times. At this time, it is considered that the user has abnormal operation. Then, it is further determined whether the time interval between the two behavioral information is less than the first time threshold, that is, whether the time interval between the two behaviors is short, so as to determine whether the user is frequently switching between the two behavioral information.

[0077] Step 23: If the time interval between the two types of behavioral information is less than the first time threshold, then output a warning message and store it in the log.

[0078] In this step, if a user frequently switches between operations, it is considered cheating. At this time, a warning message is output to the user, recorded in the log, and uploaded to the server.

[0079] In this embodiment, since the behavioral information corresponding to two different events may be the same, it is necessary to make a collaborative judgment to avoid misjudgment of cheating.

[0080] Steps 21-23 describe the methods for monitoring cheating in online examination systems.

[0081] Step 24: In response to the pause event triggered by the current examination program, switch the current examination program to run in the background.

[0082] In this step, WidgetsBindingObserver is used to listen for when the current exam application is about to enter the background, specifically when the iOS application's state changes from active to inactive to paused, and the Android application's state is onPause. Immediately, a platform-specific background task is launched via a native plugin, effectively starting background suspending. Background suspending allows the application to circumvent background execution restrictions, preventing it from being closed within the specified time, thus ensuring continuous operation regardless of whether it's in the background or foreground. Specifically, when paused or onPause is triggered, the iOS side calls BGTaskScheduler to register a "short-term background task" (default validity of 30 seconds) to ensure background code execution. The Android side adapts to the system version: Android 8.0+ uses WorkManager (to circumvent background service restrictions), while Android versions below 8.0 use ForegroundService to ensure background task stability. The current exam application needs to call these services to achieve background suspending.

[0083] Step 25: Send heartbeat packets to the server at a preset frequency.

[0084] Once the current exam program is running in the background, it sends a high-frequency (e.g., once every 5 seconds), lightweight encrypted heartbeat packet (encrypted using AES-128, containing candidate ID, exam ID, and current timestamp) to the server.

[0085] Step 26: In response to feedback from the server regarding whether the heartbeat packet was successfully received, determine the data submission status of the exam program running in the background.

[0086] In this step, after receiving the heartbeat packet, the server will send feedback to the system indicating whether the reception was successful. Specifically, step 26 includes either step 261 or step 262:

[0087] Step 261: In response to the feedback message sent by the server after a first preset number of heartbeat packets, maintain the connection between the examination program running in the background and the server, and determine that the data submission status is not submitted.

[0088] In this step, the first preset number of attempts can be two consecutive attempts. If the heartbeat packet is successfully sent twice in a row (for a total of 10 seconds) and a response is received from the server, it is determined to be a "brief background operation" (such as pulling down the status bar to view the time or accidentally touching the multitasking button). The submission of the exam paper (data submission) will not be performed, and the normal connection of the exam program will be maintained.

[0089] In situations like when a user pulls down the notification bar to view a notification, then swipes up to close it and returns to the current exam program, the heartbeat packet can be sent successfully within a short period of time without affecting the exam.

[0090] Step 262: In response to the feedback message from the server indicating that the heartbeat packet sending failed after a second preset number of attempts, the data in the local answer database of the exam program running in the background is sent to the server, and the data submission status is confirmed as submitted.

[0091] In this step, if the heartbeat packet fails to be sent three times consecutively (a total of 15 seconds), or if the background task has less than 5 seconds remaining, "local emergency submission" is immediately triggered: the local answer data is compressed using GZIP, encrypted with RSA asymmetric encryption, and a final submission request is sent to the server to complete the submission operation. This ensures that the user can complete the submission if they exit directly and switch to another application and do not return.

[0092] Steps 24-26 provide a reliable method for submitting the exam. Although iOS and Android differ significantly in background task mechanisms, system limitations, and API capabilities, platform-related operations can be encapsulated into a unified interface through Flutter Platform Channels (MethodChannel / EventChannel) for the Dart layer to call. For cheating behaviors such as attempting to switch screens to other applications to check answers or leaving the platform for an extended period, the system can accurately identify and trigger submission within 30 seconds. Through local encryption and a final submission mechanism, the system maximizes the preservation of the examinee's answers and prevents cheating.

[0093] In one feasible implementation, when the examination program switches from background to foreground, a recovery verification can be performed. Specifically, in response to the examination program switching from background to the current running state, the data submission status is obtained. If the data submission status is "not submitted", the examination program remains running. If the data submission status is "submitted", the examination program terminates to prevent duplicate submissions.

[0094] Step 27: In response to the user's input operation, the data indicating the input operation is sent to the server and simultaneously encrypted and stored in the local answer database in the form of an incrementing local version number.

[0095] In this step, each time a user selects an answer or modifies content, two operations are performed in the form of a "transaction": first, the answer data is updated in memory and sent to the server; second, it is written to the local answer database (the database is encrypted using SQLCipher, and the key is bound to the candidate's account). Each piece of data written to the server and locally is accompanied by an "incrementing version number + timestamp" to ensure the atomicity of data writing (either all succeed or all are rolled back).

[0096] Step 28: When the current examination program status is "submission failed", update the status of the local examination state machine to "failed" and add a resubmission flag in the local answer database.

[0097] In this step, a local exam state machine is maintained to record the exam status in real time for synchronization with the server:

[0098] In progress: The exam is proceeding normally, and the answer data is being updated in real time;

[0099] Submitting your work: A submission request has been initiated, awaiting a server response;

[0100] Successful: The submission request has been confirmed by the server.

[0101] Failed: Submission request timed out / network interruption / application crash, submission incomplete.

[0102] When a submission request times out, network interruption occurs, or the application crashes, the current exam program's submission status will be "submission failed." The local exam state machine will be automatically updated to "failed," and the latest version number of the data in the local answer database will be marked as "to be submitted later," waiting for the user to reconnect and log in.

[0103] Step 29: In response to logging into the current exam program, upload data from the local answer database to the server based on the local version number and the server's answer version number.

[0104] When the user takes the exam again, the system checks if the local exam state machine is in a state of failure and if the exam time has not expired. If so, the data recovery process is triggered.

[0105] Specifically, in response to logging into the current exam program, it determines whether the local exam state machine is in a state of failure and whether the exam time has not expired, retrieves the latest version number of the current exam from the server, and determines whether the current local version number is less than the answer version number of the server.

[0106] If the current local version number is greater than or equal to the server's answer version number, then upload the data from the local answer database to the server. After the upload is complete, wait for the server's response. If successful, update the local exam state machine to "successful"; otherwise, retain the "failed" state and prompt "Manual retry and resubmit".

[0107] If the current local version number is less than the server's answer version number, then retrieve the data corresponding to the answer version number from the server and store it in the local answer database.

[0108] Steps 27-29 describe the method for recovering from abnormal submissions. By using real-time encrypted storage and version comparison, it achieves zero data loss and recovery from abnormal submissions, ensuring that answer data is not lost. This improves the success rate of recovery in abnormal submission scenarios and solves the problem of students losing their scores due to abnormalities.

[0109] In this embodiment, steps 21-23, 24-26, and 27-29 correspond to three different online examination methods under three different scenarios, and the three methods are parallel.

[0110] The present invention provides an online examination system for mobile devices integrated into the examination program / system.

[0111] like Figure 2 As shown, a third aspect of the present invention provides an online examination system for mobile devices, comprising:

[0112] The acquisition module 31 is used to acquire at least two kinds of behavioral information in response to triggering at least two of the first event, the second event, and the third event; wherein, the first event includes the activation of the life cycle state of the current examination program, the second event includes acquiring the preset gesture and the corresponding screen coordinates, and the third event includes the current examination program losing focus, physical button feedback, floating window opening, screenshot event, and / or application switching.

[0113] The judgment module 32 is used to determine whether the time interval between the two types of behavioral information is less than a first time threshold when the number of activations between the two types of behavioral information is greater than the number threshold.

[0114] Output module 33 is used to output a warning message and store it in the log if the value is less than the specified value.

[0115] Switching module 34 is used to switch the current examination program to background operation in response to a pause event triggered by the current examination program;

[0116] Sending module 35 is used to send heartbeat packets to the server according to a preset frequency;

[0117] Module 36 is used to determine the data submission status of the examination program running in the background in response to feedback information on whether the heartbeat packet sent by the server was successfully received.

[0118] Storage module 37 is used to respond to user input operations by sending the data indicated by the input operation to the server while simultaneously encrypting and storing it in the local answer database in the form of an incrementing local version number;

[0119] The update module 38 is used to update the status of the local examination state machine to "failed" and add a resubmission flag in the local answer database when the current examination program status is "submission failed".

[0120] Recovery module 39 is used to respond to logging into the current exam program by uploading data from the local answer database to the server based on the local version number and the server's answer version number.

[0121] In one embodiment of the present invention, in response to feedback information regarding whether the heartbeat packet sent by the server was successfully received, the data submission status of the examination program running in the background is determined, including:

[0122] In response to the server's successful heartbeat feedback message after a first preset number of heartbeats, the background examination program maintains its connection with the server and determines that the data submission status is not submitted.

[0123] In response to the server's feedback message that the heartbeat packet sending failed after a second preset number of attempts, the data in the local answer database of the exam program running in the background is sent to the server, and the data submission status is confirmed as submitted.

[0124] In one embodiment of the present invention, it further includes: a verification module, configured to obtain the data submission status in response to the background suspended examination program switching to the current running state; if the data submission status is not submitted, the examination program is kept running in the current state; if the data submission status is submitted, the examination program is terminated.

[0125] In one embodiment of the present invention, in response to logging into the current examination program, data from the local answer database is uploaded to the server according to the current local version number and the server's answer version number, including:

[0126] In response to logging into the current exam program, determine whether the current local version number is less than the server's answer version number;

[0127] If not, upload the data from the local answer database to the server;

[0128] If so, retrieve the data corresponding to the answer version number from the server and store it in the local answer database.

[0129] A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the online examination method for a mobile device provided by the present invention described above.

[0130] A fifth aspect of the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the mobile device online examination method provided in the above-described embodiments of the present invention.

[0131] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage system located remotely from the aforementioned processor.

[0132] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware systems.

[0133] The method provided in this invention can be applied to electronic devices. Specifically, the electronic device can be a desktop computer, a portable computer, a smart mobile terminal, a server, etc. No limitation is made herein; any electronic device that can implement this invention falls within the protection scope of this invention.

[0134] For system / electronic device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be found in the description of the method embodiments.

[0135] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.

[0136] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0137] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0138] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for online examination using mobile devices, characterized in that, Includes the following steps: In response to triggering at least two of the first, second, and third events, at least two corresponding behavioral information are obtained; wherein, the first event includes the activation of the lifecycle state of the current examination program, the second event includes obtaining a preset gesture and the corresponding screen coordinates, and the third event includes the current examination program losing focus, physical button feedback, floating window opening, screenshot event, and / or application switching. When the number of activations between the two types of behavioral information is greater than the number threshold, it is determined whether the time interval between the two types of behavioral information is less than the first time threshold. If the value is less than the specified value, a warning message will be output and stored in the log. In response to a pause event triggered by the current examination program, switch the current examination program to run in the background. Send heartbeat packets to the server at a preset frequency; In response to feedback information regarding whether the heartbeat packet sent by the server was successfully received, the data submission status of the examination program running in the background is determined; In response to a user's input operation, the data indicated by the input operation is sent to the server while being encrypted and stored in the local answer database in the form of an incrementing local version number. When the current examination program status is "submission failed", the status of the local examination state machine is updated to "failed", and a resubmission mark is added to the local answer database. In response to logging into the current exam program, data from the local answer database is uploaded to the server based on the local version number and the answer version number of the server. The response to feedback information regarding whether the heartbeat packet sent by the server was successfully received determines the data submission status of the examination program running in the background, including: In response to the feedback message sent by the server after a first preset number of heartbeat packets, the connection between the examination program running in the background and the server is maintained, and the data submission status is determined to be unsubmitted. In response to feedback information indicating that the heartbeat packet sending has failed after a second preset number of attempts, the data in the local answer database of the exam program running in the background is sent to the server, and the data submission status is determined to be submitted.

2. The method as described in claim 1, characterized in that, The method further includes: In response to the examination program running in the background being switched to the current running program, the data submission status is retrieved; If the data submission status is "not submitted", the examination program will remain running. When the data submission status is "submitted", the examination program will terminate.

3. The method as described in claim 1, characterized in that, In response to logging into the current exam program, the system uploads data from its local answer database to the server based on the current local version number and the server's answer version number, including: In response to logging into the current exam program, determine whether the current local version number is less than the answer version number of the server; If not, then upload the data from the local answer database to the server; If so, the data corresponding to the answer version number is obtained from the server and stored in the local answer database.

4. A mobile device online examination system, characterized in that, include: The acquisition module is used to acquire at least two kinds of behavioral information in response to triggering at least two of the first, second and third events; wherein, the first event includes the activation of the life cycle state of the current examination program, the second event includes acquiring a preset gesture and the corresponding screen coordinates, and the third event includes the current examination program losing focus, physical button feedback, floating window opening, screenshot event and / or application switching. The judgment module is used to determine whether the time interval between the two behavioral information is less than a first time threshold when the number of activations between the two behavioral information is greater than a number threshold. The output module is used to output a warning message and store it in the log if the value is less than the specified value. The switching module is used to switch the current examination program to background operation in response to a pause event triggered by the current examination program. The sending module is used to send heartbeat packets to the server at a preset frequency; The determination module is used to determine the data submission status of the examination program running in the background in response to feedback information on whether the heartbeat packet sent by the server was successfully received. The storage module is used to respond to user input operations by sending the data indicated by the input operation to the server while simultaneously encrypting and storing it in the local answer database in the form of an incrementing local version number; The update module is used to update the status of the local examination state machine to "failed" when the current examination program status is "submission failed", and to add a resubmission flag in the local answer database. The recovery module is used to upload data from the local answer database to the server in response to logging into the current exam program, based on the local version number and the answer version number of the server. The response to feedback information regarding whether the heartbeat packet sent by the server was successfully received determines the data submission status of the examination program running in the background, including: In response to the feedback message sent by the server after a first preset number of heartbeat packets, the connection between the examination program running in the background and the server is maintained, and the data submission status is determined to be unsubmitted. In response to feedback information indicating that the heartbeat packet sending has failed after a second preset number of attempts, the data in the local answer database of the exam program running in the background is sent to the server, and the data submission status is determined to be submitted.

5. The system as described in claim 4, characterized in that, Also includes: The verification module is used to respond to the switching of the examination program running in the background to the current running program and to obtain the data submission status; If the data submission status is "not submitted", the examination program will continue to run; if the data submission status is "submitted", the examination program will terminate.

6. The system as described in claim 4, characterized in that, In response to logging into the current exam program, the system uploads data from its local answer database to the server based on the current local version number and the server's answer version number, including: In response to logging into the current exam program, determine whether the current local version number is less than the answer version number of the server; If not, then upload the data from the local answer database to the server; If so, the data corresponding to the answer version number is obtained from the server and stored in the local answer database.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the mobile device online examination method as described in any one of claims 1 to 3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the mobile device online examination method according to any one of claims 1 to 3.