WO2024098550A1 - 数据中用户标识的加解密方法、系统及设备 - Google Patents

数据中用户标识的加解密方法、系统及设备 Download PDF

Info

Publication number
WO2024098550A1
WO2024098550A1 PCT/CN2023/071988 CN2023071988W WO2024098550A1 WO 2024098550 A1 WO2024098550 A1 WO 2024098550A1 CN 2023071988 W CN2023071988 W CN 2023071988W WO 2024098550 A1 WO2024098550 A1 WO 2024098550A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
user
data
identifier
key
Prior art date
Application number
PCT/CN2023/071988
Other languages
English (en)
French (fr)
Inventor
吕晓俞
Original Assignee
阿里巴巴(中国)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴(中国)有限公司 filed Critical 阿里巴巴(中国)有限公司
Publication of WO2024098550A1 publication Critical patent/WO2024098550A1/zh

Links

Definitions

  • the present application relates to the field of computer technology, and in particular to a method, system and device for encrypting and decrypting user identification in data.
  • the existing user identification encryption scheme has low security.
  • the present application provides a method, system and device for encrypting and decrypting user identifiers in data to improve security.
  • a method for encrypting a user identifier in data comprises:
  • An encrypted identifier corresponding to the user identifier is generated according to the reference information and the encrypted information.
  • a method for decrypting a user identifier in data comprises:
  • the encrypted information is decrypted using the key to obtain a user identifier corresponding to the encrypted identifier.
  • a data service system in another embodiment, includes:
  • Data provider which stores the data
  • a data processing subsystem having an open platform, wherein the open platform provides an API
  • the data user accesses the data processing subsystem through the API to obtain the data stored at the data provider through the data processing subsystem;
  • the data processing subsystem is used to obtain the target data to be sent to the data user and the information of the data user; determine the reference information and the service object identifier based on the information of the data user; determine the key according to the reference information and the information of the data user; use the key to encrypt the user identifier in the target data to obtain encrypted information; generate an encrypted identifier corresponding to the user identifier according to the reference information and the encrypted information.
  • the present application also provides an embodiment of a computing device, which includes a memory and a processor, wherein the memory stores one or more computer instructions; the processor is coupled to the memory and is used to execute the one or more computer instructions to implement the steps in the encryption method of the user identifier in the above data, or the steps in the decryption method of the user identifier in the above data.
  • An embodiment of the present application also provides a computer-readable storage medium storing computer instructions.
  • the computer instructions When the computer instructions are executed by one or more processors, the one or more processors execute the steps in the encryption method of the user identifier in the above data, or the steps in the decryption method of the user identifier in the above data.
  • Another embodiment of the present application provides a computer program product, which includes a computer program or instructions.
  • the processor executes the steps in the encryption method of the user identifier in the above data, or the steps in the decryption method of the user identifier in the above data.
  • the technical solutions provided in the embodiments of the present application propose a user identification encryption and decryption solution in an open scenario in the context of user personal data protection and data security.
  • the solution provided in the embodiments of the present application uses an encrypted identification instead of a plaintext user identification to provide to the data user, while meeting the requirements of open scenarios and eliminating the risk of black and gray industries using user identification to associate with user personal information.
  • the solution provided in the embodiments of the present application determines the reference information for obtaining the key based on preset scenario configuration information; different isolation and intercommunication levels can be configured for different service scenarios, thereby controlling the flow of user data between different service objects; it can effectively prevent cracking and is difficult to When used to match user personal information, it can support rapid rotation and update of keys to further deal with possible leaks.
  • FIG1 shows a schematic diagram of a user identification encryption method in the prior art
  • FIG2 is a schematic diagram showing a flow chart of a method for encrypting a user identifier in data provided by the present application
  • FIG3 is a schematic diagram showing a flow chart of a method for decrypting a user identifier in data provided by an embodiment of the present application
  • FIG4 shows a schematic diagram of the principle corresponding to a method for encrypting a user identifier in data provided by an embodiment of the present application
  • FIG5 is a schematic diagram showing the structure of a data processing system provided by an embodiment of the present application.
  • FIG6 shows a structural block diagram of a device for encrypting a user identifier in data provided by an embodiment of the present application
  • FIG7 shows a structural block diagram of a device for decrypting a user identifier in data provided by an embodiment of the present application
  • FIG8 shows a schematic diagram of the structure of a computer device provided in an embodiment of the present application.
  • Figure 1 shows a scheme for encrypting user identification in data in the prior art.
  • KeyCenter Key Management Center
  • KC issuance code maintained by KeyCenter and used to identify the user of the KC key.
  • KC key An encryption key applied for through KeyCenter. Users can use the KC issuance code and KC key to encrypt and decrypt user IDs through KeyCenter's SDK (Software Development Kit).
  • symmetric encryption is used in the prior art, that is, the same KC key is used in both the encryption and decryption processes.
  • FIG. 1 The prior art shown in FIG. 1 has the following disadvantages:
  • the encrypted identifier of the user under the same KC key encryption is essentially the unique identifier of the user. Although the encrypted identifier is more secure than the plaintext user identifier, it is easy for the black and gray industries to gradually establish the corresponding relationship between the encrypted identifier and the user.
  • the encrypted identifier is longer and not fixed in length after encryption.
  • ISVs Independent Software Vendors, independent software developers or e-commerce merchants
  • ISVs Independent Software Vendors, independent software developers or e-commerce merchants
  • the present application provides the following embodiments, which adopt a scheme with higher encryption security and good isolation to improve the problems existing in the prior art.
  • the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application.
  • the open platform provides an API interface and a related development environment.
  • third-party application developers can develop third-party tools based on the open platform to provide to e-commerce merchants or buyers, etc.; the merchant's own management system can also obtain the merchant's own order information through the API interface to perform corresponding statistical management, etc.
  • Third-party tools, merchant management systems, etc. developed by third-party application developers can obtain data from the backend database of the open platform through APIs.
  • the data in the backend database stores data from the e-commerce platform, such as buyer user information, seller user information, product information, store information, product category information, product transaction information, etc.
  • Scenario 1 The first, second, and third tools developed by third-party application developers access the backend database through APIs to obtain data 1, data 2, and data 3, respectively. Assume that data 1, data 2, and data 3 are all data of user A on the same e-commerce platform (such as an e-commerce platform member user or registered user, etc.). Third-party application developers cannot aggregate user data obtained by different tools, that is, user data between different tools cannot be interoperable.
  • Scenario 2 User data between different tools developed by different third-party application developers cannot be interoperable.
  • Scenario 3 A merchant has multiple stores, each of which has a different order management tool. Order information from different order management tools cannot be communicated with each other, so the merchant's order management tool is prohibited from aggregating buyer information across stores.
  • the embodiments of the present application provide the following technical solutions to provide an encryption and decryption solution with high security and strong isolation to achieve the above-mentioned purpose.
  • FIG2 is a schematic diagram showing a flow chart of a method for encrypting a user identifier in data provided by an embodiment of the present application.
  • the encryption method includes:
  • the data user may be an application program (APP), management software, etc., which is not limited in this embodiment.
  • the management software may include but is not limited to: CRM (Customer Relationship Management), merchant order management software, logistics management software, etc.
  • the APP can be developed by an ISV, or by a merchant based on the resources of an open platform, etc.
  • the target data and the information of the data user can be determined by the context of the open platform request. For example, the data user sends a request to obtain the target data through the open platform. If the data user has the right to use the target data, the target data is read and sent to the data user.
  • the acquisition request carries the information of the data user.
  • the information of the data user may include: a tool identifier and a user identifier corresponding to a third-party tool developed based on the open platform.
  • the user identifier is a developer identifier corresponding to the third-party tool developer or a user identifier corresponding to the third-party tool user.
  • the developer identifier is an ISVID, etc.; the user identifier can be the name, nickname, etc. of the third-party tool user.
  • the tool identifier can be specifically an AppKey, which is a unique identifier of the tool.
  • the open platform uses the AppKey to identify the identity of the application.
  • the scenario configuration information can be manually set.
  • the scenario configuration information can be pre-configured: version information (such as algorithm version, key version, etc.), and the service scenario type can also be configured.
  • version information such as algorithm version, key version, etc.
  • the service scenario type can also be configured.
  • the current scenario is mainly to prevent different developers' tools from obtaining user data from intercommunication and aggregation.
  • the current scenario is intended to prohibit merchant order management tools from aggregating buyer information across stores.
  • each data user may be associated with a scene configuration information. That is, step 102 of this embodiment may include: acquiring the scene configuration information associated with the data user according to the information of the data user; and then determining the reference information according to the scene configuration information.
  • the reference information may include, but is not limited to: version information, service scenario type, etc.
  • the version information includes at least one of algorithm version information and key version information.
  • the above 103 "determining the key according to the reference information and the information of the data user" can be implemented by the following steps:
  • the data user's information includes a tool identifier and a user identifier
  • the service scenario type clarifies the specific meanings of these two identifiers.
  • the current service scenario type is the first type, and the scenario corresponding to the first type is that user data between tools corresponding to different developers cannot be interoperable and aggregated; accordingly, the user identifier in the data user's information can be determined as the service object identifier.
  • the current service scenario type is the second type, and the scenario corresponding to the second type is that user data between different tools cannot be interoperable and aggregated; accordingly, the tool identifier in the data user's information can be determined as the service object identifier.
  • the difference between the first type and the second type is that the first type limits data communication between different developers, while data between multiple tools of the same developer can still be communicated; the second type limits data communication between different tools, even if the two tools are developed by the same party, they cannot communicate with each other.
  • the tool can be an application program (APP, such as a mini-program, etc.), or it can be management software with corresponding functions, etc., and this embodiment does not specifically limit this.
  • APP application program
  • management software with corresponding functions, etc.
  • step 1031 determining a service object identifier from the information of the data user according to the service scenario type.
  • At least one identifier is determined from the tool identifier and the user identifier as the service object identifier.
  • the other can be used as service object extension information.
  • the service object extension information can also be a timestamp or a preset information. That is, the method provided in the embodiment of the present application can also include at least one of the following steps:
  • the other is service object extension information
  • the first feasible solution of the above step 104 is: directly using the key and the algorithm corresponding to the algorithm version in the reference information to encrypt the user identifier in the target data.
  • the second feasible solution is that, with the service object extension information, the above step 104 "using the key to encrypt the user identifier in the target data to obtain encrypted information" is also implemented by the following steps:
  • step 103 “determining a key according to the reference information and the information of the data user” may include:
  • the reference information and the information of the data user constitute a query keyword
  • the query keywords in the above 1031' may include: the reference information and the service object identifier. More specifically, the query keywords may include: algorithm version information, key version information, service scenario type, and service object identifier.
  • key storage is divided into local memory cache (such as 30s expiration), Redis cache and persistent database, taking into account high concurrency scenarios and timely updates of runtime data.
  • the embodiment of the present application may include a key management center (KeyCenter), which only generates keys based on algorithm version information and key version information, encrypts user identifiers, and is not perceived by the outside world.
  • KeyCenter key management center
  • step 105 "generates according to the reference information and the encrypted information
  • the encrypted identifier corresponding to the user identifier may include the following steps:
  • FIG3 shows a schematic flow chart of a method for decrypting a user identifier in data provided by another embodiment of the present application.
  • the decryption method includes:
  • the method provided in the embodiment of the present application is the reverse process of the above encryption method embodiment.
  • the implementation process of this embodiment can be understood corresponding to the above encryption method embodiment.
  • the encryption identifier includes a first portion of information located at the front and a second portion of information located at the back.
  • the first portion of information corresponds to the reference information
  • the second portion of information corresponds to the encryption information.
  • the second part of information is the encrypted information to be decrypted.
  • the reference information includes: version information and service scenario type; the version information includes at least one of algorithm version information and key version information; and step 203 of this embodiment "determining the key according to the reference information and the information of the data user" may include:
  • step 204 of “decrypting the encrypted information using the key to obtain a user identifier corresponding to the encrypted identifier” may include:
  • parsed information includes service object extension information, extracting the user identifier from the parsed information;
  • the parsed information is the user identifier.
  • the service object extension information may include but is not limited to at least one of the following: an identifier that is not determined as a service object identifier in the information of the data user, a timestamp, preset information, etc.
  • the embodiments of the present application propose a user identification encryption and decryption scheme in an open scenario.
  • the scheme provided by each embodiment of the present application is used to encrypt the user identification in the data to replace the plaintext user identification. In this way, while meeting the demand for the open platform to provide services to the outside world, the risk of black and gray industries using user identification to associate with user personal information is reduced.
  • the encryption and decryption solution provided in the embodiment of the present application can configure different isolation and intercommunication levels for different service scenarios, thereby controlling the flow of user data between different service objects (such as ISVs, merchants, etc.), effectively preventing cracking and making it difficult to be used to match user personal information. At the same time, it can also support rapid rotation and update of keys to further deal with possible leaks.
  • service objects such as ISVs, merchants, etc.
  • the encryption algorithm in each embodiment of the present application can use but is not limited to the AES192 algorithm.
  • the AES192 algorithm uses a secure symmetric encryption algorithm with a 192-bit key, and there is currently no effective cracking method.
  • AES Advanced Encryption Standard
  • AES is a block cipher that belongs to the category of symmetric ciphers.
  • the modules of the AES algorithm are often used in the field of symmetric ciphers, especially in the field of block ciphers.
  • the AES encryption algorithm involves 4 operations: byte substitution (SubBytes), row shift (ShiftRows), column confusion (MixColumns) and round key addition (AddRoundKey).
  • Algorithm version Indicates the version of the current encryption algorithm, used for encryption algorithm upgrades.
  • Key version Indicates the version of the current key, used to support key update rotation.
  • Service scenario type an open service scenario type that indicates an encrypted identifier (a user identifier encrypted using the solution provided in the embodiment of the present application may be referred to as OpenUid, and OpenUid will be used hereinafter to represent an encrypted identifier), which is used to clarify the meaning of the service object identifier and service object extension information.
  • Service object identifier identifies the user object of OpenUid, such as AppKey, ISVId, authorized user identifier, etc.
  • Service object extended information as additional encrypted content, such as timestamp, authorized user ID, etc.
  • OpenUid A fixed 25-character encoding (e.g., 19 bytes converted through BASE64 RFC4648 URL SAFE), such as: BBCHhIMbva-QL7Dmc_sakKWkW
  • the combination of algorithm version information, key version information, service scenario type, and service object identifier corresponds to a key, that is, the key can be queried through the combination.
  • KC only acts as an intermediate key to protect and encrypt the user ID in the remotely called data, and it is not perceived by the outside world.
  • the service scenario type determine whether one of the AppKey and the authorized user ID is the service object identifier and the other is the service object extension information.
  • the service scenario type determine that one of the AppKey and the authorized user ID is the service object identifier and the other is the service object extension information.
  • the algorithm version, key version, service scenario type and service object identifier form the key query parameters.
  • the OpenUid encrypted with the same user identifier is different for different service objects.
  • the service object extension information is used as additional encrypted content, the OpenUid encrypted with the same user identifier is also different for the same service object but different extension information.
  • the encrypted OpenUid of the same user ID is different, which can prevent user data from being directly communicated between different service objects (such as ISV, merchants, stores, etc.). This not only greatly increases the difficulty of the black and gray industries to gradually encrypt the corresponding relationship between codes and users, but also reduces the impact caused by key rotation and update, and can be managed separately for high-risk service objects.
  • the service object identifier is ISVID: User data obtained by tools between different developers cannot be interoperable.
  • the service object identifier is AppKey: User data obtained by different tools cannot be interoperable, and developers can be prohibited from aggregating user data of different functional tools.
  • the service object identifier is AppKey
  • the service object extended information is the authorized user ID: the data of different tool users cannot be interoperable, for example: the merchant order management tool can be prohibited from aggregating buyer information across stores.
  • the service object identifier is a combination of the AppKey and the authorized user ID: The effect is the same as the previous item (3.3), but the security is higher. Each combination corresponds to a key.
  • the service object identifier is AppKey
  • the service object extended information is the timestamp: the user ID is different for each request.
  • the solution in the embodiment of the present application can support data intercommunication in some special scenarios by adjusting the service scenario configuration information, such as setting the keys corresponding to two service objects (such as two merchants) to be the same.
  • Key management adopts a multi-layer cache design, which takes into account high concurrency and timely update of runtime data, and supports automatic key generation and runtime loading of key data.
  • Each service object obtains a different OpenUid for the same user ID, which effectively prevents hacking. It is difficult to be deciphered and matched to user personal information.
  • each service object is independent and can be governed and managed separately without affecting each other. It supports rapid rotation and update of keys to further deal with possible leakage.
  • this article describes the encryption and decryption of user identifiers in data.
  • the encrypted objects in the embodiments of the present application can be other information besides user identifiers, such as some private information that cannot be expressed in plain text.
  • the solutions provided in the embodiments of the present application can be applied to the encryption and decryption of various types of information.
  • FIG5 shows a schematic diagram of the structure of a data service system provided by an embodiment of the present application.
  • the data service system includes: a data provider 11, a data processing subsystem 12 and a data user 13.
  • the data provider 11 stores data
  • the data processing subsystem 12 has an open platform, and the open platform provides an API
  • the data user 13 accesses the data processing subsystem 12 through the API to obtain the data stored in the data provider 11 through the data processing subsystem 12;
  • the data processing subsystem 12 is used to obtain the target data to be sent to the data user and the information of the data user; determine the reference information and the service object identifier based on the information of the data user; determine the key according to the reference information and the information of the data user; use the key to encrypt the user identifier in the target data to obtain encrypted information; generate an encrypted identifier corresponding to the user identifier according to the reference information and the encrypted information.
  • the data processing subsystem in this embodiment can implement all the steps in the above-mentioned method for encrypting the user identifier in the data.
  • the data processing subsystem in this embodiment can implement all the steps in the above-mentioned method for encrypting the user identifier in the data.
  • the data user 13 is used to obtain the information of the data user and the encryption identifier in the target data; wherein the data user has the authority to use the target data; parse the encryption identifier to obtain reference information and encryption information; determine the key based on the reference information and the information of the data user; use the key to decrypt the encrypted information to obtain the user identifier corresponding to the encryption identifier.
  • the data user in this embodiment can implement all the steps in the above-mentioned method for decrypting the user identifier in the data.
  • the data user in this embodiment can implement all the steps in the above-mentioned method for decrypting the user identifier in the data.
  • the query can be made through the open platform.
  • Figure 6 shows an encryption device for a user identifier in data provided by an embodiment of the present application.
  • the encryption device includes: a first acquisition module 21, a first determination module 22, an encryption module 23 and a generation module 24.
  • the first acquisition module 21 is used to obtain the target data to be sent to the data user and the information of the data user.
  • the first determination module 22 is used to determine the reference information based on the preset scene configuration information; and is also used to determine the key according to the reference information and the information of the data user.
  • the encryption module 23 is used to encrypt the user identifier in the target data using the key to obtain the encrypted information.
  • the generation module 24 is used to generate an encrypted identifier corresponding to the user identifier based on the reference information and the encrypted information.
  • the reference information includes: version information and service scenario type; the version information includes at least one of algorithm version information and key version information. Accordingly, when the first determination module 22 determines the key according to the reference information and the information of the data user, it is specifically used to:
  • a service object identifier is determined from the information of the data user; and a key is determined based on the reference information and the service object identifier.
  • the data user information includes: tool identification and user identification corresponding to the third-party tool developed based on the open platform; wherein the user identification is the developer identification corresponding to the third-party tool developer or the user identification corresponding to the third-party tool user.
  • the first determination module 22 determines the service object identifier from the information of the data user according to the service scenario type, it is specifically used to:
  • At least one identifier is determined from the tool identifier and the user identifier as the service object identifier.
  • the encryption device provided in the embodiment of the present application may also include an extended information determination module.
  • the extended information determination module is used to:
  • the other is the service object extension information
  • the preset information is used as the service object extension information.
  • the encryption module uses the key to encrypt the user identifier in the target data to obtain the encrypted information, it is specifically used to:
  • the user identification and the service object extension information are encoded to obtain first encoded information; and the first encoded information is encrypted using the key to obtain the encrypted information.
  • the first determination module 22 is specifically used to:
  • the reference information and the data user's information constitute query keywords
  • the key is retrieved
  • the generating module 24 when the generating module 24 generates the encrypted identifier corresponding to the user identifier according to the reference information and the encrypted information, it is specifically used to:
  • the reference information is encoded to obtain second encoded information; the second encoded information is placed in front of the encrypted information to obtain an encrypted identifier corresponding to the user identifier.
  • the encryption device for user identifiers in data provided in this embodiment can implement the technical solution described in the above-mentioned encryption method embodiment for user identifiers in data.
  • the specific implementation principles of the above-mentioned modules or units can be found in the corresponding contents in the above-mentioned method embodiment, which will not be repeated here.
  • FIG7 shows a schematic diagram of the structure of a decryption device for a user identifier in data provided by an embodiment of the present application.
  • the decryption device includes: a second acquisition module 31, a parsing module 32, a second determination module 33 and a decryption module 34.
  • the second acquisition module 31 is used to obtain the information of the data user and the encryption identifier in the target data; wherein the data user has the authority to use the target data.
  • the parsing module 32 is used to parse the encryption identifier to obtain reference information and encryption information.
  • the second determination module 33 is used to determine the key based on the reference information and the information of the data user.
  • the decryption module 34 is used to decrypt the encrypted information using the key to obtain the user identifier corresponding to the encryption identifier.
  • the encryption mark includes a first part of information located at the front and a second part of information located at the back. Accordingly, when the parsing module 32 parses the encryption mark to obtain the reference information and the encryption information, it is specifically used to:
  • the first part of information is parsed to obtain the reference information; the second part of information is the encrypted information to be decrypted.
  • the reference information includes: version information and service scenario type; the version information includes at least one of algorithm version information and key version information. Accordingly, when the second determination module 33 determines the key according to the reference information and the information of the data user, it is specifically used to:
  • a service object identifier is determined from the information of the data user; and a key is determined based on the reference information and the service object identifier.
  • the decryption module 34 uses the key to decrypt the encrypted information and obtains the user identifier corresponding to the encrypted identifier, it is specifically used to:
  • the encrypted information is decrypted using the key to obtain first coded information; the first coded information is parsed to obtain parsed information; if the parsed information contains service object extension information, the user identifier is extracted from the parsed information; if the parsed information does not contain service object extension information, the parsed information is the user identifier.
  • the data user information includes: tool identifiers and user identifiers corresponding to third-party tools developed based on the open platform; wherein the user identifier is the developer identifier corresponding to the third-party tool developer or the user identifier corresponding to the third-party tool user.
  • the reference information includes: version information and service scenario type, and the version information includes at least one of algorithm version information and key version information.
  • the second determination module 33 is specifically used to:
  • At least one identifier is determined from the tool identifier and the user identifier as the service object identifier.
  • the decryption device for user identification in data provided in this embodiment can implement the technical solution described in the above-mentioned decryption method embodiment for user identification in data.
  • the specific implementation principles of the above-mentioned modules or units can be found in the corresponding contents in the above-mentioned method embodiment, which will not be repeated here.
  • the computing device includes a memory 51 and a processor 52.
  • the memory 51 is used to store one or more computer instructions;
  • the processor 52 coupled to the memory 51, is used for the at least one or more computer instructions (such as computer instructions that implement data storage logic) to implement the steps in the encryption method of the user identifier in the data provided in the embodiment of the present application, or the steps in the decryption method of the user identifier in the data.
  • the memory 51 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable programmable read-only memory
  • PROM programmable read-only memory
  • ROM read-only memory
  • magnetic memory magnetic memory
  • flash memory magnetic disk or optical disk.
  • FIG8 schematically shows only some of the components that a computing device may include, and does not mean that the computing device only includes the components shown in FIG8 , such as an audio component 56 , a display 54 , a power component 55 , a communication component 53 , and the like.
  • the computer program product includes a computer program or instructions.
  • the processor is enabled to implement the steps in the above-mentioned method embodiments.
  • an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the method steps or functions provided in the above embodiments can be implemented.
  • each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware.
  • the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)

Abstract

本申请实施例提供一种数据中用户标识的加解密方法、系统及设备。其中,加密方法包括:获取待发送至数据使用方的目标数据及所述数据使用方的信息;基于预置的场景配置信息,确定参照信息;根据所述参照信息和所述数据使用方的信息,确定密钥;利用所述密钥对所述目标数据中的用户标识进行加密,得到加密信息;根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识。本申请实施例提供的方案使用加密标识替代了明文的用户标识提供给数据使用方,在满足开放场景需求的同时,消除了黑灰产使用用户标识关联到用户个人信息的风险。

Description

数据中用户标识的加解密方法、系统及设备
本申请要求于2022年11月10日提交中国专利局、申请号为202211408284.9、申请名称为“数据中用户标识的加解密方法、系统及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种数据中用户标识的加解密方法、系统及设备。
背景技术
近些年,外部黑灰产对用户标识的爬取和攻击较为频繁。他们可以通过各种手段基于用户标识联系到对应用户,实施诈骗、翘客、恶意营销等犯罪行为。为了降低此类风险,需要对明文的用户标识(如用户ID、昵称等)进行加密。
现有的用户标识加密方案,安全性低。
发明内容
本申请提供一种数据中用户标识的加解密方法、系统及设备,以提高安全性。
在本申请的一个实施例中,提供了一种数据中用户标识的加密方法。所述方法包括:
获取待发送至数据使用方的目标数据及所述数据使用方的信息;
基于所述数据使用方的信息,确定参照信息和服务对象标识;
根据所述参照信息和所述数据使用方的信息,确定密钥;
利用所述密钥对所述目标数据中的用户标识进行加密,得到加密信息;
根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识。
在本申请的另一个实施例中,提供了一种数据中用户标识的解密方法。该方法包括:
获取数据使用方的信息及目标数据中的加密标识;其中,所述数据使用方具有使用所述目标数据的权限;
对所述加密标识进行解析,得到参照信息及加密信息;
根据所述参照信息及所述数据使用方的信息,确定密钥;
利用所述密钥对所述加密信息进行解密,得到所述加密标识对应的用户标识。
在本申请的另一个实施例中,提供了一种数据服务系统。该系统包括:
数据提供方,存储有数据;
数据处理子系统,具有开放平台,所述开放平台提供API;
数据使用方,通过所述API接入所述数据处理子系统,以通过所述数据处理子系统获取所述数据提供方处存储的数据;
其中,所述数据处理子系统,所述数据处理子系统,用于获取待发送至数据使用方的目标数据及所述数据使用方的信息;基于所述数据使用方的信息,确定参照信息和服务对象标识;根据所述参照信息和所述数据使用方的信息,确定密钥;利用所述密钥对所述目标数据中的用户标识进行加密,得到加密信息;根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识。
本申请的还提供了一种计算设备实施例,该计算设备包括存储器和处理器,所述存储器,存储一条或多条计算机指令;所述处理器,与所述存储器耦合,用于执行所述一条或多条计算机指令,以用于实现上述数据中用户标识的加密方法中的步骤,或上述数据中用户标识的解密方法中的步骤。
本申请实施例还提供一种存储有计算机指令的计算机可读存储介质,当所述计算机指令被一个或多个处理器执行时,使得所述一个或多个处理器执行上述数据中用户标识的加密方法中的步骤,或上述数据中用户标识的解密方法中的步骤。
本申请还有一实施例提供一种计算机程序产品,该计算机程序产品包括计算机程序或指令,当所述计算机程序或指令被处理器执行时,使得所述处理器执行上述数据中用户标识的加密方法中的步骤,或上述数据中用户标识的解密方法中的步骤。
本申请各实施例提供的技术方案,在用户个人数据保护和数据安全的背景下,提出了一种开放场景下的用户标识加解密方案。本申请实施例提供的方案使用加密标识替代了明文的用户标识提供给数据使用方,在满足开放场景需求的同时,消除了黑灰产使用用户标识关联到用户个人信息的风险。本申请实施例提供的方案基于预置的场景配置信息,确定获取密钥的参照信息;可以针对不同的服务场景,配置不同的隔离和互通级别,进而管控用户数据在不同服务对象间流通;可以有效地防止破解,并难以 被使用匹配到用户个人信息,可以支持快速轮换更新密钥,以进一步应对可能泄露情况的发生。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要利用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了现有技术中的一种用户标识加密方法对应的原理性示意图;
图2示出了本申请提供的一种数据中用户标识的加密方法的流程示意图;
图3示出了本申请一实施例提供的一种数据中用户标识的解密方法的流程示意图;
图4示出了本申请一实施例提供的数据中用户标识的加密方法对应的原理性示意图;
图5示出了本申请一实施例提供的数据处理系统的结构示意图;
图6示出了本申请一实施例提供的数据中用户标识的加密装置的结构框图;
图7示出了本申请一实施例提供的数据中用户标识的解密装置的结构框图;
图8示出了本申请一实施例提供的计算机设备的结构示意图。
具体实施方式
图1示出了现有技术中一种对数据中用户标识进行加密的方案。图1中,KeyCenter(密钥管理中心)。
KC发放码:通过KeyCenter维护,用于标示KC密钥的使用者。
KC密钥:通过KeyCenter申请的加密密钥,使用者可通过KeyCenter的SDK(Software Development Kit,软件包)使用KC发放码和KC密钥对用户标识进行加密和解密。
加密过程中,现有技术中采用的是对称加密,即加密和解密过程均使用相同的KC密钥。
图1所示的现有技术具有如下几点缺点:
1、实践过程中,KC密钥和KC发放码,必须手动申请并需要重启机器,不支持自动化申请和运行时的热加载。
2、用户标识在同一个KC密钥加密下的加密标识,本质还是用户唯一标识。虽然加密标识较明文用户标识有一定的安全性,但黑灰产很容易逐步建立该加密标识和用户间的对应关系。
3、KC密钥的泄露风险较高。如果需要进行密钥轮转更新,所有对外的加密编码都会失效,影响面很大。
4、加密以后的加密标识长度较长,且长度不固定,ISV(Independent Software Vendors,独立软件开发商或电商商家)需要改造各自对应的数据库进行维护。
因此,本申请提供了如下各实施例,采用一种加密安全性更高、隔离性好的方案,以改善现有技术中存在的问题。为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
在本申请的说明书、权利要求书及上述附图中描述的一些流程中,包含了按照特定顺序出现的多个操作,这些操作可以不按照其在本文中出现的顺序来执行或并行执行。操作的序号如101、102等,仅仅是用于区分各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。而本申请中术语“或/和”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如:A或/和B,表示可以单独存在A,同时存在A和B,单独存在B这三种情况;本申请中字符“/”,一般表示前后关联对象是一种“或”关系。还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。此外,下述的各实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在介绍本申请各实施例之前,对方案的背景进行简要说明。本申请发明人发现当下开放场景下,比如开放平台,开放平台向外提供API接口和相关开发环境。这样第三方应用开发者可基于开放平台开发第三方工具以提供给电商商家或买家等;商家自己的管理系统也可通过API接口获取商家自己的订单信息以进行相应的统计管理等等。 第三方应用开发者开发的第三方工具、商家管理系统等等可通过API获取开放平台后端数据库中的数据。例如,后端数据库中的数据存储的是电商平台的数据,如买方用户信息、卖方用户信息、商品信息、店铺信息、商品类目信息、商品交易信息等等。
理想的情况是:
场景1:第三方应用开发者开发的第一个工具、第二个工具、第三个工具等分别通过API访问后端数据库获取到的数据1、数据2和数据3。假设数据1、数据2和数据3,都是同一电商平台用户A(如电商平台会员用户、或注册用户等)的数据。第三方应用开发者不能对不同工具获取到的用户数据进行聚合,即不同工具间的用户数据无法互通。
场景2:不同第三方应用开发者开发的不同的工具间的用户数据无法互通。
场景3:商家具有多个店铺,多个店铺分别对应有不同的订单管理工具。不同订单管理工具的订单信息无法互通,以禁止商家订单管理工具进行跨店铺买家信息聚合。
因为提高了对同一用户信息聚合的难度,关联链打断,这样就可以降低黑灰产使用用户标识关联到用户个人信息的风险。
为此,本申请各实施例提供如下技术方案,以提供安全性高、隔离性强的加解密方案,以达到上述目的。
图2示出了本申请一实施例提供的一种数据中用户标识的加密方法的流程示意图。如图2所示,所述加密方法包括:
101、获取待发送至数据使用方的目标数据及所述数据使用方的信息。
102、基于预置的场景配置信息,确定参照信息。
103、根据所述参照信息和所述数据使用方的信息,确定密钥。
104、利用所述密钥对所述目标数据中的用户标识进行加密,得到加密信息。
105、根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识。
上述101中,数据使用方可以是应用程序(APP)、管理软件等等,本实施例对此不作限定。其中,管理软件可包括但不限于:CRM(Customer Relationship Management,客户关系管理)、商家订单管理软件、物流管理软件等等。
APP可以是ISV开发的,也可以是商家自行基于开放平台的资源开发的,等等。
其中,所述目标数据及数据使用方的信息,可通过开放平台请求的上下文来确定。例如,数据使用方通过开放平台发送针对目标数据的获取请求,若数据使用方具有该目标数据的使用权限,则读取目标数据,并向数据使用方发送目标数据。其中,获取请求中携带有数据使用方的信息。
在一具体实施例中,所述数据使用方的信息可包括:基于开放平台开发的第三方工具对应的工具标识及使用方标识。其中,使用方标识为第三方工具开发方对应的开发方标识或第三方工具使用者对应的使用者标识。例如,开发方标识为ISVID等等;使用者标识可以是第三方工具使用者的名称、昵称等等。工具标识可具体为AppKey,AppKey是工具的唯一标识。开放平台通过AppKey来鉴别应用的身份。
上述102中,场景配置信息可人为设置。该场景配置信息中可预先配置好:版本信息(如算法版本、密钥版本等),还可配置好服务场景类型。比如,当前场景主要是让不同的开发者的工具获取到用户数据无法互通、聚合。或是,当前场景旨在禁止商家订单管理工具进行跨店铺买家信息聚合。
在具体实施时,每一个数据使用方可关联有一个场景配置信息。即本实施例步骤102可包括:根据所述数据使用方的信息,获取与所述数据使用方关联的场景配置信息;然后,根据所述场景配置信息,确定所述参照信息。
参照信息可包括但不限于:版本信息、服务场景类型等。其中,所述版本信息包括算法版本信息和密钥版本信息中的至少一项。
在一个可实现的实时方式中,上述103“根据所述参照信息和所述数据使用方的信息,确定密钥”可采用如下步骤实现:
1031、根据所述服务场景类型,从所述数据使用方的信息中确定出服务对象标识;
1032、基于所述参照信息及所述服务对象标识,确定密钥。
如上文中提及的数据使用方的信息包括工具标识和使用方标识,服务场景类型明确了这两个标识的具体含义。比如,当前服务场景类型为第一类型,该第一类型对应的场景为不同开发者对应工具间的用户数据不能互通合和聚合;相应的,可将数据使用方的信息中的使用方标识确定为服务对象标识。又比如,当前服务场景类型为第二类型,该第二类型对应的场景为不同工具间用户数据不能互通合和聚合;相应的,可将数据使用方的信息中的工具标识确定为服务对象标识。
第一类型和第二类型的区别在于,第一类型限制不同开发者间的数据互通,而同一开发者的多个工具间的数据还是可以实现互通的;第二类型限制不同工具间的数据互通,即便两个工具的开发方为同一个,也不能互通。
另外,此处还需要补充的是:工具可以是应用程序(APP,如小程序等),也可以是具有相应功能的管理软件等等,本实施例对此不作具体限定。
相应的,上述步骤1031“根据所述服务场景类型,从所述数据使用方的信息中确定出服务对象标识”可包括:
根据所述服务场景类型,从所述工具标识和所述使用方标识中确定至少一个标识为所述服务对象标识。
进一步的,若所述工具标识和所述使用方标识中的一个被确定为所述服务对象标识,则另一个可作为服务对象拓展信息。当然,服务对象拓展信息还可以是时间戳、或一个预设置信息。即本申请实施例提供的方法还可包括如下至少一个步骤:
106、若所述工具标识和所述使用方标识中的一个被确定为所述服务对象标识,则另一个为服务对象拓展信息;
107、获取时间戳信息,将所述时间戳信息作为所述服务对象拓展信息;
108、将预设置信息作为所述服务对象拓展信息。
这样,上述步骤104的第一种可实现的方案是:直接利用密钥,并使用参照信息中的算法版本对应的算法,对目标数据中的用户标识进行加密。第二种可实现的方案是,有了服务对象拓展信息,上述步骤104“利用所述密钥对目标数据中的用户标识进行加密,得到加密信息”还采用如下步骤实现:
1041、对所述用户标识及所述服务对象拓展信息进行编码,得到第一编码信息;
1042、利用所述密钥,对所述第一编码信息进行加密,得到所述加密信息。
进一步的,本实施例中的步骤103“根据所述参照信息和所述数据使用方的信息,确定密钥”可包括:
1031’、所述参照信息和所述数据使用方的信息组成查询关键词;
1032’、查询本地内存是否有与所述查询关键词关联的密钥;
1033’、若本地内存有,查询到所述密钥;
1034’、若本地内存无,查询Redis缓存中是否有与所述查询关键词关联的密钥;
1035’、若Redis缓存中有,查询到所述密钥;
1036’、若Redis缓存中无,在数据库中查询与所述查询关键词关联的密钥。
基于上文中内容,上述1031’中的查询关键词可以包括:所述参照信息和所述服务对象标识。更具体的,所述查询关键词可以包括:算法版本信息、密钥版本信息、服务场景类型、服务对象标识。
在实践过程中,密钥的存储分为本地内存缓存(如30s过期)、Redis缓存和持久化数据库,兼顾了高并发的场景和运行时数据及时更新。
另外,本申请实施例中可包含有密钥管理中心(KeyCenter),该密钥管理中心只基于算法版本信息和密钥版本信息生成密钥,对用户标识进行加密,对外没有感知。
进一步的,本申请实施例中步骤105“根据所述参照信息及所述加密信息,生成 所述用户标识对应的加密标识”可包括如下步骤:
1051、将所述参照信息进行编码,得到第二编码信息;
1052、将所述第二编码信息置于所述加密信息的前部,得到所述用户标识对应的加密标识。
图3示出了本申请另一实施例提供的数据中用户标识的解密方法的流程示意图。如图3所示,所述解密方法包括:
201、获取数据使用方的信息及目标数据中的加密标识;其中,所述数据使用方具有使用所述目标数据的权限。
202、对所述加密标识进行解析,得到参照信息及加密信息。
203、根据所述参照信息及所述数据使用方的信息,确定密钥。
204、利用所述密钥对所述加密信息进行解密,得到所述加密标识对应的用户标识。
本申请实施例提供的方法是上述加密方法实施例的逆过程。本实施例的实现过程,可对应着上述加密方法实施例理解。
在一个具体的实施例中,所述加密标识包括位于前部的第一部分信息及位于后部的第二部分信息。第一部分信息对应参照信息,第二部分信息对应加密信息。相应的,上述步骤202“对所述加密标识进行解析,得到参照信息及加密信息”可包括:
2021、对所述第一部分信息进行解析,得到所述参照信息;
2022、所述第二部分信息即待解密的所述加密信息。
进一步的,所述参照信息包括:版本信息及服务场景类型;所述版本信息包括算法版本信息和密钥版本信息中的至少一项;以及本实施例步骤203“根据所述参照信息及所述数据使用方的信息,确定密钥”可包括:
2031、根据所述服务场景类型,从所述数据使用方的信息中确定出服务对象标识;
2032、基于所述参照信息及所述服务对象标识,确定密钥。
上述2031和2032的具体实现,可参见上文中相应的步骤,此次不作赘述。
进一步的,本实施例步骤204“利用所述密钥对所述加密信息进行解密,得到所述加密标识对应的用户标识”,可包括:
2041、利用所述密钥对所述加密信息进行解密,得到第一编码信息;
2042、对所述第一编码信息进行解析,得到解析后的信息;
2043、若所述解析后的信息包含有服务对象拓展信息,则从所述解析后的信息中提取所述用户标识;
若所述解析后的信息不含有服务对象拓展信息,则所述解析后的信息即所述用户标识。
其中,服务对象拓展信息可包括但不限于如下中的至少一项:所述数据使用方的信息中未被确定为服务对象标识的标识,时间戳、预设置信息等。
综上可知,本申请实施例提出了一种开放场景下的用户标识加解密方案。采用本申请各实施例提供的方案对数据中的用户标识进行加密,以替代明文的用户标识。这样在满足开放平台向外提供服务需求的同时,降低黑灰产使用用户标识关联到用户个人信息的风险。
本申请实施例提供的加解密方案可以针对不同的服务场景,配置不同隔离和互通级别,进而管控用户数据在不同服务对象(如ISV、商家等)间流通,可以有效防止破解,并难以被使用匹配到用户个人信息。同时还可以支持快速轮换更新密钥,以进一步应对可能的泄露情况。
另外,本申请各实施例中加密算法可以使用但不限于AES192算法。AES192算法使用了192位密钥的安全对称加密算法,目前没有有效的破解方法。AES(Advanced Encryption Standard,高级加密标准),是一个分组密码,属于对称密码范畴,AES算法的模块在对称密码领域特别是分组密码领域常有使用。AES加密算法涉及4种操作:字节替代(SubBytes)、行移位(ShiftRows)、列混淆(MixColumns)和轮密钥加(AddRoundKey)。
下面结合图4对本申请各实施例提供的加密和解密过程进行说明。参见图4所示,图中:
算法版本:标示当前加密算法的版本,用于加密算法的升级。
密钥版本:标示当前密钥所属的版本,用于支持密钥更新轮转。
服务场景类型:标示加密标识(使用本申请实施例提供的方案完成加密的用户标识可称为OpenUid,下文将使用OpenUid表征加密标识)的开放服务场景类型,用于明确服务对象标识、服务对象拓展信息的含义。
服务对象标识:标示OpenUid的使用对象,如:AppKey、ISVId、授权使用的使用者标识等。
服务对象拓展信息:作为额外的加密内容,如:时间戳、授权使用的使用者标识等。
OpenUid:为固定25个字符(如,19字节经过BASE64 RFC4648 URL SAFE转换)的编码,如:BBCHhIMbva-QL7Dmc_sakKWkW
密钥管理说明:
1、算法版本信息、密钥版本信息、服务场景类型、服务对象标识的组合对应一个密钥,即通过该组合可以查询到密钥。
2、在实践过程中,密钥的存储分为本地内存缓存(30s过期)、Redis缓存和持久化数据库,兼顾了高并发的场景和运行时数据及时更新。
3、KC只做中间密钥,对远程调用的数据中的用户标识进行防护加密,对外没有感知。
加密过程说明:
1.1、获取目标数据中的用户标识,将用户标识转换为数字类型的UserID(用于压缩并固定OpenUid长度)。
1.2、通过开放平台请求的上下文,获取AppKey和授权使用者ID。
1.3、根据预置的服务场景配置信息,获取算法版本信息、密钥版本信息及服务场景类型。
1.4、根据服务场景类型,决定AppKey和授权使用者ID中的一个是服务对象标识,另一个是服务对象拓展信息。
1.5、将服务场景类型、服务对象标识、算法版本信息及密钥版本信息组成密钥查询参数。
1.6、查询获取密钥。
1.7、对UserID和服务对象拓展信息进行编码,得到第二编码信息。
1.8、利用所述密钥对第二编码信息进行加密,得到加密信息。
1.9、对服务场景类型、算法版本信息及密钥版本信息进行编码,得到第一编码信息;
2.0、将第一编码信息与加密信息组合得到OpenUid。
解密过程说明:
2.1、通过开放平台请求的上下文,获取AppKey和授权使用者ID。
2.2、解析OpenUid的前半部分,获取算法版本、密钥版本及服务场景类型。
2.3、根据服务场景类型,决定AppKey和授权使用者ID中的一个是服务对象标识,另一个是服务对象拓展信息。
2.4、将算法版本、密钥版本、服务场景类型及服务对象标识组成密钥查询参数。
2.5、查询获得密钥。
2.6、使用密钥对OpenUid的后半部分进行解密,得到数字类型的UserID。
2.7、将数字类型的UserID转换为用户标识。
可见,本申请实施例提供的方案具有如下特点:
A、由于服务对象标识和密钥相关联,因此对于不同的服务对象而言,同一用户标识加密后的OpenUid不相同。同样的,由于服务对象拓展信息作为额外的加密内容,因此对于同一服务对象但不同的拓展信息而言,同一用户标识加密后的OpenUid也不相同。
B、同一用户标识加密后的OpenUid不同,可以阻止用户数据直接在不同的服务对象(如ISV、商家、店铺等)中互通。这不仅大大增加了黑灰产逐步加密编码和用户间的对应关系的难度,还减小了密钥轮转更新导致的影响,可以针对高风险服务对象进行单独地治理。
下面列出几种类型的服务对象和场景进行说明:
3.1:服务对象标识是ISVID:不同的开发者间的工具获取的用户数据无法互通。
3.2:服务对象标识是AppKey:不同的工具获取的用户数据无法互通,可以禁止开发者对不同功能工具的用户数据进行聚合。
3.3:服务对象标识是AppKey,服务对象拓展信息是授权使用者ID:不同的工具使用者的数据无法互通,比如:可以禁止商家订单管理工具进行跨店铺买家信息聚合。
3.4:服务对象标识是AppKey和授权使用者ID的组合:效果和上一条(3.3)相同,只是安全性更高,每一条组合对应一个密钥。
3.5:服务对象标识是AppKey,服务对象拓展信息是时间戳:每次请求用户ID均不相同。
当然,本申请实施例中的方案,可通过调整服务场景配置信息,来实现支持一些特殊场景下的数据互通,如将两个服务对象(如两个商家)对应的密钥设置为相同即可。
本申请各实施例提供的方案对应的技术效果如下:
4.1、密钥管理采用了多层缓存设计,兼顾了高并发和运行时数据的及时更新,支持自动化密钥生成和运行时加载密钥数据。
4.2、设计服务场景类型、服务对象标识、服务对象拓展信息,不同服务对象独立配置密钥,支持针对不同的服务场景,配置不同隔离和互通级别,进而管控用户数据在不同服务对象间流通。
4.3、各服务对象获取到的同一用户标识的OpenUid不同,支持有效地防止被破 解,并难以被使用匹配到用户个人信息。
4.4、各服务对象密钥独立,互不影响可以进行单独治理和管理,支持快速轮转更新密钥,以进一步应对可能泄露情况的发生。
4.5、设计固定格式的加密编码OpenUid,长度为25个字符,支持正则区分OpenUid与明文用户ID,且长度小于原有明文用户昵称,ISV无需改造数据库和各类入参数校验等。
这里重点说明的是:本文中均针对数据中用户标识进行加解密进行说明的,实质上,本申请各实施例中的被加密的对象除了可以是用户标识外,还可以是其他信息,如一些不能明文的私密信息,本申请各实施例提供的方案可适用于各类信息的加解密。
图5示出了本申请一实施例提供的一种数据服务系统的结构示意图。如图5所示,所述数据服务系统包括:数据提供方11、数据处理子系统12及数据使用方13。其中,
数据提供方11,存储有数据;
数据处理子系统12,具有开放平台,所述开放平台提供API;
数据使用方13,通过所述API接入所述数据处理子系统12,以通过所述数据处理子系统12获取所述数据提供方11处存储的数据;
其中,所述数据处理子系统12,用于获取待发送至数据使用方的目标数据及所述数据使用方的信息;基于所述数据使用方的信息,确定参照信息和服务对象标识;根据所述参照信息和所述数据使用方的信息,确定密钥;利用所述密钥对所述目标数据中的用户标识进行加密,得到加密信息;根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识。
本实施例中的数据处理子系统可实现上述数据中用户标识的加密方法实施例中的所有步骤,具体可参见上文中的相应内容,此次不作赘述。
进一步的,所述数据使用方13,用于获取数据使用方的信息及目标数据中的加密标识;其中,所述数据使用方具有使用所述目标数据的权限;对所述加密标识进行解析,得到参照信息及加密信息;根据所述参照信息及所述数据使用方的信息,确定密钥;利用所述密钥对所述加密信息进行解密,得到所述加密标识对应的用户标识。
同样的,本实施例中的数据使用方可实现上述数据中用户标识的解密方法实施例中的所有步骤,具体可参见上文中的相应内容,此次不作赘述。
其中,所述数据使用方在基于参照信息及数据使用方的信息查询密钥时,可通过开放平台查询。
图6示出了本申请一实施例提供的数据中用户标识的加密装置。该加密装置包括:第一获取模块21、第一确定模块22、加密模块23及生成模块24。其中,第一获取模块21用于获取待发送至数据使用方的目标数据及所述数据使用方的信息。所述第一确定模块22用于基于预置的场景配置信息,确定参照信息;还用于根据所述参照信息和所述数据使用方的信息,确定密钥。所述加密模块23用于利用所述密钥对所述目标数据中的用户标识进行加密,得到加密信息。所述生成模块24用于根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识。
进一步的,所述参照信息包括:版本信息及服务场景类型;所述版本信息包括算法版本信息和密钥版本信息中的至少一项。相应的,所述第一确定模块22在根据所述参照信息和所述数据使用方的信息,确定密钥时,具体用于:
根据所述服务场景类型,从所述数据使用方的信息中确定出服务对象标识;基于所述参照信息及所述服务对象标识,确定密钥。
进一步的,所述数据使用方的信息包括:基于开放平台开发的第三方工具对应的工具标识及使用方标识;其中,使用方标识为第三方工具开发方对应的开发方标识或第三方工具使用者对应的使用者标识。相应的,
所述第一确定模块22在根据所述服务场景类型,从所述数据使用方的信息中确定出服务对象标识时,具体用于:
根据所述服务场景类型,从所述工具标识和所述使用方标识中确定至少一个标识为所述服务对象标识。
进一步的,本申请实施例提供的加密装置还可包括拓展信息确定模块。该拓展信息确定模块用于:
若所述工具标识和所述使用方标识中的一个被确定为所述服务对象标识,则另一个为服务对象拓展信息;和/或
获取时间戳信息,将所述时间戳信息作为所述服务对象拓展信息;和/或
将预设置信息作为所述服务对象拓展信息。
进一步的,所述加密模块在利用所述密钥对目标数据中的用户标识进行加密,得到加密信息时,具体用于:
对所述用户标识及所述服务对象拓展信息进行编码,得到第一编码信息;利用所述密钥,对所述第一编码信息进行加密,得到所述加密信息。
进一步的,所述第一确定模块22在根据所述参照信息和所述数据使用方的信息,确定密钥时,具体用于:
所述参照信息和所述数据使用方的信息组成查询关键词;
查询本地内存是否有与所述查询关键词关联的密钥;
若本地内存有,查询到所述密钥;
若本地内存无,查询Redis缓存中是否有与所述查询关键词关联的密钥;
若Redis缓存中有,查询到所述密钥;
若Redis缓存中无,在数据库中查询与所述查询关键词关联的密钥。
进一步的,所述生成模块24在根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识时,具体用于:
将所述参照信息进行编码,得到第二编码信息;将所述第二编码信息置于所述加密信息的前部,得到所述用户标识对应的加密标识。
这里需要说明的是:本实施例提供的数据中用户标识的加密装置可实现上述数据中用户标识的加密方法实施例中描述的技术方案,上述各模块或单元具体实现的原理可参见上述方法实施例中的相应内容,此处不再赘述。
图7示出了本申请一实施例提供的数据中用户标识的解密装置的结构示意图。如图7所示,所述解密装置包括:第二获取模块31、解析模块32、第二确定模块33及解密模块34。其中,所述第二获取模块31用于获取数据使用方的信息及目标数据中的加密标识;其中,所述数据使用方具有使用所述目标数据的权限。所述解析模块32用于对所述加密标识进行解析,得到参照信息及加密信息。所述第二确定模块33用于根据所述参照信息及所述数据使用方的信息,确定密钥。所述解密模块34用于利用所述密钥对所述加密信息进行解密,得到所述加密标识对应的用户标识。
进一步的,所述加密标识包括位于前部的第一部分信息及位于后部的第二部分信息。相应的,所述解析模块32在对所述加密标识进行解析,得到参照信息及加密信息时,具体用于:
对所述第一部分信息进行解析,得到所述参照信息;所述第二部分信息即待解密的所述加密信息。
进一步的,所述参照信息包括:版本信息及服务场景类型;所述版本信息包括算法版本信息和密钥版本信息中的至少一项。相应的,所述第二确定模块33在根据所述参照信息及所述数据使用方的信息,确定密钥时,具体用于:
根据所述服务场景类型,从所述数据使用方的信息中确定出服务对象标识;基于所述参照信息及所述服务对象标识,确定密钥。
进一步的,所述解密模块34在利用所述密钥对所述加密信息进行解密,得到所述加密标识对应的用户标识时,具体用于:
利用所述密钥对所述加密信息进行解密,得到第一编码信息;对所述第一编码信息进行解析,得到解析后的信息;若所述解析后的信息包含有服务对象拓展信息,则从所述解析后的信息中提取所述用户标识;若所述解析后的信息不含有服务对象拓展信息,则所述解析后的信息即所述用户标识。
进一步的,所述数据使用方的信息包括:基于开放平台开发的第三方工具对应的工具标识及使用方标识;其中,使用方标识为第三方工具开发方对应的开发方标识或第三方工具使用者对应的使用者标识。所述参照信息包括:版本信息及服务场景类型,所述版本信息包括算法版本信息和密钥版本信息中的至少一项。相应的,
所述第二确定模块33在根据所述参照信息及所述数据使用方的信息,确定服务对象标识时,具体用于:
根据所述服务场景类型,从所述工具标识和所述使用方标识中确定至少一个标识为所述服务对象标识。
这里需要说明的是:本实施例提供的数据中用户标识的解密装置可实现上述数据中用户标识的解密方法实施例中描述的技术方案,上述各模块或单元具体实现的原理可参见上述方法实施例中的相应内容,此处不再赘述。
本申请一实施例提供的计算设备的原理性结构示意图。该原理性结构示意图如图8所示。具体地,所述计算设备包括存储器51及处理器52。其中,所述存储器51用于存储一条或多条计算机指令;所述处理器52,与所述存储器51耦合,用于所述至少一条或多条计算机指令(如实现数据存储逻辑的计算机指令),以用于实现本申请实施例提供的数据中用户标识的加密方法中的步骤,或数据中用户标识的解密方法中的步骤。
上述中,存储器51可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
图8中仅示意性给出了计算设备可包含的部分组件,并不意味着计算设备只包括图8所示组件,如音频组件56、显示器54、电源组件55、通信组件53等等。
本申请还有一实施例提供一种计算机程序产品(说明书附图中无相应附图示出)。该 计算机程序产品包括计算机程序或指令,当所述计算机程序或指令被处理器执行时,致使所述处理器能够实现上述各方法实施例中的步骤。
相应地,本申请实施例还提供一种存储有计算机程序的计算机可读存储介质,所述计算机程序被计算机执行时能够实现上述各实施例提供的方法步骤或功能。
通过以上实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (14)

  1. 一种数据中用户标识的加密方法,其特征在于,包括:
    获取待发送至数据使用方的目标数据及所述数据使用方的信息;
    基于预置的场景配置信息,确定参照信息;
    根据所述参照信息和所述数据使用方的信息,确定密钥;
    利用所述密钥对所述目标数据中的用户标识进行加密,得到加密信息;
    根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识。
  2. 根据权利要求1所述的方法,其特征在于,所述参照信息包括:版本信息及服务场景类型;所述版本信息包括算法版本信息和密钥版本信息中的至少一项;以及
    根据所述参照信息和所述数据使用方的信息,确定密钥,包括:
    根据所述服务场景类型,从所述数据使用方的信息中确定出服务对象标识;
    基于所述参照信息及所述服务对象标识,确定密钥。
  3. 根据权利要求2所述的方法,其特征在于,所述数据使用方的信息包括:基于开放平台开发的第三方工具对应的工具标识及使用方标识;其中,使用方标识为第三方工具开发方对应的开发方标识或第三方工具使用者对应的使用者标识;以及
    根据所述服务场景类型,从所述数据使用方的信息中确定出服务对象标识,包括:
    根据所述服务场景类型,从所述工具标识和所述使用方标识中确定至少一个标识为所述服务对象标识。
  4. 根据权利要求3所述的方法,其特征在于,还包括:
    若所述工具标识和所述使用方标识中的一个被确定为所述服务对象标识,则另一个为服务对象拓展信息;和/或
    获取时间戳信息,将所述时间戳信息作为所述服务对象拓展信息;和/或
    将预设置信息作为所述服务对象拓展信息。
  5. 根据权利要求4所述的方法,其特征在于,利用所述密钥对目标数据中的用户标识进行加密,得到加密信息,包括:
    对所述用户标识及所述服务对象拓展信息进行编码,得到第一编码信息;
    利用所述密钥,对所述第一编码信息进行加密,得到所述加密信息。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,根据所述参照信息和所述数据使用方的信息,确定密钥,包括:
    所述参照信息和所述数据使用方的信息组成查询关键词;
    查询本地内存是否有与所述查询关键词关联的密钥;
    若本地内存有,查询到所述密钥;
    若本地内存无,查询Redis缓存中是否有与所述查询关键词关联的密钥;
    若Redis缓存中有,查询到所述密钥;
    若Redis缓存中无,在数据库中查询与所述查询关键词关联的密钥。
  7. 根据权利要求1至5中任一项所述的方法,其特征在于,根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识,包括:
    将所述参照信息进行编码,得到第二编码信息;
    将所述第二编码信息置于所述加密信息的前部,得到所述用户标识对应的加密标识。
  8. 一种数据中用户标识的解密方法,其特征在于,包括:
    获取数据使用方的信息及目标数据中的加密标识;其中,所述数据使用方具有使用所述目标数据的权限;
    对所述加密标识进行解析,得到参照信息及加密信息;
    根据所述参照信息及所述数据使用方的信息,确定密钥;
    利用所述密钥对所述加密信息进行解密,得到所述加密标识对应的用户标识。
  9. 根据权利要求8所述的方法,其特征在于,所述加密标识包括位于前部的第一部分信息及位于后部的第二部分信息;以及
    对所述加密标识进行解析,得到参照信息及加密信息,包括:
    对所述第一部分信息进行解析,得到所述参照信息;
    所述第二部分信息即待解密的所述加密信息。
  10. 根据权利要求8所述的方法,其特征在于,所述参照信息包括:版本信息及服务场景类型;所述版本信息包括算法版本信息和密钥版本信息中的至少一项;以及
    根据所述参照信息及所述数据使用方的信息,确定密钥,包括:
    根据所述服务场景类型,从所述数据使用方的信息中确定出服务对象标识;
    基于所述参照信息及所述服务对象标识,确定密钥。
  11. 根据权利要求8至10中任一项所述的方法,其特征在于,利用所述密钥对所述加密信息进行解密,得到所述加密标识对应的用户标识,包括:
    利用所述密钥对所述加密信息进行解密,得到第一编码信息;
    对所述第一编码信息进行解析,得到解析后的信息;
    若所述解析后的信息包含有服务对象拓展信息,则从所述解析后的信息中提取所述用户标识;
    若所述解析后的信息不含有服务对象拓展信息,则所述解析后的信息即所述用户标识。
  12. 一种数据服务系统,其特征在于,包括:
    数据提供方,存储有数据;
    数据处理子系统,具有开放平台,所述开放平台提供API;
    数据使用方,通过所述API接入所述数据处理子系统,以通过所述数据处理子系统获取所述数据提供方处存储的数据;
    其中,所述数据处理子系统,用于获取待发送至数据使用方的目标数据及所述数据使用方的信息;基于所述数据使用方的信息,确定参照信息和服务对象标识;根据所述参照信息和所述数据使用方的信息,确定密钥;利用所述密钥对所述目标数据中的用户标识进行加密,得到加密信息;根据所述参照信息及所述加密信息,生成所述用户标识对应的加密标识。
  13. 根据权利要求12所述的系统,其特征在于,
    所述数据使用方,用于获取数据使用方的信息及目标数据中的加密标识;其中,所述数据使用方具有使用所述目标数据的权限;对所述加密标识进行解析,得到参照信息及加密信息;根据所述参照信息及所述数据使用方的信息,确定密钥;利用所述密钥对所述加密信息进行解密,得到所述加密标识对应的用户标识。
  14. 一种计算设备,其特征在于,包括:存储器及处理器,其中,
    所述存储器,存储一条或多条计算机指令;
    所述处理器,与所述存储器耦合,用于执行所述一条或多条计算机指令,以用于实现上述权利要求1至7中任一项所述方法中的步骤,或权利要求8至11中任一项所述方法中的步骤。
PCT/CN2023/071988 2022-11-10 2023-01-13 数据中用户标识的加解密方法、系统及设备 WO2024098550A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211408284.9 2022-11-10
CN202211408284.9A CN115941279A (zh) 2022-11-10 2022-11-10 数据中用户标识的加解密方法、系统及设备

Publications (1)

Publication Number Publication Date
WO2024098550A1 true WO2024098550A1 (zh) 2024-05-16

Family

ID=86549812

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/071988 WO2024098550A1 (zh) 2022-11-10 2023-01-13 数据中用户标识的加解密方法、系统及设备

Country Status (2)

Country Link
CN (1) CN115941279A (zh)
WO (1) WO2024098550A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756761B (zh) * 2023-08-22 2024-01-12 广东南方电信规划咨询设计院有限公司 一种对数据进行加密的方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107196840A (zh) * 2016-03-14 2017-09-22 阿里巴巴集团控股有限公司 数据处理方法、装置及设备
US20180159833A1 (en) * 2015-05-13 2018-06-07 Alibaba Group Holding Limited Method and apparatus for securing communications using multiple encryption keys
CN111064757A (zh) * 2020-03-18 2020-04-24 腾讯科技(深圳)有限公司 应用访问方法、装置、电子设备以及存储介质
WO2022022009A1 (zh) * 2020-07-28 2022-02-03 百果园技术(新加坡)有限公司 消息处理方法、装置、设备及存储介质
CN115208705A (zh) * 2022-09-16 2022-10-18 广州万协通信息技术有限公司 基于链路数据自适应调整的加密解密方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180159833A1 (en) * 2015-05-13 2018-06-07 Alibaba Group Holding Limited Method and apparatus for securing communications using multiple encryption keys
CN107196840A (zh) * 2016-03-14 2017-09-22 阿里巴巴集团控股有限公司 数据处理方法、装置及设备
CN111064757A (zh) * 2020-03-18 2020-04-24 腾讯科技(深圳)有限公司 应用访问方法、装置、电子设备以及存储介质
WO2022022009A1 (zh) * 2020-07-28 2022-02-03 百果园技术(新加坡)有限公司 消息处理方法、装置、设备及存储介质
CN115208705A (zh) * 2022-09-16 2022-10-18 广州万协通信息技术有限公司 基于链路数据自适应调整的加密解密方法及装置

Also Published As

Publication number Publication date
CN115941279A (zh) 2023-04-07

Similar Documents

Publication Publication Date Title
CN111191286B (zh) Hyperledger Fabric区块链隐私数据存储与访问系统及其方法
US20210099287A1 (en) Cryptographic key generation for logically sharded data stores
AU2018367363B2 (en) Processing data queries in a logically sharded data store
US10284372B2 (en) Method and system for secure management of computer applications
EP2095288B1 (en) Method for the secure storing of program state data in an electronic device
US11936776B2 (en) Secure key exchange electronic transactions
CN112351015B (zh) 一种基于api的网关控制方法
US8990553B2 (en) Perimeter encryption method and system
CN108810017B (zh) 业务处理安全验证方法及装置
CN108270739B (zh) 一种管理加密信息的方法及装置
CA3065767C (en) Cryptographic key generation for logically sharded data stores
WO2019165175A1 (en) System and method for securely transferring data
CN103378971A (zh) 一种数据加密系统及方法
US20190260715A1 (en) Computer system, connection apparatus, and processing method using transaction
WO2024098550A1 (zh) 数据中用户标识的加解密方法、系统及设备
CN113055376A (zh) 一种区块链数据保护系统
CN114969128A (zh) 一种基于安全多方计算技术的隐匿查询方法、系统和存储介质
CN111241492A (zh) 一种产品多租户安全授信方法、系统及电子设备
US20230327863A1 (en) Data management and encryption in a distributed computing system
WO2022199796A1 (en) Method and computer-based system for key management
CN106919846B (zh) 一种消息中间件处理方法和系统
KR101078703B1 (ko) 암호화 키를 이용한 문자보안 서비스 시스템 및 그 암호화 키 갱신방법
GB2607289A (en) Data management and encryption in a distributed computing system
KR100384182B1 (ko) 무선 데이터 통신에서의 양단간 데이터 보안이 가능한무선단말기
CN114329627A (zh) 签名方法、装置、计算机设备、存储介质