Query processing device and query processing method
A query processing device that reduces the calculation cost for checking whether a query complies with restrictions. A query dividing section generates subqueries by dividing an input query for each of a plurality of organizations. A score computing section computes an organization score by evaluating an organization-specific risk that is the risk of determination that the subquery does not comply with organization rules of the organization corresponding to the subquery, on the basis of history information relating to a determination track record resulting from determining, regarding each organization, whether or not the input query complies with the organization rules of each organization. A subquery control section sequentially transmits the subqueries to rule check devices in transmission order according to the organization score, and response information is received regarding the subquery from the rule check devices. Whether the input query complies with restrictions is determined by using the response information.
1 . A query processing device that determines whether or not an input query to request operation on a plurality of pieces of data managed in each of a plurality of organizations complies with restrictions imposed on the plurality of pieces of data, the query processing device comprising:
a processor; and
a memory storing instructions that when executed by the processor configure the processor to:
generate a plurality of subqueries obtained by dividing the input query for each of the organizations, each of the plurality of subqueries corresponds to each of the organizations;
compute, regarding each of the organizations, an organization score obtained by evaluating an organization-specific risk that the subquery does not comply with organization rules of the organization corresponding to the subquery based on history information relating to a determination track record resulting from determining, regarding each of the organizations, whether or not the input query complies with the organization rules, the organization rules being the restrictions of each of the organizations;
sequentially transmit the plurality of subqueries to check devices in a transmission order according to the organization scores and sequentially receive response information regarding the plurality of subqueries from the check devices, the check devices checking whether each subquery of the plurality of subqueries complies with the organization rules of the organization corresponding to the subquery;
upon receiving response information indicating that a respective subquery does not comply with the organization rules, stop transmission of any subqueries subsequent to the respective subquery; and
determine whether the input query complies with the restrictions, by using the response information.
2 . The query processing device according to claim 1 , wherein the processor is configured to:
stop transmission of the respective subquery when receiving non-compliance response indicating that the respective subquery does not comply with the organization rules, as the response information, and
determine that the input query does not comply with the restrictions when the non-compliance response information is received.
3 . The query processing device according to claim 1 , wherein the processor is configured to:
compute, regarding each of the organizations, a required time taken to determine that the subquery corresponding to the organization does not comply with the organization rules and a ratio of determination that the subquery corresponding to the organization does not comply with the organization rules, based on the history information, and
compute the organization score based on the required time and the ratio of determination.
4 . The query processing device according to claim 1 , wherein, the processor is configured to:
based on the organization scores, sequentially transmit high-prediction subqueries that are subqueries corresponding to the organizations regarding which the organization-specific risk is higher than a predetermined criterion in descending order of the organization-specific risk, and collectively transmit subqueries corresponding to the organizations regarding which the organization-specific risk is equal to or lower than the predetermined criterion after the transmission of the high-prediction subqueries.
5 . The query processing device according to claim 1 , wherein the processor is configured to:
compute a query score obtained by evaluating an overall risk that is a risk of determination that the input query does not comply with the restrictions, based on the history information, and,
wherein based on the query score, the processor sequentially transmits the subqueries in the transmission order when the overall risk is equal to or lower than a predetermined criterion, and collectively transmit the plurality of subqueries when the overall risk is higher than the predetermined criterion.
6 . The query processing device according to claim 5 , wherein the processor is configured to:
compute, regarding each of the organizations, a ratio of determination that the subquery does not comply with an individual rule of the organization rules corresponding to data that becomes a subject of operation requested by the subquery, based on the history information, and
compute the query score based on a sum of the ratios of determination.
7 . The query processing device according to claim 1 , wherein attribute information that specifies data that becomes a subject of operation in the input query includes a location value representing a location at which the organization is set, and
wherein the processor is configured to divide the input query into the plurality of subqueries based on the location value.
8 . The query processing device according to claim 1 , wherein the processor is configured to:
determine a country regulation whether the input query complies with country regulations that are the restrictions prescribed in subject countries relating to the plurality of pieces of data, and
wherein the processor, in the determination of whether the input query complies with the restrictions, by further using a determination result obtained by the determination of whether the input query complies with country regulations that are the restrictions prescribed in subject countries relating to the plurality of pieces of data.
9 . A query processing method by a query processing device that determines whether an input query to request operation on a plurality of pieces of data managed in each of a plurality of organizations complies with restrictions imposed on the plurality of pieces of data, the query processing method comprising:
generating a plurality of subqueries obtained by dividing the input query for each of the organizations, each of the plurality of subqueries corresponds to each of the organizations;
computing, regarding each of the organizations, an organization score obtained by evaluating an organization-specific risk that the subquery does not comply with organization rules of the organization corresponding to the subquery based on history information relating to a determination track record resulting from determining, regarding each of the organizations, whether or not the input query complies with the organization rules, the organization rules being the restrictions of each of the organizations;
sequentially transmitting the plurality of subqueries to check devices in a transmission order according to the organization scores, the check devices checking whether each subquery of the plurality of subqueries complies with the organization rules of the organization corresponding to the subquery;
sequentially receiving response information regarding the plurality of subqueries from the check devices;
upon receiving response information indicating that a respective subquery does not comply with the organization rules, stopping transmission of any subqueries subsequent to the respective subquery; and
determining whether the input query complies with the restrictions, by using the response information.