A method, device and apparatus for generating an attention map based on a memory mechanism

By generating an attention map based on the memory mechanism and utilizing the feature matrix and time interval factors, the problem of forgetting behavior not being captured in the deep knowledge tracking model is solved, and the accuracy of predicting learner performance is improved.

CN115496214BActive Publication Date: 2025-09-09LANZHOU UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211136626.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-19
Publication Date
2025-09-09
Estimated Expiration
2042-09-19

AI Technical Summary

Technical Problem

Existing deep knowledge tracking models fail to effectively capture learners' forgetting behavior, resulting in insufficient accuracy in predicting learners' future performance.

Method used

By generating an attention map based on the memory mechanism, using the feature matrix K, query matrix Q and value matrix V, combined with the time interval factor of the learner's forgetting behavior, the attention scores between knowledge points are calculated, and a modified attenuation function is generated to enhance the performance information of the knowledge points.

Benefits of technology

The accuracy of the knowledge tracking model is improved. By considering the time interval factor of the learner's forgetting behavior, an attention map containing accurate features is generated, which is conducive to training high-precision models and subsequent predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115496214B_ABST
    Figure CN115496214B_ABST
Patent Text Reader

Abstract

The embodiment of this specification discloses a method, device and apparatus for generating an attention map based on a memory mechanism. By determining the feature matrix corresponding to the knowledge point sequence; obtaining the feature value Q i and obtain K j , wherein the jth knowledge point is the previous knowledge point related to the i-th knowledge point; determining other knowledge points between the i-th knowledge point and the j-th knowledge point; determining the time difference Δ(t i ,t j ) and time difference Δ(t i ,t k ); According to the Δ(t i ,t j ) and Δ(t i ,t k ) Modify the preset attenuation function to generate a modified attenuation function; according to the characteristic value Q i , eigenvalue K j , the modified attenuation function and the value matrix V generate an attention map, thereby strengthening the performance information of the knowledge points by considering the time interval factor of the learner's forgetting behavior, reflecting the user's forgetting behavior in the learning process and obtaining an attention map containing accurate features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of Internet technology, and in particular to a method, device, and apparatus for generating an attention map based on a memory mechanism. Background Art

[0002] Online learning has become the primary learning method for learners. Knowledge tracking models, a key component of online learning, track changes in a learner's knowledge mastery during the learning process to predict their performance in future exercises. Current deep knowledge tracking models primarily consider factors such as student response time, number of exercises, and exercise difficulty, while ignoring psychological research on student forgetting behavior.

[0003] Based on this, a scheme for generating attention maps that can accurately capture forgetting behavior in knowledge tracking models is needed. Summary of the Invention

[0004] The embodiments of this specification provide a method, apparatus, device and storage medium for generating an attention map based on a memory mechanism to solve the following technical problem: a solution for generating an attention map that can accurately capture forgetting behavior in a knowledge tracking model is needed.

[0005] To solve the above technical problems, one or more embodiments of this specification are implemented as follows:

[0006] In the first aspect, the embodiment of the present specification provides a method for generating an attention map based on a memory mechanism, which is applied to a knowledge point sequence containing knowledge points and time, and the method comprises: determining a feature matrix corresponding to the knowledge point sequence, the feature matrix comprising a key matrix K, a query matrix Q and a value matrix V; obtaining the eigenvalue Q of the i-th knowledge point in the query matrix Q; i , and obtain the eigenvalue K of the jth knowledge point in the key matrix K j , wherein the jth knowledge point is the previous knowledge point related to the i-th knowledge point; determining whether the i-th knowledge point and the j-th knowledge point are adjacent in the sequence, and when they are not adjacent, determining other knowledge points between the i-th knowledge point and the j-th knowledge point; determining the time difference Δ(t i ,t j ), and determining the time difference Δ(t i ,t k ); According to the time difference Δ(t i ,t j ) and Δ(t i ,t k) Modify the preset attenuation function to generate a modified attenuation function; according to the characteristic value Q i , eigenvalue K j , the modified attenuation function and the value matrix V generate an attention map.

[0007] In the second aspect, the embodiment of the present specification provides a device for generating an attention map based on a memory mechanism, which is applied to a knowledge point sequence containing knowledge points and time, and the device includes: a feature determination module, which determines the feature matrix corresponding to the knowledge point sequence, and the feature matrix includes a key matrix K, a query matrix Q and a value matrix V; an eigenvalue acquisition module, which obtains the eigenvalue Q of the i-th knowledge point in the query matrix Q. i , and obtain the eigenvalue K of the jth knowledge point in the key matrix K j , wherein the jth knowledge point is the previous knowledge point related to the i-th knowledge point; an adjacent determination module; determines whether the i-th knowledge point and the j-th knowledge point are adjacent in the sequence, and when they are not adjacent, determines other knowledge points between the i-th knowledge point and the j-th knowledge point; a time difference determination module; determines the time difference Δ(t i ,t j ), and determining the time difference Δ(t i ,t k ); Correction module, according to the time difference Δ(t i ,t j ) and Δ(t i ,t k ) Modify the preset attenuation function to generate a modified attenuation function; the attention map generation module, according to the eigenvalue Q i , eigenvalue K j , the modified attenuation function and the value matrix V generate an attention map.

[0008] In a third aspect, one or more embodiments of this specification provide an electronic device, including:

[0009] at least one processor; and,

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

[0011] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect.

[0012] In a fourth aspect, an embodiment of this specification provides a non-volatile computer storage medium storing computer-executable instructions. When a computer reads the computer-executable instructions in the storage medium, the instructions enable one or more processors to execute the method described in the first aspect.

[0013] At least one of the above technical solutions adopted in one or more embodiments of this specification can achieve the following beneficial effects: by determining the characteristic matrix corresponding to the knowledge point sequence, the characteristic matrix includes a key matrix K, a query matrix Q and a value matrix V; obtaining the characteristic value Q of the i-th knowledge point in the query matrix Q i , and obtain the eigenvalue K of the jth knowledge point in the key matrix K j , wherein the jth knowledge point is the previous knowledge point related to the i-th knowledge point; determining whether the i-th knowledge point and the j-th knowledge point are adjacent in the sequence, and when they are not adjacent, determining other knowledge points between the i-th knowledge point and the j-th knowledge point; determining the time difference Δ(t i ,t j ), and determining the time difference Δ(t i ,t k ); According to the Δ(t i ,t j ) and Δ(t i ,t k ) Modify the preset attenuation function to generate a modified attenuation function; according to the characteristic value Q i , eigenvalue K j , the modified attenuation function and the value matrix V generate an attention map, thereby strengthening the performance information of the knowledge points by considering the time interval factor of the learner's forgetting behavior, reflecting the forgetting behavior of the user in the learning process and obtaining an attention map containing accurate features, which is conducive to training to obtain a high-precision model and subsequent predictions. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0015] Figure 1 A flowchart of a method for generating an attention map based on a memory mechanism provided in an embodiment of this specification;

[0016] Figure 2 A schematic diagram of the relevance of a learner's answers to knowledge points provided in an embodiment of this specification;

[0017] Figure 3 A schematic diagram of a forgetting curve provided in an embodiment of this specification;

[0018] Figure 4 A schematic diagram of the structure of a device for generating an attention map based on a memory mechanism provided in an embodiment of this specification;

[0019] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0020] The embodiments of this specification provide a method, apparatus, device, and storage medium for generating an attention map based on a memory mechanism.

[0021] In order to help those skilled in the art better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0022] like Figure 1 As shown, Figure 1 A flowchart of a method for generating an attention map based on a memory mechanism provided in an embodiment of this specification is applied to a sequence of knowledge points containing knowledge points and time. The method includes:

[0023] S101: Determine a feature matrix corresponding to the knowledge point sequence, where the feature matrix includes a key matrix K, a query matrix Q, and a value matrix V.

[0024] First, let S = {(C1, t1.R1), ..., (C n ,t n .R n )} represents a knowledge point sequence consisting of a series of knowledge points and times, where ti represents the timestamp when the event learner answers the i-th question, where 1≤i≤n. Ci refers to the question information when the learner answers the i-th question, such as the type of knowledge concept to which the question belongs, indicating that the concept type code can be represented using a one-hot encoding form such as numbers or letters. i ∈{0, 1} refers to the learner's response information to the i-th question, for example, 0 indicates an incorrect response and 1 indicates a correct response.

[0025] For example, a typical knowledge point in a knowledge point sequence may be in the form of (1, ti, 0), which means that the time the learner takes to answer the i-th question is ti, and the type of the question is coded as "1", and the answer result is "0" indicating "wrong answer".

[0026] The corresponding learnable mapping function can be pre-set Mapping Function The C and R contained in the corresponding knowledge point are mapped to the d-dimensional space to obtain the corresponding basic feature X. The basic feature can include mapping sub-matrices corresponding to the aforementioned C, t, and R, respectively.

[0027] After obtaining the basic features X of the event sequence, you can use W k 、W q The three weight matrices Wk and Wv are multiplied by X to obtain the feature matrix corresponding to the event sequence. For example, the basic feature X is multiplied by the aforementioned weight matrix Wk to obtain the corresponding key matrix K; the basic feature X is multiplied by the aforementioned weight matrix Wq to obtain the corresponding query matrix Q; and the basic feature X is multiplied by the aforementioned weight matrix Wv to obtain the corresponding value matrix V. Each row in the generated key matrix K and query matrix Q actually corresponds to a knowledge point in the knowledge point sequence.

[0028] S103, obtaining the eigenvalue Q of the i-th knowledge point in the query matrix Q i , and obtain the eigenvalue K of the jth knowledge point in the key matrix K j .

[0029] The attention map calculates the attention score between any two knowledge points to represent the correlation between the two knowledge points. That is, for any current knowledge point, it can be determined as the i-th knowledge point, and the correlation between the j-th knowledge point and it can be calculated. The j-th knowledge point is the previous knowledge point related to the i-th knowledge point.

[0030] However, conventional calculations generally don’t account for the potential memory loss that learners may experience during the learning process. In other words, to better simulate how a learner’s knowledge changes over time, it’s necessary to emphasize performance information on recent, relevant questions.

[0031] Therefore, when calculating the correlation between the jth knowledge point and the ith knowledge point, first determine the previous knowledge point related to the ith knowledge point and determine it as the jth knowledge point. The correlation here may refer to the same or similar types of knowledge points.

[0032] like Figure 2 As shown, Figure 2This is a schematic diagram illustrating the relevance of knowledge points answered by a learner according to an embodiment of this specification. In this diagram, the i-th knowledge point is the current knowledge point. There may be other knowledge points unrelated to the i-th knowledge point (or not) between the i-th knowledge point and the j-th knowledge point. Furthermore, there may not be other knowledge points related to the i-th knowledge point between the i-th knowledge point and the j-th knowledge point.

[0033] In other words, the j-th knowledge point is closest to the i-th knowledge point among all the knowledge points that are related to the i-th knowledge point, that is, the last related knowledge point learned closest to the current time.

[0034] Whether two knowledge points are related can be determined by the corresponding codes in the knowledge point sequence. For example, if the correlation determination condition requires that the two knowledge points are the same, then for the knowledge points (1, ti, 0) and (1, tj, 1) contained in the sequence, since the codes of the knowledge point types are both "1", it can be determined that the two are related knowledge points.

[0035] If the relevance determination condition requires that two knowledge points be similar, then similar knowledge points can be coded with adjacent numbers during coding. Thus, if the distance between the two codes does not exceed a preset distance (e.g., the preset distance is 2), the two knowledge points can be considered similar and thus correlated. For example, for the knowledge points (1, ti, 0) and (3, tj, 1) included in the sequence, since the distance between the codes of the knowledge point types is 2, which does not exceed the preset distance, the two knowledge points can be considered similar and thus correlated.

[0036] For another example, the Pearson correlation coefficient r can be used to characterize the degree of correlation between two numerical sequences (i.e., columns, lists, sequences, etc.). The r value is a number between -1 and 1. By calculating the r value of the encoding of two knowledge point types, it is determined whether it is positively correlated, uncorrelated, or negatively correlated. The closer r is to 1, the stronger the positive correlation is; the closer r is to -1, the stronger the negative correlation is (i.e., the more "opposite" the columns are); the closer r is to 0, the weaker the correlation is.

[0037] S105 , determining whether the i-th knowledge point and the j-th knowledge point are adjacent in the sequence; if not, determining other knowledge points between the i-th knowledge point and the j-th knowledge point.

[0038] Since memory declines after a long period of non-learning, when the time interval between the i-th question and the previous related j-th question is long, if the learner has not learned other questions during this period, that is, Figure 2The number of other questions in is 0, and j = i-1, then the magnitude of the attention weight decay is large. On the contrary, if the learner is still learning other k-th questions (k-th questions can be multiple) during this period, then the magnitude of the attention weight decay is small. Figure 2 As shown, Figure 2 The knowledge points corresponding to tk contained in tk are other knowledge points. Obviously, t k The serial number of the corresponding knowledge point is in the interval (j, i).

[0039] S107, determining the time difference Δ(t i ,t j ), and determining the time difference Δ(t i ,t k ).

[0040] Based on this, the time difference Δ(t i ,t k ), where Δ(t i ,t k )=|t i -t k |, since there can be multiple other questions, it is obvious that the time difference Δ(t i ,t k ) can also be multiple.

[0041] S109, according to the Δ(t i ,t j ) and Δ(t i ,t k ) Modify the preset attenuation function to generate a modified attenuation function.

[0042] As mentioned above, memory decline will occur during the learning process, and the longer the time interval, the greater the degree of forgetting. Figure 3 As shown, Figure 3 This is a schematic diagram of a forgetting curve provided in the embodiments of this specification. Statistics show that within 20 minutes after learning, only 58% of the knowledge and experience is retained, and this number drops to 33.7% within 1 day.

[0043] Therefore, when predicting learners' responses to the current question, earlier questions that are too relevant to the current question cannot provide effective help for the current question's response. Instead, we need to emphasize the performance information of the most recent related questions. In other words, we need to focus on the correlation between the aforementioned knowledge point i and the j knowledge point.

[0044] In other words, the preset decay function refers to a function that characterizes the memory decay between the i-th knowledge point and the j-th knowledge point during the learning process. The form of the preset decay function can be set according to actual needs. Generally speaking, it should include a function that characterizes the time difference Δ(t i ,t j ), and, can also include a learnable attenuation parameter θ. Thus, the time difference Δ(t i ,t j ) is used to characterize the attenuation of memory, and θ is a learnable attenuation parameter in the form of a matrix.

[0045] Attenuation function γ(t i ,t j The specific form of γ(t i ,t j The values ​​of ,θ) and the values ​​of the modified attenuation function should be between the interval (0, 1).

[0046] According to the Δ(t i ,t j ) and Δ(t i ,t k ) When modifying the preset attenuation function, the influence of Δ(t i ,t j ) and Δ(t i ,t k ), and the preset attenuation function is corrected according to the correction term to generate a corrected attenuation function.

[0047] For example, one form of correction could be to include Δ(t i ,t j ) and Δ(t i ,t k ) is added, subtracted, multiplied, etc. with the preset attenuation function.

[0048] S111, according to the characteristic value Q i , eigenvalue K j , the modified attenuation function and the value matrix V generate an attention map.

[0049] After determining the modified attenuation function, we can first calculate the value of the characteristic value Q i , eigenvalue K j Generate raw attention score s i,j .

[0050] For example, determine the eigenvalue Kj The transposed vector Kj T , so that the Q i and transposed vector Kj T Multiply to get the original attention score And based on the original attention score s i,j and the modified attenuation function γ(t i ,t j ,θ) performs memory decay to obtain a new attention score s i,j,γ .

[0051] Then, the new attention score can be multiplied by the value matrix V to generate an attention map. For example, the attention map can be calculated using the following formula:

[0052]

[0053] The τ representation is any one of the knowledge points in the current encoding sequence, α i,j That is, it represents the correlation between the i-th knowledge point and the j-th knowledge point. The i-th row and j-th column element in the generated attention map represents the influence weight of the j-th knowledge point on the i-th knowledge point in the knowledge point sequence.

[0054] By determining the characteristic matrix corresponding to the knowledge point sequence, the characteristic matrix includes a key matrix K, a query matrix Q and a value matrix V; obtaining the characteristic value Q of the i-th knowledge point in the query matrix Q i , and obtain the eigenvalue K of the jth knowledge point in the key matrix K j , wherein the jth knowledge point is the previous knowledge point related to the i-th knowledge point; determining whether the i-th knowledge point and the j-th knowledge point are adjacent in the sequence, and when they are not adjacent, determining other knowledge points between the i-th knowledge point and the j-th knowledge point; determining the time difference Δ(t i ,t j ), and determining the time difference Δ(t i ,t k ); According to the Δ(t i ,t j ) and Δ(t i ,t k ) Modify the preset attenuation function to generate a modified attenuation function; according to the characteristic value Q i , eigenvalue K j, the modified attenuation function and the value matrix V generate an attention map, thereby strengthening the performance information of the knowledge points by considering the time interval factor of the learner's forgetting behavior, reflecting the forgetting behavior of the user in the learning process and obtaining an attention map containing accurate features, which is conducive to training to obtain a high-precision model and subsequent predictions.

[0055] In one embodiment, the preset attenuation function is in the form of a time difference Δ(t i ,t j ) and the decay function γ(t i ,t j ,θ), where θ is a learnable attenuation parameter, and its specific form can include exponential function form, power function form, and absolute value ratio form, etc.

[0056] For example, its specific form can be a decay function γ(t i ,t j ,θ), the time difference and the attenuation parameter θ are the attenuation function γ(t i ,t j ,θ), the independent variable can be in the form of

[0057] For another example, in the attenuation function γ(t i ,t j ,θ), the time difference and the attenuation parameter θ are the attenuation function γ(t i ,t j ,θ), its form can be as follows:

[0058] For another example, the attenuation function γ(t i ,t j ,θ) can also be in the form of a ratio of the time difference and the attenuation parameter θ, which can be expressed as follows:

[0059] In one embodiment, according to the Δ(t i ,t j ) and Δ(t i ,t k ) to modify the preset attenuation function to generate a modified attenuation function, including determining the Δ(t i ,t k ) and the Δ(t i ,t j ) of the ratio P, and the attenuation function γ(t i ,tj ,θ) is corrected to generate the corrected attenuation function.

[0060] The ratio P actually reflects whether the learner continues to study other problems within the time interval of studying the same related problem. Therefore, if there are no other knowledge points between the i-th problem and the j-th problem, the corresponding attenuation coefficient remains unchanged. Correspondingly, if there are other knowledge points between the i-th problem and the j-th problem, the attenuation coefficient should be increased accordingly to reduce the attenuation of the attention weight.

[0061] Based on this, according to the Δ(t i ,t k ) and the Δ(t i ,t j ) of the decay function γ(t i ,t j ,θ) is corrected, the following method can be used, that is, determining the attenuation function γ(t i ,t j ,θ) and the correction term φ of P, wherein the λ is a learnable correction parameter; the correction term φ and the attenuation function γ(t i ,t j ,θ) and γ(t i ,t j ,t k ,θ,λ) is determined as the attenuation function γ(t i ,t j ,θ), wherein the size of the correction term φ is positively correlated with the number of other knowledge points between the i-th knowledge point and the j-th knowledge point, and is also positively correlated with the ratio P.

[0062] For example, a correction term might be of the form:

[0063] t k It refers to the timestamps of other questions between the current question and the last related question answered by the learner, and λ is a learnable correction parameter.

[0064] Correspondingly, when the attenuation function γ(t i ,t j ,θ) can be corrected in the following ways:

[0065] That is, when j is adjacent to i, no correction is made. When j is not adjacent to i, the attenuation coefficient is corrected based on the number of other questions and the relative time ratio P between the two. This can more accurately reflect whether the learner has learned other knowledge points during the interval of learning the same related knowledge point, which will cause the memory attenuation. γ(t i ,t j ,t k, θ,λ) is the modified attenuation function.

[0066] In one embodiment, the raw attention scores s are fused i,j and the modified attenuation function γ(t i ,t j ,θ) generates a new attention score s i,j, γ, different methods can be used according to the actual situation.

[0067] For example, the original attention score s i,j With the modified attenuation function γ(t i ,t j ,t k, θ,λ) are multiplied to generate a new attention score s i,j,γ , that is, the new attention score s can be generated as follows i,j,γ :

[0068]

[0069] For another example, the original attention score s can also be i,j With the modified attenuation function γ(t i ,t j ,t k, θ,λ) are subtracted to generate a new attention score s i,j,γ , that is, the new attention score s can be generated as follows i,j,γ :

[0070]

[0071] In addition, it should be noted that the specific form of the attenuation function is given in the aforementioned manner, but in actual applications, as mentioned above, the attenuation function form including the time difference and the attenuation parameter θ can be various styles set according to actual needs, including exponential function form, power function form, and absolute value ratio form, etc.

[0072] During the training phase, after obtaining the attention map, the model generates an output vector based on the attention map, decodes the output vector to obtain a prediction vector, and calculates the data residual. This data residual is then used to train the model's trainable parameters (including parameters such as θ and λ in the decay function). After model training, when used for prediction, the output vector is generated based on the attention map and decoded to predict the learner's mastery of the current knowledge point.

[0073] Based on the same idea, one or more embodiments of this specification also provide devices and apparatuses corresponding to the above methods, such as Figure 4 、 Figure 5 shown.

[0074] In the second aspect, Figure 4 As shown, Figure 4 A schematic diagram of the structure of a device for generating an attention map based on a memory mechanism provided in an embodiment of this specification, which is applied to a knowledge point sequence containing knowledge points and time, includes:

[0075] A feature determination module 401 determines a feature matrix corresponding to the knowledge point sequence, wherein the feature matrix includes a key matrix K, a query matrix Q, and a value matrix V;

[0076] The eigenvalue acquisition module 403 acquires the eigenvalue Q of the i-th knowledge point in the query matrix Q. i , and obtain the eigenvalue K of the jth knowledge point in the key matrix K j , wherein the j-th knowledge point is the previous knowledge point related to the i-th knowledge point;

[0077] Adjacent determination module 405: determining whether the i-th knowledge point and the j-th knowledge point are adjacent in the sequence, and if not, determining other knowledge points between the i-th knowledge point and the j-th knowledge point;

[0078] The time difference determination module 407 determines the time difference Δ(t i ,t j ), and determining the time difference Δ(t i ,t k );

[0079] Correction module 409, according to the Δ(t i ,t j ) and Δ(t i ,t k ) modifying the preset attenuation function to generate a modified attenuation function;

[0080] Attention map generation module 411, according to the characteristic value Q i , eigenvalue K j , the modified attenuation function and the value matrix V generate an attention map.

[0081] Optionally, the device further includes a decay module 413, which determines the time difference Δ(t i ,t j ) and the decay function γ(t i ,t j ,θ), where θ is a learnable attenuation parameter.

[0082] Optionally, the correction module 409 determines the Δ(t i ,t k ) and the Δ(t i ,t j ) of the ratio P, and the attenuation function γ(t i ,t j ,θ) is corrected to generate the corrected attenuation function.

[0083] Optionally, the correction module 409 determines the inclusion of λ, the attenuation function γ(t i ,t j ,θ) and the correction term φ of P, wherein the λ is a learnable correction parameter; the correction term φ and the attenuation function γ(t i ,t j ,θ) and γ(t i ,t j ,t k ,θ,λ) is determined as the modified attenuation function.

[0084] Optionally, the attention map generating module 411, according to the eigenvalue Q i , eigenvalue K j Generate raw attention score s i,j ; Fusion of the original attention score s i,j and the modified attenuation function to generate a new attention score s i,j, γ.

[0085] Optionally, the attention map generation module 411 converts the original attention score s i,j Multiplying the modified attenuation function generates a new attention score s i,j, γ; or, the original attention score s i,j Subtract the modified attenuation function to generate a new attention score s i,j, γ.

[0086] Optionally, the attenuation module 413 determines an attenuation function γ(t i ,t j ,θ), wherein the time difference and the attenuation parameter θ are the attenuation function γ(t i ,t j ,θ) in the independent variable; or, determining the decay function γ(t i ,t j ,θ), wherein the time difference and the attenuation parameter θ are the attenuation function γ(t i ,t j ,θ).

[0087] Optionally, the apparatus further includes a training module 415 for training the λ and the decay parameter θ according to the attention map.

[0088] In the third aspect, Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification, the device comprising:

[0089] at least one processor; and,

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

[0091] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect.

[0092] In the fourth aspect, based on the same idea, an embodiment of this specification also provides a non-volatile computer storage medium corresponding to the above method, which stores computer-executable instructions. When a computer reads the computer-executable instructions in the storage medium, the instructions enable one or more processors to execute the method described in the first aspect.

[0093] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0094] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also understand that in addition to implementing the controller in pure computer-readable program code, the controller can also be implemented in the form of logic gates, switches, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0095] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0096] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0097] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0098] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0099] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0101] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0102] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0103] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0104] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0105] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0106] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device, apparatus, and non-volatile computer storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant details, refer to the descriptions of the method embodiments.

[0107] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0108] The foregoing description is merely one or more embodiments of this specification and is not intended to limit this specification. It will be apparent to those skilled in the art that various modifications and variations may be made to one or more embodiments of this specification. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of one or more embodiments of this specification are intended to be within the scope of the claims of this specification.

Claims

1. A memory-based attention map generation method, applied to a knowledge point sequence containing knowledge points and time; time represents the timestamp when the learner answers the question; The knowledge point includes: question information of the learner's answer, the timestamp when the learner answers the question, and the response information of the learner's answer to the question; the method includes: Determine a feature matrix corresponding to the knowledge point sequence, wherein the feature matrix includes a key matrix K, a query matrix Q, and a value matrix V; Get the eigenvalue Q of the i-th knowledge point in the query matrix Q i , and obtain the eigenvalue K of the jth knowledge point in the key matrix K j , wherein the j-th knowledge point is the previous knowledge point related to the i-th knowledge point; Determine whether the i-th knowledge point and the j-th knowledge point are adjacent in the sequence, and if not, determine other knowledge points between the i-th knowledge point and the j-th knowledge point; Determine the time difference Δ(t i ,t j ) , And, determine the time difference Δ(t i ,t k ); According to the time difference Δ(t i ,t j ) and Δ(t i ,t k ) modifying the preset attenuation function to generate a modified attenuation function; According to the characteristic value Q i , eigenvalue K j , generating an attention map using the modified attenuation function and the value matrix V; The preset attenuation function is predetermined in the following manner: Determine the time difference Δ(t i ,t j ) and the decay function γ(t i ,t j ,θ), where θ is a learnable attenuation parameter; According to the Δ(t i ,t j ) and Δ(t i ,t k ) Modify the preset attenuation function to generate a modified attenuation function, including: Determine the Δ(t i ,t k ) and the Δ(t i ,t j ) ratio P, determine the decay function γ(t i ,t j ,θ) and the correction term φ of P, wherein the λ is a learnable correction parameter; The correction term φ and the attenuation function γ(t i ,t j ,θ) and γ(t i ,t j ,t k ,θ,λ) is determined as the modified attenuation function.

2. The method according to claim 1, wherein According to the characteristic value Q i , eigenvalue K j , the modified attenuation function and the value matrix V generate an attention map, including: According to the characteristic value Q i , eigenvalue K j Generate raw attention score s i,j ; Fusion of the original attention scores s i,j and the modified attenuation function to generate a new attention score s i,j,γ .

3. The method according to claim 2, wherein: Fusion of the original attention scores s i,j and the modified attenuation function to generate a new attention score s i,j,γ ,include: The original attention score s i,j Multiplying the modified attenuation function generates a new attention score s i,j,γ ;or, The original attention score s i,j Subtract the modified attenuation function to generate a new attention score s i,j, x.

4. The method according to claim 1, wherein Determine the decay function γ(t i ,t j ,θ), including: Determine the decay function γ(t i ,t j ,θ), wherein the time difference and the attenuation parameter θ are the attenuation function γ(t i ,t j ,θ) in the independent variable; or, Determine the decay function γ(t i ,t j ,θ), wherein the time difference and the attenuation parameter θ are the attenuation function γ(t i ,t j ,θ).

5. The method of claim 1 , further comprising: The λ and decay parameter θ are trained according to the attention map.

6. A memory-based attention map generation device, applied to a knowledge point sequence containing knowledge points and time; the time represents the timestamp when the learner answers the question; The knowledge points include: question information of the learner's answer, the timestamp of the learner's answer, and the learner's response information; the device includes: A feature determination module determines a feature matrix corresponding to the knowledge point sequence, wherein the feature matrix includes a key matrix K, a query matrix Q, and a value matrix V; Eigenvalue acquisition module, which obtains the eigenvalue Q of the i-th knowledge point in the query matrix Q i , and obtain the eigenvalue K of the jth knowledge point in the key matrix K j , wherein the j-th knowledge point is the previous knowledge point related to the i-th knowledge point; Adjacent determination module: determining whether the i-th knowledge point and the j-th knowledge point are adjacent in the sequence, and if not, determining other knowledge points between the i-th knowledge point and the j-th knowledge point; The time difference determination module determines the time difference Δ(t i ,t j ), and determining the time difference Δ(t i ,t k ); The correction module, according to the time difference Δ(t i ,t j ) and Δ(t i ,t k ) modifying the preset attenuation function to generate a modified attenuation function; Attention map generation module, based on the eigenvalue Q i , eigenvalue K j , generating an attention map using the modified attenuation function and the value matrix V; The preset attenuation function is predetermined in the following manner: Determine the time difference Δ(t i ,t j ) and the decay function γ(t i ,t j ,θ), where θ is a learnable attenuation parameter; According to the Δ(t i ,t j ) and Δ(t i ,t k ) Modify the preset attenuation function to generate a modified attenuation function, including: Determine the Δ(t i ,t k ) and the Δ(t i ,t j ) ratio P, determine the decay function γ(t i ,t j ,θ) and the correction term φ of P, wherein the λ is a learnable correction parameter; The correction term φ and the attenuation function γ(t i ,t j ,θ) and γ(t i ,t j ,t k ,θ,λ) is determined as the modified attenuation function.

7. An electronic device comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.