CN115827708A - Data sampling method and device, storage medium and electronic equipment - Google Patents

Data sampling method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115827708A
CN115827708A CN202211585970.3A CN202211585970A CN115827708A CN 115827708 A CN115827708 A CN 115827708A CN 202211585970 A CN202211585970 A CN 202211585970A CN 115827708 A CN115827708 A CN 115827708A
Authority
CN
China
Prior art keywords
data
target data
data table
sampling
receiving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211585970.3A
Other languages
Chinese (zh)
Inventor
张攀
王斌
温超
谢圳钿
刘时光
李名进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202211585970.3A priority Critical patent/CN115827708A/en
Publication of CN115827708A publication Critical patent/CN115827708A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present disclosure provides a data sampling method and apparatus, a storage medium, and an electronic device, wherein the data sampling method includes: receiving a target data table; the target data table comprises at least one group of data. A data sampling condition is received. And extracting target data from at least one group of data in the target data table according to the data sampling condition. The data sampling method of the embodiment of the disclosure provides a feasible method for non-technical personnel to sample data, and can improve the service decision efficiency.

Description

Data sampling method and device, storage medium and electronic equipment
Technical Field
The technical scheme of the disclosure relates to the technical field of data processing, and in particular relates to a data sampling method and device, a storage medium and an electronic device.
Background
Data sampling is a common method of selecting a subset of data objects for analysis. Currently, data sampling is usually performed by a professional technician writing related sampling codes based on sampling conditions.
With the increasing trend of data-driven business decisions, not only technicians have a need for data sampling, but non-technicians (such as product managers and operators) also need to perform high-frequency data sampling to support business decisions. Since a non-technician needs to make a service decision based on the obtained data sampling result, the requirement on the real-time performance of obtaining the data sampling result is high, and the data sampling is not suitable for the data sampling by waiting for the technician to write the sampling code.
Disclosure of Invention
In view of this, the present disclosure provides a data sampling method and apparatus, a storage medium, and an electronic device.
According to a first aspect of the present disclosure, a data sampling method is provided, the method comprising:
receiving a target data table; the target data table comprises at least one group of data;
receiving a data sampling condition;
and extracting target data from at least one group of data in the target data table according to the data sampling condition.
In combination with any one of the embodiments provided in this disclosure, before the receiving the target data table, the method further includes:
responding to the detected login operation, and acquiring the authority level of the logged-in user; the permission level is used for representing the permission of the user to view the data tables with different privacy degrees;
displaying a set of data tables corresponding to the permission level of the user; the data table set comprises at least one data table;
the receiving target data table includes:
receiving a selection operation, and taking a data table indicated by the selection operation as the target data table; wherein the data table indicated by the selection operation belongs to the set of data tables.
In combination with any one of the embodiments provided by the present disclosure, the number of the received target data tables is multiple;
after receiving the target data table, the method further comprises:
receiving an incidence relation among a plurality of target data tables; the incidence relation is used for representing incidence fields in a plurality of target data tables; each target data table comprises the associated fields and corresponding information fields;
the extracting target data from at least one group of data included in the target data table according to the data sampling condition includes:
extracting at least one data sample from a plurality of target data tables according to the data sampling condition; wherein the data in each of the data samples comprises: and extracting data obtained by combining the information fields respectively corresponding to the association fields from the target data tables according to the association relation.
In combination with any one of the embodiments provided by the present disclosure, the target data table includes a plurality of fields, and after receiving the target data table, the method further includes:
receiving a desired field; the expected field is used for representing a field which a user desires to obtain;
after the target data is extracted from at least one group of data included in the target data table according to the data sampling condition, the method further includes:
and acquiring data corresponding to the expected field in the target data according to the expected field.
In combination with any one embodiment provided by the present disclosure, the data sampling condition includes: the sampling ratio or the absolute sampling number; the sampling proportion is used for representing the proportion of the target data extracted from the target data table to the total data, and the absolute sampling quantity is used for representing the quantity of the target data extracted from the target data table.
In combination with any one of the embodiments provided in this disclosure, before receiving the data sampling condition, the method further includes:
receiving a sample ratio threshold and/or an absolute sample number threshold;
after receiving the data sampling condition, the method further comprises:
and responding to the fact that the sampling proportion is lower than the sampling proportion threshold value or the absolute sampling quantity is lower than the absolute sampling quantity threshold value, and reminding a user of failure in condition setting.
According to a second aspect of the present disclosure, a data sampling apparatus is presented, the apparatus comprising:
the target data table receiving module is used for receiving a target data table; the target data table comprises at least one group of data;
a data sampling condition receiving module for receiving a data sampling condition;
and the target data extraction module is used for extracting target data from at least one group of data in the target data table according to the data sampling condition.
According to a third aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon machine readable instructions which, when invoked and executed by a processor, cause the processor to implement the data sampling method of any of the embodiments of the present disclosure.
According to a fourth aspect of the present disclosure, there is provided an electronic apparatus comprising
A processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the data sampling method of any of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the data sampling method and device, the storage medium and the electronic equipment provided by the embodiment of the disclosure receive a target data table; the target data table comprises at least one group of data. A data sampling condition is received. And extracting target data from the target data table according to the data sampling condition. The data sampling method of the embodiment of the disclosure provides a feasible method for acquiring the data sampling result in real time for the user, and can improve the business decision efficiency and reduce the cooperation cost.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart diagram illustrating a method of data sampling according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating another method of sampling data according to an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a user selection targeting data table according to an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating one user-selected determination of data sampling conditions according to an exemplary embodiment of the present disclosure;
FIG. 5 is a flow chart illustrating another method of sampling data according to an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating an association between user set target data tables according to an exemplary embodiment of the present disclosure;
FIG. 7 is a schematic diagram illustrating one type of user setting a desired display field according to an exemplary embodiment of the present disclosure;
FIG. 8 is a block diagram illustrating a data sampling apparatus according to an exemplary embodiment of the present disclosure;
FIG. 9 is a schematic diagram illustrating another data sampling apparatus according to an exemplary embodiment of the present disclosure;
FIG. 10 is a schematic diagram illustrating another data sampling apparatus according to an exemplary embodiment of the present disclosure;
FIG. 11 is a schematic diagram illustrating another data sampling apparatus according to an exemplary embodiment of the present disclosure;
FIG. 12 is a schematic diagram illustrating another data sampling apparatus according to an exemplary embodiment of the present disclosure;
FIG. 13 is a schematic diagram illustrating another data sampling apparatus according to an exemplary embodiment of the present disclosure;
FIG. 14 is a schematic diagram illustrating another data sampling apparatus according to an exemplary embodiment of the present disclosure;
FIG. 15 is a schematic diagram illustrating another data sampling apparatus according to an exemplary embodiment of the present disclosure;
fig. 16 is a schematic structural diagram of an electronic device shown in accordance with an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at" \8230; "or" when 8230; \8230; "or" in response to a determination ", depending on the context.
Data sampling is a method of extracting a subset of data objects from a set of data objects. Currently, data sampling needs to be done by a skilled technician writing the relevant code based on the specific sampling requirements. With the increasing trend of data-driven business decision-making, not only technicians have demands for data sampling, but also non-technicians (such as product managers and operators) need to perform high-frequency data sampling to support business decision-making. For example, when an operator performs advertisement delivery, the operator needs to extract part of data from a huge data object set to analyze and obtain characteristics of different users, and determine groups and opportunities of advertisement delivery based on the characteristics of the different users. Because the operator needs to determine the group and the opportunity of advertisement delivery based on the obtained data sampling result, the real-time requirement on the acquisition of the data sampling result is high. At this point, it is not suitable to complete the data sampling by waiting for the technician to write the sampling code.
In order to meet the requirement of a user on obtaining a data sampling result in real time, the data sampling method is provided. By the data sampling method, a user can obtain the data sampling result in real time only by having the conventional computer operation capability.
The data sampling method according to the embodiment of the present disclosure is described in detail below with reference to the drawings.
Fig. 1 is a flow chart illustrating a data sampling method of the present disclosure according to an exemplary embodiment. In a particular implementation, the data sampling method may be performed by a data sampling system deployed on a server. As shown in FIG. 1, the exemplary embodiment method may include the steps of:
in step 100, a target data table is received.
The target data table comprises at least one group of data.
And the data in the target data table comprises the data required to be acquired by the current user. For example, the current user needs to obtain the Chinese achievements of the three high students to perform the overall analysis on the Chinese levels of the three high students, and at this time, the received target data table at least includes the Chinese achievement of one of the three high students. For another example, the current user needs to obtain the internet surfing information of other users to analyze the active time of the other users on the network, and at this time, the received target data table at least includes the internet surfing information of one user within a period of time.
In an alternative example, the target data table may be selected by the current user based on his or her own needs and input to the data sampling system.
In step 102, a data sampling condition is received.
The data sampling condition is used for representing an extraction rule when data is extracted from the target data table.
In an alternative example, the data sampling condition may include: sample ratio or absolute sample number.
Wherein the sampling proportion is used for indicating the proportion of the target data extracted from the target data table to the total data. The absolute sample number is used to indicate the amount of target data extracted from the target data table in a manner that does not take into account the magnitude of the data in the target data table.
For example, in the above example of the chinese achievements, the obtained target data table includes the number of 1000 students and the respective chinese achievements corresponding to them.
When the received data sampling condition is a sampling proportion, if the sampling proportion is 10%, the result indicates that the Chinese achievement of 1000 × 10% =100 students is to be extracted from the target data table.
When the received data sampling condition is an absolute sampling number, and if the absolute sampling number is 200, the data sampling condition indicates that the Chinese achievements of 200 students are to be extracted from the target data table.
It should be noted that the above description of "the sampling ratio is 10%", and "the absolute sampling number is 200%" is merely illustrative, and is intended to make the data sampling method of the embodiment of the present disclosure better understood by those skilled in the art, and in the practical application, the present invention is not limited thereto.
In an alternative example, which data sampling condition is adopted may be selected by the current user, and a specific sampling ratio or a specific absolute sampling number may be set based on the user's own needs.
In step 104, target data is extracted from at least one group of data included in the target data table according to the data sampling condition.
The target data is data which a current user desires to obtain.
For example, in the above-mentioned example of the chinese achievement, when the data sampling condition is a sampling ratio and the sampling ratio is 10%, 100 sets of school number-chinese achievement data need to be randomly extracted from 1000 sets of school number-chinese achievement data included in the target data table as the target data.
When the data sampling condition is an absolute sampling number and the absolute sampling number is 200, 200 groups of school number-language achievement data are randomly extracted from 1000 groups of school number-language achievement data included in the target data table to serve as the target data.
The data sampling method provided by the embodiment of the disclosure receives a target data table; the target data table comprises at least one group of data. A data sampling condition is received. And extracting target data from the target data table according to the data sampling condition. The data sampling method of the embodiment of the disclosure provides a feasible method for acquiring the data sampling result in real time for the user, and can improve the efficiency of service decision.
Fig. 2 is a flow chart illustrating another method of sampling data according to an exemplary embodiment of the present disclosure.
In the description of the present embodiment, the same steps as those in any of the foregoing embodiments will be briefly described, and detailed descriptions thereof will be omitted, so that reference may be made to any of the foregoing embodiments. As shown in FIG. 2, the exemplary embodiment method may include the steps of:
in step 200, in response to detecting a login operation, the permission level of the logged-in user is obtained.
The permission level is used for representing the permission of the user to view the data tables with different privacy degrees. Specifically, the user with the lower authority level has the authority to acquire the data table with the lower privacy degree, and the user with the higher authority level has the authority to acquire the data table with the higher privacy degree.
For example, the fields in Table A include school code-gender-language achievement, and the fields in Table B include school code-gender-identity number-contact-language achievement. The user with the lower privilege level has the right to acquire the data table a, while the user with the higher privilege level has the right to acquire the data table B.
In an alternative example, the permission level of the current user may be obtained based on a user ID (Identity document) of the currently logged-in user.
Specifically, a corresponding relationship between a user ID and an authority level may be pre-established, and when a user login is detected, the authority level corresponding to the user ID may be searched for in the corresponding relationship by using the user ID of the user.
In step 202, a set of data tables corresponding to the user's privilege level is displayed.
The data table set comprises at least one data table.
In one optional example, the data table may be divided into different sets of data tables in advance based on the degree of privacy of the fields included in the data table. For example, the data table a may be divided into a first set of data tables, and the data table B may be divided into a second set of data tables. And setting the first data table set to correspond to a low permission level and the second data table set to correspond to a high permission level.
When the permission level of the current user is determined to be a high permission level, a second set of data tables corresponding to the high permission level may be displayed. When the permission level of the current user is determined to be a low permission level, a first set of data tables corresponding to the low permission level may be displayed.
It should be noted that, besides the data table a, the first data table set may further include other data tables, and that, besides the data table B, the second data table set may also include other data tables, which is not limited in this disclosure.
In one optional example, the data sampling system may also display a set of data tables corresponding to the current user-selected cluster based on the current user-selected cluster.
As shown in fig. 3, when the user selects the Singapore cluster, the data sampling system may display a set of data tables stored in the Singapore server.
In step 204, receiving a selection operation, and taking the data table indicated by the selection operation as the target data table; wherein the data table indicated by the selection operation belongs to the set of data tables.
FIG. 3 is a schematic diagram of a set of data tables displayed by the data sampling system corresponding to the permission level of the current user based on the permission level of the current user. As shown in FIG. 3, the user may complete the selection of a spreadsheet based on the + Add button to the left of each spreadsheet label name.
After the user selects a certain data table from the set of data tables, the data sampling system may receive the selection operation, and use the data table indicated by the selection operation as the target data table.
In step 206, a data sampling condition threshold is received.
The data sampling condition threshold includes a sampling proportion threshold and/or an absolute sampling number threshold.
The sampling proportion threshold is used for representing the minimum value of the proportion of the target data extracted from the target data table to the total data. The absolute sample number threshold is used to represent a minimum value of the number of target data extracted from the target data table. For example, the sample ratio threshold may be 5% and the absolute sample number threshold may be 100.
It should be noted that step 206 may be executed before steps 200 to 204, may be executed in parallel with any of steps 200 to 204, or may be executed after steps 200 to 204, which is not limited in the present disclosure.
In step 208, a data sampling condition is received.
The data sampling condition is used for representing an extraction rule when data is extracted from the target data table.
In an alternative example, the data sampling condition may include: sample ratio or absolute sample number. Wherein the sampling proportion is used for indicating the proportion of the target data extracted from the target data table to the total data, and the absolute sampling number is used for indicating the number of the target data extracted from the target data table.
In step 210, it is determined whether the data sampling condition is greater than the data sampling condition threshold.
If yes, go to step 212a.
If not, go to step 212b.
In step 212a, target data is extracted from at least one set of data included in the target data table according to the data sampling condition.
In step 212b, the user is alerted to the failure of the condition setting.
And when the sampling proportion is smaller than or equal to the sampling proportion threshold value or the absolute sampling quantity is smaller than or equal to the absolute sampling quantity threshold value, reminding a user that the condition setting is failed.
In a specific implementation process, a user may select to determine data sampling conditions and set a specific sampling ratio or a specific absolute sampling number through an interface as shown in fig. 4.
When the sampling proportion set by the user is less than or equal to the sampling proportion threshold value 5%, or the absolute sampling quantity set by the user is less than or equal to the absolute sampling quantity threshold value 100, the user can be reminded that the condition setting is failed.
In an alternative example, the user may be guided to perform setting of the data sampling condition again by pop-up displaying "condition setting failure" on the basis of the interface shown in fig. 4.
In one alternative example, a time range of a current user selection may be received and the sampling range may be constrained by the time range.
For example, if the received time range selected by the user is 3/8/2022, the target data may be sampled from the data acquired on the current day.
The data sampling method provided by the embodiment of the disclosure can preset a sampling proportion threshold and an absolute sampling quantity threshold, and when the sampling proportion set by a user is smaller than or equal to the preset sampling proportion threshold or the absolute sampling quantity set by the user is smaller than or equal to the preset absolute sampling quantity threshold, the user is reminded that the condition setting fails, so that the problem of exposing the privacy of the user caused by too small sampling quantity is prevented.
FIG. 5 is a flow chart illustrating another method of sampling data according to an exemplary embodiment of the present disclosure.
In the description of the present embodiment, the same steps as those in any of the foregoing embodiments will be briefly described, and detailed descriptions thereof will be omitted, so that reference may be made to any of the foregoing embodiments. In this embodiment, how to extract the associated data from the plurality of data tables using the data sampling method of the present disclosure will be further described. As shown in FIG. 5, the exemplary embodiment method may include the steps of:
in step 500, a plurality of target data tables are received.
Each target data table comprises at least one group of data.
The user can select a plurality of data tables in the interface shown in fig. 3 as the target data table based on own requirements.
In step 502, an association relationship between a plurality of the target data tables is received.
The incidence relation is used for representing incidence fields in a plurality of target data tables; each target data table comprises the associated field and a corresponding information field.
The association may be configured by the user and sent to the data sampling system. As shown in fig. 6, 4 target data tables are received. The user can configure the association relationship between the adjacent data tables in the 4 target data tables by the illustrated equation on the right side of the "JO I N Ru I es (association relationship)". The selectable range of the drop-down box on the left side of the equal sign is all fields in the upper adjacent data table, and the selectable range of the drop-down box on the right side of the equal sign is all fields in the lower adjacent data table.
For example, the fields in the target data table 1 include: school number-chinese achievement-music achievement field, the fields in the target data table 2 include: student number-math-art score field, the fields in the target data table 3 include: student id-english score-historical score field, the fields in target data table 4 include: student identification number-sports score field.
The study number, the student ID and the student identification number are different in name but substantially the same, for example, the study number of the student is represented. In order to obtain the results of four subjects of several students from the 4 target data tables, the 4 target data tables may be associated with each other by using the 4 fields as the association fields.
Specifically, when configuring JO I N Ru l es between the target data table 1 and the target data table 2, the school number may be selected in the drop-down box on the left side of the equal sign, and the student number may be selected in the drop-down box on the right side of the equal sign, that is, the received association relationship between the target data table 1 and the target data table 2 may be expressed as school number = student number. For another example, when configuring JO I N Ru l es between the target data table 2 and the target data table 3, a student number may be selected in the drop-down box on the left side of the equal sign, and a student id may be selected in the drop-down box on the right side of the equal sign, that is, the received association relationship between the target data table 2 and the target data table 3 may be expressed as student number = student id.
The school number, the student ID and the student identification number are the associated fields, and the Chinese score, the music score, the mathematics score, the art score, the English score, the historical score and the sports score are the information fields.
The user can also adjust the positional relationship between the target data tables by the "up" and "down" buttons shown in fig. 6.
In step 504, a data sampling condition is received.
In step 506, at least one data sample is extracted from the plurality of target data tables according to the data sampling condition.
Wherein the data in each of the data samples comprises: and extracting data obtained by combining the information fields respectively corresponding to the association fields from the target data tables according to the association relation.
In an alternative example, after receiving the association relationship between the 4 target data tables, an intermediate table may be determined based on the association relationship between the 4 target data tables. For example, in the above example, an intermediate table can be obtained from the target data table 1, the target data table 2, the target data table 3, and the target data table 4, and the fields in the intermediate table include: school grade, chinese grade, music grade, mathematics grade, art grade, english grade, history grade, and sports grade.
Each school number and the Chinese score, music score, mathematics score, art score, english score, history score and sports score corresponding to the school number are taken as a data sample.
Then, at least one data sample may be randomly drawn from the plurality of data samples included in the intermediate table according to the received data sampling condition.
In an alternative example, the expected field may also be received in advance. The expected field is used for representing the field which the user desires to acquire. And acquiring data corresponding to the expected field in the target data according to the expected field.
In particular embodiments, the user may select the fields that the user desires to display in the interface shown in FIG. 7.
As described above, the target data table 1 includes the school number-language achievement-music achievement field, the target data table 2 includes the student number-mathematics achievement-art achievement field, and the target data table 3 includes the student id-english achievement-history achievement field. The data sampling system can display all fields contained in each target data table, and the user can select the fields based on the requirement of the user. For example, when the user wants to obtain the scores of the english subject of the student for analysis, the user may select a chinese score field in the fields in the target data table 1, a math score field in the fields in the target data table 2, and an english score field in the fields in the target data table 3.
Then, based on the expected field, the data corresponding to the expected field in the target data is obtained.
Specifically, based on the foregoing, each data sample in the obtained target data includes a school number, a Chinese score, a music score, a math score, an art score, an english score, a history score, and a sports score.
The fields expected to be acquired by the user are a Chinese achievement field, a mathematic achievement field and an English achievement field, so that for each data sample, the data corresponding to the expected fields can be further acquired. Namely, only the Chinese achievement, the math achievement and the English achievement in each data sample are obtained. Thereby reducing the quantity of output data and eliminating invalid data.
According to the data sampling method provided by the embodiment of the disclosure, the associated data in the target data tables can be sampled by associating the target data tables, a feasible method for sampling the multi-table associated data in real time is provided for a user, the decision efficiency can be improved, and the cooperation cost can be reduced.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently.
Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that acts and modules referred to are not necessarily required by the disclosure.
Corresponding to the embodiment of the application function implementation method, the disclosure also provides an embodiment of an application function implementation device and a corresponding terminal.
Fig. 8 is a schematic structural diagram of a data sampling apparatus according to an exemplary embodiment of the present disclosure, and as shown in fig. 8, the data sampling apparatus may include:
a target data table receiving module 81 for receiving a target data table; the target data table comprises at least one group of data.
A data sampling condition receiving module 82 for receiving the data sampling condition.
And a target data extraction module 83, configured to extract target data from at least one group of data included in the target data table according to the data sampling condition.
Optionally, as shown in fig. 9, on the basis of the module shown in fig. 8, the data sampling apparatus may further include:
the permission level acquiring module 91 is configured to acquire a permission level of a logged-in user in response to detecting a login operation; the permission level is used for expressing the permission of the user to view the data tables with different privacy degrees.
A data table set display module 92, configured to display a data table set corresponding to the permission level of the user; the data table set comprises at least one data table.
The target data table receiving module 81, when configured to receive a target data table, includes:
receiving a selection operation, and taking a data table indicated by the selection operation as the target data table; wherein the data table indicated by the selection operation belongs to the set of data tables.
Optionally, the number of the received target data tables is multiple.
As shown in fig. 10, on the basis of the module shown in fig. 8, the data sampling apparatus may further include:
an association receiving module 101, configured to receive an association between multiple target data tables; the incidence relation is used for representing incidence fields in a plurality of target data tables; each target data table comprises the associated field and a corresponding information field.
The target data extracting module 83, when configured to extract target data from at least one group of data included in the target data table according to the data sampling condition, includes:
extracting at least one data sample from a plurality of target data tables according to the data sampling condition; wherein the data in each of the data samples comprises: and extracting data obtained by combining the information fields respectively corresponding to the association fields from the target data tables according to the association relation.
Optionally, the target data table includes a plurality of data information.
As shown in fig. 11, on the basis of the module shown in fig. 8, the data sampling apparatus may further include:
an expected field receiving module 111 for receiving an expected field; the expected field is used for indicating the field which the user desires to obtain.
A data obtaining module 112, configured to obtain, according to the expected field, data corresponding to the expected field in the target data.
Optionally, the data sampling condition includes: sampling proportion or absolute sampling number; the sampling proportion is used for representing the proportion of the target data extracted from the target data table to the total data, and the absolute sampling quantity is used for representing the quantity of the target data extracted from the target data table.
Optionally, as shown in fig. 12, on the basis of the module shown in fig. 8, the data sampling apparatus may further include:
a threshold receiving module 121, configured to receive a sample ratio threshold and/or an absolute sample number threshold.
And a setting failure reminding module 122, configured to, in response to the sampling ratio being lower than the sampling ratio threshold or the absolute sampling number being lower than the absolute sampling number threshold, remind a user of a failure in setting the condition.
Optionally, as shown in fig. 13, on the basis of the module shown in fig. 9, the data sampling apparatus may further include:
a threshold receiving module 121, configured to receive a sample ratio threshold and/or an absolute sample number threshold.
And a setting failure reminding module 122, configured to, in response to the sampling ratio being lower than the sampling ratio threshold or the absolute sampling number being lower than the absolute sampling number threshold, remind a user of a failure in setting the condition.
Optionally, as shown in fig. 14, on the basis of the module shown in fig. 10, the data sampling apparatus may further include:
a threshold receiving module 121, configured to receive a sample ratio threshold and/or an absolute sample number threshold.
And a setting failure reminding module 122, configured to remind a user of a condition setting failure in response to the sampling ratio being lower than the sampling ratio threshold or the absolute sampling number being lower than the absolute sampling number threshold.
Optionally, as shown in fig. 15, on the basis of the module shown in fig. 11, the data sampling apparatus may further include:
a threshold receiving module 121, configured to receive a sample ratio threshold and/or an absolute sample number threshold.
And a setting failure reminding module 122, configured to, in response to the sampling ratio being lower than the sampling ratio threshold or the absolute sampling number being lower than the absolute sampling number threshold, remind a user of a failure in setting the condition.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
Correspondingly, the embodiment of the present disclosure provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the data sampling method of any of the embodiments of the present disclosure.
Fig. 16 is a schematic diagram illustrating a structure of an electronic device 1600 according to an example embodiment. For example, the electronic device 1600 may be a user device, which may be embodied as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a wearable device such as a smart watch, smart glasses, a smart bracelet, a smart running shoe, and the like.
Referring to fig. 16, electronic device 1600 may include one or more of the following components: processing component 1602, memory 1604, power component 1606, multimedia component 1608, audio component 1610, input/output (I/O) interface 1612, sensor component 1614, and communications component 1616.
The processing component 1602 generally controls overall operation of the electronic device 1600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1602 may include one or more processors 1620 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1602 can include one or more modules that facilitate interaction between the processing component 1602 and other components. For example, the processing component 1602 can include a multimedia module to facilitate interaction between the multimedia component 1608 and the processing component 1602.
The memory 1604 is configured to store various types of data to support operation at the device 1600. Examples of such data include instructions for any application or method operating on the electronic device 1600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1604 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 1606 provides power to the various components of the electronic device 1600. The power components 1606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 1600.
The multimedia component 1608 includes a screen that provides an output interface between the electronic device 1600 and a user as described above. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of the touch or slide action but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1608 comprises a front-facing camera and/or a rear-facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 1600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1610 is configured to output and/or input an audio signal. For example, the audio component 1610 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 1600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 1604 or transmitted via the communications component 1616. In some embodiments, audio component 1610 further includes a speaker for outputting audio signals.
The I/O interface 1612 provides an interface between the processing component 1602 and peripheral interface modules, such as keyboards, click wheels, buttons, and the like. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor assembly 1614 includes one or more sensors for providing various aspects of status assessment for electronic device 1600. For example, sensor assembly 1614 may detect an open/closed state of electronic device 1600, the relative positioning of components, such as a display and keypad of electronic device 1600, a change in position of electronic device 1600 or a component of electronic device 1600, the presence or absence of user contact with electronic device 1600, orientation or acceleration/deceleration of electronic device 1600, and a change in temperature of electronic device 1600. The sensor assembly 1614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communications component 1616 is configured to facilitate communications between the electronic device 1600 and other devices in a wired or wireless manner. The electronic device 1600 may access a wireless network based on a communication standard, such as WiFi,4G or 5g,4G LTE, 5G NR, or a combination thereof. In an exemplary embodiment, the communication component 1616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the aforementioned communication component 1616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 1600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium, such as the memory 1604 including instructions that, when executed by the processor 1620 of the electronic device 1600, enable the electronic device 1600 to perform a data sampling method, the method comprising:
receiving a target data table; the target data table comprises at least one group of data.
A data sampling condition is received.
And extracting target data from at least one group of data in the target data table according to the data sampling condition.
The non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method of data sampling, the method comprising:
receiving a target data table; the target data table comprises at least one group of data;
receiving a data sampling condition;
and extracting target data from at least one group of data in the target data table according to the data sampling condition.
2. The method of claim 1, wherein prior to receiving the target data table, the method further comprises:
in response to the detection of the login operation, acquiring the authority level of the logged-in user; the permission level is used for representing the permission of the user to view the data tables with different privacy degrees;
displaying a set of data tables corresponding to the user's permission level; the data table set comprises at least one data table;
the receiving target data table includes:
receiving a selection operation, and taking the data table indicated by the selection operation as the target data table; wherein the data table indicated by the selection operation belongs to the set of data tables.
3. The method of claim 1, wherein the number of the target data tables received is plural;
after receiving the target data table, the method further comprises:
receiving an incidence relation among a plurality of target data tables; the incidence relation is used for expressing incidence fields in a plurality of target data tables, and each target data table comprises the incidence fields and corresponding information fields;
the extracting target data from at least one group of data included in the target data table according to the data sampling condition includes:
extracting at least one data sample from a plurality of target data tables according to the data sampling condition; wherein the data in each of the data samples comprises: and extracting data obtained by combining the information fields respectively corresponding to the association fields from the target data tables according to the association relation.
4. The method of claim 1, wherein the target data table comprises a plurality of fields, and wherein after receiving the target data table, the method further comprises:
receiving a desired field; the expected field is used for representing a field which a user desires to obtain;
after the target data is extracted from at least one group of data included in the target data table according to the data sampling condition, the method further includes:
and acquiring data corresponding to the expected field in the target data according to the expected field.
5. The method according to any one of claims 1 to 4,
the data sampling conditions include: the sampling ratio or the absolute sampling number; the sampling proportion is used for representing the proportion of the target data extracted from the target data table to the total data, and the absolute sampling quantity is used for representing the quantity of the target data extracted from the target data table.
6. The method of claim 5, wherein prior to the receive data sampling condition, the method further comprises:
receiving a sample ratio threshold and/or an absolute sample number threshold;
after the receiving data sampling condition, the method further comprises:
and responding to the fact that the sampling proportion is lower than the sampling proportion threshold value or the absolute sampling quantity is lower than the absolute sampling quantity threshold value, and reminding a user of failure in condition setting.
7. A data sampling apparatus, the apparatus comprising:
the target data table receiving module is used for receiving a target data table; the target data table comprises at least one group of data;
a data sampling condition receiving module for receiving a data sampling condition;
and the target data extraction module is used for extracting target data from at least one group of data in the target data table according to the data sampling condition.
8. The apparatus of claim 7, further comprising:
the permission level acquisition module is used for responding to the detection of the login operation and acquiring the permission level of the logged-in user; the permission level is used for representing the permission of the user to view the data tables with different privacy degrees;
the data table set display module is used for displaying a data table set corresponding to the authority level of the user; the data table set comprises at least one data table;
the target data table receiving module, when configured to receive a target data table, includes:
receiving a selection operation, and taking the data table indicated by the selection operation as the target data table; wherein the data table indicated by the selection operation belongs to the set of data tables.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the steps of the method of any one of claims 1 to 6.
10. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured for performing the steps of the method of any one of claims 1 to 6.
CN202211585970.3A 2022-12-09 2022-12-09 Data sampling method and device, storage medium and electronic equipment Pending CN115827708A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211585970.3A CN115827708A (en) 2022-12-09 2022-12-09 Data sampling method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211585970.3A CN115827708A (en) 2022-12-09 2022-12-09 Data sampling method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115827708A true CN115827708A (en) 2023-03-21

Family

ID=85546366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211585970.3A Pending CN115827708A (en) 2022-12-09 2022-12-09 Data sampling method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115827708A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116150175A (en) * 2023-04-18 2023-05-23 云账户技术(天津)有限公司 Heterogeneous data source-oriented data consistency verification method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116150175A (en) * 2023-04-18 2023-05-23 云账户技术(天津)有限公司 Heterogeneous data source-oriented data consistency verification method and device

Similar Documents

Publication Publication Date Title
CN111539443B (en) Image recognition model training method and device and storage medium
EP3173940A1 (en) Method and device for identifying information and computer-readable storage medium
EP3173948A1 (en) Method and apparatus for recommendation of reference documents
US10216711B2 (en) Information collection method and apparatus
CN108038102B (en) Method and device for recommending expression image, terminal and storage medium
CN105653276A (en) Method and apparatus for language setting
US9959487B2 (en) Method and device for adding font
US20150339016A1 (en) Tab creation method, device, and terminal
CN112562675A (en) Voice information processing method, device and storage medium
CN111797262A (en) Poetry generation method and device, electronic equipment and storage medium
CN104461236A (en) Method and device for displaying application icons
CN106095236A (en) The method and device of arranging desktop icons
CN106331328B (en) Information prompting method and device
CN112153218B (en) Page display method and device, wearable device and storage medium
CN112035031B (en) Note generation method and device, electronic equipment and storage medium
CN112131466A (en) Group display method, device, system and storage medium
CN112051949A (en) Content sharing method and device and electronic equipment
CN115827708A (en) Data sampling method and device, storage medium and electronic equipment
CN109783729A (en) Information recommendation method, device and storage medium
CN107122801B (en) Image classification method and device
CN110650364A (en) Video attitude tag extraction method and video-based interaction method
CN105787094A (en) Data optimizing method and device
CN114021060A (en) User label display method and device, electronic equipment and storage medium
CN110020117B (en) Interest information acquisition method and device and electronic equipment
CN113885713A (en) Method and device for generating handwriting formula

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination