Fast interpretability method based on multi-level cache

By employing multi-level caching and zero-copy techniques, the problem of slow explanatory report generation in real-time recommendation systems has been solved, enabling rapid generation of explanatory reports and improving the system's real-time performance and efficiency.

CN115757496BActive Publication Date: 2025-12-16SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211454490.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2025-12-16
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

Existing technologies are slow to interpret the generated recommendation results in scenarios with high real-time requirements, and cannot respond quickly.

Method used

A multi-level caching mechanism is adopted, combining local caching, distributed caching and zero-copy technology to reduce data copying and context switching between memory regions. DMA data transfer and memory region mapping technology are used to achieve fast generation of interpretable reports.

Benefits of technology

It improves the explanation response speed of the recommendation system in real-time scenarios, reduces CPU load and system calls, and enables rapid generation of explanatory reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757496B_ABST
    Figure CN115757496B_ABST
Patent Text Reader

Abstract

A kind of fast explainability method based on multi-level cache, respectively through local cache in the memory space in the same process and through distributed cache in historical data cache explainability report for fast reading, in turn through unique identification retrieval local cache and distributed cache failure with zero-copy mode transmission, reduce the repeated I / O copy operation between kernel buffer and user process buffer and CPU overhead between user process address space and kernel address space because of context switching.The application can be applied to recommendation model developers and actual recommendation system scenarios, and tell model modeling personnel or the essential reason of recommended item obtained by using user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a technology in the field of machine learning, in particular to a fast explainability method based on multi-level caching. BACKGROUND

[0002] With the rapid development of the Internet, artificial intelligence and big data technology have driven the booming development of a recommendation system. Model generation of the recommendation system needs to give an explanation, that is, 1) explainability of a machine learning model essence and post-explainability; 2) explainability of a specific machine learning model and explainability irrelevant to a machine learning model; and 3) local explainability and global explainability. SUMMARY

[0003] The application aims at the slow process of generating an explanation result in the prior art, and proposes a fast explainability method based on multi-level caching, which is faster than the traditional method of starting an explanation response every time data is transmitted, can be applied to a recommendation model developer and an actual recommendation system scene, and can inform a model modeling personnel or a user of a nature reason of recommended items.

[0004] The application is implemented by the following technical scheme:

[0005] The application relates to a fast explainability method based on multi-level caching, which is used for fast reading by locally caching historical data explainability reports in a memory space in a same process and by caching the historical data explainability reports in a distributed cache, and is transmitted in a zero-copy mode after local cache and distributed cache are searched by a unique identifier and fail in turn, so that I / O copy operations between a kernel buffer and a user process buffer and CPU overhead between a user process address space and a kernel address space due to context switching are reduced.

[0006] The zero-copy mode refers to that, when a computer performs an operation, the CPU does not need to copy data from one memory region to another memory region, so that context switching and copy time of the CPU can be reduced. The zero-copy mode functions to reduce data copy times and system calls and realizes zero participation of the CPU in the process of transferring a data report from a network device to a user program space, and completely eliminates the load of the CPU in this respect. The most technologies used for realizing the zero-copy mode are a DMA data transmission technology and a memory region mapping technology. BRIEF DESCRIPTION OF DRAWINGS

[0007] Figure 1 The application is a flowchart. DETAILED DESCRIPTION

[0008] As Figure 1As shown, the embodiment relates to a multi-level cache-based fast explainability method, which comprises the following steps:

[0009] Step 1) An Internet client inputs data features to be explained and actual data to be explained, and processes the input into a unique identifier.

[0010] The unique identifier includes hashcode, uuid, snowflake algorithm generated id, etc.

[0011] Step 2) Send the input unique identifier to the local cache and query.

[0012] Step 3) When the unique identifier hits the explainability report data, the result report is directly returned to the client, the explainability report is directly generated and displayed to the client, and the direct response is directly returned to the client. Step 7) is turned to; otherwise, the input unique identifier is sent to the distributed cache and queried, and step 4) is turned to.

[0013] Step 4) When the unique identifier hits the explainability report data, the result report is directly returned to the client, the explainability report is directly generated and displayed to the client, and the direct response is directly returned to the client. Step 7) is turned to; otherwise, step 5) is turned to.

[0014] Step 5) Query the explainability report data of the unique identifier through the database storage service, and when the query hits, directly return the explainability report to the client, directly generate and display the explainability report to the client, and directly respond to step 7) is turned to; otherwise, step 6) is turned to.

[0015] Step 6) After the explainability report is generated by the explainability report program, the report is directly output to the client by the zero-copy method, and the distributed cache and the database storage are notified and step 7) is turned to.

[0016] The explainability report program refers to the reason for the model modeling personnel to explain the model to make a recommended result or the reason for the user to explain to give a recommended list (for example, your friend also purchases a certain commodity, your friend also likes this video)

[0017] The zero-copy (Zero-copy) method refers to: when the computer performs an operation, the CPU does not need to copy the data from one memory area to another memory area, so as to reduce the context switching and the copying time of the CPU. Its role is to reduce the number of data copying times, reduce system calls, realize zero participation of the CPU, and completely eliminate the load of the CPU in this respect. The most technology used to realize zero-copy is DMA data transmission technology and memory area mapping technology.

[0018] Step 7) The explanatory report is presented by the client in the form of page rendering, text display, pictures, voice, etc.

[0019] The above specific embodiments can be adjusted in different ways by those skilled in the art without departing from the principles and purposes of the present application. The protection scope of the present application is subject to the claims and is not limited by the above specific embodiments. Each implementation within the scope is subject to the constraints of the present application.

Claims

1. A fast explainability method based on multi-level cache, characterized in that, The historical data explanatory report is cached in the memory space in the same process through local caching and is cached in the distributed cache for fast reading, and is transmitted in a zero-copy mode after the local cache and the distributed cache are searched in turn through the unique identifier, thereby reducing repeated I / O copy operations between the kernel buffer and the user process buffer and CPU overhead caused by context switching between the user process address space and the kernel address space. The zero-copy mode refers to that, during computer execution, the CPU does not need to copy data from one memory region to another memory region, thereby reducing context switching and CPU copy time, and its role is to reduce data copy times and system calls during data packet transmission from a network device to a user program space, to realize zero participation of the CPU, completely eliminate the load of the CPU in this respect, and realize the zero-copy technology of DMA data transmission technology and memory region mapping technology.

2. The multi-level cache based fast explainability method according to claim 1, characterized in that, in particular The method comprises the following steps: Step 1) an Internet client inputs data characteristics to be explained and actual data to be explained, and processes the input into a unique identifier; The unique identifier comprises a hash code, a UUID, and an id generated by a snowflake algorithm; Step 2) the input unique identifier is sent to a local cache and is queried; Step 3) when the explanatory report data of the unique identifier hits, a result report is directly returned to the client, the explanatory report is directly generated and displayed to the client, a direct response is given, and the process proceeds to step 7); otherwise, the input unique identifier is sent to a distributed cache and is queried, and the process proceeds to step 4); Step 4) when the explanatory report data of the unique identifier hits, a result report is directly returned to the client, the explanatory report is directly generated and displayed to the client, a direct response is given, and the process proceeds to step 7); otherwise, the process proceeds to step 5); Step 5) the explanatory report data of the unique identifier is queried through a database storage service, when the query hits, the explanatory report is directly returned to the client, the explanatory report is directly generated and displayed to the client, a direct response is given, and the process proceeds to step 7); otherwise, the process proceeds to step 6); Step 6) after the interpretable report is generated by an interpretable report program, the report is directly output to the client in a zero-copy mode, and the distributed cache and the database storage are notified and the process proceeds to step 7); Step 7) the explanatory report is displayed to the client in a page rendering, text display, picture, and voice mode.

3. The multi-level cache based fast explainability method of claim 2, wherein, The interpretable report program refers to a program for explaining reasons for a recommended result of a model to a model modeling personnel or explaining reasons for a recommended list to a user.

Citation Information

Patent Citations

  • Network data packet capturing method and system of embedded system and storage medium

    CN111124948A

  • File movement method supporting data zero-copytechnique

    KR100758272B1