Chi-square test method, device, server and storage medium
By performing chi-square inspection sharding processing of sample data at the initiating node and participating node, the problem of low chi-square inspection accuracy in the prior art is solved, and the accuracy of chi-square inspection is improved without leaking plain text data.
Patent Information
- Application Number
- CN202111664856.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The existing chi-square inspection methods are low in accuracy due to the introduction of noise in privacy data protection, and cannot effectively obtain chi-square inspection results between different nodes.
By performing chi-square inspection sharding processing of sample data on the initiating node and participating node, the chi-square value sharding data is obtained, and data aggregation is performed without leaking plain text data to reconstruct the chi-square inspection results.
While obtaining chi-square test results between different nodes, it avoids the introduction of noise and improves the accuracy of chi-square test.
Smart Images

Figure CN114357513B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of privacy data processing, and in particular to a chi-square test method, apparatus, computer equipment, and storage medium. Background Art
[0002] The chi-square test is a commonly used statistical algorithm that can test for correlation between variables. It has numerous applications in industry, the internet, healthcare, transportation, finance, and other fields. For example, in healthcare, the chi-square test can be used to calculate whether the prevalence of a certain type of cancer is related to gender. However, the chi-square test often requires a large amount of sample data, which is often held by different parties. For privacy reasons, different sample data sets are not directly shared with each other.
[0003] Existing chi-square tests for private data are often implemented based on differential privacy algorithms. Differential privacy algorithms achieve privacy protection by adding noise that does not change the original data distribution. Due to the increase in noise, the chi-square test based on the differential privacy algorithm has low accuracy. Summary of the Invention
[0004] Based on this, it is necessary to provide a chi-square test method, device, computer equipment and storage medium to address the above technical problems, so as to obtain the chi-square test results without the plaintext data of different nodes being stored, while avoiding the introduction of noise and improving the accuracy of the chi-square test.
[0005] In a first aspect, the present application provides a chi-square test method, applied to a server corresponding to an initiating node, comprising:
[0006] Obtain the sample observation frequencies corresponding to each second categorical variable under different first categorical variables of the local sample data, perform chi-square test sharding on the sample observation frequencies, and obtain the first chi-square value sharding data between the first categorical variable and the second categorical variable;
[0007] Receive the second chi-square value shard data sent by the participating nodes;
[0008] A chi-square test result is obtained according to the first chi-square value segmented data and the second chi-square value segmented data, and the chi-square test result is used to identify the correlation between different categorical variables.
[0009] In some embodiments of the present application, performing a chi-square test segmentation process on the sample observation frequency to obtain first chi-square value segmentation data between the first categorical variable and the second categorical variable includes:
[0010] Obtaining a first local sample statistical frequency under each first categorical variable and a second local sample statistical frequency under each second categorical variable in the local sample data;
[0011] receiving first remote sample statistical frequencies under each first categorical variable and second remote sample statistical frequencies under each second categorical variable sent by the participating node;
[0012] Obtaining the expected sample frequency under each second classification variable under different first classification variables according to the first local sample statistical frequency, the second local sample statistical frequency, the first remote sample statistical frequency, and the second remote sample statistical frequency;
[0013] Based on the sample expected frequency and sample observed frequency corresponding to each second categorical variable under different first categorical variables, the first chi-square value segmented data is obtained.
[0014] In some embodiments of the present application, obtaining first chi-square value segmented data based on the sample expected frequencies and sample observed frequencies corresponding to each second categorical variable under different first categorical variables includes:
[0015] Determine the categories corresponding to different second classification variables under different first classification variables as target sample categories, and obtain the deviation segmentation data of the target sample category based on the sample observation frequency of the target sample category and the sample expected frequency of the target sample category;
[0016] The sum of the deviation slice data of each target sample category is determined as the first chi-square value slice data.
[0017] In some embodiments of the present application, performing a chi-square test segmentation process on the sample observation frequency to obtain first chi-square value segmentation data between the first categorical variable and the second categorical variable includes:
[0018] Performing a sharding operation on the sample observation frequency to obtain first local shard data and first remote shard data, and distributing the first remote shard data to participating nodes;
[0019] Obtain second remote shard data distributed by the participating nodes, and obtain a first deviation shard item based on the second remote shard data and the first local shard data;
[0020] Sending the first deviation sharding item to the aggregator server, where the first deviation sharding item is used to instruct the aggregator server to obtain the second deviation sharding item based on the first deviation sharding item;
[0021] According to the sample observation frequency and the second deviation segmentation item, the first chi-square value segmentation data between the first categorical variable and the second categorical variable is obtained.
[0022] In some embodiments of the present application, obtaining a chi-square test result based on the first chi-square value shard data and the second chi-square value shard data includes:
[0023] Obtain the sum of the first chi-square value shard data and the second chi-square value shard data to obtain a chi-square value;
[0024] Obtain chi-square test results based on the chi-square value and the preset degrees of freedom.
[0025] In a second aspect, the present application provides a chi-square test method, which is applied to a server corresponding to a participating node, comprising:
[0026] Obtain the sample observation frequencies corresponding to each second categorical variable under different first categorical variables of the local sample data, perform chi-square test sharding on the sample observation frequencies, and obtain the second chi-square value sharding data between the first categorical variable and the second categorical variable;
[0027] The second chi-square value shard data is sent to the initiating node. The second chi-square value shard data is used to instruct the initiating node to obtain a chi-square test result based on the second chi-square value shard data. The chi-square test result is used to identify the correlation between different categorical variables.
[0028] In a third aspect, the present application provides a chi-square verification device, which is applied to a server corresponding to an initiating node, comprising:
[0029] The first sharding calculation module is used to obtain the sample observation frequencies corresponding to each second categorical variable under different first categorical variables of the local sample data, and perform chi-square test sharding processing on the sample observation frequencies to obtain the first chi-square value sharding data between the first categorical variable and the second categorical variable;
[0030] A sharding result receiving module, configured to receive the second chi-square value sharding data sent by the participating nodes;
[0031] The test result acquisition module is used to obtain a chi-square test result based on the first chi-square value segmented data and the second chi-square value segmented data. The chi-square test result is used to identify the correlation between different categorical variables.
[0032] In a fourth aspect, the present application provides a chi-square verification device, which is applied to a server corresponding to a participating node, comprising:
[0033] The second sharding calculation module is used to obtain the sample observation frequency corresponding to each second categorical variable under different first categorical variables of the local sample data, and perform chi-square test sharding processing on the sample observation frequency to obtain the second chi-square value sharding data between the first categorical variable and the second categorical variable;
[0034] The sharding result sending module is used to send the second chi-square value sharding data to the initiating node. The second chi-square value sharding data is used to instruct the initiating node to obtain the chi-square test result based on the second chi-square value sharding data. The chi-square test result is used to identify the correlation between different classification variables.
[0035] In a fifth aspect, the present application further provides a server, the server comprising:
[0036] one or more processors;
[0037] Memory; and
[0038] One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the chi-square test method.
[0039] In a sixth aspect, the present application further provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the above-mentioned chi-square test method.
[0040] In a seventh aspect, embodiments of the present application provide a computer program product or computer program, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the first or second aspect.
[0041] The chi-square test method, device, server and storage medium described above obtain the sample observation frequencies corresponding to each second classification variable of the local sample data under different first classification variables, and perform chi-square test sharding on the sample observation frequencies to obtain the first chi-square value sharding data between the first classification variable and the second classification variable. After receiving the second chi-square value sharding data sent by the participating nodes, the chi-square test results are obtained based on the first chi-square value sharding data and the second chi-square value sharding data. The initiating node and participating nodes of the chi-square test each perform chi-square test sharding on the local sample data of the server to obtain chi-square value sharding data used to describe the correlation between the classification variables. Subsequently, each participating node shares the chi-square value sharding data with the initiating node, and the initiating node reconstructs the chi-square test results based on each chi-square value sharding data, thereby achieving the chi-square test results without the plaintext data of different nodes being stored, while avoiding the introduction of noise and improving the accuracy of the chi-square test. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0043] Figure 1Schematic diagram of a chi-square test method in an embodiment of the present application;
[0044] Figure 2 Schematic diagram of the chi-square test method in the embodiment of the present application;
[0045] Figure 3 1 is a flow chart of the first chi-square value sharding data acquisition step in an embodiment of the present application;
[0046] Figure 4 2 is a flow chart of another step of obtaining first chi-square value shard data in an embodiment of the present application;
[0047] Figure 5 is a flow chart of another chi-square test method in an embodiment of the present application;
[0048] Figure 6 2 is a schematic structural diagram of a chi-square test device according to an embodiment of the present application;
[0049] Figure 7 is a structural diagram of another chi-square test device in an embodiment of the present application;
[0050] Figure 8 It is a structural diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0052] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the described features. In the description of this application, "plurality" means two or more, unless otherwise specifically specified.
[0053] In the description of this application, the word "for example" is used to mean "used as an example, illustration or illustration". Any embodiment described in this application as "for example" is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any person skilled in the art to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in this application.
[0054] In the embodiment of the present application, it should also be noted that the chi-square test method provided in the embodiment of the present application can be applied to Figure 1 In the chi-square test system shown. The chi-square test system includes a server 100 corresponding to multiple data holders. The server 100 can be an independent server or a server network or server cluster composed of servers, including but not limited to computers, network hosts, single network servers, multiple network server sets or cloud servers composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing. Different data holders hold different sample data, that is, different data holders hold corresponding servers that store different sample data. When performing a chi-square test, a certain server can act as the initiator of the chi-square test and initiate a chi-square test between different categorical variables. The server can act as an initiating node, and the corresponding servers of other data holders in the chi-square test system can act as participating nodes to jointly provide sample data and perform a chi-square test to obtain the correlation between different categorical variables.
[0055] Those skilled in the art will understand that Figure 1 The application environment shown in is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Figure 1 The scenario diagram of the chi-square test system shown is only an example. The chi-square test system and scenario described in the embodiment of the present invention are intended to more clearly illustrate the technical solution of the embodiment of the present invention, and do not constitute a limitation on the technical solution provided by the embodiment of the present invention. Ordinary technicians in this field can know that with the evolution of the chi-square test system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present invention is also applicable to similar technical problems.
[0056] See Figure 2The embodiment of the present application provides a chi-square test method, which is applied to a server corresponding to an initiating node. The method includes steps S210 to S230, which are specifically as follows:
[0057] S210, obtaining the sample observation frequencies corresponding to each second classification variable under different first classification variables of the local sample data, and performing chi-square test sharding processing on the sample observation frequencies to obtain the first chi-square value sharding data between the first classification variable and the second classification variable.
[0058] Local sample data refers to sample data stored locally on the server; categorical variables represent the categories to which the sample data belongs. For example, "gender" is a categorical variable with values including "male" and "female." Another example is "disease status" with values including "illness" and "not ill."
[0059] It can be understood that the sample data can be divided into different sample categories based on the first classification variable and the second classification variable.
[0060] The sample observation frequencies corresponding to each second categorical variable under different first categorical variables refer to the number of sample data that are classified into a certain first categorical variable and also classified into a certain second categorical variable. For example, taking the first categorical variable as "gender" and the second categorical variable as "disease status", the sample observation frequencies of each second categorical variable under different first categorical variables include: the number of sample data for male patients with the disease, the number of sample data for males without the disease, the number of sample data for female patients with the disease, and the number of sample data for females without the disease.
[0061] Specifically, the server corresponding to the chi-square test initiating node obtains local sample data stored locally on the server, and obtains the sample observation frequency corresponding to each second classification variable under different first classification variables based on the local sample data.
[0062] Among them, the first chi-square value shard data refers to the shard obtained by calculating the chi-square value between the sample observation frequency and the sample expected frequency of the sample data in the server corresponding to the chi-square test initiation node. It can be understood that the chi-square value is used to measure the degree of deviation between the sample observation frequency and the sample expected frequency. The sample expected frequency is the distribution frequency corresponding to each second classification variable of the sample data under different first classification variables under the assumption that the correlation between the first classification variable and the second classification variable is zero. Specifically, the chi-square value can be obtained by the cumulative sum of the ratio of the square of the difference between the sample observation frequency and the sample expected frequency corresponding to each second classification variable under different first classification variables of all sample data, which can be specifically expressed as the following formula (1):
[0063]
[0064] Among them, A i It represents the sample observation frequency corresponding to each second classification variable under different first classification variables, T i represents the expected frequency of samples corresponding to each second classification variable under different first classification variables, χ 2 represents the chi-square value; It indicates the deviation of the corresponding category fragments of each second categorical variable under different first categorical variables, that is, the chi-square test result of the corresponding category fragments.
[0065] Since sample data is often held by different data holders, different data holders will not directly share private data such as locally stored sample data and the distribution of sample data into different sample categories based on different classification variables for privacy protection. When sample data is distributed among different data holders, when the chi-square test initiation node corresponding to the server obtains the chi-square test result based on its own sample data, the chi-square test result will be inaccurate due to the small amount of sample data, or even the chi-square test cannot be performed due to the small amount of sample data.
[0066] Therefore, considering the amount of sample data and data privacy issues, the initiating node of the chi-square test and the servers corresponding to the participating nodes can each perform chi-square test sharding on the local sample data of the server to obtain chi-square value sharding data used to describe the correlation between categorical variables. Subsequently, the servers corresponding to each participating node will share the chi-square value sharding data with the server corresponding to the initiating node, and the server corresponding to the initiating node will reconstruct the chi-square verification result based on each chi-square value sharding data.
[0067] Specifically, in the process of obtaining the first chi-square value shard data, the servers participating in the chi-square test can be pre-determined, the chi-square test calculation formula can be sharded, and the chi-square test shard calculation formula corresponding to the initiating node or participating node can be obtained. The server corresponding to the chi-square test initiating node can use the corresponding shard calculation formula to perform chi-square test shard processing on the sample observation frequencies corresponding to each second classification variable under different first classification variables in the local sample data to obtain the first chi-square value shard data of the chi-square value at the initiating node. The steps of obtaining chi-square value shard data are described in detail below in conjunction with specific embodiments.
[0068] There are three types of chi-square verification: horizontal, vertical, and migration. In the case of migration, each initiating node or participating node holds sample data of each sample category. In one embodiment, Figure 3 As shown, the sample observation frequency is subjected to chi-square test slicing processing to obtain the first chi-square value slicing data between the first categorical variable and the second categorical variable, including:
[0069] S310 , obtaining a first local sample statistical frequency under each first categorical variable and a second local sample statistical frequency under each second categorical variable in the local sample data.
[0070] The local sample statistical frequency refers to the total amount of sample data classified under a certain classification variable in the local sample data of the server.
[0071] Taking the first classification variable as "gender" and the second classification variable as "disease status" as an example, the first local sample statistical frequency under each first classification variable includes the total amount of sample data classified as "male" and the total amount of sample data classified as "female" in the local sample data of the server; the first local sample statistical frequency under each second classification variable includes the total amount of sample data classified as "disease status" and the total amount of sample data classified as "not diseased" in the local sample data of the server.
[0072] S320: Receive first remote sample statistical frequencies under each first classification variable and second remote sample statistical frequencies under each second classification variable sent by the participating nodes.
[0073] The remote sample statistical frequency refers to the total amount of sample data classified under a certain classification variable in the sample data of other servers.
[0074] Still taking the first categorical variable as "gender" and the second categorical variable as "disease status" as an example, the first remote sample statistical frequency under each first categorical variable includes the total amount of sample data classified as "male" in the sample data of other servers, and the total amount of sample data classified as "female"; the first local sample statistical frequency under each second categorical variable includes the total amount of sample data classified as "disease status" in the sample data of other servers, and the total amount of sample data classified as "not diseased".
[0075] Specifically, each participating node corresponding server can each perform statistics on the local sample data of its server, obtain the total amount of sample data classified under each first classification variable, and the total amount of sample data classified under each second classification variable, obtain the first remote sample statistical frequency and the second remote sample statistical frequency, and then send the first remote sample statistical frequency and the second remote sample statistical frequency to the server corresponding to the initiating node.
[0076] It can be understood that the first remote sample statistical frequency and the second remote sample statistical frequency are processed data of sample data, rather than the original data of private data. The sharing of the second sample statistical value by the participating nodes does not involve the leakage of private data.
[0077] S330 , obtaining expected sample frequencies under each second classification variable under different first classification variables according to the first local sample statistical frequency, the second local sample statistical frequency, the first remote sample statistical frequency, and the second remote sample statistical frequency.
[0078] Among them, the sample expected frequency refers to the distribution frequency of each second classification variable of the sample data under different first classification variables under the assumption that the correlation between the first classification variable and the second classification variable is zero. Since the first local sample statistical frequency and the second local sample statistical frequency identify the amount of sample data classified under each different classification variable in the local sample data. The first remote sample statistical frequency and the second remote sample statistical frequency identify the amount of sample data classified under each different classification variable in the sample data of other servers. Therefore, for all sample data provided by the initiating node and the participating nodes, the server can process the first local sample statistical frequency, the second local sample statistical frequency, the first remote sample statistical frequency and the second remote sample statistical frequency to obtain the sample expected frequency of each second classification variable under different first classification variables in all sample data. It can be understood that the sample expected frequency is for all sample data (including the sample data provided by the participating nodes and the data provided by the initiating node).
[0079] Specifically, in one embodiment, step S330 includes: obtaining the total sample frequency based on the first local sample statistical frequency and the first remote sample statistical frequency; obtaining the sample proportion of sample data corresponding to each second classification variable based on the second local sample statistical frequency, the second remote sample statistical frequency and the total sample frequency; obtaining the expected sample frequency under each second classification variable under different first classification variables based on the first local sample statistical frequency, the first remote sample statistical frequency and the sample proportion corresponding to each second classification variable.
[0080] The total sample frequency refers to the total amount of sample data provided by the initiating node and participating nodes. Specifically, upon receiving the first remote sample statistical frequency and the second remote sample statistical frequency sent by the corresponding server of each participating node, the sum of the first local sample statistical frequency and the first remote sample statistical frequency can be determined as the total sample frequency. It is understood that the total sample frequency can also be obtained based on the second local sample statistical frequency and the second remote sample statistical frequency.
[0081] Among them, the sample proportion is the probability that the sample data obtained based on all the sample data are classified into each second classification variable. After obtaining the total sample frequency, the sample statistical frequency corresponding to each second classification variable in all the sample data can be obtained based on the second local sample statistical frequency and the second remote sample statistical frequency. Furthermore, according to the ratio of the sample statistical frequency corresponding to each second classification variable in all the sample data to the total sample frequency, the sample proportion of the sample data corresponding to each second classification variable is determined. Finally, based on the first local sample statistical frequency and the first remote sample statistical frequency, the sample statistical frequency corresponding to each first classification variable in all the sample data is obtained, and according to the product of the sample statistical frequency corresponding to each first classification variable in all the sample data and the sample proportion of the sample data corresponding to each second classification variable, the sample expected frequency under each second classification variable under different first classification variables is obtained.
[0082] Taking the example of a case where the first categorical variable is "gender" and the second categorical variable is "disease status," the statistical frequency of samples classified as "disease status" and the statistical frequency of samples classified as "non-disease status" in all sample data are obtained based on the second local sample statistical frequency and the second remote sample statistical frequency. Furthermore, based on the ratio of the statistical frequency of samples classified as "disease status" to the total sample frequency, the proportion of samples classified as "disease status" in the sample data is determined, and based on the ratio of the statistical frequency of samples classified as "non-disease status" to the total sample frequency, the proportion of samples classified as "non-disease status" in the sample data is determined. Finally, based on the first local sample statistical frequency and the first remote sample statistical frequency, the statistical frequency of samples classified as "male" and the statistical frequency of samples classified as "female" in all sample data are obtained. Based on the product of the statistical frequency of samples classified as "male" and the proportion of samples classified as "disease status," the expected frequency of samples classified as "disease status" under the "male" category is obtained.
[0083] Similarly, based on the product of the statistical frequency of samples classified as "male" and the proportion of samples classified as "not sick", the expected frequency of samples classified as "not sick" under the category of "male" is obtained. The expected frequency of samples classified as "sick" under the category of "female" and the expected frequency of samples classified as "not sick" under the category of "female" are obtained in the same way, which will not be elaborated here.
[0084] It can be understood that, in one embodiment, after obtaining the total sample frequency, the sample proportion of the sample data corresponding to each first classification variable can be obtained based on the first local sample statistical frequency, the first remote sample statistical frequency and the total sample frequency; and the expected sample frequency under each second classification variable under different first classification variables can be obtained based on the second local sample statistical frequency, the second remote sample statistical frequency and the sample proportion corresponding to each first classification variable.
[0085] S340 , obtaining first chi-square value segmented data based on the sample expected frequencies and sample observed frequencies corresponding to each second categorical variable under different first categorical variables.
[0086] Among them, the server corresponding to the chi-square test initiation node can obtain the first chi-square value shard data of the chi-square value at the initiation node based on the sample observation frequency and sample expected frequency corresponding to each second classification variable under different first classification variables of the local sample data. Specifically, in the process of obtaining the first chi-square value shard data, the multiplication triplet can be used to convert the multiplication operation in the calculation process into an addition operation. Among them, the multiplication triplet can be a Beave triplet, expressed as [u, v, z], to realize the conversion of the multiplication operation into an addition operation. Among them, the construction method of the multiplication triplet is not limited, and it can be generated by a trusted target server, or it can be generated by each server through inadvertent transmission.
[0087] In one embodiment, step S340 includes: determining the categories corresponding to different second classification variables under different first classification variables as target sample categories, and obtaining the deviation shard data of the target sample category based on the sample observation frequency of the target sample category and the sample expected frequency of the target sample category; and determining the sum of the deviation shard data of each target sample category as the first chi-square value shard data.
[0088] Among them, according to the first classification variable and the second classification variable, the sample data can be divided into different sample categories, that is, each second classification variable under different first classification variables can correspond to a sample category. As shown in the above formula (1), the chi-square value can be obtained by accumulating the deviation of the category slices corresponding to each sample category (that is, each second classification variable under different first classification variables). Therefore, the first chi-square value slice data corresponding to the initiating node can include the deviation slice data of the category slice corresponding to each sample category. By obtaining the deviation slice data corresponding to different sample categories based on the sample observation frequency and sample expected frequency of the sample data classified into each sample category, and then accumulating the deviation slice data corresponding to each second classification variable under different first classification variables, the first chi-square value slice data is determined.
[0089] In addition, in a longitudinal chi-square test, the initiating node and each participating node hold sample data of different sample categories; taking the example of a first categorical variable being "gender" and a second categorical variable being "disease status," and two nodes participating in the chi-square test (the initiating node and one participating node), the initiating node holds sample data of male patients and male non-patients, while the participating nodes hold sample data of female patients and female non-patients. Therefore, in one embodiment, a chi-square test is performed on the sample observation frequency to obtain the first chi-square value slice data between the first categorical variable and the second categorical variable, including:
[0090] S410: Perform a sharding operation on the sample observation frequency to obtain first local sharding data and first remote sharding data, and distribute the first remote sharding data to participating nodes.
[0091] Among them, the first local shard data and the first remote shard data refer to the shards of the sample observation frequencies corresponding to each second classification variable of the local sample data under different first classification variables (in the sub-server corresponding to the initiating node). The first local shard data is retained locally, and the first remote shard data is distributed to the participating nodes.
[0092] Still taking the example of the first categorical variable being "gender" and the second categorical variable being "disease status", the server divides the sample observation frequency of the sample data of male diseased samples into the corresponding first local shard data and the first remote shard data; and divides the sample observation frequency of the data sample of male non-disease samples into the corresponding first local shard data and the first remote shard data; similarly, the same operation is performed on the sample observation frequency of the sample data of female diseased samples and the sample observation frequency of the sample data of female non-disease samples.
[0093] After obtaining the shards of sample observation frequencies corresponding to the second classification variables under different first classification variables, the first remote shard data is distributed to the participating nodes. The number of the first remote shard data is consistent with the number of participating nodes.
[0094] For example, assuming that the number of participating nodes is 2, the above-mentioned sample data is the sample observation frequency of male diseased samples, which is divided into the corresponding first local shard data and the first remote shard data. Specifically, the sample observation frequency of male diseased samples is divided into 1 first local shard data and 2 first remote shard data; during the distribution process, these two first remote shard data are distributed to different participating nodes respectively. In the above example, after the sample observation frequency is sharded, the first remote shard data corresponding to the sample observation frequency of male diseased samples, the first remote shard data corresponding to the sample observation frequency of male non-disease samples, the first remote shard data corresponding to the sample observation frequency of female diseased samples, and the first remote shard data corresponding to the sample observation frequency of female non-disease samples are distributed to the participating nodes.
[0095] S420: Obtain second remote shard data distributed by participating nodes, and obtain a first deviation shard item based on the second remote shard data and the first local shard data.
[0096] Similarly, the second remote shard data refers to the sharding of the sample observation frequencies corresponding to each second classification variable under different first classification variables of the sample data of other servers (for example, in the sub-servers corresponding to the participating nodes), and the sample observation frequencies include the sample observation frequencies corresponding to each second classification variable under different first classification variables.
[0097] Specifically, the server corresponding to the participating node performs a sharding operation on the sample observation frequency locally on the server to obtain second local shard data and second remote shard data. The second local shard data is retained locally, and the second remote shard data is distributed to the initiating node and other participating nodes except itself. The number of second remote shard data is consistent with the data of the participating nodes. The server corresponding to the initiating node can receive the second remote shard data corresponding to each participating node.
[0098] For example, Figure 1 The chi-square test system shown includes five servers. Any server (no matter whether it is the server corresponding to the initiating node or the server corresponding to the participating node) performs a sharding operation on the local sample observation frequency of the server to obtain a local shard data and four remote shard data. The local shard data and the four remote shard data constitute the original sample observation frequency. The local shard data is retained locally, and the four remote shard data are distributed to servers other than itself.
[0099] Among them, the first deviation shard item refers to a shard of the deviation between the sample observation frequency and the sample expected frequency corresponding to the local sample data in the server corresponding to the initiating node (or participating node), which is calculated locally on the server, including the addition shard result of the second remote shard data and the first local shard data or the multiplication shard result of the second remote shard data and the first local shard data.
[0100] Specifically, after the server corresponding to the initiating node receives the second remote shard data sent by the participating node, it obtains the first deviation shard item based on the second remote shard data and the first local shard data.
[0101] Similarly, the server corresponding to the participating node receives the first remote sharding data sent by the initiating node and the second remote sharding data sent by other participating nodes except itself, and obtains the first deviation sharding item corresponding to the participating node based on the first remote sharding data, the second remote sharding data and the second local sharding data generated by itself.
[0102] S430: Send the first deviation sharding item to the aggregator server, where the first deviation sharding item is used to instruct the aggregator server to obtain the second deviation sharding item based on the first deviation sharding item.
[0103] S440 , obtaining first chi-square value slice data between the first categorical variable and the second categorical variable according to the sample observation frequency and the second deviation slice item.
[0104] Among them, the second deviation shard item refers to another shard of the deviation between the sample observation frequency and the sample expected frequency corresponding to the local sample data in the server corresponding to the initiating node (or participating node), which is calculated by the aggregation server based on the first deviation shard item sent by the initiating node and the participating node. The server corresponding to the initiating node and the server corresponding to the participating node respectively send the first deviation shard item generated by themselves to the aggregation server, and the aggregation server uses the first deviation shard item to restore the second deviation shard item and return the second deviation shard item to the server corresponding to the initiating node and the server corresponding to the participating node. The server corresponding to the initiating node obtains the first chi-square value shard data based on the first deviation shard item, the second deviation shard item and the sample observation frequency of each second classification variable corresponding to the local sample data under different first classification variables; correspondingly, the server corresponding to the participating node can also obtain the second chi-square value shard data corresponding to the participating node based on the second deviation shard item and the sample observation frequency of each second classification variable corresponding to the local sample data of its server under different first classification variables.
[0105] As shown in formula (1), the chi-square value can be obtained by accumulating the deviations of the category slices corresponding to each sample category (i.e., each second classification variable under different first classification variables); the first chi-square value slice data corresponding to the initiating node can include the deviations of the category slices corresponding to the sample categories held locally. By exchanging the slices of the sample observation frequencies corresponding to the local sample categories held by the participating nodes, and then obtaining the deviation slice items required for calculating the deviation of the local category slices based on the slices of the sample observation frequencies of all sample categories, the deviation slice items are finally reconstructed based on the deviation slice items to obtain the first chi-square value slice data.
[0106] S220: Receive the second chi-square value fragment data sent by the participating nodes.
[0107] There may be one or more participating nodes, and the second chi-square value shard data refers to the chi-square value shard data independently obtained locally by the server corresponding to the participating node. It is understood that the second chi-square value shard data is obtained by the server corresponding to the participating node by performing chi-square test sharding based on the sample observation frequencies corresponding to each second categorical variable under different first categorical variables in its local sample data. The principle for obtaining the second chi-square value shard data is the same as the principle for obtaining the first chi-square value shard data.
[0108] S230 , obtaining a chi-square test result according to the first chi-square value shard data and the second chi-square value shard data, where the chi-square test result is used to identify correlations between different categorical variables.
[0109] After obtaining the chi-square value shard data of the initiating node and the participating nodes, the chi-square value shard data of the initiating node and the participating nodes can be used to restore the chi-square value, and the chi-square test result can be output based on the chi-square value.
[0110] It can be understood that the chi-square test is to measure the degree of deviation between the actual observed values and the theoretical expected values of the statistical sample data. The degree of deviation between the actual observed values and the theoretical inference values determines the size of the chi-square value. The larger the chi-square value, the greater the degree of deviation between the actual observed values and the theoretical expected values, and the smaller the probability that the assumption is true, that is, the smaller the probability that the chi-square test result is that the categorical variables are unrelated, and the greater the correlation between the categorical variables; the smaller the chi-square value, the smaller the degree of deviation between the actual observed values and the theoretical expected values, and the greater the probability that the assumption is true, that is, the greater the probability that the chi-square test result is that the categorical variables are unrelated, and the smaller the correlation between the categorical variables.
[0111] In one embodiment, a chi-square test result is obtained based on the first chi-square value shard data and the second chi-square value shard data, including: obtaining the sum of the first chi-square value shard data and the second chi-square value shard data to obtain the chi-square value; and obtaining the chi-square test result based on the chi-square value and the preset degrees of freedom.
[0112] Specifically, after the server corresponding to the initiating node obtains the chi-square value shard data of the initiating node and the participating nodes, it can obtain the sum of the chi-square value shard data of the initiating node and the participating nodes, determine the sum as the chi-square value of the first categorical variable and the second categorical variable, and search the corresponding degree of freedom table based on the chi-square value to determine the probability that the assumption that the correlation between the first categorical variable and the second categorical variable is zero is true, and then output the chi-square test result.
[0113] The above-mentioned chi-square test method obtains the sample observation frequency corresponding to each second classification variable of the local sample data under different first classification variables, and performs chi-square test sharding processing on the sample observation frequency to obtain the first chi-square value sharding data between the first classification variable and the second classification variable. After receiving the second chi-square value sharding data sent by the participating node, the chi-square test result is obtained based on the first chi-square value sharding data and the second chi-square value sharding data. The initiating node and participating nodes of the chi-square test each perform chi-square test sharding processing on the local sample data of the server to obtain chi-square value sharding data used to describe the correlation between the classification variables. Subsequently, each participating node shares the chi-square value sharding data with the initiating node, and the initiating node reconstructs the chi-square test result based on each chi-square value sharding data, so as to obtain the chi-square test result without the plaintext data of different nodes being stored, while avoiding the introduction of noise and improving the accuracy of the chi-square test.
[0114] In one embodiment, Figure 5 As shown, the embodiment of the present application provides a chi-square test method, which is applied to a server corresponding to a participating node. The method includes steps S510 and S520, which are specifically as follows:
[0115] S510, obtaining the sample observation frequencies corresponding to the second categorical variables under different first categorical variables of the local sample data, and performing chi-square test sharding processing on the sample observation frequencies to obtain second chi-square value sharding data between the first categorical variable and the second categorical variable;
[0116] S520, sending the second chi-square value shard data to the initiating node, the second chi-square value shard data is used to instruct the initiating node to obtain a chi-square test result according to the second chi-square value shard data, and the chi-square test result is used to identify the correlation between different categorical variables.
[0117] The way in which the participating node corresponding server obtains the second card square value shard data is similar to the way in which the initiating node corresponding server obtains the first card square value, except that the processed data objects are different.
[0118] For example, in one embodiment, the first local sample statistical frequency under each first classification variable and the second local sample statistical frequency under each second classification variable in the local sample data are obtained; the first remote sample statistical frequency under each first classification variable and the second remote sample statistical frequency under each second classification variable sent by the initiating node and other participating nodes are received; based on the first local sample statistical frequency, the second local sample statistical frequency, the first remote sample statistical frequency and the second remote sample statistical frequency, the sample expected frequency under each second classification variable under different first classification variables is obtained; based on the sample expected frequency and sample observation frequency corresponding to each second classification variable under different first classification variables, the second chi-square value sharded data is obtained.
[0119] Specifically, the server corresponding to the participating node and the server corresponding to the initiating node send each other the sample statistical frequency of the sample under each first classification variable and the sample statistical frequency under each second classification variable in the local sample data. After obtaining the sample statistical frequency under the first classification variable and the sample statistical frequency under each second classification variable sent by the initiating node, the server corresponding to the participating node obtains the sample expected frequency under each second classification variable under different first classification variables; further, based on the sample expected frequency and sample observation frequency corresponding to each second classification variable under different first classification variables, the second chi-square value sharded data is obtained.
[0120] For another example, in one embodiment, the sample observation frequency can be sharded to obtain second local shard data and second remote shard data, and the second remote shard data can be distributed to the participating nodes; the first remote shard data distributed by the initiating node and other distribution nodes is obtained, and the first deviation shard item is obtained based on the first remote shard data and the second local shard data; the first deviation shard item is sent to the aggregator server, and the first deviation shard item is used to instruct the aggregator server to obtain and return the second deviation shard item based on the first deviation shard item; and the second chi-square value shard data between the first categorical variable and the second categorical variable is obtained based on the sample observation frequency and the second deviation shard item.
[0121] Specifically, the server corresponding to the participating node performs a sharding operation on the local sample observation frequency, and obtains local sharding data and remote sharding data after sharding. The server corresponding to the participating node distributes the remote sharding data to other nodes (including the initiating node and other participating nodes) except itself; after obtaining the remote sharding data distributed by other participating nodes and the initiating node, the server corresponding to the participating node obtains the first deviation sharding item corresponding to the participating node based on the remote sharding data and its own local sharding data, and sends the first deviation sharding item corresponding to the participating node to the aggregator server. The aggregator server obtains the second deviation sharding item based on the first deviation sharding item sent by all nodes (the initiating node and all participating nodes), and sends the second deviation sharding item to each participating node and the initiating node. The server corresponding to the participating node obtains the second chi-square value sharding data between the first categorical variable and the second categorical variable based on the local sample observation frequency and the second deviation sharding item.
[0122] The above-mentioned chi-square test method performs chi-square test sharding on the local sample data of the server through the initiating node and participating nodes of the chi-square test to obtain chi-square value sharding data used to describe the correlation between categorical variables. Subsequently, each participating node shares the chi-square value sharding data with the initiating node, and the initiating node reconstructs the chi-square test result based on each chi-square value sharding data, so as to obtain the chi-square test result without the plaintext data of different nodes being stored, while avoiding the introduction of noise and improving the accuracy of the chi-square test.
[0123] The following is an example of Figure 3 The steps of obtaining the chi-square value shard data shown are further explained. For the convenience of description, the number of nodes participating in the chi-square test is two, including a first server and a second server. The first server serves as the initiating node of the chi-square test, and the second server serves as the participating node of the chi-square test.
[0124] The sample data is divided into different sample categories based on the first categorical variable X and the second categorical variable Y. The range of the first categorical variable X is {X1, X2}, and the range of the second categorical variable Y is {Y1, Y2}. Correspondingly, the sample data on the first server is shown in Table 1 below, and the sample data on the second server is shown in Table 2 below. Assuming that the first categorical variable X and the second categorical variable Y are independent, the expected sample frequencies of all sample data in different sample categories can be obtained by calculation, as shown in Table 3.
[0125] Table 1
[0126] Observation frequency X1 X2 Statistical frequency Y1 <![CDATA[a 00 ]]> <![CDATA[a 01 ]]> <![CDATA[a 00 +a 01 ]]> Y2 <![CDATA[a 10 ]]> <![CDATA[a 11 ]]> <![CDATA[a 10 +a 11 ]]> Statistical frequency <![CDATA[a 00 +a 10 ]]> <![CDATA[a 01 +a 11 ]]> <![CDATA[a 00 +a 01 +a 10 +a 11 ]]>
[0127] Table 2
[0128] Observation frequency X1 X2 Statistical frequency Y1 <![CDATA[b 00 ]]> <![CDATA[b 01 ]]> <![CDATA[b 00 +b 01 ]]> Y2 <![CDATA[b 10 ]]> <![CDATA[b 11 ]]> <![CDATA[b 10 +b 11 ]]> Statistical frequency <![CDATA[b 00 +b 10 ]]> <![CDATA[b 01 +b 11 ]]> <![CDATA[b 00 +b 01 +b 10 +b 11 ]]>
[0129] Table 3
[0130]
[0131] Where S = a 00 +a 10 +a 01 +a 11 +b 00 +b 10 +b 01 +b 11 .
[0132] Taking the first categorical variable as X1 and the second categorical variable as Y1 as an example, for all sample data with the first categorical variable as X1 and the second categorical variable as Y1 (hereinafter referred to as the first sample category), the calculation of the chi-square value of the first sample category can be expressed as the following formula (2):
[0133]
[0134] Based on secure multi-party computation, a multiplication triplet can be pre-constructed to replace the a in the above formula 00 b 00 This multiplication operation is converted into α0+α1=a 00 b 00 , therefore, the calculation of the chi-square test in this sample category can be further expressed as the following formula (3):
[0135]
[0136] in, is the first shard of the chi-square test for the first sample category shard, The second split of the chi-square test for this category split of the first sample category.
[0137] Since the data involved in the first shard of the chi-square test of the first sample category shard are all the original data of the first server, the first shard can be obtained by local calculation by the first server, and the first shard is the deviation shard data of the sample data of the first sample category in the first server, and the data involved in the second shard of the chi-square test of the first sample category shard are all the original data of the second server, the second shard can be obtained by local calculation by the second server, and the second shard can be understood as the deviation shard data of the sample data of the first sample category in the second server.
[0138] That is, the calculation of the chi-square test for the category shard of the first sample category can be achieved by the first server calculating the first shard and the second server calculating the second shard.
[0139] Similarly, the calculation principles of the chi-square test for the category segmentation where the first categorical variable is X1 and the second categorical variable is Y2 (hereinafter referred to as the second sample category), the calculation principles of the chi-square test for the category segmentation where the first categorical variable is X2 and the second categorical variable is Y1 (hereinafter referred to as the third sample category), and the calculation principles of the chi-square test for the category segmentation where the first categorical variable is X2 and the second categorical variable is Y2 (hereinafter referred to as the fourth sample category) are the same.
[0140] Therefore, when performing the chi-square test calculation, the server corresponding to the initiating node or the participating node can calculate its corresponding chi-square value shard data based on the local sample data of the server, wherein the chi-square value shard data includes the deviation shard data of the category shard corresponding to each sample category.
[0141] Taking the first server in the above example as an example, the first server calculates the first slice of the chi-square test for the first sample category, the first slice of the chi-square test for the second sample category, the first slice of the chi-square test for the third sample category, and the first slice of the chi-square test for the fourth sample category. The first slice of the chi-square test for each sample category is the deviation slice data for the corresponding category slice calculated by the first server. The sum of the first slice of the chi-square test for the first sample category, the first slice of the chi-square test for the second sample category, the first slice of the chi-square test for the third sample category, and the first slice of the chi-square test for the fourth sample category is the chi-square value slice data corresponding to the first server.
[0142] Similarly, the second server calculates the second slice of the chi-square test for the first sample category, the second slice of the chi-square test for the second sample category, the second slice of the chi-square test for the third sample category, and the second slice of the chi-square test for the fourth sample category. The second slice of the chi-square test for each sample category is the deviation slice data for the corresponding category slice calculated by the second server. The sum of the second slice of the chi-square test for the first sample category, the second slice of the chi-square test for the second sample category, the second slice of the chi-square test for the third sample category, and the second slice of the chi-square test for the fourth sample category is the chi-square value slice data corresponding to the second server.
[0143] Subsequently, the chi-square value sharding data can be collected from the servers corresponding to each data holder, and the chi-square value can be reorganized to obtain the correlation between the first categorical variable and the second categorical variable.
[0144] Specifically, the first server obtains the sample statistics of the sample data classified into X1 (ie, a 00 +a 10 ), the sample statistics of the sample data classified as the categorical variable X2 (i.e. a01 +a 11 ), the sample statistics of the sample data classified into the categorical variable Y1 (i.e. a 00 +a 01 ), and the sample statistics of the sample data classified into the categorical variable Y2 (i.e. a 10 +a 11 ), and receives the sample statistics (i.e., b 00 +b 10 ), the sample statistics of the sample data classified as the categorical variable X2 (i.e. b 01 +b 11 ), the sample statistics of the sample data classified into the categorical variable Y1 (i.e. b 00 +b 01 ), and the sample statistics of the sample data classified into the categorical variable Y2 (i.e. b 10 +b 11 ).
[0145] Then, the sum of the sample statistics corresponding to the categorical variable X1 and the categorical variable X2 in the first server and the second server is obtained (i.e., a 00 +a 10 +a 01 +a 11 +b 00 +b 10 +b 01 +b 11 ), the sum is the total frequency of samples in the first server and the second server. After determining the total frequency of samples, the local sample statistics frequency (i.e., a) of the first server is classified into the categorical variable Y1. 00 +a 01 ) and the remote sample statistics frequency (i.e., b 00 +b 01 ) and confirm the sample statistics frequency (i.e. a 00 +a 01 +b 00 +b 01 ). Therefore, the proportion of sample data classified into the categorical variable Y1 in all sample data can be expressed by the following formula (4):
[0146]
[0147] After obtaining the sample proportion of sample data classified as the classification variable Y1 in all sample data, the local sample statistical frequency (i.e., a 00 +a 10) and the remote sample statistics frequency (i.e., b 00 +b 10 ) and confirm the sample statistics of the sample data classified into the categorical variable X1 (i.e. a 00 +a 10 +b 00 +b 10 ). The expected frequency of samples classified into the first sample category (i.e., the first classification variable is X1 and the second classification variable is Y1) in all sample data is expressed by the following formula (5):
[0148]
[0149] Where S = a 00 +a 10 +a 01 +a 11 +b 00 +b 10 +b 01 +b 11 .
[0150] It can be understood that for other sample categories, the method for obtaining the corresponding expected sample frequencies is the same as the method for obtaining the expected sample frequencies of the first sample category, which will not be repeated here. The expected sample frequencies of all sample data in different sample categories are shown in Table 3.
[0151] After obtaining the expected sample frequencies corresponding to each second classification variable of all sample data under different first classification variables (i.e., the expected sample frequencies corresponding to different sample categories of all sample data), and the observed sample frequencies corresponding to each second classification variable of the local sample data in the first server or the second server under different first classification variables, the first server can obtain the deviation shard data of the category shard corresponding to the first sample category in the first server through the following formula (6).
[0152]
[0153] Similarly, the second server obtains the deviation degree fragmentation data of the category fragmentation corresponding to the first sample category in the first server through the following formula (7).
[0154]
[0155] In the first server or the second server, the deviation degree slice data of the category slice corresponding to the second sample category, the deviation degree slice data of the category slice corresponding to the third sample category, and the deviation degree slice data of the category slice corresponding to the fourth sample category can be obtained by the same method. For example, taking the first classification variable as X2 and the second classification variable as Y1 as an example, the calculation of the chi-square value of the sample data corresponding to the category slice for all the first classification variables as X2 and the second classification variables as Y1 (hereinafter referred to as the second sample category) can be expressed as the following formula (8):
[0156]
[0157] Based on secure multi-party computation, a multiplication triplet can be pre-constructed to replace the a in the above formula 01 b 01 This multiplication operation translates to β0+β1=a 01 b 01 , therefore, the calculation of the chi-square test for the corresponding category segmentation in this sample category can be further expressed as the following formula (9):
[0158]
[0159] Therefore, the deviation degree fragment data of the category fragment corresponding to the second sample category in the first server can be obtained by the following formula (10).
[0160]
[0161] The deviation degree fragment data of the category fragment corresponding to the second sample category in the second server can be obtained through the following formula (11).
[0162]
[0163] The first server obtains the deviation slice data of the category slice corresponding to the first sample category, the deviation slice data of the category slice corresponding to the second sample category, the deviation slice data of the category slice corresponding to the third sample category, and the deviation slice data of the category slice corresponding to the fourth sample category, and obtains the chi-square value slice data corresponding to the first server based on the sum of the deviation slice data of the category slice corresponding to the first sample category, the deviation slice data of the category slice corresponding to the second sample category, the deviation slice data of the category slice corresponding to the third sample category, and the deviation slice data of the category slice corresponding to the fourth sample category.
[0164] Similarly, the second server obtains the deviation slice data of the category slice corresponding to the first sample category, the deviation slice data of the category slice corresponding to the second sample category, the deviation slice data of the category slice corresponding to the third sample category, and the deviation slice data of the category slice corresponding to the fourth sample category, and obtains the chi-square value slice data corresponding to the second server based on the sum of the deviation slice data of the category slice corresponding to the first sample category, the deviation slice data of the category slice corresponding to the second sample category, the deviation slice data of the category slice corresponding to the third sample category, and the deviation slice data of the category slice corresponding to the fourth sample category.
[0165] The second server sends its corresponding chi-square value shard data to the first server as the initiating node, and the first server sums the chi-square value shard data corresponding to the first server and the chi-square value shard data corresponding to the second server to obtain the chi-square test result.
[0166] The following is an example of Figure 4 The steps for obtaining chi-square value slice data are further explained. For ease of description, the number of nodes participating in the chi-square test is two, including a first server and a second server. The first server serves as the initiating node of the chi-square test, and the second server serves as the participating node of the chi-square test. The range of the first categorical variable X is {X1, X2}, and the range of the second categorical variable Y is {Y1, Y2}. Correspondingly, the sample data on the first server is shown in Table 4 below, and the sample data on the second server is shown in Table 5 below. Assuming that the first categorical variable X and the second categorical variable Y are independent, the expected sample frequencies of all sample data in different sample categories can be obtained through calculation, as shown in Table 6.
[0167] Table 4
[0168] Observation frequency X1 Y1 a Y2 b
[0169] Table 5
[0170] Observation frequency X2 Y1 c Y2 d
[0171] Table 6
[0172]
[0173]
[0174] It can be seen from Tables 5 to 6 above that for the sample data with the first classification variable being X1 and the second classification variable being Y1 (hereinafter referred to as the first sample category), the sample data of the first sample category are all stored in the first server. Therefore, the first server can independently complete the calculation of the chi-square test corresponding to the sample category.
[0175] Similarly, for the first categorical variable being X1 and the second categorical variable being Y2 (hereinafter referred to as the second sample category), the first server can independently complete the calculation of the chi-square test corresponding to the sample category; for the first categorical variable being X2 and the second categorical variable being Y1 (hereinafter referred to as the third sample category), the second server can independently complete the calculation of the chi-square test corresponding to the sample category; for the first categorical variable being X2 and the second categorical variable being Y2 (hereinafter referred to as the fourth sample category), the second server can independently complete the calculation of the chi-square test corresponding to the sample category.
[0176] That is, when calculating the chi-square test, each server can calculate its corresponding chi-square value shard data based on the local sample data of the server. It can be understood that the chi-square value shard data includes the value of the chi-square test of the category shard corresponding to the sample category held locally by the server; subsequently, the chi-square value shard data of the corresponding server of each data holder can be collected and reorganized to obtain the correlation between the categorical variables.
[0177] Specifically, for the sample category (i.e., the first sample category) in which the first categorical variable is X1 and the second categorical variable is Y1, the calculation of the chi-square test for the first sample category can be expressed as the following formula (12):
[0178]
[0179] Where (a+b) is the plaintext data of the first server, which can be directly obtained locally on the first server. When calculating the part (bd-ac)^2 / ((a+c)(a+b+c+d)), you can obtain it by following the following steps:
[0180] The first server obtains the local sample observation frequency a of the sample data whose first classification variable is X1 and the second classification variable is Y1 (i.e., the first sample category), and the local sample observation frequency b of the sample data whose first classification variable is X1 and the second classification variable is Y2 (i.e., the second sample category).
[0181] Similarly, the second server determines the local sample observation frequency c of the sample data with the first classification variable being X2 and the second classification variable being Y1 (i.e., the third sample category), and the sample observation frequency d of the sample data with the first classification variable being X2 and the second classification variable being Y2 (i.e., the fourth sample category).
[0182] Then, the first server performs sharding operations on the local sample observation frequency a and the local sample observation frequency b, respectively, to obtain the first local sharded data a1 and the second remote sharded data a2 corresponding to the sample observation frequency a, and the first local sharded data b1 and the second remote sharded data b2 corresponding to the sample observation frequency b; the second server performs sharding operations on the sample observation frequency c and the local sample observation frequency d, respectively, to obtain the first local sharded data c1 and the second remote sharded data c2 corresponding to the sample observation frequency c, and the first local sharded data d1 and the second remote sharded data d2 corresponding to the sample observation frequency d.
[0183] For the item ((a+c)(a+b+c+d)), for the item (a+c), the first server distributes the first remote shard data a2 and the first remote shard data b2 to the second server, and simultaneously receives the second remote shard data c2 and the second remote shard data d2 distributed by the second server. Furthermore, the first server calculates the shard data (a+c) corresponding to the first server based on the first local shard data a1 and the second remote shard data c2. Similarly, the second server calculates the shard data (a+c) corresponding to the first server based on the first remote shard data a2 and the second local shard data c1.
[0184] For the item (a+b+c+d), the first server calculates the shard data (a+b+c+d) corresponding to the first server based on the first local shard data a1, the first local shard data b1, the second remote shard data c2, and the second remote shard data d2; similarly, the second server calculates the shard data (a+b+c+d) corresponding to the second server based on the first remote shard data a2, the first remote shard data b2, the second local shard data c1, and the second local shard data d1.
[0185] Furthermore, the first server calculates the shard result of the product of (a+c) and (a+b+c+d) based on the multiplication triplet, using the shard data of (a+c) and the shard data of (a+b+c+d) calculated by itself, and obtains the first deviation shard item (corresponding to the first server); and the second server also calculates the shard result of the product of (a+c) and (a+b+c+d) based on the multiplication triplet, using the shard data of (a+c) and the shard data of (a+b+c+d) calculated by itself, and obtains the first deviation shard item (corresponding to the second server).
[0186] The first server and the second server respectively send the sharding results of the product of (a+c) and (a+b+c+d) corresponding to themselves (i.e., the first deviation sharding item) to the aggregation server. The aggregation server obtains the sharding results of the product of (a+c) and (a+b+c+d) corresponding to each server, sums the sharding results, restores the product result of (a+c) and (a+b+c+d), and obtains the second deviation sharding item.
[0187] For the (bd-ac)^2 item, the first server uses the multiplication triplet to calculate the sharding result of (ac) based on the second remote sharding data c2 and the first local sharding data a1, and calculates the sharding result of (bd) based on the second remote sharding data d2 and the first local sharding data b1, and obtains the difference between the sharding result of (ac) and the sharding result of (bd), to obtain the first deviation sharding item. Similarly, the second server uses the multiplication triplet to calculate the sharding result of (ac) based on the second local sharding data c1 and the first remote sharding data a2, and calculates the sharding result of (bd) based on the second local sharding data d1 and the first remote sharding data b2, and obtains the difference between the sharding result of (ac) and the sharding result of (bd), the first deviation sharding item.
[0188] Furthermore, the first server and the second server respectively send the difference between the sharding results of (ac) corresponding to themselves and the sharding results of (bd) (i.e., the first deviation sharding item) to the aggregation server. After the aggregation server obtains the difference between the sharding results of (ac) corresponding to each server and the sharding results of (bd), it restores (bd-ac) and obtains the square value of (bd-ac) after restoration to obtain another second deviation sharding item.
[0189] It can be understood that the first deviation fragmentation item includes the fragmentation result of the product of (a+c) and (a+b+c+d), and the difference between the fragmentation result of (ac) and the fragmentation result of (bd); the second deviation fragmentation item includes the square value of (bd-ac), and the product of (a+c) and (a+b+c+d).
[0190] After obtaining the product of (a+c) and (a+b+c+d) and the square value of (bd-ac), the first server obtains the calculation result of the chi-square test of the category segment corresponding to the first sample category according to the above formula (11).
[0191] Similarly, the first server obtains the calculation result of the chi-square test of the category shard of the second sample category through the same method. The first server obtains the first chi-square value shard data corresponding to the first server based on the calculation result of the chi-square test of the category shard of the first sample category and the calculation result of the chi-square test of the category shard of the second sample category.
[0192] In the second server, the second server can obtain the calculation results of the chi-square test of the third sample category and the calculation results of the chi-square test of the fourth sample category in the same way; then, the second server obtains the second chi-square value slice data corresponding to the second server based on the calculation results of the chi-square test of the third sample category and the calculation results of the chi-square test of the fourth sample category.
[0193] Finally, the second server sends the chi-square value shard data to the first server as the initiating node, and the first server sums the first chi-square value shard result and the second chi-square value shard result to obtain the chi-square test result.
[0194] In order to better implement the chi-square test method provided in the embodiment of the present application, on the basis of the chi-square test method provided in the embodiment of the present application, a chi-square test device is also provided in the embodiment of the present application, such as Figure 6 As shown, the Chi-square test device 600 includes:
[0195] The first shard calculation module 610 is used to obtain the sample observation frequencies corresponding to each second categorical variable under different first categorical variables of the local sample data, and perform chi-square test sharding processing on the sample observation frequencies to obtain the first chi-square value sharding data between the first categorical variable and the second categorical variable;
[0196] The sharding result receiving module 620 is configured to receive the second chi-square value sharding data sent by the participating nodes;
[0197] The test result acquisition module 630 is used to obtain a chi-square test result based on the first chi-square value segmented data and the second chi-square value segmented data. The chi-square test result is used to identify the correlation between different categorical variables.
[0198] In some embodiments of the present application, the first shard calculation module 610 is also used to obtain the first local sample statistical frequency under each first classification variable and the second local sample statistical frequency under each second classification variable in the local sample data; receive the first remote sample statistical frequency under each first classification variable and the second remote sample statistical frequency under each second classification variable sent by the participating nodes; obtain the sample expected frequency under each second classification variable under different first classification variables based on the first local sample statistical frequency, the second local sample statistical frequency, the first remote sample statistical frequency and the second remote sample statistical frequency; obtain the first chi-square value shard data based on the sample expected frequency and sample observation frequency corresponding to each second classification variable under different first classification variables.
[0199] In some embodiments of the present application, the first shard calculation module 610 is also used to determine the categories corresponding to different second classification variables under different first classification variables as target sample categories, and obtain the deviation shard data of the target sample category based on the sample observation frequency of the target sample category and the sample expected frequency of the target sample category; and determine the sum of the deviation shard data of each target sample category as the first chi-square value shard data.
[0200] In some embodiments of the present application, the first sharding calculation module 610 is also used to perform sharding operations on the sample observation frequency to obtain first local sharding data and first remote sharding data, and distribute the first remote sharding data to the participating nodes; obtain the second remote sharding data distributed by the participating nodes, and obtain the first deviation sharding item based on the second remote sharding data and the first local sharding data; send the first deviation sharding item to the aggregator server, and the first deviation sharding item is used to instruct the aggregator server to obtain the second deviation sharding item based on the first deviation sharding item; obtain the first chi-square value sharding data between the first categorical variable and the second categorical variable based on the sample observation frequency and the second deviation sharding item.
[0201] In some embodiments of the present application, the test result acquisition module 630 is used to obtain the sum of the first chi-square value slice data and the second chi-square value slice data to obtain the chi-square value; and obtain the chi-square test result based on the chi-square value and the preset degrees of freedom.
[0202] The present application also provides a chi-square test device, such as Figure 7 As shown, the chi-square test device 700 includes:
[0203] The second shard calculation module 710 is used to obtain the sample observation frequencies corresponding to each second categorical variable under different first categorical variables of the local sample data, and perform chi-square test sharding processing on the sample observation frequencies to obtain the second chi-square value sharding data between the first categorical variable and the second categorical variable;
[0204] The sharding result sending module 720 is used to send the second chi-square value sharding data to the initiating node. The second chi-square value sharding data is used to instruct the initiating node to obtain the chi-square test result based on the second chi-square value sharding data. The chi-square test result is used to identify the correlation between different classification variables.
[0205] In the above embodiment, by obtaining a first image area containing reference object information and a second image area containing target object information in the image to be identified, the first pixel information of the first image area and the second pixel information of the second image area can be used to achieve the desired size category of the target object information in the image to be identified, and finally the size recognition result of the target object information relative to the reference object information is obtained by analysis, that is, the size of the target object in the image to be identified is determined. Since the present application proposes to introduce a comprehensive analysis of the reference object while identifying the size of the target object, and the actual size of the reference object is fixed, the actual size of the target object can be accurately identified, thereby achieving the size classification of the target object. By adopting the solution provided by the present application, the target object in the image is identified based on artificial intelligence technology, and the relative size of the reference object and the target object is analyzed to determine the actual size of the target object. This can not only improve the accuracy of the size recognition of the target object, but also improve the efficiency of the classification of large and small objects in actual business scenarios based on the rapid classification of the target object size, saving manpower and material resources.
[0206] In some embodiments of the present application, the Chi-square test device 600 can be implemented in the form of a computer program. The computer program can be used in Figure 8 The computer device shown in FIG. 1 is run on the computer device shown in FIG. The memory of the computer device can store various program modules constituting the chi-square test device 600, such as: Figure 6 The first shard calculation module 610, the shard result receiving module 620 and the test result obtaining module 630 are shown. The computer program composed of various program modules enables the processor to execute the steps of the chi-square test method of each embodiment of the present application described in this specification.
[0207] For example, Figure 8 The computer device shown can be Figure 6 The first shard calculation module 610 in the illustrated chi-square test apparatus 600 executes step S210. The computer device may execute step S220 via the shard result receiving module 620. The computer device may execute step S230 via the test result acquisition module 630. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with an external computer device via a network connection. When executed by the processor, the computer program implements a chi-square test method.
[0208] In some embodiments of the present application, the Chi-square test device 700 can be implemented in the form of a computer program. The computer program can be used in Figure 8 The computer device shown in FIG. 1 is run on the computer device shown in FIG. The memory of the computer device can store various program modules constituting the chi-square test device 700, such as: Figure 7 The second shard calculation module 710 and the shard result sending module 720 are shown. The computer program composed of various program modules enables the processor to execute the steps of the chi-square test method of each embodiment of the present application described in this specification.
[0209] For example, Figure 8 The computer device shown can be Figure 7 The second shard calculation module 710 in the illustrated chi-square test apparatus 700 executes step S510. The computer device may execute step S520 via the shard result sending module 720. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with an external computer device via a network connection. When executed by the processor, the computer program implements a chi-square test method.
[0210] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0211] In some embodiments of the present application, a computer device is provided, comprising one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to cause the processor to execute the steps of the aforementioned chi-square test method. The steps of the chi-square test method herein may be the steps of the chi-square test method in each of the aforementioned embodiments.
[0212] In some embodiments of the present application, a computer-readable storage medium is provided, storing a computer program, which is loaded by a processor to cause the processor to execute the steps of the above-mentioned chi-square test method. The steps of the chi-square test method here can be the steps of the chi-square test method in each of the above-mentioned embodiments.
[0213] A person of ordinary skill in the art will appreciate that all or part of the processes in the above-described embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-described methods. Any reference to memory, storage, database or other media used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0214] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0215] The above is a detailed introduction to a chi-square test method, device, computer equipment and storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A chi-square test method, characterized in that: Applied to a server corresponding to an initiating node, the method includes: Obtaining sample observation frequencies corresponding to each second categorical variable of the local sample data under different first categorical variables, and performing chi-square test slicing processing on the sample observation frequencies to obtain first chi-square value slicing data between the first categorical variable and the second categorical variable; the first chi-square value slicing data includes deviation slicing data of category slicing corresponding to each sample category, wherein the each sample category is obtained by dividing the local sample data based on the first categorical variable and the second categorical variable; The performing chi-square test slicing processing on the sample observation frequency to obtain first chi-square value slicing data between the first categorical variable and the second categorical variable includes: Obtaining a first local sample statistical frequency under each of the first classification variables and a second local sample statistical frequency under each of the second classification variables in the local sample data; receiving a first remote sample statistical frequency under each of the first classification variables and a second remote sample statistical frequency under each of the second classification variables sent by a participating node; Obtaining expected sample frequencies under each second classification variable under different first classification variables according to the first local sample statistical frequency, the second local sample statistical frequency, the first remote sample statistical frequency, and the second remote sample statistical frequency; The method of obtaining the first chi-square value segmented data based on the sample expected frequencies and the sample observed frequencies corresponding to each second categorical variable under different first categorical variables comprises: Determine the categories corresponding to different second classification variables under different first classification variables as target sample categories respectively, and obtain the deviation segmentation data of the target sample category based on the sample observation frequency of the target sample category and the sample expected frequency of the target sample category; Determine the sum of the deviation slice data of each target sample category as the first chi-square value slice data; Receive the second chi-square value shard data sent by the participating nodes; A chi-square test result is obtained according to the first chi-square value segmented data and the second chi-square value segmented data, where the chi-square test result is used to identify correlations between different categorical variables.
2. The method according to claim 1, characterized in that The obtaining of a chi-square test result according to the first chi-square value shard data and the second chi-square value shard data includes: Obtaining a sum of the first chi-square value shard data and the second chi-square value shard data to obtain a chi-square value; The chi-square test result is obtained according to the chi-square value and the preset degrees of freedom.
3. A chi-square test method, characterized in that: Applied to a server corresponding to an initiating node, the method includes: Obtaining sample observation frequencies corresponding to respective second categorical variables of local sample data under different first categorical variables, and performing chi-square test slicing processing on the sample observation frequencies to obtain first chi-square value slicing data between the first categorical variable and the second categorical variable; performing chi-square test slicing processing on the sample observation frequencies to obtain first chi-square value slicing data between the first categorical variable and the second categorical variable, including: Performing a sharding operation on the sample observation frequency to obtain first local shard data and first remote shard data, and distributing the first remote shard data to participating nodes; Obtaining the second remote shard data distributed by the participating node, and obtaining a first deviation shard item based on the second remote shard data and the first local shard data; the first deviation shard item refers to a shard of the deviation between the sample observation frequency and the sample expected frequency corresponding to the local sample data in the server corresponding to the initiating node; The first deviation shard item is sent to the aggregator server. The first deviation shard item is used to instruct the aggregator server to obtain and return a second deviation shard item based on the first deviation shard item. The second deviation shard item refers to another shard of the deviation between the sample observation frequency and the sample expected frequency corresponding to the local sample data in the server corresponding to the initiating node. The second deviation shard item is obtained based on the aggregator server restoring the first deviation shard item. Obtaining first chi-square value sharding data between the first categorical variable and the second categorical variable based on the sample observation frequency and the second deviation sharding item; the first chi-square value sharding data is obtained by reconstructing the deviation of the local category sharding based on the deviation sharding item; Receive the second chi-square value shard data sent by the participating nodes; A chi-square test result is obtained according to the first chi-square value segmented data and the second chi-square value segmented data, where the chi-square test result is used to identify correlations between different categorical variables.
4. The method according to claim 3, characterized in that The obtaining of a chi-square test result according to the first chi-square value shard data and the second chi-square value shard data includes: Obtaining a sum of the first chi-square value shard data and the second chi-square value shard data to obtain a chi-square value; The chi-square test result is obtained according to the chi-square value and the preset degrees of freedom.
5. A chi-square test method, characterized in that: Applied to a server corresponding to a participating node, the method includes: Obtaining sample observation frequencies corresponding to each second categorical variable of the local sample data under different first categorical variables, and performing chi-square test slicing processing on the sample observation frequencies to obtain second chi-square value slicing data between the first categorical variable and the second categorical variable; the second chi-square value slicing data includes deviation slicing data of category slicing corresponding to each sample category, wherein the each sample category is obtained by dividing the local sample data based on the first categorical variable and the second categorical variable; The performing chi-square test slicing processing on the sample observation frequency to obtain second chi-square value slicing data between the first categorical variable and the second categorical variable includes: Obtaining a first local sample statistical frequency under each of the first classification variables and a second local sample statistical frequency under each of the second classification variables in the local sample data; receiving first remote sample statistical frequencies under each of the first classification variables and second remote sample statistical frequencies under each of the second classification variables sent by the initiating node and other participating nodes; Obtaining expected sample frequencies under each second classification variable under different first classification variables according to the first local sample statistical frequency, the second local sample statistical frequency, the first remote sample statistical frequency, and the second remote sample statistical frequency; The method of obtaining the second chi-square value segmented data based on the sample expected frequency and the sample observed frequency corresponding to each second categorical variable under different first categorical variables comprises: Determine the categories corresponding to different second classification variables under different first classification variables as target sample categories respectively, and obtain the deviation segmentation data of the target sample category based on the sample observation frequency of the target sample category and the sample expected frequency of the target sample category; Determine the sum of the deviation slice data of each target sample category as the second chi-square value slice data; The second chi-square value shard data is sent to the initiating node, and the second chi-square value shard data is used to instruct the initiating node to obtain a chi-square test result based on the second chi-square value shard data, and the chi-square test result is used to identify the correlation between different classification variables.
6. A chi-square test device, characterized in that: Applied to a server corresponding to an initiating node, the apparatus includes: A first sharding calculation module is configured to obtain sample observation frequencies corresponding to respective second categorical variables of local sample data under different first categorical variables, and perform chi-square test sharding processing on the sample observation frequencies to obtain first chi-square value sharding data between the first categorical variable and the second categorical variable; the first chi-square value sharding data includes deviation sharding data of category shards corresponding to respective sample categories, wherein the respective sample categories are obtained by dividing the local sample data based on the first categorical variable and the second categorical variable; The performing chi-square test slicing processing on the sample observation frequency to obtain first chi-square value slicing data between the first categorical variable and the second categorical variable includes: Obtaining a first local sample statistical frequency under each of the first classification variables and a second local sample statistical frequency under each of the second classification variables in the local sample data; receiving a first remote sample statistical frequency under each of the first classification variables and a second remote sample statistical frequency under each of the second classification variables sent by a participating node; Obtaining expected sample frequencies under each second classification variable under different first classification variables according to the first local sample statistical frequency, the second local sample statistical frequency, the first remote sample statistical frequency, and the second remote sample statistical frequency; The method of obtaining the first chi-square value segmented data based on the sample expected frequencies and the sample observed frequencies corresponding to each second categorical variable under different first categorical variables comprises: Determine the categories corresponding to different second classification variables under different first classification variables as target sample categories respectively, and obtain the deviation segmentation data of the target sample category based on the sample observation frequency of the target sample category and the sample expected frequency of the target sample category; Determine the sum of the deviation slice data of each target sample category as the first chi-square value slice data; A sharding result receiving module, configured to receive the second chi-square value sharding data sent by the participating nodes; The test result acquisition module is used to obtain a chi-square test result based on the first chi-square value segmentation data and the second chi-square value segmentation data, wherein the chi-square test result is used to identify the correlation between different categorical variables.
7. A chi-square test device, characterized in that: Applied to a server corresponding to a participating node, the apparatus comprises: A second sharding calculation module is configured to obtain sample observation frequencies corresponding to respective second categorical variables of the local sample data under different first categorical variables, and perform chi-square test sharding processing on the sample observation frequencies to obtain second chi-square value sharding data between the first categorical variable and the second categorical variable; the second chi-square value sharding data includes deviation sharding data of category shards corresponding to respective sample categories, wherein the respective sample categories are obtained by dividing the local sample data based on the first categorical variable and the second categorical variable; The performing chi-square test slicing processing on the sample observation frequency to obtain second chi-square value slicing data between the first categorical variable and the second categorical variable includes: Obtaining a first local sample statistical frequency under each of the first classification variables and a second local sample statistical frequency under each of the second classification variables in the local sample data; receiving first remote sample statistical frequencies under each of the first classification variables and second remote sample statistical frequencies under each of the second classification variables sent by the initiating node and other participating nodes; Obtaining expected sample frequencies under each second classification variable under different first classification variables according to the first local sample statistical frequency, the second local sample statistical frequency, the first remote sample statistical frequency, and the second remote sample statistical frequency; The method of obtaining the second chi-square value segmented data based on the sample expected frequency and the sample observed frequency corresponding to each second categorical variable under different first categorical variables comprises: Determine the categories corresponding to different second classification variables under different first classification variables as target sample categories respectively, and obtain the deviation segmentation data of the target sample category based on the sample observation frequency of the target sample category and the sample expected frequency of the target sample category; Determine the sum of the deviation slice data of each target sample category as the second chi-square value slice data; A sharding result sending module is used to send the second chi-square value sharding data to the initiating node, and the second chi-square value sharding data is used to instruct the initiating node to obtain a chi-square test result based on the second chi-square value sharding data, and the chi-square test result is used to identify the correlation between different classification variables.
8. A server, characterized in that: The server includes: one or more processors; Memory; and One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the chi-square test method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that A computer program is stored thereon, and the computer program is loaded by a processor to execute the chi-square test method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Data processing method, device, computer equipment and storage medium
CN108920272A
Scoring card model establishment method and device, computer equipment and storage medium
CN109598095A