Method, device, apparatus and storage medium for data processing
By encrypting the data during the interaction between the user terminal and the cloud, the security risk of plain text data storage in the cloud knowledge base is resolved, and the secure storage and retrieval of data is achieved.
Patent Information
- Application Number
- CN202411659318.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-11-19
AI Technical Summary
During the data interaction between the user terminal and the cloud, the data in the knowledge base created by the user in the cloud is stored in plain text, which poses a risk of leakage and affects data security.
By using the target key to encrypt the initial prompt word information in the knowledge service, retrieving the matching encrypted knowledge fragments from multiple encrypted knowledge fragments, and using the machine learning model to obtain the response, the ciphertext retrieval and storage of the knowledge fragments are realized.
It reduces the risk of leakage of plaintext data resources during storage and transmission, and improves data security.
Smart Images

Figure CN119622760B_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, apparatuses, devices, and storage media for data processing. Background Art
[0002] As data security becomes increasingly important, improving it has become a pressing issue. In particular, ensuring the security of data generated by user terminals during data interaction with the cloud is a pressing issue. Summary of the Invention
[0003] In a first aspect of the present disclosure, a data processing method is provided. The method includes: obtaining initial prompt word information generated based on user input at a client; encrypting the initial prompt word information using a target key to obtain encrypted prompt word information; retrieving at least one target encrypted knowledge fragment that matches the encrypted prompt word information from a plurality of encrypted knowledge fragments, the plurality of encrypted knowledge fragments being encrypted using the target key; and obtaining a response to the user input using a machine learning model based on the at least one target encrypted knowledge fragment.
[0004] In a second aspect of the present disclosure, a data processing method is provided. The method is applied to a client and includes: presenting a key configuration interface; configuring a target key based on a target operation on the key configuration interface; and sending the target key to a key management service in response to the key management service passing verification.
[0005] In a third aspect of the present disclosure, a data processing method is provided. The method is applied to a key management service and includes: receiving a target key from a client; receiving a key request for the target key from a knowledge service; and sending the target key to the knowledge service.
[0006] In a fourth aspect of the present disclosure, a data processing device is provided. The device includes: a prompt word information acquisition module configured to acquire initial prompt word information generated based on user input at a client; a prompt word information encryption module configured to encrypt the initial prompt word information using a target key to obtain encrypted prompt word information; a retrieval module configured to retrieve at least one target encrypted knowledge fragment that matches the encrypted prompt word information from a plurality of encrypted knowledge fragments, the plurality of encrypted knowledge fragments being encrypted using the target key; and a reply acquisition module configured to acquire a reply to the user input based on the at least one target encrypted knowledge fragment and using a machine learning model.
[0007] In a fifth aspect of the present disclosure, a data processing device is provided. The device is applied to a client and includes: a configuration interface presentation module configured to present a key configuration interface; a key configuration module configured to configure a target key based on a target operation on the key configuration interface; and a first key sending module configured to send the target key to a key management service in response to the key management service passing verification.
[0008] In a sixth aspect of the present disclosure, a data processing device is provided. The device is applied to a key management service and includes: a key receiving module configured to receive a target key from a client; a request receiving module configured to receive a key request for the target key from a knowledge service; and a second key sending module configured to send the target key to the knowledge service.
[0009] In a seventh aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first, second, or third aspect.
[0010] In an eighth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect, the second aspect, or the third aspect.
[0011] It should be understood that the content described in this section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0013] Figure 1 A schematic diagram illustrating an example environment in which embodiments of the present disclosure can be implemented;
[0014] Figure 2 A schematic diagram illustrating an example interactive process of data processing according to some embodiments of the present disclosure;
[0015] Figure 3 A schematic diagram illustrating an example interaction scenario of data processing according to some embodiments of the present disclosure;
[0016] Figure 4A flowchart showing a process of data processing applied to knowledge services according to some embodiments of the present disclosure is shown;
[0017] Figure 5 A flowchart showing a process of data processing applied to a client according to some embodiments of the present disclosure is shown;
[0018] Figure 6 A flowchart illustrating a process of data processing applied to a key management service according to some embodiments of the present disclosure is shown;
[0019] Figure 7 A block diagram of an apparatus for data processing applied to knowledge services according to some embodiments of the present disclosure is shown;
[0020] Figure 8 A block diagram showing an apparatus for data processing applied to a client according to some embodiments of the present disclosure is shown;
[0021] Figure 9 A block diagram showing an apparatus for data processing applied to a key management service according to some embodiments of the present disclosure; and
[0022] Figure 10 A block diagram of a device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0023] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0024] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below.
[0025] Herein, unless explicitly stated otherwise, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0026] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0027] It is understandable that before using the technical solutions disclosed in each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and authorization should be obtained from relevant users in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.
[0028] For example, in response to receiving an active request from a user, a prompt word information is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to the electronic device, application, server or storage medium and other software or hardware that executes the operation of the technical solution of the present disclosure based on the prompt word information.
[0029] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, the prompt word information may be sent to the relevant user in the form of a pop-up window, in which the prompt word information may be presented in text form. In addition, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.
[0030] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0031] As briefly described above, in order to better utilize services such as large models on the cloud, users need to transfer some of their data to the cloud to provide retrieval enhancements for services such as machine learning models. Currently, after users upload local documents to the cloud from the client, the cloud service vectorizes the documents and stores the vectorized results in the cloud database. Once storage is complete, users will see a status synchronization result on the client indicating that the knowledge base has been successfully created. Users can then initiate end-to-cloud interaction based on a custom knowledge base on the client, search the database based on user requests such as keywords, and then input the search results and user requests into the large model service request for refinement, and finally return the results to the client. However, in the above process, the data in the knowledge base created by users in the cloud is stored in plain text, which poses a risk of leakage.
[0032] According to an embodiment of the present disclosure, an improved data processing solution is provided. In this solution, a knowledge service first obtains initial prompt word information generated based on user input from a client and encrypts the initial prompt word information using a target key to obtain encrypted prompt word information. The knowledge service then retrieves at least one target encrypted knowledge fragment that matches the encrypted prompt word information from multiple encrypted knowledge fragments, each encrypted using the target key. Based on the at least one target encrypted knowledge fragment, the knowledge service utilizes a machine learning model to obtain a response to the user input.
[0033] Through the above process, the knowledge service can encrypt knowledge fragments before storage and use the same key to encrypt the initial prompt word information, enabling ciphertext retrieval of knowledge fragments. These improvements can reduce the risk of leakage of plaintext data resources during storage and transmission, thereby solving data security issues.
[0034] Figure 1 1 shows a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, example environment 100 may include client 120 of user 140 and cloud environment 101 .
[0035] like Figure 1 As shown, a trusted execution environment 115 can be deployed in the cloud environment 101. Trusted Execution Environment (TEE) is a hardware-based security technology that builds a secure computing environment isolated from the outside by dividing the secure part and the non-secure part. The secure computing environment can ensure the confidentiality and integrity of the data and code loaded inside the trusted execution environment 115. The trusted execution environment 115 is isolated from the ordinary environment, has a higher security level, and is suitable for processing sensitive data. Private Cloud Computing (PCC) can run in the trusted execution environment 115. Private Cloud Computing is a cloud-based secure computing framework based on TEE, which aims to build a set of secure computing services that users trust, provide users with a safe and reliable cloud operating environment, and ensure the security of the entire end-cloud collaboration link.
[0036] The knowledge service 112 can be deployed in the trusted execution environment 115. The knowledge service can be a Retrieval-Augmented Generation (RAG) service. RAG can retrieve relevant information based on a large-scale knowledge source (such as documents, knowledge bases, etc.), and then use the retrieved relevant information as context to assist the language model in text generation. Secure RAG is a RAG security enhancement service running in the PCC. Secure RAG can support encrypted storage of plaintext vectors in the knowledge source and retrieval in ciphertext vectors to avoid knowledge leakage caused by plaintext storage.
[0037] The key management service can be deployed in the trusted execution environment 115. Using the key management service, the key of the user 140 obtained from the client 120 can be stored in the key management service 114. The Trusted Key Service (TKS) is a secure key service running in the PCC, designed to provide users with hardware-protected key management and proxy services.
[0038] The knowledge service 112 can communicate with the key management service 114. For example, the knowledge service 112 can send a key request to the key management service 114 to obtain a target key to encrypt or decrypt knowledge.
[0039] In some embodiments, the trusted execution environment 115 can communicate with the client 120 to enable data access and analysis. The client 120 can be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio receiver, an e-book device, a gaming device, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the client 120 can also support any type of interface for the user (such as "wearable" circuitry, etc.).
[0040] The cloud environment 101 may include a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, and cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. The trusted execution environment 115 may be implemented using host devices in the cloud environment 101. For example, the host devices may include computing systems / servers such as mainframes, edge computing nodes, computing devices in the cloud environment, and the like. The host devices may provide backend services for data management for the client 120.
[0041] A communication connection may be established between the cloud environment 101 and the client 120. The communication connection may be established via a wired or wireless connection. The communication connection may include, but is not limited to, a Bluetooth connection, a mobile network connection, a Universal Serial Bus connection, a Wi-Fi connection, and the like, and the embodiments of the present disclosure are not limited in this respect.
[0042] It should be understood that the structure and function of each element in environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure. In other words, the structure, function, number, and linkage relationship of the elements in environment 100 may be varied according to actual needs. The present disclosure is not limited in this respect.
[0043] The following will refer to Figure 2 and Figure 3 Some example embodiments of the present disclosure are described in detail with reference to examples.
[0044] Figure 2 An example interactive process 200 of data processing according to some embodiments of the present disclosure is shown. The interactive process 200 includes a client 120, a knowledge service 112, and a key management service 114. Figure 3 An example interaction scenario 300 of data processing according to some embodiments of the present disclosure is shown. The interaction scenario 300 includes a client 120, a knowledge service 112, a key management service 114, a database 305, and a machine learning model 310. For ease of discussion, reference will be made to Figure 1 The interaction process 200 and the interaction scenario 310 are described based on the environment 100. It is understandable that the knowledge service 112 is only exemplary, and the methods and steps implemented at the knowledge service 112 described herein can also be applied to other services or functions.
[0045] like Figure 3As shown, at the client 120, corresponding keys can be set for each user. In some embodiments, the keys can be set based on user input. Alternatively or additionally, the keys can be set in a randomly generated manner. In the case of setting the keys based on user input, as shown in FIG. Figure 2 As shown, the client 120 may present (203) a key configuration interface and configure (206) a target key based on a target operation on the key configuration interface. For example, the key configuration interface may include a key input box, and the client 120 may configure the target key of the user 140 based on the input operation in the input box. The target key may be used for knowledge management related to the client 120. For example, the target key may be used to encrypt or decrypt data uploaded by the user 140 at the client 120, as described below.
[0046] In some embodiments, client 120 may authenticate key management service 114. For example, key management service 114 may send an attestation report to client 120. The attestation report may indicate the trustworthiness of the environment in which the target key is stored. Client 120 may receive the attestation report and authenticate key management service 114 based on the attestation report. For example, if the attestation report indicates that the execution environment of key management service 114 is trustworthy, client 120 may determine that the key management service 114 is authenticated and send the key to the key management service 114. The authentication method described herein is merely exemplary and not intended to be limiting, and embodiments of the present disclosure are not limited in this respect.
[0047] If key management service 114 passes verification, client 120 may send (209) the target key to key management service 114. Accordingly, key management service 114 may receive (212) the target key from client 120. Key management service 114 may store and manage the received key. In some embodiments, key management service 114 may be deployed in a trusted execution environment 115 to improve the security of key storage and management.
[0048] After the key for knowledge management is configured, the user 140 can interact with the knowledge service 112 through the client 120. Figure 2As shown, in some embodiments, the client 120 can receive (215) a user selection for a data object. For example, the client 120 can present a configuration interface for the data object, and can receive the user's selection of the data object based on the user's selection, input, paste, and other operations on the interface. The data object may include various types of objects such as documents and data sets. The data object selected by the user may be a data object local to the client, or a data object stored remotely or online. The data object selected by the user can be used to create a knowledge fragment to provide the cloud service required by the user. In some embodiments, in response to the user's selection, the client 120 can send (218) indication information for the data object to the knowledge service 112. The indication information may include any information that can access and obtain the data object. For example, if the data object selected by the user is an online document, the indication information may be a link to the online document, a storage location, etc. For another example, if the data object selected by the user is a document local to the client, the indication information may include the document itself.
[0049] In some embodiments, in response to the sending of the instruction information, the client 120 may present a reminder that the knowledge fragment created based on the data object will be encrypted. The reminder may remind the user that the selected knowledge content will be stored and used in an encrypted form.
[0050] Accordingly, the knowledge service 112 may receive (221) indication information for the data object to obtain the data object selected by the user. Next, the knowledge service 112 may generate a knowledge fragment based on the obtained data object. In some embodiments, the knowledge service 112 may obtain at least one knowledge fragment for the data object by performing vectorization processing on at least one portion of the data object. For example, in the case where the data object is a document, the knowledge service may perform vectorization processing on each paragraph or each sentence of the document to obtain a plaintext vector for the paragraph or sentence as a knowledge fragment for the data object.
[0051] In some embodiments, the knowledge service 112 may encrypt the knowledge fragment using a key. In some embodiments, the key may be randomly generated by the knowledge service 112. In some embodiments, the key may be hosted by the user 140 at the key management service 114. For example, the knowledge service 112 may send (230) a key request to the key management service 114. In some embodiments, the key request may indicate a purpose for the key, i.e., indicate that the requested key is to be used for knowledge fragment generation. The key management service 114 may receive (233) the key request and send (236) a target key to the knowledge service 112.
[0052] In some embodiments, after receiving (239) the target key, the knowledge service 112 may encrypt (242) the at least one knowledge fragment using the target key to obtain at least one encrypted knowledge fragment. The knowledge service 112 may use the at least one encrypted knowledge fragment as at least a portion of a plurality of encrypted knowledge fragments to construct a plurality of encrypted knowledge fragments for the user.
[0053] In some embodiments, as Figure 3 As shown, knowledge service 112 can store encrypted knowledge fragments in database 305. For example, the encrypted knowledge fragments can be stored in an encrypted knowledge base. Database 305 can be a database in a trusted execution environment or a database in a common cloud environment. Database 305 can store multiple encrypted knowledge fragments for user A, user B, and user C, respectively. It is understood that the knowledge fragments stored in database 305 for different users can be encrypted, partially encrypted, or unencrypted.
[0054] In some embodiments, the client 120 may send (245) to the knowledge service 112 initial prompt word information generated based on the user input at the client 120. The initial prompt word information represents unencrypted, plaintext prompt word information. For example, the initial prompt word information may be an inference request input by the user 140. For another example, the initial prompt word information may be generated based on the inference request and related context information. In some embodiments, the indication information for the data object described above may be issued by the second user, and the user input may be issued by the first user. The second user may be the first user or a user related to the first user. For example, the second user may be the creator of the knowledge base, and the first user may be a user authorized by the second user to use the knowledge base. After receiving (248) the initial prompt word information, the knowledge service 112 may encrypt the initial prompt word information using the target key for encrypting the knowledge fragment to obtain encrypted prompt word information. The encrypted prompt word information may enable retrieval of the encrypted knowledge fragment.
[0055] In some embodiments, the target key used for encryption may come from the key management service 114. Figure 2As shown, in response to obtaining the initial prompt word information, the knowledge service 112 can send (251) a key request for the target key to the key management service 114. In some embodiments, the key request can indicate the purpose of the key, that is, indicate that the requested key will be used to encrypt the prompt word information. The key management service 114 can receive (254) the key request and send (257) the target key to the knowledge service 112. In some embodiments, after receiving (260) the target key, the knowledge service 112 uses the target key to encrypt (263) the initial prompt word information to obtain encrypted prompt word information. Specifically, the knowledge service 112 can perform vectorization processing on the initial prompt word information to obtain vectorized prompt word information, and encrypt the vectorized prompt word information using the target key to obtain encrypted prompt word information.
[0056] In some embodiments, the knowledge service 112 retrieves (266) at least one target encrypted knowledge fragment that matches the encrypted prompt word information from the plurality of encrypted knowledge fragments, and obtains a response to the user input based on the at least one target encrypted knowledge fragment using a machine learning model. For example, the encrypted knowledge fragment can be retrieved from an encrypted knowledge base. In some embodiments, Figure 3 As shown, knowledge service 112 sends the encrypted prompt word information to database 305, searching for at least one target encrypted knowledge segment that matches the encrypted prompt word information from the multiple encrypted knowledge segments stored in database 305. It is understood that since the encrypted prompt word information and the encrypted knowledge segment are encrypted using the same key, they can be considered to undergo the same transformation in vector space compared to the unencrypted prompt word information and the unencrypted knowledge segment. In this case, the impact of encryption on retrieval accuracy is minimal. In other words, such encrypted retrieval does not affect the effectiveness of knowledge retrieval.
[0057] After the retrieval is completed, the knowledge service 112 obtains a response to the user input based on the at least one target encrypted knowledge fragment retrieved. In some embodiments, in response to retrieving the at least one target encrypted knowledge fragment, the knowledge service 112 may send (269) a key request for a target key to the key management service 114. In some embodiments, the key request may indicate the purpose of the key, that is, indicate that the requested key will be used to decrypt the encrypted knowledge fragment. The key management service 114 may receive (272) the key request and send (275) the target key to the knowledge service 112. In some embodiments, after receiving (278) the target key, the knowledge service 112 may use the received target key to decrypt (281) the at least one target encrypted knowledge fragment to obtain the at least one target knowledge fragment, and obtain (284) a response to the user input based on the at least one target knowledge fragment and the initial prompt word information.
[0058] For example, reference Figure 3 , the knowledge service 112 may provide the initial prompt word information and at least one target knowledge fragment to the machine learning model 310 deployed in the trusted execution environment 115 to obtain the output of the machine learning model 310. In one example, the machine learning model 310 may be a large language model (LLM). The knowledge service 112 may determine a response to the user input based on the output of the machine learning model and send (287) the response to the client 120. For example, the knowledge service 112 may provide the initial prompt word information and at least one target knowledge fragment to the LLM and determine a response to the user input based on the output of the LLM. The client 120 may receive (290) the response and present it to the client 140. In some embodiments, after the response to the user input has been determined, the knowledge service 112 may delete the target key and the retrieved at least one target knowledge fragment.
[0059] In some embodiments, the target key can be derived based on the configuration of the target user who issued the user input on client 120. That is, the target user can configure the key on client 120 and have it hosted by key management service 114. When processing the knowledge corresponding to the target user, knowledge service 114 requests the target key from key management service 114. Because the data in database 305 is stored in encrypted form and the target key is in the hands of the target user, data leakage of the target user can be prevented.
[0060] exist Figure 2 In the example shown in FIG2 , the knowledge service 112 sends a key request to the key management service 114 three times before encrypting (242) the knowledge fragment, encrypting (263) the initial prompt word information, and decrypting (281) the target encrypted knowledge fragment to obtain the target key. In this way, the knowledge service 112 can delete the target key in a timely manner after each encryption or decryption operation is completed to reduce the risk of the target key being leaked. It is understood that the knowledge service 112 can also send a key request to the key management service 114 only once and, after receiving the target key, store the target key for subsequent encryption or decryption.
[0061] In some embodiments, the key request sent by the knowledge service 112 to the key management service 114 may include authorization information for the target key. The authorization information is obtained by the knowledge service 112 from the client 120. The key management service 114 may send the target key to the knowledge service 112 based on the verification of the authorization information in the key request.
[0062] In some embodiments, the knowledge service 112 may be deployed in a trusted execution environment 115. Alternatively, the knowledge service 112 may be deployed in a common execution environment. In the case where the knowledge service 112 is deployed in a trusted execution environment, the key request may include a security report. The security report indicates the trustworthiness of the environment in which the knowledge service 112 is deployed.
[0063] Despite Figure 3 In the example of FIG, the knowledge service 112, the key management service 114 and the model 310 are shown as being in the same trusted execution environment 115, but it should be understood that Figure 3 The illustrated scenario is merely exemplary and not intended to be limiting. Knowledge service 112, key management service 114, model 310, and database 305 may be deployed in the same trusted execution environment, or in separate trusted execution environments. Alternatively, a portion of knowledge service 112, key management service 114, model 310, and database 305 may be deployed in the same trusted execution environment. For example, knowledge service 112 and model 310 may be deployed in the same trusted execution environment, while key management service 114 and database 305 may be deployed in the same or separate trusted execution environments.
[0064] The disclosed embodiments can encrypt knowledge fragments before storage and encrypt the initial prompt word information using the same key, enabling ciphertext retrieval of knowledge fragments. These improvements can reduce the risk of leakage of plaintext data resources during storage and transmission, thereby addressing data security issues.
[0065] Example Process
[0066] Figure 4 FIG. 4 is a flow chart showing a process 400 for data processing according to some embodiments of the present disclosure. The process 400 may be applied to the knowledge service 112. Figure 1 Process 400 is described.
[0067] In block 410 , the knowledge service 112 obtains initial prompt word information generated based on user input at the client 120 .
[0068] At block 420 , the knowledge service 112 encrypts the initial cue word information using the target key to obtain encrypted cue word information.
[0069] At block 430 , the knowledge service 112 retrieves at least one target encrypted knowledge segment that matches the encrypted hint word information from the plurality of encrypted knowledge segments, the plurality of encrypted knowledge segments being encrypted using the target key.
[0070] At block 440 , the knowledge service 112 encrypts the knowledge fragment based on the at least one objective, utilizes the machine learning model, and obtains a response to the user input.
[0071] In some embodiments, the knowledge service 112 may decrypt at least one target encrypted knowledge fragment using a target key to obtain at least one target knowledge fragment; and obtain a response to the user input based on the at least one target knowledge fragment and the initial prompt word information.
[0072] In some embodiments, the user input may be issued by a first user, and the knowledge service 112 may receive indication information from a second user regarding a data object, the data object being used for knowledge fragment creation; obtaining at least one knowledge fragment for the data object by performing vectorization processing on at least one portion of the data object; and encrypting at least one knowledge fragment using a target key to obtain at least one encrypted knowledge fragment as at least a part of multiple encrypted knowledge fragments.
[0073] In some embodiments, the knowledge service 112 may send a key request for a target key to the key management service in response to obtaining the initial prompt word information; and receive the target key from the key management service.
[0074] In some embodiments, the knowledge service 112 may, in response to retrieving at least one target encrypted knowledge fragment, send a key request for a target key to the key management service; and
[0075] Receive the target key from the key management service.
[0076] In some embodiments, the target key is derived based on a configuration at the client by the target user issuing the user input.
[0077] In some embodiments, the knowledge service 112 may perform vectorization processing on the initial prompt word information to obtain vectorized prompt word information; and encrypt the vectorized prompt word information using a target key to obtain encrypted prompt word information.
[0078] In some embodiments, the knowledge service 112 can provide initial prompt word information and at least one target knowledge fragment to a machine learning model deployed in a trusted execution environment to obtain the output of the machine learning model; and determine a response to the user input based on the output of the machine learning model.
[0079] In some embodiments, process 400 is performed in a trusted execution environment.
[0080] Figure 5 FIG. 5 is a flow chart showing a process 500 for data processing according to some embodiments of the present disclosure. The process 500 may be applied to the client 120. Figure 1 Process 500 is described.
[0081] At block 510 , the client 120 presents a key configuration interface.
[0082] At block 520 , the client 120 configures a target key based on the target operation on the key configuration interface.
[0083] At block 530 , the client 120 sends the target key to the key management service in response to the key management service being authenticated.
[0084] In some embodiments, the client 120 may receive a user selection of a data object for knowledge fragment creation; in response to the user selection, send indication information for the data object to the knowledge service; and present a reminder that the knowledge fragment created based on the data object will be encrypted.
[0085] In some embodiments, client 120 may receive an attestation report from the key management service, the attestation report indicating the trustworthiness of the environment in which the target key is stored; and authenticate the key management service based on the attestation report.
[0086] Figure 6 FIG. 6 is a flow chart showing a process 600 for data processing according to some embodiments of the present disclosure. The process 600 may be applied to the key management service 114. Figure 1 Process 600 is described.
[0087] At block 610 , the key management service 114 receives a target key from a client.
[0088] At block 620 , the key management service 114 receives a key request for a target key from the knowledge service.
[0089] At block 630 , the key management service 114 sends the target key to the knowledge service.
[0090] In some embodiments, the key management service 114 may send an attestation report to the client indicating the trustworthiness of the environment in which the target key is stored.
[0091] Example devices and equipment
[0092] Figure 7 : A schematic structural block diagram of an apparatus 700 for data processing according to some embodiments of the present disclosure is shown. The apparatus 700 can be applied to the knowledge service 112. Each module / component in the apparatus 700 can be implemented by hardware, software, firmware, or any combination thereof.
[0093] like Figure 7As shown, the apparatus 700 includes a prompt word information acquisition module 710 configured to acquire initial prompt word information generated based on user input at a client. The apparatus 700 also includes a prompt word information encryption module 720 configured to encrypt the initial prompt word information using a target key to obtain encrypted prompt word information. The apparatus 700 also includes a retrieval module 730 configured to retrieve at least one target encrypted knowledge segment that matches the encrypted prompt word information from a plurality of encrypted knowledge segments, wherein the plurality of encrypted knowledge segments are encrypted using the target key. The apparatus 700 also includes a reply acquisition module 740 configured to acquire a reply to the user input based on the at least one target encrypted knowledge segment using a machine learning model.
[0094] In some embodiments, the reply acquisition module 740 is further configured to decrypt at least one target encrypted knowledge fragment using a target key to obtain at least one target knowledge fragment; and obtain a reply to the user input based on at least one target knowledge fragment and initial prompt word information.
[0095] In some embodiments, the user input is issued by a first user, and the device 700 also includes a knowledge fragment encryption module, which is configured to receive indication information from a second user regarding a data object, the data object being used for knowledge fragment creation; obtain at least one knowledge fragment for the data object by performing vectorization processing on at least one part of the data object; and encrypt at least one knowledge fragment using a target key to obtain at least one encrypted knowledge fragment as at least a part of multiple encrypted knowledge fragments.
[0096] In some embodiments, the apparatus 700 further includes a target key acquisition module configured to, in response to acquiring the initial prompt word information, send a key request for a target key to the key management service; and receive the target key from the key management service.
[0097] In some embodiments, the target key acquisition module is further configured to, in response to retrieving the at least one target cryptographic knowledge fragment, send a key request for the target key to the key management service; and receive the target key from the key management service.
[0098] In some embodiments, the target key is derived based on a configuration at the client by the target user issuing the user input.
[0099] In some embodiments, the prompt word information encryption module 720 is further configured to perform vectorization processing on the initial prompt word information to obtain vectorized prompt word information; and encrypt the vectorized prompt word information using a target key to obtain encrypted prompt word information.
[0100] In some embodiments, the reply acquisition module 740 is also configured to provide initial prompt word information and at least one target knowledge fragment to a machine learning model deployed in a trusted execution environment to obtain the output of the machine learning model; and determine a reply to the user input based on the output of the machine learning model.
[0101] In some embodiments, apparatus 700 executes in a trusted execution environment.
[0102] Figure 8 1 shows a schematic structural block diagram of an apparatus 800 for data processing according to certain embodiments of the present disclosure. The apparatus 800 may be applied to the client 120. Each module / component in the apparatus 800 may be implemented by hardware, software, firmware, or any combination thereof.
[0103] like Figure 8 As shown, the apparatus 800 includes a configuration interface presentation module 810 configured to present a key configuration interface. The apparatus 800 also includes a key configuration module 820 configured to configure a target key based on a target operation on the key configuration interface. The apparatus 800 also includes a first key sending module 830 configured to send the target key to the key management service in response to the key management service passing the authentication.
[0104] In some embodiments, the device 800 also includes a user selection receiving module, which is configured to receive a user selection for a data object, the data object being used for knowledge fragment creation; in response to the user selection, send indication information for the data object to the knowledge service; and present a reminder message that the knowledge fragment created based on the data object will be encrypted.
[0105] In some embodiments, the apparatus 800 further comprises a key request verification module configured to receive an attestation report from a key management service, the attestation report indicating the trustworthiness of an environment storing the target key; and verify the key management service based on the attestation report.
[0106] Figure 9 FIG2 shows a schematic structural block diagram of an apparatus 900 for data processing according to certain embodiments of the present disclosure. The apparatus 900 may be applied to the key management service 114. Each module / component in the apparatus 900 may be implemented by hardware, software, firmware, or any combination thereof.
[0107] like Figure 9 As shown, the apparatus 900 includes a key receiving module 910 configured to receive a target key from a client. The apparatus 900 also includes a request receiving module 920 configured to receive a key request for the target key from a knowledge service. The apparatus 900 also includes a second key sending module 930 configured to send the target key to the knowledge service.
[0108] In some embodiments, the apparatus 900 further includes a verification report sending module configured to send a certification report to the client, where the certification report indicates the credibility of the environment in which the target key is stored.
[0109] The units and / or modules included in the apparatus 700, apparatus 800, and apparatus 900 may be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules may be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units and / or modules in the apparatus 700 may be implemented at least in part by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0110] Figure 10 1 shows a block diagram of an electronic device 1000 in which one or more embodiments of the present disclosure may be implemented. Figure 10 The illustrated electronic device 1000 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein.
[0111] like Figure 10 As shown, electronic device 1000 is in the form of a general electronic device. Components of electronic device 1000 may include, but are not limited to, one or more processors or processing units 1010, memory 1020, storage device 1030, one or more communication units 1040, one or more input devices 1050, and one or more output devices 1060. Processing unit 1010 may be a real or virtual processor and is capable of performing various processes according to a program stored in memory 1020. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of electronic device 1000.
[0112] The electronic device 1000 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 1000, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 1020 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 1030 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and / or data and can be accessed within the electronic device 1000.
[0113] The electronic device 1000 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 10 As shown in FIG, a magnetic disk drive for reading from or writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. Memory 1020 may include a computer program product 1025 having one or more program modules configured to perform the various methods or actions of various embodiments of the present disclosure.
[0114] The communication unit 1040 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 1000 can be implemented as a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the electronic device 1000 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or other network nodes.
[0115] Input device 1050 may be one or more input devices, such as a mouse, keyboard, or trackball. Output device 1060 may be one or more output devices, such as a display, a speaker, or a printer. Electronic device 1000 may also communicate with one or more external devices (not shown) via communication unit 1040 as needed, such as storage devices, display devices, or the like, with one or more devices that allow a user to interact with electronic device 1000, or with any device that allows electronic device 1000 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0116] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0117] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0118] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0119] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0120] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0121] While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, not exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A data processing method, comprising: Obtaining initial prompt word information generated based on user input at the client; encrypting the initial prompt word information using a target key to obtain encrypted prompt word information, wherein the target key is obtained based on a configuration at the client and the target key is sent from the client to a key management service; ciphertextally retrieving at least one target encrypted knowledge segment that matches the encrypted prompt word information from a plurality of encrypted knowledge segments, the plurality of encrypted knowledge segments being encrypted using the target key at the key management service; as well as Based on the at least one target encrypted knowledge fragment, a response to the user input is obtained using a machine learning model.
2. The method according to claim 1, wherein obtaining a reply to the user input comprises: decrypting the at least one target encrypted knowledge fragment using the target key to obtain at least one target knowledge fragment; as well as The reply to the user input is obtained based on the at least one target knowledge segment and the initial prompt word information.
3. The method of claim 1 , wherein the user input is issued by a first user, and the plurality of encrypted knowledge fragments are obtained by: receiving instruction information from a second user regarding a data object, wherein the data object is used for creating a knowledge fragment; Obtaining at least one knowledge fragment for the data object by performing vectorization processing on at least a portion of the data object; and The at least one knowledge fragment is encrypted using the target key to obtain at least one encrypted knowledge fragment as at least a part of the multiple encrypted knowledge fragments.
4. The method according to claim 1, wherein the target key is obtained by: In response to obtaining the initial prompt word information, sending a key request for the target key to a key management service; and The target key is received from the key management service.
5. The method according to claim 2, wherein the target key is obtained by: In response to retrieving the at least one target cryptographic knowledge piece, sending a key request for the target key to a key management service; and The target key is received from the key management service. The method according to claim 1 , wherein the target key is obtained based on a configuration at the client by a target user who issues the user input.
7. The method according to claim 1, wherein encrypting the initial prompt word information using a target key comprises: performing vectorization processing on the initial prompt word information to obtain vectorized prompt word information; as well as The vectorized prompt word information is encrypted using the target key to obtain the encrypted prompt word information.
8. The method according to claim 2, wherein obtaining the reply to the user input comprises: Providing the initial prompt word information and the at least one target knowledge segment to the machine learning model deployed in the trusted execution environment to obtain an output of the machine learning model; as well as The response to the user input is determined based on an output of the machine learning model.
9. The method of claim 1, wherein the method is performed in a trusted execution environment.
10. A data processing method, applied to a client and comprising: Presenting a key configuration interface on the client; Based on the target operation on the key configuration interface, configuring the target key in the client; In response to the key management service passing the authentication, sending the target key from the client to the key management service; receiving a user selection of a data object for knowledge fragment creation; In response to the user selection, sending indication information for the data object to the knowledge service; as well as Presenting a reminder that the knowledge fragment created based on the data object will be encrypted, The knowledge fragment is encrypted at the knowledge service by the target key received by the knowledge service from the key management service.
11. The method of claim 10, wherein the key management service is authenticated by: receiving an attestation report from the key management service, the attestation report indicating the trustworthiness of the environment in which the target key is stored; and The key management service is verified based on the attestation report.
12. A device for data processing, comprising: a prompt word information acquisition module configured to acquire initial prompt word information generated based on user input at the client; a prompt word information encryption module configured to encrypt the initial prompt word information using a target key to obtain encrypted prompt word information, wherein the target key is obtained based on a configuration at the client and the target key is sent from the client to a key management service; a retrieval module configured to encrypt and retrieve at least one target encrypted knowledge segment that matches the encrypted prompt word information from a plurality of encrypted knowledge segments, wherein the plurality of encrypted knowledge segments are encrypted using the target key at the key management service; as well as The reply acquisition module is configured to acquire a reply to the user input based on the at least one target encrypted knowledge fragment.
13. A device for data processing, the device being applied to a client and comprising: A configuration interface presenting module, configured to present a key configuration interface on the client; a key configuration module configured to configure a target key in the client based on a target operation on the key configuration interface; a first key sending module, configured to send the target key to the key management service in response to the key management service passing the verification; as well as A user selection receiving module configured to receive a user selection for a data object, the data object being used for knowledge fragment creation; In response to the user selection, sending indication information for the data object to the knowledge service; and presenting a reminder that the knowledge fragments created based on the data object will be encrypted, The knowledge fragment is encrypted at the knowledge service by the target key received by the knowledge service from the key management service.
14. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 11 when executed by the at least one processing unit.
15. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Large model reasoning method, device and equipment and storage medium
CN118035988A
Multi-party joint knowledge retrieval enhancement method, device and system, medium and equipment
CN118568243A
Method and device for key management, equipment and storage medium
CN118764213A