Rule configuration method, ciphertext processing method, equipment, storage medium and program product

By setting status flags and generating matching rules for the operation sequence in the ciphertext processing process, the issue of the reasonableness of data attribute disclosure in ciphertext processing is resolved, ensuring that user-specified attributes are disclosed only under authorized operations, thereby improving data security and the flexibility of attribute disclosure.

CN121367585APending Publication Date: 2026-01-20ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410977741.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

In the process of encrypted data processing, how can we reasonably set the disclosure of data attributes while ensuring data security, especially in data grouping and filtering operations to avoid the leakage of unauthorized attributes?

Method used

Based on the first operation sequence authorized by the user and the target attribute, the sub-operation sequence under different operation orders is determined, and a status identifier is set for the encrypted result. Matching rules and attribute disclosure rules are generated, and the target attribute is disclosed only when the target status identifier allows it.

Benefits of technology

This approach enhances the rationality and flexibility of data attribute disclosure while ensuring data security. It ensures that user-authorized attributes are disclosed only under specified operation combinations, preventing the leakage of unauthorized attributes under other operation combinations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121367585A_ABST
    Figure CN121367585A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a rule configuration method, a ciphertext processing method, equipment, a storage medium and a program product, and the method comprises the steps: generating a matching rule according to sub-operation sequences of a first operation sequence under different operation sequences and a state identifier of a ciphertext result of the first operation sequence; and under the condition that the second operation sequence is matched with the sub-operation sequence corresponding to any operation sequence, determining the state identifier of the ciphertext result of the second operation sequence as the state identifier in the matching rule, and generating an attribute disclosure rule according to the state identifier of the ciphertext result of the first operation sequence and a target attribute provided by a user, the target attribute in the target ciphertext data is disclosed under the condition that it is judged that the target state identifier matched with the target ciphertext data is allowed to be disclosed, and the target attribute of the target ciphertext data is disclosed only under the condition that the target state identifier of the target ciphertext data is allowed to be disclosed. According to the scheme of the embodiment of the invention, the rationality and safety of attribute disclosure are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of ciphertext processing, and in particular, to a rule configuration method, a ciphertext processing method, a device, a storage medium and a program product. BACKGROUND

[0002] With the highlighting of data security issues, ciphertext data processing technology has attracted more and more attention. Ciphertext processing usually takes one or more ciphertexts as input, performs operations on them according to the corresponding operation sequence, and outputs the ciphertext of the operation result. The data security is high, and the operation sequence defines the operation expression for ciphertext processing.

[0003] However, in actual application, the disclosure of the attribute of data is inevitably involved in the ciphertext processing process to realize data grouping, filtering and other operations. The attribute can refer to part of the plaintext information in the ciphertext data or the data characteristics of the ciphertext data such as data length. For example, when the ciphertext data with the name "Zhang" and the ciphertext data with the name "Wang" are divided into different data groups, the attribute information of "surname" is needed; for example, when the ciphertext data with the last digit "2" is filtered, the attribute information of "last digit" is needed, and so on.

[0004] Therefore, how to reasonably set the disclosure of the attribute of data on the basis of ensuring data security is a problem to be solved. SUMMARY

[0005] Embodiments of the present application provide a rule configuration method, a ciphertext processing method, a device, a storage medium and a program product to improve the rationality of the disclosure of the attribute of data on the basis of ensuring data security.

[0006] In a first aspect, the embodiments of the present application provide a rule configuration method, comprising:

[0007] determining a first operation sequence provided by a user and a target attribute;

[0008] determining a sub-operation sequence corresponding to different operation sequences according to the different operation sequences of the first operation sequence;

[0009] setting a corresponding state identifier for the ciphertext result of the first operation sequence;

[0010] generating a matching rule according to the sub-operation sequence corresponding to the different operation sequences and the state identifier of the ciphertext result; the matching rule is used to determine that the ciphertext result of a second operation sequence is the state identifier when the second operation sequence matches any operation sequence corresponding to the sub-operation sequence;

[0011] According to the state identifier corresponding to the ciphertext result in the matching rule and the target attribute, an attribute disclosure rule is generated; the attribute disclosure rule is used to determine whether the target state identifier matched by the target ciphertext data allows disclosure, and to disclose the target attribute in the target ciphertext data.

[0012] In a second aspect, an embodiment of the present application provides a ciphertext processing method, comprising:

[0013] In response to a ciphertext processing event, a target operation sequence is determined.

[0014] The target operation sequence is matched with a matching rule to determine a state identifier corresponding to a ciphertext result of the target operation sequence; the matching rule is generated according to a sub-operation sequence corresponding to different operation sequences of a first operation sequence and a state identifier of a ciphertext result of the first operation sequence, and the first operation sequence is the same as the target operation sequence or the first operation sequence is a sub-operation sequence in the target operation sequence.

[0015] According to an attribute acquisition instruction of target ciphertext data, a target state identifier corresponding to the target ciphertext data and an attribute disclosure rule are determined; the attribute disclosure rule is generated according to a state identifier of a ciphertext result of the first operation sequence and a target attribute provided by a user.

[0016] According to the attribute disclosure rule, the target attribute in the target ciphertext data is disclosed when the target state identifier allows disclosure.

[0017] In a third aspect, an embodiment of the present application provides a computing device, comprising a storage component and a processing component; the storage component stores one or more computer program instructions, the computer program instructions are called and executed by the processing component, and the processing component executes the one or more computer program instructions to implement the rule configuration method of the first aspect or the ciphertext processing method of the second aspect.

[0018] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program; the computer program is executed by a computer to implement the rule configuration method of the first aspect or the ciphertext processing method of the second aspect.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product, which stores a computer program; the computer program is executed by a computer to implement the rule configuration method of the first aspect or the ciphertext processing method of the second aspect.

[0020] In the embodiments of this application, the matching rule is generated according to the state identifier of the ciphertext result of the first operation sequence and the state identifier of the sub-operation sequence of the first operation sequence in different operation sequences, so that the state identifier of the ciphertext result of the second operation sequence is determined as the state identifier in the matching rule when the second operation sequence matches any operation sequence corresponding to the sub-operation sequence, thereby realizing the setting of the state identifier of the ciphertext result of the second operation sequence, and the attribute disclosure rule is generated according to the state identifier of the ciphertext result of the first operation sequence and the target attribute provided by the user, so that the target attribute in the target ciphertext data is disclosed when it is determined that the target ciphertext data matches the target state identifier that allows disclosure, thereby realizing the disclosure of the target attribute of the target ciphertext data only when the target state identifier of the target ciphertext data allows disclosure, that is, the user's specified attribute is allowed to be disclosed only when the data comes from the specified operation combination, which can be understood as the user's authorized attribute, and the disclosure is not allowed in any other operation combination, the same calculation based on other data or the disclosure of other non-authorized attributes, so that the rationality of data attribute disclosure is improved on the basis of ensuring data security.

[0021] These aspects or other aspects of the application will be more apparent in the following description of the embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without any creative effort.

[0023] Figure 1 A flowchart of one embodiment of a rule configuration method provided by the application is shown;

[0024] Figure 2 A schematic diagram of one embodiment of determining a plurality of sub-operation sequences in different operation sequences provided by the application is shown;

[0025] Figure 3 A schematic diagram of one embodiment of a state conversion rule provided by the application is shown;

[0026] Figure 4 A schematic diagram of one embodiment of a state conversion process provided by the application is shown;

[0027] Figure 5 A flowchart of another embodiment of a rule configuration method provided by the application is shown;

[0028] Figure 6A flow chart of one embodiment of a ciphertext processing method provided by the present application is shown.

[0029] Figure 7 A structural schematic diagram of one embodiment of a rule configuration device provided by the present application is shown.

[0030] Figure 8 A structural schematic diagram of one embodiment of a ciphertext processing device provided by the present application is shown.

[0031] Figure 9 A scene interaction schematic diagram of an actual application of an embodiment of the present application is shown.

[0032] Figure 10 A structural schematic diagram of one embodiment of a computing device provided by the present application is shown. DETAILED DESCRIPTION

[0033] In order to enable persons skilled in the art to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.

[0034] In some of the processes described in the specification and claims of the present application and the above drawings, a plurality of operations appear in a specific order, but it should be clearly understood that these operations can be executed or performed in parallel or in a sequence different from that in which they appear in the text, and the serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution sequence. In addition, these processes can include more or fewer operations, and the operations can be executed or performed in sequence or in parallel. It should be noted that the "first", "second", etc. in the text are used to distinguish different messages, devices, modules, etc., and do not represent the sequence, nor do "first" and "second" represent different types.

[0035] The technical solutions of the present application are applicable to the field of data processing, especially the scene of ciphertext processing. Ciphertext processing usually takes one or more ciphertexts as input, performs operations and other processing on them, and outputs the ciphertext of the operation result, with high data security.

[0036] However, in actual applications, the disclosure of attribute information of data is inevitably involved in the process of ciphertext processing to realize data grouping, screening and filtering, etc. How to reasonably set the disclosure of attribute information of data on the basis of ensuring data security is a problem to be solved.

[0037] The inventors find that, since the attribute information may be involved in the process of ciphertext processing and thus the disclosure of the attribute information may be needed, it is thought that the ciphertext result of the authorized designated operation can be used to disclose the designated attribute information, such as the plaintext comparison result of the operator to be used for the Boolean judgment. However, in the actual scenario, the data requesting the disclosure of the attribute may be obtained by the complex combination calculation of the original ciphertext data, and the combination calculation may be split into multiple steps and executed under different operation sequences, and the attribute disclosure of the authorized designated operation cannot well ensure the data security.

[0038] Based on this, the inventors have further conducted a series of researches and proposed the technical scheme of the present application. In the embodiments of the present application, a user can be authorized to provide a first operation sequence and a target attribute. Then, different operation sequences corresponding to sub-operation sequences are determined according to different operation sequences of the first operation sequence. After that, a state identifier is set for the ciphertext result of the first operation sequence, and a matching rule is generated according to the different operation sequences corresponding to the sub-operation sequences and the state identifier of the ciphertext result. Thus, the matching rule can be used to determine that the ciphertext result of a second operation sequence is the state identifier when the second operation sequence matches any operation sequence corresponding to the sub-operation sequence. According to the state identifier of the ciphertext result and the target attribute, an attribute disclosure rule is generated. The attribute disclosure rule can be used to determine whether the target attribute in the target ciphertext data is allowed to be disclosed when the target state identifier matched by the target ciphertext data matches the target state identifier. Thus, for the target operation sequence performing the ciphertext processing operation, if the matching rule is hit, the state identifier corresponding to the ciphertext result can be determined. The target ciphertext data can be the ciphertext result output by any target operation sequence, so that whether the target attribute is disclosed can be determined by determining whether the target state identifier corresponding to the target ciphertext data hits the attribute disclosure rule.

[0039] In this embodiment, matching rules are generated based on the status identifiers of the ciphertext results of the first operation sequence under different operation sequences and the sub-operation sequences of the first operation sequence. When the second operation sequence matches any sub-operation sequence corresponding to any operation sequence, the status identifier of the ciphertext result of the second operation sequence is determined as the status identifier in the matching rules. This achieves the setting of the status identifier of the ciphertext result of the second operation sequence. Furthermore, attribute disclosure rules are generated based on the status identifiers of the ciphertext results of the first operation sequence and the target attributes provided by the user. When the target status identifier of the target ciphertext data is determined to allow disclosure, the target attributes in the target ciphertext data are disclosed. This ensures that the target attributes of the target ciphertext data are disclosed only when the target status identifier of the target ciphertext data allows disclosure. In other words, it ensures that user-specified attributes are allowed to be disclosed only when the data comes from a specified combination of operations (i.e., user-authorized attributes). Attributes are not disclosed in any other combination of operations, based on the same calculations of other data, or when disclosing other unauthorized attributes. This improves the rationality of data attribute disclosure settings while ensuring data security. Furthermore, compared to the attribute disclosure scheme that authorizes a single operation result, it achieves fine-grained attribute disclosure settings, further improving the rationality and flexibility of data attribute disclosure settings.

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

[0041] The technical solutions of this application can be applied to system architectures including user terminals and servers, with the user terminal and server establishing a connection through a network. The network can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. In one implementation, the server can be a cloud server.

[0042] The user client can interact with the server via the network to receive or send data, etc.

[0043] The user end can be a browser, an APP (application), a web application such as an H5 (HyperText Markup Language 5) application, a light application (also known as a small program, a lightweight application), a cloud application, or the like. The user end can be deployed in an electronic device and needs to rely on the device or some app in the device to run, and the like. The electronic device can have a display screen and support information browsing, and the like, and can be a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, and the like. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like.

[0044] The service end can include a server that provides various services, such as a service end that processes data sent by the user end, and the like.

[0045] It should be noted that the service end can be implemented as a distributed server cluster composed of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0046] It should be noted that the rule configuration method and the ciphertext processing method provided in the embodiments of the present application are generally executed by the service end. However, in other embodiments of the present application, the user end can also have similar functions as the service end, so as to execute the rule configuration method and the ciphertext processing method provided in the embodiments of the present application. In other embodiments, the rule configuration method and the ciphertext processing method provided in the embodiments of the present application can also be executed by the user end and the service end together.

[0047] It should be noted that the embodiments of the present application can involve the use of user data. In actual applications, user-specific personal data can be used in the schemes described herein within the scope permitted by applicable laws and regulations, for example, with the explicit consent of the user, with the user being effectively notified, and the like.

[0048] It should be noted that the user information (including but not limited to user device information, user personal information, and the like) and data (including but not limited to data for analysis, stored data, displayed data, and the like) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use, and processing of related data need to comply with relevant laws, regulations, and standards of relevant countries and regions, and provide corresponding operation portals for users to choose authorization or refusal.

[0049] It should be noted that the technical solutions of the embodiments of the present application are applicable to a network virtual environment, and the described user generally refers to a "virtual user". A real user can register a user account in a server through a registration method to obtain a user identity in a network environment.

[0050] The ciphertext processing method of the present application can be implemented based on a matching rule and an attribute disclosure rule, which can be preconfigured. The rule configuration process is described below.

[0051] As shown in the flowchart of one embodiment of a rule configuration method provided by the present application, the method can be executed by a server and can include the following steps: Figure 1

[0052] 101: Determine the first operation sequence provided by the user and the target attribute.

[0053] The scheme of the present application is applicable to a scenario of performing operation processing on data provided by a user. In order to ensure the security of data operation, it can be executed in a trusted execution environment (Trusted Execution Environment, referred to as TEE).

[0054] In the present embodiment, the first operation sequence can be used to represent the operation mode of the operation processing on the data, and can include an operation expression. Specifically, the operation sequence can refer to a group of operations or steps arranged in a specific order. The operation sequence can be understood as a set of instructions that define the types of operations required to complete a task. These operation types can be arithmetic operations, logical operations, data movement, conditional jumps, etc.

[0055] Among them, the operation sequence can include an operator and an operand. The operator identifies the type of instruction, i.e., what operation the computer will perform. The operand indicates the data involved in the instruction, such as operation data, which can be the data required by the instruction or a data tag. The data tag can be a data location, from which the corresponding saved data can be obtained. In addition, in the embodiments of the present application, the data tag can be used to identify the data type, and the data of the corresponding data type can be obtained to participate in the ciphertext processing according to the data tag. For example, in the operation sequence "a+b", "+" is the operator, and "a" and "b" are the operands. The target attribute can refer to the attribute authorized by the user to be disclosed, which can be set according to the actual scene requirements, such as the highest bit and the lowest bit of the data.

[0056] The first operation sequence and the target attribute can be provided by the user through the user terminal, and the first operation sequence and the target attribute transmitted by the user terminal can be obtained.

[0057] ​Further, in an optional implementation, determining the first operation sequence provided by the user and the target attribute can include:

[0058] obtaining a regular expression provided by the user and an attribute allowed to be disclosed corresponding to the regular expression; obtaining a first operation sequence provided by the user, and determining an attribute allowed to be disclosed corresponding to a target regular expression matched by the first operation sequence as the target attribute.

[0059] The regular expression is a logical formula for string operations (including normal characters and special characters, normal characters such as letters between a and z, and special characters also known as metacharacters). That is, a "regular string" is formed by using some specific characters and combinations of these specific characters, which can be used to express a filtering logic for strings. In actual applications, the attribute allowed to be disclosed corresponding to the regular expression provided by the user can be obtained, so that for the first operation sequence provided by the user, the attribute allowed to be disclosed corresponding to the target regular expression matched by the first operation sequence can be matched as the target attribute, and for other operation sequences, the attribute allowed to be disclosed corresponding to the target regular expression can also be matched, improving the universality of the operation sequence and the target attribute setting.

[0060] Of course, in actual data operation scenarios, in addition to obtaining the first operation sequence and the target attribute provided by the user, the ciphertext data provided by the user can also be obtained. In addition, in order to ensure data security, the ciphertext processing operation can be performed in a trusted execution environment, and therefore, the method can further include:

[0061] obtaining ciphertext data encrypted and transmitted by the user; and decrypting the ciphertext data in a trusted execution environment to obtain plaintext data corresponding to the ciphertext data.

[0062] The ciphertext data provided by the user can be generated by encrypting the plaintext data using a preset encryption algorithm, and the server can use a decryption algorithm corresponding to the preset encryption algorithm to decrypt the ciphertext data in the trusted execution environment to obtain the plaintext data corresponding to the ciphertext data. The plaintext data can be subjected to subsequent ciphertext processing operations according to the operation sequence specified by the user, and the like.

[0063] 102: Determine a sub-operation sequence corresponding to each operation order of the first operation sequence.

[0064] The different operation orders corresponding to the first operation sequence can be enumerated, and one or more sub-operation sequences under any operation order can be determined. In order to facilitate understanding, Figure 2 shows a schematic diagram of one embodiment of determining multiple sub-operation sequences under different operation orders. As shown in Figure 2As shown, the first operation sequence is A+B*C-D, and the operation sequences of the multiple sub-operation sequences in one operation order are B*C, A+(B*C), (A+(B*C))-D in turn; the operation sequences of the multiple sub-operation sequences in another operation order are B*C, (B*C)-D, A+((B*C)-D) in turn; the operation sequences of the multiple sub-operation sequences in another operation order are A-D, B*C, (A-D)+(B*C), and so on.

[0065] 103: Set the corresponding state identifier for the ciphertext result of the first operation sequence.

[0066] The state identifier can be implemented in the form of a number, a letter, a figure, or the like, and the embodiments of the present application do not limit the same.

[0067] It can be understood that, since the ciphertext results in different operation orders have the same meaning, the state identifiers of the ciphertext results in different operation orders are the same, such as being set as the number 9.

[0068] 104: Generate a matching rule according to the sub-operation sequences corresponding to different operation orders and the state identifiers of the ciphertext results.

[0069] The matching rule is used to determine that the ciphertext result of the second operation sequence is the state identifier in the case that the second operation sequence matches the sub-operation sequence corresponding to any operation order.

[0070] The matching rule can include the sub-operation sequences corresponding to different operation orders and the state identifiers of the ciphertext results. The case that the second operation sequence matches the sub-operation sequence corresponding to any operation order can include that the second operation sequence or any sub-operation sequence in the second operation sequence is consistent with the sub-operation sequence corresponding to the operation order, and then the ciphertext result of any sub-operation sequence in the second operation sequence can be the state identifier of the ciphertext result of the first operation sequence set in the matching rule.

[0071] It should be noted that, in the description herein, the first operation sequence or the second operation sequence represents a complete operation combination, and the sub-operation sequence represents a sub-operation combination or a partial operation combination.

[0072] The second operation sequence can refer to a target operation sequence or a sub-operation sequence in the target operation sequence to be executed in response to a ciphertext processing event.

[0073] In addition, in order to facilitate matching search and improve processing efficiency, the matching can also be performed through state conversion, which will be described in detail in the embodiments below.

[0074] Optionally, the first operation sequence can be identical to the second operation sequence or the first operation sequence can be a sub-operation sequence in the second operation sequence. If the first operation sequence is identical to the second operation sequence, it can be determined that the ciphertext result of the second operation sequence is the state identifier set in the matching rule; if the first operation sequence is a sub-operation sequence in the second operation sequence, it can be determined that the intermediate result of the second operation sequence is the state identifier set in the matching rule; for example, taking the matching rule generated by the first operation sequence A+B*C-D as an example, if the second operation sequence is A+B*C-D-F, the state identifier of the ciphertext result of the sub-operation sequence A+B*C-D in the second operation sequence can be set to the number 9.

[0075] 105: generating an attribute disclosure rule according to the state identifier corresponding to the ciphertext result in the matching rule and the target attribute.

[0076] Among them, it can be according to the state identifier of the ciphertext result and the target attribute, generate the attribute disclosure rule in the case that the state identifier of any ciphertext data is consistent with the state identifier of the ciphertext result in the matching rule, allow to disclose the target attribute in the ciphertext data, otherwise do not allow to disclose the target attribute in the ciphertext data, that is, the attribute matching rule can include the state identifier of the ciphertext result corresponding to the first operation sequence and the target attribute. For example, assuming that the state identifier of the ciphertext result of the first operation sequence is the number 9 and the target attribute is the highest bit; the attribute disclosure rule can include the number 9 and the highest bit, only the highest bit of the ciphertext data with the state identifier of the number 9 is allowed to be disclosed, and any attribute of the ciphertext data with the state identifier other than the number 9 is not allowed to be disclosed.

[0077] The attribute disclosure rule can be used to determine the target state identifier of the target ciphertext data that allows disclosure of the target attribute in the target ciphertext data.

[0078] In addition, the generated attribute disclosure rule and the matching rule can be stored.

[0079] In the trusted execution environment, the attribute disclosure rule can be used to determine the target plaintext data corresponding to the target ciphertext data in the case that the target state identifier allows disclosure, and output the target attribute in the target plaintext data to the trusted execution environment.

[0080] In this embodiment, the matching rule is generated according to the state identifier of the ciphertext result of the first operation sequence and the state identifier of the sub-operation sequence of the first operation sequence under different operation sequences, which can determine the state identifier of the ciphertext result of the second operation sequence as the state identifier in the matching rule when the second operation sequence matches any sub-operation sequence corresponding to the operation sequence, thereby realizing the setting of the state identifier of the ciphertext result of the second operation sequence. In addition, the attribute disclosure rule is generated according to the state identifier of the ciphertext result of the first operation sequence and the target attribute provided by the user, which can disclose the target attribute in the target ciphertext data when it is determined that the target ciphertext data matches the target state identifier that allows disclosure, thereby realizing the disclosure of the target attribute of the target ciphertext data only when the target state identifier of the target ciphertext data allows disclosure, that is, the user-specified attribute is allowed to be disclosed only when the data comes from the specified operation combination, which can be understood as the user-authorized attribute, and the attribute is not disclosed in any other operation combination, the same calculation based on other data or the disclosure of other unauthorized attributes. In this way, the rationality, granularity and flexibility of the data attribute disclosure setting can be improved on the basis of ensuring data security.

[0081] The above embodiments show the implementation of setting the state identifier for the ciphertext result and then generating the matching rule in combination with the sub-operation sequence. In order to improve the matching efficiency, the state identifier can also be set for the intermediate result of the sub-operation sequence. Therefore, in some embodiments, the matching rule can include a plurality of state transition rules, and setting the state identifier for the ciphertext result of the first operation sequence can include:

[0082] The state identifier is set for the intermediate result of any sub-operation sequence and the ciphertext result of the first operation sequence, respectively.

[0083] The state identifier of the intermediate result of the sub-operation sequence is different from the state identifier of the ciphertext result of the first operation sequence.

[0084] Optionally, the state identifiers of the intermediate results and the ciphertext results can be set according to the following principles: the state identifiers of equivalent sub-operation sequences in different operation orders are the same, and the ciphertext results in different operation orders have the same state identifier. The equivalent sub-operation sequences can refer to a plurality of sub-operation sequences that operate on the same operands according to the same operator. It can be understood that the equivalent sub-operation sequences have the same meaning in different operation orders, and therefore, the state identifiers of the intermediate results can be set according to the principle that the equivalent sub-operation sequences have the same state identifier. For example, for the two different operation orders "B*C, A+(B*C), (A+(B*C))-D" and "A-D, B*C, (A-D)+(B*C)", the sub-operation sequence "B*C" is a multiplication operation on the operands "B" and "C", which is an equivalent sub-operation sequence, and the intermediate results can have the same state identifier, for example, the number 5. In addition, the ciphertext results in different operation orders also have the same meaning, and therefore, the state identifiers of the ciphertext results can be set according to the principle that the ciphertext results in different operation orders have the same state identifier. For example, for the two different operation orders "B*C, A+(B*C), (A+(B*C))-D" and "A-D, B*C, (A-D)+(B*C)", "A+(B*C))-D" represents the ciphertext result, and the state identifier can be set to the number 9.

[0085] On this basis, the generation of the matching rule according to the state identifiers of the sub-operation sequences and the ciphertext results corresponding to different operation orders can include:

[0086] The state transition rule is generated according to the state identifiers corresponding to any sub-operation sequence, intermediate result and ciphertext result.

[0087] For example, the state identifier of the intermediate result of the sub-operation sequence "B*C" is the number 5, the state identifier of the intermediate result of the sub-operation sequence "A+(B*C)" is the number 6, and the state identifier of the intermediate result of the sub-operation sequence "(A+(B*C))-D" is the number 9. The state transition rule can include that the state identifier "5" is converted to the state identifier "6" through the addition operation with the operand A, and the state identifier "6" is converted to the state identifier "9" through the subtraction operation with the operand D.

[0088] In actual application, the state transition rule can be used to determine the state identifier corresponding to the ciphertext result of the second operation sequence in the case of successful matching with the second operation sequence. At this time, the state identifier corresponding to the ciphertext result of the second operation sequence can be the state identifier of the intermediate result specified in the state transition rule, or can be the state identifier of the ciphertext result. For example, when the second operation sequence is B*C, it can be determined that the state identifier corresponding to the ciphertext result of the second operation sequence is the number 5. For another example, when the second operation sequence is A+B*C-D, it can be determined that the state identifier corresponding to the ciphertext result of the second operation sequence is the number 9.

[0089] In the embodiment, by setting the state identifier for the intermediate result of the sub-operation sequence, and generating the state transition rule according to the state identifiers corresponding to the sub-operation sequence, the intermediate result and the ciphertext result, the matching efficiency of the second operation sequence and the state transition rule is improved, so that in the case of matching the intermediate result of a certain sub-operation sequence in the state transition rule, the state identifier corresponding to the ciphertext result of the second operation sequence can be determined, and the efficiency and operability of determining whether to allow attribute disclosure based on the state identifier and the attribute disclosure rule are improved.

[0090] In order to further improve the matching efficiency, optionally, the method can further include:

[0091] Determining the state identifier corresponding to the data tag involved in the first operation sequence.

[0092] The state identifier corresponding to the data tag is different from the state identifiers of the intermediate result and the ciphertext result.

[0093] Optionally, determining the state identifier corresponding to the data tag involved in the first operation sequence can include:

[0094] Determining the data tag involved in the first operation sequence.

[0095] Determining the state identifier corresponding to the data tag involved in the first operation sequence according to the state identifier set for different data tags.

[0096] The data tag can include a string, an enumeration value, a combination of a table name and a column name in a database, and the like. Different data tags are different for different data categories, and the data tag can be used to identify the data category. For example, when the data is salary, the corresponding data tag can be A, and when the data is age, the corresponding data tag can be g, and the like. The state identifier set for different data tags can be different. For example, the state identifier set for the data tag A can be 1, the state identifier set for the data tag g can be 27, and the like.

[0097] The data label can be provided by the user, and the data label transmitted by the user can be acquired. In order to improve the data security and integrity, the above method further comprises:

[0098] Different data labels transmitted by encryption are acquired; and the different data labels are decrypted in the trusted execution environment.

[0099] The data label can be encrypted and transmitted together with the plaintext data by using the same preset encryption algorithm, so that the decryption algorithm corresponding to the preset encryption algorithm can be used for decryption in the trusted execution environment, or the data label can be transmitted after signature protection, and the data label can be used after signature verification in the trusted execution environment, etc.

[0100] The data label is transmitted after encryption or processing, so that the data transmission security is improved, and the integrity protection is realized.

[0101] After the data label provided by the user is acquired, the state identifier corresponding to the data label involved in the first operation sequence can be determined according to the data label involved in the first operation sequence and the state identifier set for different data labels. Taking the first operation sequence A+B*C-D as an example, the state identifiers corresponding to the data labels involved can be 1-4 respectively.

[0102] Optionally, different data labels can identify different data categories corresponding to one or more users, that is, in actual application, the data labels involved in the operation sequence can be provided by multiple users. For example, in the first operation sequence A+B*C-D, the data labels A and B can be provided by the first user, and the data labels C and D can be provided by the second user, so that the joint analysis of multiple user ciphertext data can be realized.

[0103] Further, after the state identifier corresponding to the data label involved in the first operation sequence is determined, the state conversion rule can be generated according to the state identifier corresponding to any sub-operation sequence, intermediate result and ciphertext result.

[0104] The state conversion rule is generated according to the state identifier of the data label involved in any sub-operation sequence, the operator and the state identifier of the intermediate result.

[0105] Optionally, the state transition rule can be generated by taking the state identifier of the first data tag in any operation sequence as the start state, the operator and the corresponding state identifiers of the rest data tags as the transition condition, and the state identifier of the intermediate result of the sub-operation sequence as the target state. For example, in the sub-operation sequence of "B*C", the state identifier of the first data tag B is number 2, the state identifier of the rest data tag C is number 3, and the state identifier of the intermediate result is number 5. The state transition rule can be generated by taking the state identifier 2 as the start state, *3 as the transition condition, and state identifier 5 as the target state. The state transition rule can include that the state identifier "2" is converted to the state identifier "5" via "*3".

[0106] For the convenience of understanding, Figure 3 A schematic diagram of one embodiment of a state transition rule is shown. As Figure 3 shown, the state transition rule generated by taking the first operation sequence as A+B*C-D can include the mapping relationship between the data tags A, B, C, D, ··· and the state identifiers 1, 2, 3, 4, ···, and the conversion rules that the state identifier "1" is converted to the state identifier "6" via "+5", the state identifier "1" is converted to the state identifier "9" via "+7", the state identifier "1" is converted to the state identifier "8" via "-4", ···, the state identifier "7" is converted to the state identifier "9" via "+1", and the state identifier "8" is converted to the state identifier "9" via "*5".

[0107] In this embodiment, the state transition rule is generated by setting the state identifiers for the data tags involved in the first operation sequence, and taking the state identifier of the first data tag in any sub-operation sequence as the start state, the operator and the corresponding state identifiers of the rest data tags as the transition condition, and the state identifier of the intermediate result of the sub-operation sequence as the target state. This realizes clear state transition, improves the matching efficiency of the second operation sequence and the state transition rule, and further improves the attribute disclosure efficiency.

[0108] In order to further clarify the state transition process, Figure 4 A schematic diagram of one embodiment of a state transition process is shown. As Figure 4 shown, the state transition process corresponding Figure 3The state transition process of the state transition rule shown can include that state identifier "2" is transitioned to state identifier "5" via "*3", and state identifier "3" is transitioned to state identifier "5" via "*2", state identifier "5" is transitioned to state identifier "6" via "+1", state identifier "5" is transitioned to state identifier "7" via "-4", state identifier "5" is transitioned to state identifier "9" via "+8", state identifier "1" is transitioned to state identifier "6" via "+5", state identifier "1" is transitioned to state identifier "8" via "-4", state identifier "1" is transitioned to state identifier "9" via "+7", state identifier "8" is transitioned to state identifier "9" via "+5", state identifier "6" is transitioned to state identifier "9" via "-4", and state identifier "7" is transitioned to state identifier "9" via "+1", wherein the state identifier "9" represents the state identifier of the ciphertext result.

[0109] Thus, the clear display of the state transition process is improved, the matching efficiency of the second operation sequence and the state transition rule is improved, and the attribute disclosure efficiency is further improved.

[0110] To perfect the matching process, the state identifier can also be set for the ciphertext result of the matching failure. In some embodiments, the above method can further include:

[0111] A preset identifier is provided; and a preset rule is set according to the preset identifier.

[0112] The preset identifier is different from the state identifiers of the above data label, intermediate result and ciphertext result. For example, the preset identifier can be set as the number 0.

[0113] The preset rule can be used to determine that the ciphertext result of the second operation sequence corresponds to the preset identifier in the case that the second operation sequence and the matching rule fail to match or the operand involved in the second operation sequence is the preset identifier. For example, Figure 3 As shown, the preset rule can set the preset identifier as the number 0 when the matching is incorrect, i.e., the matching fails.

[0114] Further, generating the attribute disclosure rule according to the state identifier of the ciphertext result and the target attribute can include:

[0115] According to the state identifier of the ciphertext result and the target attribute, the attribute disclosure rule is generated to allow the target attribute in the ciphertext data to be disclosed in the case that the state identifier of the ciphertext data is consistent with the state identifier of the ciphertext result in the matching rule, and not to allow the target attribute in the ciphertext data to be disclosed in the case that the state identifier of the ciphertext data is consistent with the preset identifier in the preset rule. For example, Figure 4 As shown, the attribute disclosure rule can include that the MSB (most significant bit) of the ciphertext data with the state identifier of the number 9 is allowed to be disclosed.

[0116] By providing the preset identifier and setting the preset rule, the preset rule is matched to determine that the state identifier corresponding to the ciphertext result is the preset identifier in the case that the second operation sequence fails to match the state conversion rule, the setting of the state identifier of the ciphertext result in the second operation sequence in the case of matching failure is realized, the matching process is further improved, and the efficiency and operability of determining whether to allow attribute disclosure based on the state identifier and the attribute disclosure rule are improved.

[0117] As shown in Figure 5 FIG. 1 is a flow chart of another embodiment of a rule configuration method provided by the present application, which can include the following steps:

[0118] 501: determining a first operation sequence and a target attribute provided by a user;

[0119] 502: determining a plurality of sub-operation sequences corresponding to different operation sequences according to the first operation sequence;

[0120] 503: setting a state identifier for a data tag involved in the first operation sequence, and setting the state identifier for an intermediate result and a ciphertext result respectively according to the principle that equivalent sub-operation sequences have the same state identifier and the ciphertext result has the same state identifier;

[0121] 504: generating a state conversion rule by taking the state identifier of the first data tag in any sub-operation sequence as a starting state, the state identifier corresponding to the operator and the remaining data tags as a conversion condition, and the state identifier of the intermediate result of the sub-operation sequence as a target state;

[0122] 505: setting a preset rule according to a preset identifier;

[0123] 506: generating an attribute disclosure rule according to the state identifier of the ciphertext result and the target attribute.

[0124] In this embodiment, by setting state identifiers for the data tags involved in the first operation sequence, setting state identifiers for the intermediate results of multiple sub-operation sequences under different operation orders, and setting state identifiers for the ciphertext result of the first operation sequence, and using the state identifier of the first data tag in any sub-operation sequence as the starting state, the state identifiers corresponding to the operator and the remaining data tags as the transition conditions, and the state identifier of the intermediate result of the sub-operation sequence as the target state, a state transition rule is generated. If the second operation sequence successfully matches the state transition rule, the state identifier in the state transition rule corresponding to the ciphertext result of the second operation sequence can be determined. This achieves the setting of the state identifier for the ciphertext result of the second operation sequence, and by... The system generates attribute disclosure rules based on the status identifier of the encrypted result of an operation sequence and the target attribute provided by the user. This allows for the disclosure of target attributes in the encrypted data only when the target status identifier allows disclosure. In other words, it ensures that user-specified attributes are disclosed only when the data comes from a specified combination of operations (i.e., user-authorized attributes). Attributes are not disclosed in any other combination of operations, based on the same calculations with other data, or when disclosing other unauthorized attributes. This improves the rationality, granularity, and flexibility of data attribute disclosure settings while ensuring data security. Furthermore, by providing a preset identifier and setting preset rules, the system matches the preset rule when the second operation sequence fails to match the aforementioned status transition rule. This determines the status identifier corresponding to the encrypted result as the preset identifier, thus setting the status identifier of the encrypted result in the second operation sequence in case of a matching failure. This further improves the matching process and enhances the efficiency and operability of determining whether attribute disclosure is allowed based on status identifiers and attribute disclosure rules.

[0125] The following explains the ciphertext processing procedure.

[0126] like Figure 6 The diagram shown is a flowchart of an embodiment of a ciphertext processing method provided in this application. The method may include the following steps:

[0127] 601: In response to a ciphertext processing event, determine the target sequence of operations.

[0128] In this embodiment, the ciphertext processing event can be generated in response to a ciphertext processing operation, which is the process of processing ciphertext data provided by the user according to a target operation sequence. Optionally, the ciphertext processing event can be generated after receiving a ciphertext processing request. The ciphertext processing request specifies the target operation sequence, etc.

[0129] 602: match the target operation sequence with the matching rule to determine the state identifier corresponding to the ciphertext result of the target operation sequence.

[0130] The matching rule can be generated according to the state identifier of the ciphertext result of the first operation sequence and the sub-operation sequence corresponding to different operation sequences of the first operation sequence. The first operation sequence can be the same as the target operation sequence or the first operation sequence can be a sub-operation sequence in the target operation sequence. In the case that the first operation sequence is the same as the target operation sequence, matching the target operation sequence with the matching rule can determine the state identifier corresponding to the ciphertext result of the target operation sequence, and in the case that the first operation sequence is a sub-operation sequence in the target operation sequence, matching the target operation sequence with the matching rule can determine the state identifier corresponding to the intermediate result of the target operation sequence.

[0131] In the case of successful matching, it can be determined that the ciphertext result of the target operation sequence is the state identifier corresponding to the ciphertext result of the first operation sequence set in the matching rule.

[0132] And, specifically, in the case that the target operation sequence matches any sub-operation sequence corresponding to an operation sequence, it is determined that the matching is successful.

[0133] The generation process of the matching rule has been described in detail in the foregoing embodiments, which will not be repeated here.

[0134] 603: According to the attribute acquisition instruction of the target ciphertext data, determine the target state identifier and the attribute disclosure rule corresponding to the target ciphertext data.

[0135] The attribute disclosure rule can be generated according to the state identifier of the ciphertext result of the first operation sequence and the target attribute provided by the user. The generation process of the attribute disclosure rule has also been described in detail in the foregoing embodiments, which will not be repeated here.

[0136] The attribute acquisition instruction can be sent by the ciphertext data requester.

[0137] 604: According to the attribute disclosure rule, in the case that the target state identifier allows disclosure, disclose the target attribute in the target ciphertext data.

[0138] Optionally, according to the attribute disclosure rule, in the case that the target state identifier does not allow disclosure, output a prompt information.

[0139] In the case that the target state identifier allows disclosure, the target attribute in the target ciphertext data can be sent to the ciphertext data requester, and in the case that the target state identifier does not allow disclosure, a prompt information is output to the ciphertext data requester to prompt that the target attribute of the requested target ciphertext data is not authorized and does not support disclosure.

[0140] In this embodiment, the ciphertext result corresponding to the state identifier of the target operation sequence is determined by matching the target operation sequence with the matching rule, which is generated according to the state identifier of the ciphertext result of the first operation sequence and the sub-operation sequence of the first operation sequence under different operation sequences, and the target state identifier and the attribute disclosure rule corresponding to the target ciphertext data are determined according to the attribute acquisition instruction of the target ciphertext data. In the case of allowing disclosure, the target attribute in the ciphertext data is disclosed, ensuring that the user-specified attribute is allowed to be disclosed only when the data comes from the specified operation combination, which can be understood as the authorized attribute of the user, and the attribute is not disclosed in any other operation combination, the same calculation based on other data or the disclosure of other unauthorized attributes. On the basis of ensuring data security, the rationality, granularity and flexibility of data attribute disclosure setting are improved.

[0141] In some embodiments, as described in the foregoing, the matching rule can include a state transition rule. Alternatively, the matching rule can include a plurality of state transition rules. The state transition rule can be generated according to the state identifier corresponding to any sub-operation sequence of the first operation sequence, the intermediate result of the sub-operation sequence and the ciphertext result of the first operation sequence, which is described in detail in the foregoing embodiments and will not be repeated here.

[0142] At this time, matching the target operation sequence with the matching rule to determine the state identifier corresponding to the ciphertext result of the target operation sequence can include:

[0143] Matching the target operation sequence with the state transition rule.

[0144] According to the state transition rule, the state identifier corresponding to the intermediate result and / or the ciphertext result of the target operation sequence is determined.

[0145] Taking the state transition rule shown in Figure 3 If the target operation sequence is A+B*C-D, the state identifier of the ciphertext result of the target operation sequence can be determined as number 9. If the target operation sequence is A+B*C-D-E, the state identifier of the intermediate result corresponding to the sub-operation sequence A+B*C-D in the target operation sequence can be determined as number 9.

[0146] By matching the state transition rule, the state identifier corresponding to the intermediate result or the ciphertext result of the target operation sequence can be determined when the target operation sequence matches a sub-operation sequence in the state transition rule, improving the efficiency and operability of determining whether to allow attribute disclosure based on the state identifier and the attribute disclosure rule.

[0147] In some embodiments, as described in the foregoing, the state transition rule can include a starting state, a target state and a transition condition.

[0148] The above methods may also include:

[0149] In response to ciphertext processing events, determine the data tags corresponding to the operands in the target operation sequence;

[0150] Based on the correspondence between data labels and status identifiers, the status identifiers corresponding to the operands in the target operation sequence are determined.

[0151] At this point, matching the target operation sequence with the state transition rule can include:

[0152] Match the state identifiers and operators of the operands involved in the target sub-operation sequence in the target operation sequence with the starting state and transition conditions in the state transition rules.

[0153] Furthermore, based on the state transition rules, determining the state identifiers corresponding to the intermediate results and / or ciphertext results of the target operation sequence may include:

[0154] If the target sub-operation sequence matches the state transition rule, determine the state identifier of the target state corresponding to the ciphertext result of the target sub-operation sequence.

[0155] by Figure 3 Taking the state transition rule shown as an example, if the target operation sequence is A+B*C, and the data labels A, B, and C of the operands in the target operation sequence correspond to the state identifiers 1, 2, and 3 respectively, the state identifiers "2" and "3" of the operands involved in the target sub-operation sequence "B*C" and the operator "*" can be matched with the starting state "2" and the transition condition "*3" in the state transition rule. Thus, it can be determined that the state identifier of the intermediate result of the target sub-operation sequence is the number 5.

[0156] By matching clear state transition rules, the matching efficiency between the target operation sequence and the state transition rules is further improved, thereby improving the attribute disclosure efficiency.

[0157] In some embodiments, the above method may further include:

[0158] If the target sub-operation sequence fails to match the state transition rule, the state identifier of the encrypted result of the target operation sequence can be determined as the preset identifier according to the preset rule.

[0159] Among them, the preset rules can be set according to the preset identifiers.

[0160] By matching preset rules, the status flag of the encrypted result in the target operation sequence can be set in case of matching failure, which further improves the matching process and enhances the efficiency and operability of determining whether attribute disclosure is allowed based on status flags and attribute disclosure rules.

[0161] In some embodiments, according to the attribute disclosure rule, in the case that the target state identifier allows disclosure, the target attribute in the target ciphertext data can be disclosed, which includes:

[0162] According to the attribute disclosure rule, it is determined whether the target state identifier is a state identifier defined in the attribute disclosure rule; if yes, according to the target attribute defined in the attribute disclosure rule, the target attribute in the target ciphertext data is disclosed.

[0163] In the attribute disclosure rule in the embodiment shown in Figure 1 For example, in the attribute disclosure rule in the embodiment shown in

[0164] As shown in Figure 7 An embodiment of a structure diagram of a rule configuration device provided by the present application is shown in the figure, which can include the following modules:

[0165] The first determining module 701 is configured to determine the first operation sequence provided by the user and the target attribute.

[0166] The second determining module 702 is configured to determine the sub-operation sequence corresponding to different operation sequences according to the different operation sequences of the first operation sequence.

[0167] The first setting module 703 is configured to set the state identifier for the ciphertext result of the first operation sequence.

[0168] The first generating module 704 is configured to generate a matching rule according to the sub-operation sequence corresponding to different operation sequences and the state identifier of the ciphertext result; the matching rule can be used to determine that the ciphertext result of the second operation sequence is the state identifier in the case that the second operation sequence matches the sub-operation sequence corresponding to any operation sequence.

[0169] The second generating module 705 is configured to generate an attribute disclosure rule according to the state identifier of the ciphertext result in the matching rule and the target attribute; the attribute disclosure rule can be used to determine the target attribute in the target ciphertext data in the case that the target state identifier matched by the target ciphertext data allows disclosure.

[0170] The rule configuration device of the embodiment can realize Figure 1The rule configuration method shown can generate a matching rule according to the state identifier of the ciphertext result of the first operation sequence and the sub-operation sequence under different operation sequences, can determine the state identifier of the ciphertext result of the second operation sequence as the state identifier in the matching rule in a case where the second operation sequence matches any operation sequence corresponding sub-operation sequence, thereby achieving setting of the state identifier of the ciphertext result of the second operation sequence, and can generate an attribute disclosure rule according to the state identifier of the ciphertext result of the first operation sequence and the target attribute provided by the user, can disclose the target attribute in the target ciphertext data in a case where the target state identifier matched by the target ciphertext data allows disclosure, thereby achieving disclosure of the target attribute of the target ciphertext data only in the case where the target state identifier of the target ciphertext data allows disclosure, that is, ensuring that the user-specified attribute is allowed to be disclosed only when the data comes from a specified operation combination, which can be understood as a user-authorized attribute, and the attribute is not disclosed in any other operation combination, the same calculation based on other data or the disclosure of other unauthorized attributes, thereby improving the rationality, granularity and flexibility of data attribute disclosure setting on the basis of ensuring data security.

[0171] In some embodiments, the first setting module 703 can be specifically configured to set state identifiers for the intermediate results of any sub-operation sequence and the ciphertext result of the first operation sequence respectively.

[0172] The first generation module 704 can be specifically configured to generate a state conversion rule according to the state identifiers corresponding to any sub-operation sequence, intermediate result and ciphertext result; the state conversion rule can be used to determine the state identifier corresponding to the ciphertext result of the second operation sequence in a case where the second operation sequence matches successfully.

[0173] In some embodiments, the first setting module 703 can be specifically configured to determine the state identifier corresponding to the data tag involved in the first operation sequence, and set the state identifiers for the intermediate results and the ciphertext result according to the setting principle that equivalent sub-operation sequences have the same state identifier and the ciphertext result has the same state identifier.

[0174] In some embodiments, the first generation module 704 can be specifically configured to generate a state conversion rule according to the state identifier of the data tag involved in the sub-operation sequence, the operator and the state identifier of the intermediate result.

[0175] In some embodiments, the first generation module 704 can be specifically configured to generate a state conversion rule with the state identifier of the first data tag in any sub-operation sequence as the starting state, the operator and the state identifiers corresponding to the remaining data tags as the conversion conditions, and the state identifier of the intermediate result of the sub-operation sequence as the target state.

[0176] In some embodiments, the apparatus can further include:

[0177] a providing module configured to provide a preset identifier;

[0178] a second setting module configured to set a preset rule according to the preset identifier; the preset rule can be used to determine that the ciphertext result of the second operation sequence corresponds to the preset identifier in a case where the second operation sequence and the matching rule fail to match or the operation number involved in the second operation sequence is the preset identifier.

[0179] In some embodiments, the first determining module 701 can be specifically configured to acquire a regular expression provided by a user and an attribute allowed to be disclosed corresponding to the regular expression; acquire a first operation sequence provided by the user, and determine that the attribute allowed to be disclosed corresponding to a target regular expression matched by the first operation sequence is a target attribute.

[0180] In some embodiments, the first setting module 703 can be specifically configured to determine a data label involved in the first operation sequence, the data label being provided by the user; different data labels identify different data categories; the data label is used as an operation number in the first operation sequence; and the state identifier corresponding to the data label involved in the first operation sequence is determined according to a state identifier respectively set for different data labels.

[0181] In some embodiments, the apparatus can further include:

[0182] a first acquiring module configured to acquire different data labels in encrypted transmission;

[0183] a first decrypting module configured to decrypt the different data labels in a trusted execution environment.

[0184] As shown in Figure 8 FIG. 1, which is a structural schematic diagram of an embodiment of a ciphertext processing apparatus provided by the present application, the apparatus can include the following modules:

[0185] a third determining module 801 configured to determine a target operation sequence in response to a ciphertext processing event;

[0186] a matching module 802 configured to match the target operation sequence with a matching rule to determine a state identifier corresponding to a ciphertext result of the target operation sequence; the matching rule can be generated according to a sub-operation sequence corresponding to different operation orders of a first operation sequence and the state identifier of the ciphertext result of the first operation sequence, the first operation sequence being the same as the target operation sequence or the first operation sequence being a sub-operation sequence in the target operation sequence;

[0187] The fourth determining module 803 is used to determine the target status identifier and attribute disclosure rule corresponding to the target ciphertext data according to the attribute acquisition instruction of the target ciphertext data; the attribute disclosure rule can be generated based on the status identifier of the ciphertext result of the first operation sequence and the target attribute provided by the user.

[0188] Disclosure module 804 is used to disclose target attributes in target encrypted data according to attribute disclosure rules, provided that disclosure is permitted by the target status identifier.

[0189] The encrypted processing device in this embodiment can achieve... Figure 6 The ciphertext processing method shown above determines the status identifier corresponding to the ciphertext result of the target operation sequence by matching the target operation sequence with matching rules. These matching rules are generated based on the sub-operation sequences of the first operation sequence under different operation orders and the status identifiers of the ciphertext results of the first operation sequence. Furthermore, based on the attribute acquisition instructions for the target ciphertext data, the method determines the target status identifier and attribute disclosure rules corresponding to the target ciphertext data. When disclosure is permitted, the target attributes in the ciphertext data are disclosed. This ensures that user-specified attributes are disclosed only when the data comes from a specified combination of operations (i.e., user-authorized attributes). Attributes are not disclosed in any other combination of operations, based on the same calculations of other data, or when disclosing other unauthorized attributes. This method improves the rationality, granularity, and flexibility of data attribute disclosure settings while ensuring data security.

[0190] In some embodiments, the device may further include:

[0191] The prompt module is used to output prompt information when the target status identifier is not allowed to be disclosed, based on the attribute disclosure rules.

[0192] In some embodiments, the matching rules include multiple state transition rules;

[0193] The matching module 802 can be used to match the target operation sequence with the state transition rules; and to determine the state identifiers corresponding to the intermediate results and / or ciphertext results of the target operation sequence according to the state transition rules.

[0194] In some embodiments, state transition rules may include a starting state, a target state, and transition conditions;

[0195] The above-mentioned device may further include:

[0196] The fifth determination module is used to determine the data tags corresponding to the operands in the target operation sequence in response to the ciphertext processing event;

[0197] The sixth determination module is used to determine the status identifiers corresponding to the operands in the target operation sequence based on the correspondence between data tags and status identifiers.

[0198] The matching module 802 can be used to match state transition rules based on the state identifiers of operands, operators, and ciphertext results involved in at least one target sub-operation sequence of the target operation sequence.

[0199] In some embodiments, the matching module 802 can be specifically used to match the state identifiers and operators of the operands involved in the target sub-operation sequence in the target operation sequence with the starting state and transition conditions in the state transition rule; if the target sub-operation sequence matches the state transition rule successfully, the state identifier of the target state corresponding to the ciphertext result of the target sub-operation sequence is determined.

[0200] In some embodiments, the above-described apparatus may further include:

[0201] The seventh determination module is used to determine the state identifier of the encrypted result of the target operation sequence as a preset identifier if the target sub-operation sequence fails to match the state transition rule, according to the preset rule.

[0202] In some embodiments, the disclosure module 804 may be specifically used to determine whether the target status identifier is a status identifier defined in the attribute disclosure rules according to the attribute disclosure rules; if so, to disclose the target attribute in the target encrypted data according to the target attribute defined in the attribute disclosure rules.

[0203] In some embodiments, the above-described apparatus may further include:

[0204] The second acquisition module is used to acquire the encrypted data transmitted by the user.

[0205] The second decryption module is used to decrypt the plaintext data corresponding to the ciphertext data in a trusted execution environment.

[0206] The processing module is used to process plaintext data according to the target operation sequence to obtain plaintext results;

[0207] The encryption module is used to encrypt plaintext results to obtain ciphertext results, and output the ciphertext results to the trusted execution environment;

[0208] The disclosure module 804 can be used in a trusted execution environment to determine the target plaintext data corresponding to the target ciphertext data according to the attribute disclosure rules, provided that the target status identifier allows disclosure, and output the target attributes in the target plaintext data to the trusted execution environment.

[0209] To facilitate understanding, the following example uses a real-world encrypted text processing scenario, combined with... Figure 9 The schematic diagram shown illustrates the technical solution of this application.

[0210] like Figure 9The system architecture shown may include a server 901, a user 902, and a ciphertext data requester 903.

[0211] When generating encrypted data, users can first set data tags using strings, enumeration values, etc., to identify the data type, such as salary or name. Users can encrypt and transmit the data tags to server 901 via client 902. Server 901 can decrypt the data tags in a trusted execution environment and map them to status identifiers. The data tags can be encrypted along with the plaintext data before being transmitted to server 901. Alternatively, other methods of integrity protection can be used, such as digital signatures. By encrypting or processing the data tags before transmission, tampering by third parties during transmission can be avoided, improving data transmission security and achieving integrity protection. This application does not limit the scope of this application.

[0212] Users can authorize the disclosure of target attributes through the user terminal 902. Users can specify the first operation sequence A+B*CD and the target attribute through the user terminal 902. The first operation sequence and target attribute can be provided with authorization information, such as "MSB(A+B*CD)", where MSB represents the most significant bit, and A, B, C, and D are numeric labels. The first operation sequence uses numeric labels to distinguish different data types. Optionally, A, B, C, and D can correspond to one or more users, thereby enabling multi-user data joint analysis.

[0213] Server 901 can determine the first operation sequence A+B*CD and the target attribute provided by client 902. Server 901 can determine multiple sub-operation sequences corresponding to different operation orders based on the first operation sequence. For example, it can set status identifiers 1-4 for the data tags AD involved in the first operation sequence, and set status identifiers 5-9 for intermediate results and ciphertext results based on the principle that equivalent sub-operation sequences have the same status identifier and ciphertext results have the same status identifier. Optionally, if an intermediate result does not have a status identifier set, an unused status identifier can be randomly assigned. Then, a state transition rule can be generated using the status identifier of the first data tag in any sub-operation sequence as the starting state, the status identifiers of the operator and the remaining data tags as the transition conditions, and the status identifier of the intermediate result of the sub-operation sequence as the target state. A preset rule can be set based on preset identifier 0. Furthermore, based on the status identifier 9 of the ciphertext result and the target attribute MSB(A+B*CD), an attribute disclosure rule is generated, meaning that the highest bit of the ciphertext data with status identifier 9 is allowed to be disclosed. For example, state transition rules, preset rules, and attribute matching rules can be found in [reference needed]. Figure 3 As shown in the image.

[0214] Subsequently, the user can also send a ciphertext processing request through the client 902 to request the server 901 to perform ciphertext processing operations according to the target operation sequence. At this time, the server 901 can also respond to the ciphertext processing event, determine the target operation sequence, match the state transition rules, and determine the state identifier of the ciphertext result of the target operation sequence. The specific matching process can be found in the corresponding embodiments above, and will not be repeated here.

[0215] The server 901 can also obtain instructions based on the attributes of the encrypted data requester 903. First, it determines the target status identifier corresponding to the target encrypted data. According to the attribute disclosure rules, if the target status identifier allows disclosure, it discloses the target attributes in the target encrypted data. If the target status identifier does not allow disclosure, it can output a prompt message to the encrypted data requester 903.

[0216] In this embodiment, by setting state identifiers for data tags involved in the first operation sequence, setting state identifiers for intermediate results of multiple sub-operation sequences under different operation orders, and setting state identifiers for the ciphertext result of the first operation sequence, and using the state identifier of the first data tag in any sub-operation sequence as the starting state, the state identifiers corresponding to the operator and the remaining data tags as the transition conditions, and the state identifier of the intermediate result of the sub-operation sequence as the target state, a state transition rule is generated. If the target operation sequence successfully matches the state transition rule, the state identifier in the state transition rule corresponding to the ciphertext result of the target operation sequence can be determined. This achieves the setting of the state identifier for the ciphertext result of the target operation sequence, and by... The status identifier of the encrypted result of the first operation sequence and the target attribute provided by the user are used to generate attribute disclosure rules. If the target status identifier of the target encrypted data matches and allows disclosure, the target attribute in the target encrypted data can be disclosed. This ensures that target attributes of the target encrypted data are disclosed only when the target status identifier allows disclosure. In other words, it ensures that user-specified attributes are disclosed only when the data comes from a specified combination of operations—that is, user-authorized attributes. Attributes are not disclosed in any other combination of operations, based on the same calculations of other data, or when disclosing other unauthorized attributes. This improves the rationality, granularity, and flexibility of data attribute disclosure settings while ensuring data security. Furthermore, by setting status identifiers for the intermediate results of sub-operation sequences, the matching efficiency between the second operation sequence and the state transition rules is improved. When the intermediate result of a sub-operation sequence in the second operation sequence matches the state transition rules, the status identifier corresponding to the encrypted result of the second operation sequence can be determined, improving the efficiency and operability of determining whether attribute disclosure is allowed based on status identifiers and attribute disclosure rules. Furthermore, by setting state identifiers for the data labels involved in the first operation sequence, and using the state identifier of the first data label in the sub-operation sequence as the starting state, the state identifiers corresponding to the operator and the remaining data labels as the transition conditions, and the state identifier of the intermediate result of the sub-operation sequence as the target state, a state transition rule is generated. This achieves clear state transitions, further improving the matching efficiency between the second operation sequence and the state transition rule, and thus improving attribute disclosure efficiency. Furthermore, by following the state transition process in the state transition rule... Figure 4The diagram illustrates this, improving the clarity of the state transition process and further enhancing the matching efficiency of the second operation sequence with the state transition rules, as well as the attribute disclosure efficiency. Furthermore, by providing a preset identifier and setting preset rules, the system can match the preset rule when the second operation sequence fails to match the aforementioned state transition rules. This determines the state identifier corresponding to the ciphertext result as the preset identifier, thus enabling the setting of the state identifier for the ciphertext result in the second operation sequence in case of matching failure. This further refines the matching process and improves the efficiency and operability of determining whether attribute disclosure is allowed based on the state identifier and attribute disclosure rules.

[0217] like Figure 10 The diagram shown is a structural schematic of an embodiment of a computing device provided in this application. The device may include a storage component 1001 and a processing component 1002.

[0218] The storage component 1001 can be used to store one or more computer program instructions, wherein one or more computer program instructions are called and executed by the processing component 1002 to achieve... Figure 1 or Figure 5 The rule configuration method shown, or Figure 6 The ciphertext processing method shown.

[0219] Of course, the aforementioned computing device may also include other components, such as input / output interfaces, communication components, etc.

[0220] Input / output interfaces provide interfaces between processing components and peripheral interface modules, which can be output devices, input devices, etc. Communication components are configured to facilitate wired or wireless communication between computing devices and other devices.

[0221] It should be noted that the above-mentioned computing devices implement Figure 1 or Figure 5 The rule configuration method shown, or Figure 6 The encrypted processing method shown can be implemented using physical devices or elastic computing hosts provided by cloud computing platforms. It can be implemented as a distributed cluster composed of multiple servers or terminal devices, or as a single server or a single terminal device.

[0222] The aforementioned computing device can also be implemented as an electronic device. An electronic device can refer to a user-used device with the necessary functions such as internet access, computing, and communication; examples include mobile phones, tablets, personal computers, and wearable devices. It is understood that the aforementioned electronic device may also include display components, input / output interfaces, communication components, and other components, which will not be elaborated further.

[0223] In one or more of the above embodiments, the processing component may include one or more processors to execute computer instructions to perform all or part of the steps in the above method. Alternatively, the processing component may be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.

[0224] Storage components are configured to store various types of data to support operations on the terminal. Storage components can be implemented from 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 storage, flash memory, magnetic disk, or optical disk.

[0225] The display component can be an electroluminescent (EL) element, a liquid crystal display or a microdisplay with a similar structure, or a retina-direct display or a similar laser scanning display.

[0226] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, can perform... Figure 1 or Figure 5 The rule configuration method shown, or Figure 6 The encrypted text processing method is illustrated. This computer-readable medium may be included in the computing device described in the above embodiments; or it may exist independently and not be assembled into the computing device.

[0227] Computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof.

[0228] This application also provides a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program can perform [the following functions] when executed by a computer. Figure 1 or Figure 5 The rule configuration method shown, or Figure 6 The ciphertext processing method shown.

[0229] In such embodiments, the computer program may be downloaded and installed from a network, and / or installed from a removable medium. When the computer program is executed by a processor, it performs the various functions defined in the system of this application.

[0230] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0231] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

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

[0233] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A rule configuration method, characterized in that, include: Determine the first sequence of operations and target attributes provided by the user; Based on the different operation sequences of the first operation sequence, determine the sub-operation sequences corresponding to the different operation sequences; Set a corresponding status flag for the ciphertext result of the first operation sequence; A matching rule is generated based on the sub-operation sequences corresponding to the different operation sequences and the status identifier of the ciphertext result; the matching rule is used to determine the ciphertext result of the second operation sequence as the status identifier when the second operation sequence matches the sub-operation sequence corresponding to any operation sequence. Based on the status identifier corresponding to the ciphertext result in the matching rule and the target attribute, an attribute disclosure rule is generated; the attribute disclosure rule is used to disclose the target attribute in the target ciphertext data if the target status identifier of the target ciphertext data is allowed to be disclosed.

2. The method according to claim 1, characterized in that, The matching rules include multiple state transition rules, and setting a corresponding state identifier for the ciphertext result of the first operation sequence includes: Set a status flag for the intermediate result of any sub-operation sequence and the ciphertext result of the first operation sequence respectively; The step of generating matching rules based on the sub-operation sequences corresponding to the different operation sequences and the status identifier of the ciphertext result includes: A state transition rule is generated based on the state identifiers corresponding to each of any sub-operation sequence, intermediate result, and ciphertext result. The state transition rule is used to determine the state identifier in the state transition rule corresponding to the ciphertext result of the second operation sequence when the second operation sequence is successfully matched.

3. The method according to claim 2, characterized in that, The step of setting status flags for the intermediate result of any sub-operation sequence and the ciphertext result of the first operation sequence includes: The status identifiers corresponding to the data tags involved in the first operation sequence are determined, and status identifiers are set for the intermediate results and the ciphertext results respectively, based on the principle that equivalent sub-operation sequences have the same status identifiers and ciphertext results have the same status identifiers; wherein, the equivalent sub-operation sequences include multiple sub-operation sequences that operate on the same operands according to the same operator.

4. The method according to claim 3, characterized in that, The generation of state transition rules based on the state identifiers corresponding to any sub-operation sequence, intermediate result, and ciphertext result includes: Generate state transition rules based on the state identifiers of the data labels, operators, and intermediate results involved in any sub-operation sequence.

5. The method according to claim 4, characterized in that, The process of generating state transition rules based on the state identifiers of data tags, operators, and intermediate results involved in any sub-operation sequence includes: A state transition rule is generated by taking the state identifier of the first data tag in any sub-operation sequence as the starting state, the state identifiers corresponding to the operator and the remaining data tags as the transition conditions, and the state identifier of the intermediate result of the sub-operation sequence as the target state.

6. The method according to claim 1, characterized in that, Also includes: Provide preset identifiers; Based on the preset identifier, a preset rule is set; the preset rule is used to determine that the ciphertext result of the second operation sequence corresponds to the preset identifier when the second operation sequence fails to match the matching rule or when the operands involved in the second operation sequence are the preset identifier.

7. The method according to claim 1, characterized in that, The determination of the first operation sequence and target attributes provided by the user includes: Obtain the regular expression provided by the user and the attributes that are allowed to be disclosed corresponding to the regular expression; Obtain the first operation sequence provided by the user, and determine the allowed disclosed attribute corresponding to the target regular expression matched by the first operation sequence as the target attribute.

8. The method according to claim 3, characterized in that, The step of determining the status identifier corresponding to the data tag involved in the first operation sequence includes: The data tags involved in the first operation sequence are determined, and the data tags are provided by the user; wherein, the data tags are used to identify the data type; the data tags are used as operands in the first operation sequence; Based on the status identifiers set for different data tags, determine the status identifiers corresponding to the data tags involved in the first operation sequence.

9. The method according to claim 8, characterized in that, Also includes: Obtain different data tags from encrypted transmissions; Different data tags are obtained by decryption in a trusted execution environment.

10. A method for processing encrypted text, characterized in that, include: In response to ciphertext processing events, determine the target operation sequence; The target operation sequence is matched with the matching rules to determine the state identifier corresponding to the ciphertext result of the target operation sequence; The matching rule is generated based on the sub-operation sequences corresponding to different operation orders of the first operation sequence and the status identifier of the ciphertext result of the first operation sequence, wherein the first operation sequence is the same as the target operation sequence or the first operation sequence is a sub-operation sequence in the target operation sequence; Based on the attribute acquisition instruction of the target encrypted data, determine the target status identifier and attribute disclosure rule corresponding to the target encrypted data; the attribute disclosure rule is generated based on the status identifier of the encrypted result of the first operation sequence and the target attributes provided by the user. According to the attribute disclosure rules, if the target status identifier allows disclosure, the target attribute in the target encrypted data is disclosed.

11. The method according to claim 10, characterized in that, Also includes: According to the attribute disclosure rules, if the target status identifier is not allowed to be disclosed, a prompt message will be output.

12. The method according to claim 10, characterized in that, The matching rules include multiple state transition rules; the state transition rules are generated based on the state identifiers corresponding to each of the sub-operation sequences of the first operation sequence, the intermediate results of the sub-operation sequences, and the ciphertext results of the first operation sequence. The step of matching the target operation sequence with the matching rules to determine the state identifier corresponding to the ciphertext result of the target operation sequence includes: Match the target operation sequence with the state transition rule; Based on the state transition rules, determine the state identifiers corresponding to the intermediate results and / or ciphertext results of the target operation sequence, respectively.

13. The method according to claim 12, characterized in that, The state transition rule includes a starting state, a target state, and transition conditions; the method further includes: In response to ciphertext processing events, determine the data tags corresponding to the operands in the target operation sequence; Based on the correspondence between data tags and status identifiers, determine the status identifiers corresponding to the operands in the target operation sequence; The step of matching the target operation sequence with the state transition rule includes: The state identifiers and operators of the operands involved in the target sub-operation sequence in the target operation sequence are matched with the starting state and the transition condition in the state transition rule; The step of determining the state identifiers corresponding to the intermediate results and / or ciphertext results of the target operation sequence according to the state transition rules includes: If the target sub-operation sequence matches the state transition rule, the ciphertext result of the target sub-operation sequence is determined to correspond to the state identifier of the target state.

14. The method according to claim 13, characterized in that, Also includes: If the target sub-operation sequence fails to match the state transition rule, the state identifier of the encrypted result of the target operation sequence is determined to be a preset identifier according to a preset rule.

15. The method according to claim 10, characterized in that, The step of disclosing the target attribute in the target encrypted data according to the attribute disclosure rule, when the target status identifier allows disclosure, includes: Based on the attribute disclosure rules, determine whether the target status identifier is a status identifier defined in the attribute disclosure rules; If so, disclose the target attribute in the target encrypted data according to the target attribute defined by the attribute disclosure rule.

16. The method according to claim 10, characterized in that, Also includes: Obtain encrypted data transmitted by the user; The plaintext data corresponding to the ciphertext data is obtained by decryption in a trusted execution environment; The plaintext data is processed according to the target operation sequence to obtain the plaintext result; The plaintext result is encrypted to obtain the ciphertext result, and the ciphertext result is output to the trusted execution environment; The step of disclosing the target attribute in the target encrypted data according to the attribute disclosure rule, when the target status identifier allows disclosure, includes: In a trusted execution environment, based on the attribute disclosure rules, and assuming that the target status identifier allows disclosure, the target plaintext data corresponding to the target ciphertext data is determined, and the target attribute in the target plaintext data is output to the trusted execution environment.

17. A computing device, characterized in that, It includes a storage component and a processing component; the storage component stores one or more computer program instructions, which are invoked and executed by the processing component, and the processing component executes the one or more computer program instructions to implement the rule configuration method as described in any one of claims 1 to 9, or the ciphertext processing method as described in any one of claims 10 to 16.

18. A computer-readable storage medium, characterized in that, The system contains a computer program that is executed by a computer to implement the rule configuration method as described in any one of claims 1 to 9, or the ciphertext processing method as described in any one of claims 10 to 16.

19. A computer program product, characterized in that, The system contains a computer program that, when executed by a computer, implements the rule configuration method as described in any one of claims 1 to 9, or the ciphertext processing method as described in any one of claims 10 to 16.