A method and system for lightweight collection and sharing of encrypted classroom resources

By using a small multimodal embedding model and near-homomorphic encryption technology, classroom resources are transformed into extremely small encrypted token sequences, solving the problems of large data volume and easy privacy leakage of classroom resources, and realizing lightweight and secure sharing and retrieval of classroom resources.

CN121547165BActive Publication Date: 2026-03-24HUNAN JUYE NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-19
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing classroom resource collection and sharing technologies suffer from problems such as large data volume, easy privacy leakage, and inability to retrieve and statistically analyze encrypted data. In particular, traditional encryption methods lead to excessive ciphertext expansion and computational overhead, making it impossible to process data in real time on mobile terminals.

Method used

A small multimodal embedding model is used to convert multimodal signals into semantic token sequences and apply near-homomorphic encryption to generate extremely small encrypted token sequences. This supports ciphertext operations and local decryption, achieving lightweight data volume and privacy protection.

Benefits of technology

It achieves extremely lightweight sharing of classroom resources, ensures complete privacy control, supports encrypted retrieval and statistics, improves sharing efficiency and security, and avoids the exposure of the original content in plaintext.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121547165B_ABST
    Figure CN121547165B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a kind of encryption type classroom resource light weight acquisition and sharing method and system, method includes: first terminal equipment acquires multimodal signal, and input multimodal signal into small multimodal embedding model, generate the semantic Token sequence of 2 to 10KB per minute data volume;Approximate homomorphism encryption is applied to semantic Token sequence, and encrypted Token sequence is shared together with light weight model mark and homomorphism public key;Second terminal equipment does not execute decryption under the premise, based on homomorphism property, encrypted Token sequence is executed ciphertext operation, and still ciphertext operation result of ciphertext is obtained;Second terminal equipment determines target encrypted Token subset, and target encrypted Token subset is selectively decrypted locally using private key, and output content reconstruction result.The application significantly improves the sharing efficiency, security and interactivity of classroom resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of educational informatization and privacy computing technology, and in particular to a method and system for the lightweight collection and sharing of encrypted classroom resources. Background Technology

[0002] Existing classroom resource collection and sharing technologies mainly rely on audio and video recording, screen recording, or taking photos of whiteboards. A 45-minute classroom resource typically generates 80MB to 2GB of data, which not only consumes a lot of storage space and network bandwidth, but also brings high data traffic and electricity costs to schools and students.

[0003] Existing technologies generally use plaintext or ordinary encryption (such as AES and TLS) for resource storage and transmission. Once resources are shared or uploaded to the cloud, they exist in plaintext, making them extremely vulnerable to illegal forwarding, resale, or leakage through screenshots, screen recordings, etc., seriously threatening teachers' classroom intellectual property rights and students' portrait rights, voice rights, and privacy. Existing educational resource protection schemes based on fully homomorphic encryption, while theoretically capable of computation in ciphertext, directly homomorphically encrypting the original audio and video streams or high-resolution image sequences results in ciphertext expansion hundreds to thousands of times, negating the benefits of lightweight design and incurring enormous computational overhead, making real-time processing impossible for ordinary mobile terminals.

[0004] Therefore, there is an urgent need for a new type of classroom resource collection and sharing technology that is lightweight, can achieve ciphertext computability, and ensures complete privacy control. Summary of the Invention

[0005] This application provides a lightweight method and system for collecting and sharing encrypted classroom resources, solving the problems of large data volume, easy privacy leakage, and inability to retrieve and analyze data in encrypted form in existing technologies.

[0006] This application provides the following solution:

[0007] According to the first aspect, a lightweight method for collecting and sharing encrypted classroom resources is provided. The method includes: a first terminal device collecting multimodal signals from the classroom in real time, the multimodal signals including whiteboard images, teacher audio streams, and presentation screens; inputting the multimodal signals into a small multimodal embedding model to generate a semantic token sequence with a classroom content data volume of 2 to 10 KB per minute; the first terminal device applying approximately homomorphic encryption to the semantic token sequence to obtain an encrypted token sequence, keeping the data volume of a single 45-minute class within 100 KB, and sharing the encrypted token sequence along with a lightweight model identifier and a homomorphic public key; a second terminal device performing ciphertext operations on the encrypted token sequence based on homomorphic properties without performing decryption, obtaining a ciphertext operation result that is still ciphertext, the ciphertext operation including ciphertext semantic retrieval and ciphertext knowledge point frequency statistics; the second terminal device determining a target encrypted token subset based on the ciphertext operation result, and selectively partially decrypting the target encrypted token subset using a private key when the user actively triggers plaintext generation, outputting plaintext notes or content reconstruction results based on the target encrypted token subset.

[0008] According to one achievable method in the embodiments of this application, the method further includes: performing differential encoding and Huffman compression on the semantic token sequence to further compress the amount of classroom content data per minute to 1.5 to 6KB.

[0009] According to one achievable method in an embodiment of this application, applying approximate homomorphic encryption to the semantic token sequence to obtain an encrypted token sequence includes: segmenting the semantic token sequence into multiple plaintext vector slots according to a time window, each plaintext vector slot containing a fixed number of tokens and filling the end of the plaintext vector slot with a noise vector; employing an approximate homomorphic encryption scheme based on ring learning and error instances to perform batch encryption on each plaintext vector slot at once, generating an encrypted token slot with only a single ciphertext polynomial; and attaching an encryption level label and a remaining computation budget label to each encrypted token slot, the labels being attached in plaintext form.

[0010] According to one achievable method in the embodiments of this application, the homomorphic public key and the lightweight model identifier are jointly encapsulated into a publicly verifiable Uniform Resource Identifier (URI), and the second terminal device can obtain all the public parameters used for ciphertext operations by parsing the URI.

[0011] According to one achievable method in an embodiment of this application, the encrypted semantic retrieval includes: mapping the user-input query text into a plaintext query vector using a lightweight multimodal embedding model; homomorphically encrypting the plaintext query vector to obtain an encrypted query vector; a second terminal device performing ciphertext cosine similarity or ciphertext inner product calculations on the encrypted query vector and each encrypted token embedding in the encrypted token sequence based on homomorphic addition and homomorphic multiplication to obtain a ciphertext similarity score sequence; without decryption, performing a homomorphic comparison operation on the ciphertext similarity score sequence, and filtering out encrypted position identifiers with similarity greater than or equal to the preset similarity threshold according to a preset similarity threshold to form an encrypted candidate position index set.

[0012] According to one achievable method in the embodiments of this application, the frequency statistics of encrypted knowledge points include: pre-mapping preset knowledge point words or concepts to corresponding plaintext query vector groups; the user selects one or more of the preset knowledge points to be counted locally on the second terminal device, and the system homomorphically encrypts the plaintext query vector of the selected preset knowledge points into encrypted query vectors; for each frame or segment of the encrypted token sequence, the encrypted inner product or cosine similarity calculation is performed with the encrypted query vector one by one, and the frame count values ​​exceeding the preset similarity threshold are accumulated by homomorphic addition to obtain the total number of occurrences of each knowledge point that is still encrypted.

[0013] According to one achievable method in this application embodiment, the second terminal device determines the target encrypted token subset based on the ciphertext operation result by: performing homomorphic similarity calculation on the encrypted query vector of the ciphertext semantic retrieval and each encrypted token vector in the encrypted token sequence based on a preset ciphertext semantic similarity measurement rule to obtain a ciphertext similarity score; selecting encrypted tokens with ciphertext similarity higher than a preset threshold from the encrypted token sequence based on the ciphertext similarity score to form a first candidate encrypted token set; determining the encrypted tokens corresponding to knowledge points with a frequency higher than a preset frequency threshold based on the statistical results of the ciphertext knowledge point frequency statistics to form a second candidate encrypted token set; performing homomorphic set operation on the first candidate encrypted token set and the second candidate encrypted token set to obtain a joint candidate set; and performing homomorphic sorting or homomorphic compression on the joint candidate set according to the user's search intent, operation instructions, or context requirements to finally determine the target encrypted token subset.

[0014] According to the second aspect, a lightweight encrypted classroom resource acquisition and sharing system is provided. The system includes: a multimodal acquisition and semantic tokenization module, configured on a first terminal device, for real-time acquisition of classroom multimodal signals, including blackboard images, teacher audio streams, and presentation images; inputting the multimodal signals into a small multimodal embedding model to generate a semantic token sequence with a data volume of 2 to 10 KB per minute; and an approximately homomorphic encryption and sharing module, configured on the first terminal device, for applying approximately homomorphic encryption to the semantic token sequence to obtain an encrypted token sequence, keeping the data volume of a single 45-minute class session below 100 KB, and sharing the encrypted tokens. The token sequence, along with the lightweight model identifier and homomorphic public key, is shared. A ciphertext operation module, configured on the second terminal device, performs ciphertext operations on the encrypted token sequence based on homomorphic properties without performing decryption, obtaining a ciphertext operation result that is still ciphertext. The ciphertext operation includes ciphertext semantic retrieval and ciphertext knowledge point frequency statistics. A subset determination and partial decryption module, also configured on the second terminal device, determines a target encrypted token subset based on the ciphertext operation result. When the user actively triggers plaintext generation, it uses a private key to selectively and partially decrypt the target encrypted token subset, outputting plaintext notes or a content reconstruction result based on the target encrypted token subset.

[0015] According to a third aspect, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0016] According to the fourth aspect, an electronic device is provided, comprising:

[0017] One or more processors; and

[0018] A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in the first aspect above.

[0019] According to the specific embodiments provided in this application, the following technical effects are disclosed:

[0020] This application achieves a total data size of less than 100KB after encrypting a 45-minute complete classroom resource by converting multimodal classroom signals into semantic token sequences of only 2-10KB per minute in real time and applying near-homomorphic encryption. This allows for easy sharing via instant messaging or offline methods. On a second terminal device, semantic retrieval and knowledge point frequency statistics can be performed directly in encrypted form without any decryption of the complete resource. Based on the encrypted operation results, a subset of target encrypted tokens can be accurately extracted. This tiny subset is selectively decrypted to generate plaintext notes or content reconstruction only when actively triggered by the user locally. This achieves extreme lightweighting while ensuring that the original classroom resources are never exposed in plaintext form throughout their entire lifecycle. It completely solves the three core pain points of existing technologies: large data volume, easy privacy leakage, and unusable encrypted text. This significantly improves the sharing efficiency, security, and interactivity of classroom resources.

[0021] Of course, any product implementing this application does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the 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.

[0023] Figure 1 A flowchart illustrating the method for lightweight collection and sharing of encrypted classroom resources provided in this application embodiment;

[0024] Figure 2 This is a structural block diagram of the encrypted lightweight classroom resource acquisition and sharing system provided in the embodiments of this application;

[0025] Figure 3 A schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0027] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0028] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0029] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0030] Figure 1 A flowchart illustrating a lightweight method for collecting and sharing encrypted classroom resources, as provided in this application embodiment, is shown below. Figure 1 As shown, the method may include the following steps:

[0031] Step 101: The first terminal device collects classroom multimodal signals in real time. The multimodal signals include blackboard images, teacher voice streams, and presentation screens. The multimodal signals are input into a small multimodal embedding model to generate a semantic token sequence with a classroom content data volume of 2 to 10 KB per minute.

[0032] Step 102: The first terminal applies near-homomorphic encryption to the semantic token sequence to obtain an encrypted token sequence, keeping the data volume of a single 45-minute lesson within 100KB, and shares the encrypted token sequence along with the lightweight model identifier and the homomorphic public key.

[0033] Step 103: Without performing decryption, the second terminal device performs ciphertext operations on the encrypted token sequence based on homomorphic properties to obtain a ciphertext operation result that is still ciphertext. The ciphertext operation includes ciphertext semantic retrieval and ciphertext knowledge point frequency statistics.

[0034] Step 104: The second terminal device determines the target encrypted token subset based on the ciphertext operation result. When the user actively triggers plaintext generation, it uses the private key to selectively and partially decrypt the target encrypted token subset and outputs plaintext notes or content reconstruction results based on the target encrypted token subset.

[0035] As can be seen from the above process, this application converts classroom multimodal signals into semantic token sequences of only 2-10KB per minute in real time and applies near-homomorphic encryption, achieving a total data size of less than 100KB after encryption of a complete 45-minute classroom resource. This allows for easy sharing via instant messaging or offline methods. On the second terminal device, there is no need to perform any decryption on the complete resource. Semantic retrieval and knowledge point frequency statistics can be directly completed in the encrypted state. Based on the encrypted operation results, the target encrypted token subset can be accurately extracted. Only when the user actively triggers the operation locally can the extremely small subset be selectively and locally decrypted to generate plaintext notes or content reconstruction. This achieves extreme lightweighting while ensuring that the original classroom resources are never exposed in plaintext form throughout their entire lifecycle. This completely solves the three core pain points of existing technologies: large data volume, easy privacy leakage, and unusable encrypted data. It significantly improves the sharing efficiency, security, and interactivity of classroom resources.

[0036] The following describes in detail each step of the above process and the effects that can be further produced, with reference to the embodiments.

[0037] First, in conjunction with the embodiments, a detailed description will be given of step 101 above, namely, "the first terminal device collects classroom multimodal signals in real time, the multimodal signals include blackboard images, teacher voice streams and demonstration screens, and inputs the multimodal signals into a small multimodal embedding model to generate a semantic token sequence with a classroom content data volume of 2 to 10 KB per minute".

[0038] The primary terminal device refers to the mobile phone or tablet used for actual resource collection in the classroom, typically held by the student or instructor. It is responsible for real-time camera activation (pointing to the blackboard), recording the teacher's voice, capturing the shared screen display, and feeding these multimodal signals into a local small multimodal embedding model to generate a semantic token sequence. This is then immediately followed by near-homomorphic encryption, generating an encrypted token sequence and a homomorphic public key, ultimately forming a complete encrypted classroom packet of less than 100KB that is shared. The private key is generated only on the primary terminal device and never leaves the device; therefore, it is the only device in the entire system possessing the complete private key.

[0039] The core of this invention lies in replacing traditional audio and video pixel or waveform data with "semantic token sequences," fundamentally achieving the ultimate lightweight expression of classroom resources. In modern multimodal large-scale models, a token refers to a fixed-length digital vector (typically 128 to 1024 dimensions) formed after a piece of text, image, sound, or mixed content is understood and compressed by the model. It is no longer the original text, pixels, or waveforms, but a highly abstract "semantic fingerprint." During the classroom session, the first terminal device simultaneously activates its camera, pointing it at the blackboard or electronic whiteboard, recording the teacher's voice, and acquiring the PPT or electronic lesson plan screen through screen sharing or projection protocols, thus forming three synchronous multimodal signals. If these three signals were directly saved, they would generate several megabytes to tens of megabytes of data per minute.

[0040] To avoid storing and transmitting massive amounts of raw data, this invention directly sends the three signals mentioned above into a small multimodal embedding model pre-deployed locally on the terminal. This model is typically a lightweight multimodal large language model variant with 100 million to 300 million parameters, quantized with INT8 or lower precision, and subjected to knowledge distillation. It can perform real-time inference at a rate of 20 to 30 frames per second on ordinary mobile phones or tablets. After receiving image frames, audio segments, and demonstration images, the model does not output text transcription or image descriptions. Instead, it directly outputs a series of fixed-dimensional (typically 128 to 512 dimensions) floating-point or quantized semantic vectors, i.e., semantic tokens. These tokens highly abstractly represent the semantic core of the current classroom content. For example, complex meanings such as "the teacher is writing the graph of a quadratic function on the blackboard" or "the teacher is explaining the formula for the vertex of a parabola" are compressed into one or a few vectors.

[0041] By aligning with consecutive timestamps, the model outputs one or a few semantic tokens per second or every two seconds. A one-minute lesson ultimately generates only a token sequence of approximately 2 to 10 KB. This data volume is compressed by more than 1000 times compared to the original audio and video, and by more than 50 times compared to traditional speech-to-text methods that use keyframe images. Furthermore, it retains far more semantic information than text or images, providing a minimal computational basis for subsequent near-homomorphic encryption and ciphertext operations.

[0042] Although the semantic token sequence itself is already extremely small, the classroom content at adjacent time points is usually highly continuous. For example, if a teacher repeatedly explains the "graph of a quadratic function" within a few minutes, the semantic token vectors output before and after the explanation often have only minor differences. Directly storing the complete vector would cause a lot of redundancy. Therefore, preferably, this invention can also perform differential encoding and Huffman compression on the semantic token sequence, further compressing the amount of classroom content data per minute to 1.5 to 6KB.

[0043] The specific approach of differential encoding is as follows: the semantic token vector from the first second is fully preserved as a baseline, and starting from the second second, only the difference between the vector and the vector from the previous second is recorded. Because the semantic changes in the classroom are smooth, most dimensions of adjacent difference vectors are close to zero or have extremely small quantization values; in reality, non-zero elements typically do not exceed 15% of the total dimension. Thus, where each token originally required 128 to 512 bytes of storage, differential encoding requires an average of only 20 to 60 bytes to express the same semantic change.

[0044] Huffman compression is then applied to the difference sequences. Statistical analysis reveals that certain difference patterns occur extremely frequently in classroom scenarios, such as near-zero vectors when a teacher pauses writing or small perturbation vectors when repeatedly emphasizing the same knowledge point. These high-frequency patterns are assigned the shortest codes, while abruptly changing vectors (such as sudden topic switching) are assigned longer codes. Huffman compression leverages this skewed distribution to further compress the difference sequences by an average of 40% to 60%. After two stages of compression, the plaintext semantic representation of each minute of classroom content stably falls within the range of 1.5 to 6KB, and the plaintext portion of a complete 45-minute lesson typically requires only 70 to 270KB.

[0045] The following describes in detail step 102, namely, "the first terminal applies approximate homomorphic encryption to the semantic token sequence to obtain an encrypted token sequence, so that the data volume of a single 45-minute class is controlled within 100KB, and the encrypted token sequence is shared together with the lightweight model identifier and the homomorphic public key," with reference to the embodiments.

[0046] After generating the semantic token sequence and optionally applying differential Huffman compression, this invention immediately applies approximate homomorphic encryption to this minimal plaintext sequence locally on the terminal, resulting in an encrypted token sequence. This encryption process employs an approximate homomorphic encryption scheme specifically designed for floating-point vector and approximate numerical calculations. It can directly support vector inner product, cosine similarity calculation, and multiplication and addition operations of finite depth in the ciphertext state without prior decryption. Unlike traditional encryption, approximate homomorphic encryption allows for multiple calculations under controllable noise conditions. The final decrypted result has a very small error compared to direct calculation of the plaintext, typically below 10^-5, fully meeting semantic matching and statistical requirements.

[0047] As one feasible approach, the present invention applies approximate homomorphic encryption to the semantic token sequence to obtain an encrypted token sequence, comprising: segmenting the semantic token sequence into multiple plaintext vector slots according to a time window, each plaintext vector slot containing a fixed number of tokens and filling the end of the plaintext vector slot with a noise vector; employing an approximate homomorphic encryption scheme based on ring learning and error instances to perform batch encryption on each plaintext vector slot at once, generating an encrypted token slot containing only a single ciphertext polynomial; attaching an encryption level label and a remaining computational budget label to each encrypted token slot, the labels being attached in plaintext form, and the second terminal device being able to reject ciphertext requests exceeding computational capacity in advance based on the remaining budget label.

[0048] Specifically, firstly, the continuous sequence of semantic tokens is segmented and packaged according to fixed time windows, for example, tokens from every 10 or 20 seconds are grouped into a plaintext vector slot. Each plaintext vector slot contains dozens to hundreds of semantic token vectors, and the remaining space within the slot is filled with random noise vectors. The purpose of the noise vectors is to hide the actual class duration and pace, preventing attackers from inferring the teacher's lecturing speed or chapter transitions through the ciphertext length, thereby further enhancing privacy. At the same time, batch packaging significantly reduces the number of polynomials that need to be encrypted independently, improving subsequent computational efficiency by several times.

[0049] Next, an approximate homomorphic encryption scheme based on ring learning and error instances is adopted to perform one-time batch encryption on each plaintext vector slot, ultimately generating only one ciphertext polynomial as the encrypted token slot for that time window. This "one slot, one ciphertext" design fully utilizes the SIMD parallelism natively supported by approximate homomorphic encryption, compressing the operation that originally required hundreds of independent encryptions into a single operation, greatly reducing encryption time and ciphertext expansion rate. In actual testing, the plaintext for a 45-minute class was approximately 200KB; after this step, the ciphertext typically only expanded to 3 to 5 times its original size, and the final encrypted token sequence remained between 60 and 85KB.

[0050] Preferably, during the encryption process, the system monitors noise growth in real time and dynamically selects the optimal relinearization timing and modulus switching strategy to ensure that a single ciphertext polynomial can still continuously support at least 20 levels of multiplication depth without noise exceeding a safety threshold after undergoing cosine similarity, inner product, multiple additions and multiplications. This depth is sufficient to cover the most complex ciphertext retrieval and statistical needs in actual classroom scenarios. For example, operations such as Top-K sorting, threshold comparison, and condition selection can be completed continuously on the same ciphertext without the need for decryption and reencryption midway.

[0051] Finally, each encrypted token slot is appended with two plaintext tags: an encryption level tag recording the number of computational levels consumed by the current ciphertext, and a remaining computational budget tag indicating the additional multiplications that the slot can securely support. Upon receiving the shared packet, the second terminal device first checks the budget tag. If it finds that the local device's computing power is insufficient or the budget is close to the threshold, it can immediately refuse to load the slot, avoiding decryption errors or unnecessary power consumption due to noise overflow. This mechanism achieves controlled resource sharing at the ciphertext level, effectively preventing maliciously constructed high-computational-complexity attacks, and ensuring the entire system runs securely and smoothly even on students' low-end mobile phones.

[0052] Thanks to the extremely low plaintext data size of the semantic token sequence and the carefully optimized encryption parameter design, the complete encrypted token sequence corresponding to a 45-minute class typically occupies only 60 to 85KB. Adding the approximately 10 to 12KB homomorphic public key and several tens of bytes of lightweight model identifier, the total size of the resulting sharing packet is consistently kept below 100KB. This data size is equivalent to that of a regular photograph, yet it carries the entire semantic content of the lesson, achieving a compression ratio of over a thousand times. This allows students to complete the encrypted sharing of the entire class resource within seconds via instant messaging, easily exchanging data even in environments with high bandwidth or no network connection.

[0053] To ensure the second terminal device can correctly interpret and compute the data, two pieces of public information must be included with the sharing: a lightweight model identifier and a homomorphic public key. The lightweight model identifier is typically a unique hash value or Uniform Resource Identifier (URI) of the model structure and weights, ensuring the second terminal device uses the exact same embedding model to vectorize the query text. The homomorphic public key is used to encrypt the plaintext query vector generated locally by the user into a ciphertext vector within the same domain as the encrypted token sequence, supporting all subsequent ciphertext operations. Neither contains any private key information and can be securely transmitted publicly. The private key is always stored only on the original acquisition terminal and never leaves the device, thus ensuring that even if the shared packet is arbitrarily intercepted or stored for a long period, attackers cannot obtain any readable classroom content.

[0054] The homomorphic public key and the lightweight model identifier are encapsulated together into a publicly verifiable Uniform Resource Identifier (URI). The second terminal device can obtain all the public parameters used for ciphertext operations by parsing the URI.

[0055] Specifically, a lightweight model identifier is typically a Base58 or Base64 encoded hash value of 43 to 44 characters, representing the specific model version, quantization precision, and parameter configuration used to generate the semantic token. For example, the same three characters "quadratic function" will only produce a completely identical vector on the exact same model; otherwise, even a single difference in weight will cause errors in the ciphertext similarity calculation. Traditionally, both parties need to manually confirm model consistency; this invention directly embeds this information into the URI, completely eliminating version mismatches.

[0056] The homomorphic public key itself is a piece of binary data, approximately 8 to 12 KB in length. Attaching it directly to the shared packet would be lengthy and unsightly. This invention first compresses and Base64-encodes it, then concatenates it with the model identifier, encrypted parameter digest, and optional expiration timestamp into a complete URI string according to a fixed format, typically as follows:

[0057] hom-enc: / / v1 / ckks-16384-40bit / model=sha256:8J3mBw... / pk=AA==?budget=18&exp=1767225600

[0058] The entire URI is usually no more than 2KB in length, yet it carries all the parameters required for public access.

[0059] Furthermore, this URI supports one-click verification and automatic resolution by the second terminal device. The software on the second terminal device only needs to detect a link starting with "hom-enc: / / " to automatically complete three tasks:

[0060] First, verify the URI signature using the built-in root certificate or hash chain to ensure it has not been tampered with;

[0061] Second, extract and load the homomorphic public key into the local encryption engine;

[0062] Third, download or activate the locally cached exact matching model. The entire process requires no manual selection of model files by the user, nor does it require separate transmission of public key files, truly achieving click-to-use functionality.

[0063] The following describes in detail step 103, namely, "the second terminal device performs ciphertext operation on the encrypted token sequence based on homomorphic properties without performing decryption, and obtains a ciphertext operation result that is still ciphertext, wherein the ciphertext operation includes ciphertext semantic retrieval and ciphertext knowledge point frequency statistics," with reference to the embodiments.

[0064] The second terminal device refers to any other mobile phone, tablet, or computer that receives and uses the encrypted classroom package. This could be a classmate's device, another device belonging to the student, or a computer used for after-class review. It only needs a lightweight model identical to the first terminal device to perform semantic retrieval, knowledge point frequency statistics, and subset extraction in encrypted form. Only when the user explicitly requests to view specific content does it partially decrypt a tiny subset of the target encrypted tokens to generate plaintext notes. The number of second terminal devices is usually far greater than the number of first terminal devices, achieving a highly efficient model of "collecting data for one lesson and securely sharing it across the whole class or even across schools."

[0065] The second terminal device only receives a few tens of KB of encrypted data, but it can perform advanced functions such as searching, statistics, and finding key points just like operating ordinary courseware without decryption. Throughout the entire process, the original classroom content will never appear in plaintext form in memory, on the screen, or on any storage medium.

[0066] Ciphertext operations rely entirely on the mathematical properties of near-homomorphic encryption, meaning that encrypted numbers can directly participate in addition and multiplication in their ciphertext state, with operation rules completely identical to those for plaintext. The second terminal device simply needs to convert the user's query or the knowledge points they want to analyze into a plaintext query vector using a locally identical lightweight model. Then, it uses the homomorphic public key included in the shared package to encrypt this query vector into a ciphertext query vector within the same domain as the encrypted token sequence. All subsequent calculations are performed within the ciphertext domain; servers, side-channel sniffers, and even rooted phones cannot see any readable content.

[0067] Ciphertext semantic retrieval calculates the ciphertext inner product or cosine similarity between the encrypted user query vector and each encrypted token vector in the encrypted token sequence, resulting in a sequence of similarity scores that is still ciphertext. Then, Top-K filtering or threshold comparison is performed in the ciphertext domain. The final result returned is only the encrypted position number or encrypted subset index. The result seen by the user is "most relevant from minute 12 to minute 15," but the system has never decrypted any frame of classroom content.

[0068] As one feasible approach, the encrypted semantic retrieval of the present invention includes: mapping the user-input query text into a plaintext query vector via the lightweight multimodal embedding model; homomorphically encrypting the plaintext query vector to obtain an encrypted query vector; a second terminal device performing ciphertext cosine similarity or ciphertext inner product calculations on the encrypted query vector and each encrypted token embedding in the encrypted token sequence based on homomorphic addition and homomorphic multiplication to obtain a ciphertext similarity score sequence; and performing a homomorphic comparison operation on the ciphertext similarity score sequence without decryption, filtering out encrypted position identifiers with similarity greater than or equal to the preset similarity threshold according to a preset similarity threshold, forming an encrypted candidate position index set.

[0069] Specifically, after opening the shared package on the second terminal device, students directly enter natural language in the search box, such as "how to derive the formula for the vertex of a parabola" or simply "vertex". The terminal immediately calls upon a lightweight multimodal embedding model, identical to that used on the sending end, to map this sentence into a 128-dimensional or 256-dimensional plaintext query vector. This vector is completely consistent with the mathematical space used when generating semantic tokens in real time during class, thus ensuring the accuracy of subsequent matching.

[0070] Next, the terminal uses the homomorphic public key included in the shared packet to encrypt the plaintext query vector into an encrypted query vector. After encryption, it becomes an unreadable ciphertext number, but its mathematical properties remain unchanged. Then, the system performs ciphertext cosine similarity or ciphertext inner product operations on this encrypted query vector and each encrypted token vector in the encrypted token sequence. The entire calculation is performed entirely within the ciphertext domain, equivalent to directly comparing the tooth patterns of two lock keys in a safe; there's no need to open the safe to see the documents inside.

[0071] After calculation, a sequence of similarity scores, still ciphertext, is obtained. The system then performs homomorphic comparison operations on this sequence of scores in the ciphertext domain, such as finding all positions with scores greater than or equal to 0.72, or directly selecting the top 10 time points with the highest scores. These comparisons and sorting are also all based on homomorphic addition and multiplication, and the final result is a set of encrypted position identifiers, such as "second 532, second 1180, second 2100..." or encrypted Top-K rankings.

[0072] This set of encrypted location identifiers constitutes the candidate location index set. At this point, the user interface can display "Found 12 relevant pieces of content, the most relevant at minute 21," but the system still hasn't decrypted any actual classroom frames. Only when the user clicks on any result will subsequent selective partial decryption be triggered, decrypting only a tiny subset of events around those specific time points. This two-stage design—"first encrypting the text to accurately determine the location, then partially decrypting to view the content"—ensures both fast retrieval speed and privacy, while maintaining an interactive experience indistinguishable from ordinary plaintext courseware.

[0073] The encrypted knowledge point frequency statistics are performed by pre-preparing a vocabulary list of common knowledge points, such as 1800 core concepts in high school mathematics. After the user selects several knowledge points to be counted, the terminal encrypts all of these knowledge points into a set of encrypted query vectors at once. Then, it performs encrypted similarity matching in parallel with the encrypted token sequence. If the similarity of any frame exceeds a threshold, the encrypted number is incremented by 1. Finally, the encrypted frequency of occurrence is obtained, for example, "12 times" or "8 times". Only when the user clicks to view, these tiny encrypted numbers are partially decrypted, and the plaintext frequency briefly appears on the screen.

[0074] As one feasible approach, the frequency statistics of encrypted knowledge points in this invention include: pre-mapping preset knowledge point words or concepts to corresponding plaintext query vector groups; the user selects one or more of the preset knowledge points to be counted locally on a second terminal device, and the system homomorphically encrypts the plaintext query vectors of the selected preset knowledge points into encrypted query vectors; for each frame or segment of the encrypted token sequence, the encrypted inner product or cosine similarity calculation is performed with the encrypted query vectors one by one, and the frame counts exceeding the preset similarity threshold are accumulated by homomorphic addition to obtain the total number of occurrences of each knowledge point that is still encrypted.

[0075] Specifically, the system pre-prepares a vocabulary of subject-specific knowledge points. For example, high school mathematics includes approximately 1800 core concepts such as "quadratic function," "parabola," "Vieta's formulas," and "law of cosines." Each knowledge point is pre-mapped into a fixed 128-dimensional or 256-dimensional plaintext query vector using the same lightweight multimodal embedding model and is permanently stored locally. These vectors act as "semantic ID cards" for knowledge points; regardless of whether the teacher uses a blackboard, oral presentation, or PowerPoint presentation, as long as the semantics are the same, the vectors will be highly similar.

[0076] After opening the encrypted courseware, students directly select the knowledge points they want to be tested in the statistics panel, such as simultaneously selecting "quadratic function," "graph," and "vertex." The terminal immediately encrypts these preset plaintext query vectors into a set of ciphertext query vectors using the homomorphic public key in the shared packet. This set of ciphertext query vectors is in the same encryption domain as the encrypted token sequence and can directly participate in subsequent calculations.

[0077] The actual statistical process takes place entirely in the ciphertext domain: the system calculates the ciphertext inner product or ciphertext cosine similarity between the encrypted token vector of each frame or every few seconds and the set of ciphertext query vectors. If the similarity of a frame to a certain knowledge point exceeds a preset threshold (usually 0.7 to 0.8), the ciphertext counter for that knowledge point is incremented by 1. After traversing all frames, the system obtains a set of occurrence counts that are still completely encrypted, such as the ciphertext "12 times", "9 times", and "5 times". At this point, the screen may display "Statistics completed", but the user cannot see any numbers yet because the count itself is still ciphertext.

[0078] The technical effect of this design is that even if a user's phone is completely compromised, the attacker will only obtain a bunch of undecipherable ciphertext numbers, and will never be able to deduce what the teacher said, the pace of the lecture, or what was written on the blackboard. The actual plaintext frequency is only partially decrypted after the user explicitly clicks "Show Count" and passes local biometric or password verification. This ciphertext count, which is displayed briefly on the screen for a few seconds, is then automatically cleared.

[0079] These two types of encrypted operations can be used individually or in combination. For example, encrypted retrieval followed by encrypted statistics can be performed first, or high-frequency knowledge points can be statistically analyzed first, followed by encrypted retrieval of related fragments. All intermediate results remain encrypted indefinitely. The end-user experience is that opening a small 80KB file allows for easy searching, viewing frequencies, and extracting key points, just like using local plaintext courseware. The actual classroom blackboard images, teacher audio, and PPT content are never leaked. This feature completely eliminates the security risks of traditional "sharing equals decryption," elevating the privacy protection of classroom resources to an unprecedented level.

[0080] The following describes in detail step 104, namely, "the second terminal device determines the target encrypted token subset based on the ciphertext operation result, and when the user actively triggers plaintext generation, it uses the private key to selectively and partially decrypt the target encrypted token subset, and outputs plaintext notes or content reconstruction results based on the target encrypted token subset", with reference to the embodiments.

[0081] After the second terminal device completes the preceding encrypted semantic retrieval and encrypted knowledge point frequency statistics, it can obtain two types of still fully encrypted results: one is a string of encrypted Top-K time positions or high similarity intervals, and the other is encrypted high-frequency knowledge points and their occurrence positions. These encrypted results undergo a very lightweight encrypted fusion and masking operation locally, ultimately generating an encrypted selection mask. This mask is only 1 at the time points that the user is truly concerned with, and all others are 0. The system performs an element-wise encrypted multiplication of this encrypted mask with the original encrypted token sequence, resulting in a target encrypted token subset that is typically only 5% to 12% the size of the original. This subset is still encrypted, but it precisely corresponds to core segments such as "those few minutes of quadratic function" and "the key points repeatedly emphasized by the teacher on the blackboard."

[0082] As an implementable approach, the second terminal device determines the target encrypted token subset based on the ciphertext operation results by: performing homomorphic similarity calculation on the encrypted query vector of the ciphertext semantic retrieval and each encrypted token vector in the encrypted token sequence based on a preset ciphertext semantic similarity measurement rule to obtain a ciphertext similarity score; selecting encrypted tokens with ciphertext similarity higher than a preset threshold from the encrypted token sequence based on the ciphertext similarity score to form a first candidate encrypted token set; determining the encrypted tokens corresponding to knowledge points with a frequency higher than a preset frequency threshold based on the statistical results of the ciphertext knowledge point frequency statistics to form a second candidate encrypted token set; performing homomorphic set operation on the first candidate encrypted token set and the second candidate encrypted token set to obtain a joint candidate set; and performing homomorphic sorting or homomorphic compression on the joint candidate set according to the user's search intent, operation instructions, or contextual requirements to finally determine the target encrypted token subset.

[0083] Specifically, the system first reuses the encrypted query vector generated during the user's previous search and performs a more refined ciphertext similarity calculation with the encrypted token sequence to obtain a ciphertext similarity score for each frame. This calculation can employ stricter metric rules, such as incorporating cosine similarity weighting or multi-head attention mechanisms, to obtain a more accurate ciphertext score sequence. Then, all encrypted tokens exceeding a preset threshold are directly selected from the ciphertext domain to form the first candidate set. This part represents the "user's active search intent."

[0084] Meanwhile, the system retrieves the frequency counts of previously encrypted knowledge points, which are still considered encrypted, and performs homomorphic threshold checks on these encrypted numbers, for example, identifying knowledge points that appear 5 or more times. All time frames corresponding to these high-frequency knowledge points also form an encrypted token set, called the second candidate set. This part represents "the content that the teacher objectively emphasized the most."

[0085] The key fusion steps are completed entirely in the ciphertext domain: the system performs homomorphic intersection, union, or weighted union operations on the first and second candidate sets. For example, the most common approach is "intersection followed by weighted boosting," meaning that only segments that simultaneously satisfy the dual conditions of "users want to see" and "teachers want to talk more" are retained, and different ciphertext weights are assigned based on their frequency, ultimately generating a smaller, higher-priority joint candidate set.

[0086] Finally, the system performs another lightweight encrypted processing based on the user's current operating scenario: if the user is quickly reviewing after class, it performs a Top-K sort of the encrypted data, retaining only the most relevant minutes; if the user is preparing for an exam, it performs encrypted compression, automatically merging and deduplicating multiple explanations of the same knowledge point. All these sorting, weighting, and compression are implemented using homomorphic addition and finite multiplication, ultimately resulting in a target encrypted token subset that is typically only 5% to 10% the size of the original sequence.

[0087] Only after the user explicitly clicks "Generate Note" or "Rebuild Content" and passes fingerprint, facial recognition, or password verification, does the terminal use its local private key to selectively and partially decrypt a subset of the encrypted tokens. The private key never leaves the trusted execution environment of the generating device, and decryption only occurs within a few milliseconds of a time window in memory, immediately erasing the plaintext cache upon completion.

[0088] The decrypted plaintext token subset is fed into the same lightweight model's decoding head or lightweight diffusion head, quickly reconstructing several pages of high-definition whiteboard images, timeline-based subtitle text, key PPT screenshots, or short audio clips, forming a highly condensed personal note or review card containing only the key points. Throughout the process, the user experiences "one-click extraction of key points, notes generated in seconds," but in reality, 99% of the original 45-minute class content never leaves the encrypted state. Even if the phone is seized on the spot and the system is mirrored, the attacker can only obtain a meaningless 80KB encrypted packet and a 7KB subset of encrypted text, making it completely impossible to recover the complete class.

[0089] The methods provided in this application can be applied to various scenarios, including but not limited to: tutoring institutions or online platforms converting renowned teachers' courses into encrypted semantic token packages, with only paying students receiving homomorphic public keys and model identifiers. Students can perform unlimited encrypted searches, count the frequency of knowledge points, and extract condensed versions of high-frequency exam points, without the institution needing to worry about the courses being stolen and resold; the academic affairs office can collect encrypted classroom packages from all teachers in batches, and uniformly count the knowledge point coverage, key repetition frequency, and student search hotspots for each lesson in encrypted form, generating teaching quality reports that achieve precise supervision without infringing on any teacher's classroom privacy or students' portrait rights.

[0090] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0091] According to another embodiment, an encrypted lightweight classroom resource acquisition and sharing system is provided. Figure 2 A schematic block diagram of an encrypted lightweight classroom resource acquisition and sharing system according to one embodiment is shown. Figure 2 As shown, the system 200 includes:

[0092] The multimodal acquisition and semantic module 201 is configured on the first terminal device and is used to acquire classroom multimodal signals in real time. The multimodal signals include blackboard images, teacher voice streams and presentation screens. The multimodal signals are input into a small multimodal embedding model to generate a semantic token sequence with a classroom content data volume of 2 to 10 KB per minute.

[0093] The approximate homomorphic encryption and sharing module 202, configured in the first terminal device, is used to apply approximate homomorphic encryption to the semantic token sequence to obtain an encrypted token sequence, so that the data volume of a single 45-minute class is controlled within 100KB, and the encrypted token sequence is shared together with the lightweight model identifier and the homomorphic public key.

[0094] The ciphertext operation module 203, configured in the second terminal device, is used to perform ciphertext operations on the encrypted token sequence based on homomorphic properties without performing decryption, and obtain a ciphertext operation result that is still ciphertext. The ciphertext operation includes ciphertext semantic retrieval and ciphertext knowledge point frequency statistics.

[0095] The subset determination and partial decryption module 204 is configured in the second terminal device and is used to determine the target encrypted token subset based on the ciphertext operation result, and when the user actively triggers plaintext generation, use the private key to selectively and partially decrypt the target encrypted token subset, and output plaintext notes or content reconstruction results based on the target encrypted token subset.

[0096] As an implementable approach, the multimodal acquisition and semanticization module 201 can also be configured to perform differential encoding and Huffman compression on the semantic token sequence, thereby further compressing the amount of classroom content data per minute to 1.5 to 6KB.

[0097] As an implementable approach, the approximate homomorphic encryption and sharing module 202, when applying approximate homomorphic encryption to the semantic token sequence to obtain an encrypted token sequence, can be configured as follows: The semantic token sequence is segmented into multiple plaintext vector slots according to a time window, each plaintext vector slot containing a fixed number of tokens and filled with noise vectors at the end of the plaintext vector slot; an approximate homomorphic encryption scheme based on ring learning and error instances is used to perform batch encryption on each plaintext vector slot at once, generating an encrypted token slot containing only a single ciphertext polynomial; an encryption level label and a remaining computation budget label are attached to each encrypted token slot, the labels being attached in plaintext form.

[0098] As an implementable approach, the near-homomorphic encryption and sharing module 202 can also be configured such that the homomorphic public key and the lightweight model identifier are jointly encapsulated into a publicly verifiable Uniform Resource Identifier (URI), and the second terminal device can obtain all the public parameters used for ciphertext operations by parsing the URI.

[0099] As an implementable approach, the ciphertext operation module 203 can be configured during ciphertext semantic retrieval as follows: mapping the user-input query text into a plaintext query vector using a lightweight multimodal embedding model; homomorphically encrypting the plaintext query vector to obtain an encrypted query vector; the second terminal device performing ciphertext cosine similarity or ciphertext inner product calculations on the encrypted query vector and each encrypted token embedding in the encrypted token sequence based on homomorphic addition and homomorphic multiplication to obtain a ciphertext similarity score sequence; without decryption, performing a homomorphic comparison operation on the ciphertext similarity score sequence, and filtering out encrypted position identifiers with similarity greater than or equal to the preset similarity threshold according to a preset similarity threshold to form an encrypted candidate position index set.

[0100] As an implementable approach, the ciphertext operation module 203 can be configured to: pre-map preset knowledge point words or concepts to corresponding plaintext query vector groups; the user selects one or more of the preset knowledge points to be counted locally on the second terminal device, and the system homomorphically encrypts the plaintext query vectors of the selected preset knowledge points into ciphertext query vectors; for each frame or segment of the encrypted token sequence, the ciphertext inner product or cosine similarity calculation is performed with the ciphertext query vectors one by one, and the frame count values ​​exceeding the preset similarity threshold are accumulated by homomorphic addition to obtain the total number of occurrences of each knowledge point that is still ciphertext.

[0101] As an implementable approach, the subset determination and local decryption module 204, when determining the target encrypted token subset based on the ciphertext operation result on the second terminal device, can be configured as follows: based on a preset ciphertext semantic similarity measurement rule, perform homomorphic similarity calculation on the encrypted query vector of the ciphertext semantic retrieval and each encrypted token vector in the encrypted token sequence to obtain a ciphertext similarity score; based on the ciphertext similarity score, filter out encrypted tokens with ciphertext similarity higher than a preset threshold from the encrypted token sequence to form a first candidate encrypted token set; perform homomorphic threshold judgment based on the statistical results of the frequency statistics of ciphertext knowledge points to determine the encrypted tokens corresponding to knowledge points with an occurrence frequency higher than a preset frequency threshold to form a second candidate encrypted token set; perform homomorphic set operation on the first candidate encrypted token set and the second candidate encrypted token set to obtain a joint candidate set; and perform homomorphic sorting or homomorphic compression on the joint candidate set according to the user's search intent, operation instructions, or context requirements to finally determine the target encrypted token subset.

[0102] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. Components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0103] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0104] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in the foregoing method embodiments.

[0105] And an electronic device comprising: one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in the foregoing method embodiments.

[0106] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the foregoing method embodiments.

[0107] in, Figure 3 The architecture of an electronic device is illustrated, which may include a processor 310, a video display adapter 311, a disk drive 312, an input / output interface 313, a network interface 314, and a memory 320. The processor 310, video display adapter 311, disk drive 312, input / output interface 313, network interface 314, and memory 320 can communicate with each other via a communication bus 330.

[0108] The processor 310 can be implemented using a general-purpose CPU, microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs in order to implement the technical solution provided in this application.

[0109] The memory 320 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 320 can store the operating system 321 for controlling the operation of the electronic device 300, and the basic input / output system (BIOS) 322 for controlling the low-level operations of the electronic device 300. Additionally, it can store a web browser 323, a data storage management system 324, and an encrypted lightweight classroom resource acquisition and sharing system 325, etc. The aforementioned encrypted lightweight classroom resource acquisition and sharing system 325 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when implementing the technical solution provided in this application through software or firmware, the relevant program code is stored in the memory 320 and executed by the processor 310.

[0110] Input / output interface 313 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0111] Network interface 314 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0112] Bus 330 includes a pathway for transmitting information between various components of the device, such as processor 310, video display adapter 311, disk drive 312, input / output interface 313, network interface 314, and memory 320.

[0113] It should be noted that although the above-described device only shows the processor 310, video display adapter 311, disk drive 312, input / output interface 313, network interface 314, memory 320, bus 330, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.

[0114] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer program product. This computer program product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0115] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A lightweight method for collecting and sharing encrypted classroom resources, characterized in that, The method includes: The first terminal device collects classroom multimodal signals in real time. The multimodal signals include blackboard images, teacher voice streams, and presentation screens. The multimodal signals are input into a small multimodal embedding model to generate a semantic token sequence with a classroom content data volume of 2 to 10 KB per minute. The semantic token sequence is segmented into multiple plaintext vector slots according to a time window. Each plaintext vector slot contains a fixed number of tokens and is filled with noise vectors at the end of the plaintext vector slot. An approximate homomorphic encryption scheme based on ring learning and error instances is adopted to perform batch encryption on each plaintext vector slot at one time, generating an encrypted token slot with only a single ciphertext polynomial; Each encrypted token slot is attached with an encryption level label and a remaining computation budget label. The labels are attached in plaintext to keep the data volume of a single 45-minute lesson within 100KB. The encrypted token sequence is shared along with the lightweight model identifier and the homomorphic public key. Without performing decryption, the second terminal device performs ciphertext operations on the encrypted token sequence based on homomorphic properties to obtain a ciphertext operation result that is still ciphertext. The ciphertext operation includes ciphertext semantic retrieval and ciphertext knowledge point frequency statistics. The encrypted semantic retrieval includes: mapping the user-input query text into a plaintext query vector using a lightweight multimodal embedding model; homomorphically encrypting the plaintext query vector to obtain an encrypted query vector; a second terminal device performing ciphertext cosine similarity or ciphertext inner product calculations on the encrypted query vector and each encrypted token embedding in the encrypted token sequence based on homomorphic addition and homomorphic multiplication to obtain a ciphertext similarity score sequence; performing a homomorphic comparison operation on the ciphertext similarity score sequence without decryption, and filtering out encrypted position identifiers with similarity greater than or equal to the preset similarity threshold according to a preset similarity threshold to form an encrypted candidate position index set; The frequency statistics of encrypted knowledge points include: pre-mapping preset knowledge point words or concepts into corresponding plaintext query vector groups; the user selects one or more preset knowledge points to be counted locally on the second terminal device, and the system homomorphically encrypts the plaintext query vector of the selected preset knowledge points into encrypted query vectors; for each frame or segment of the encrypted token sequence, the encrypted inner product or cosine similarity calculation is performed with the encrypted query vector one by one, and the frame count values ​​exceeding the preset similarity threshold are accumulated by homomorphic addition to obtain the total number of occurrences of each knowledge point that is still encrypted; The second terminal device determines the target encrypted token subset based on the ciphertext operation result. When the user actively triggers plaintext generation, it uses the private key to selectively and partially decrypt the target encrypted token subset and outputs plaintext notes or content reconstruction results based on the target encrypted token subset.

2. The method according to claim 1, characterized in that, The method further includes: performing differential encoding and Huffman compression on the semantic token sequence to further compress the amount of classroom content data per minute to 1.5 to 6KB.

3. The method according to claim 1, characterized in that, The homomorphic public key and the lightweight model identifier are encapsulated together into a publicly verifiable Uniform Resource Identifier (URI). The second terminal device can obtain all the public parameters used for ciphertext operations by parsing the URI.

4. The method according to claim 1, characterized in that, The second terminal device determines the target encrypted token subset based on the ciphertext operation result, including: Based on the preset ciphertext semantic similarity measurement rules, the homomorphic similarity between the encrypted query vector of the ciphertext semantic retrieval and each encrypted token vector in the encrypted token sequence is calculated to obtain the ciphertext similarity score. Based on the ciphertext similarity score, encrypted tokens with a ciphertext similarity higher than a preset threshold are selected from the encrypted token sequence to form a first candidate encrypted token set; Based on the statistical results of the frequency statistics of encrypted knowledge points, a homomorphic threshold is determined to identify the encrypted tokens corresponding to knowledge points whose frequency is higher than the preset frequency threshold, thus forming a second set of candidate encrypted tokens. Perform homomorphic set operations on the first candidate encrypted token set and the second candidate encrypted token set to obtain a joint candidate set; Based on the user's search intent, operation instructions, or contextual requirements, homomorphic sorting or homomorphic compression is performed on the joint candidate set to ultimately determine the target encrypted token subset.

5. A lightweight encrypted classroom resource acquisition and sharing system, characterized in that, The system includes: A multimodal acquisition and semantic module is configured on the first terminal device to acquire classroom multimodal signals in real time. The multimodal signals include blackboard images, teacher voice streams and presentation screens. The multimodal signals are input into a small multimodal embedding model to generate a semantic token sequence with a classroom content data volume of 2 to 10 KB per minute. An approximate homomorphic encryption and sharing module, configured in the first terminal device, is used to package the semantic token sequence into multiple plaintext vector slots segmented by time window. Each plaintext vector slot contains a fixed number of tokens and is filled with noise vectors at the end. An approximate homomorphic encryption scheme based on loop learning and error instances is used to perform batch encryption on each plaintext vector slot at once, generating an encrypted token slot with only a single ciphertext polynomial. An encryption level label and a remaining computation budget label are attached to each encrypted token slot. The labels are attached in plaintext form, so that the data volume of a single 45-minute class is controlled within 100KB. The encrypted token sequence, along with a lightweight model identifier and a homomorphic public key, is then shared. A ciphertext operation module, configured in the second terminal device, is used to perform ciphertext operations on the encrypted token sequence based on homomorphic properties without decryption, obtaining a ciphertext operation result that is still ciphertext. The ciphertext operation includes ciphertext semantic retrieval and ciphertext knowledge point frequency statistics. The ciphertext semantic retrieval includes: mapping the user-input query text to a plaintext query vector using a lightweight multimodal embedding model; homomorphically encrypting the plaintext query vector to obtain an encrypted query vector; the second terminal device performing ciphertext cosine similarity or ciphertext inner product calculations on the encrypted query vector and each encrypted token embedding in the encrypted token sequence based on homomorphic addition and homomorphic multiplication to obtain a ciphertext similarity score sequence; and, without decryption, performing ciphertext similarity scoring on the ciphertext similarity score. Homomorphic comparison is performed on the sequence, and encrypted position identifiers with similarity greater than or equal to the preset similarity threshold are selected to form an encrypted candidate position index set; the frequency statistics of ciphertext knowledge points include: pre-mapping preset knowledge point words or concepts to corresponding plaintext query vector groups; the user selects one or more preset knowledge points to be counted locally on the second terminal device, and the system homomorphically encrypts the plaintext query vector of the selected preset knowledge points into ciphertext query vectors; for each frame or segment of token vector in the encrypted token sequence, the ciphertext inner product or cosine similarity calculation is performed with the ciphertext query vector one by one, and the frame count values ​​exceeding the preset similarity threshold are accumulated by homomorphic addition to obtain the total number of occurrences of each knowledge point that is still ciphertext; The subset determination and partial decryption module is configured in the second terminal device. It is used to determine the target encrypted token subset based on the ciphertext operation result, and when the user actively triggers plaintext generation, it uses the private key to selectively and partially decrypt the target encrypted token subset, and outputs plaintext notes or content reconstruction results based on the target encrypted token subset.

6. An electronic device, characterized in that, include: One or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Teaching data management method and system based on artificial intelligence

    CN120633861A

  • Old people falling risk assessment and dynamic protection intervention system and method

    CN120892990A