WO2021082463A1 - Data processing method and apparatus, electronic device and storage medium - Google Patents

Data processing method and apparatus, electronic device and storage medium Download PDF

Info

Publication number
WO2021082463A1
WO2021082463A1 PCT/CN2020/095955 CN2020095955W WO2021082463A1 WO 2021082463 A1 WO2021082463 A1 WO 2021082463A1 CN 2020095955 W CN2020095955 W CN 2020095955W WO 2021082463 A1 WO2021082463 A1 WO 2021082463A1
Authority
WO
WIPO (PCT)
Prior art keywords
sample
list
description information
reading
samples
Prior art date
Application number
PCT/CN2020/095955
Other languages
French (fr)
Chinese (zh)
Inventor
王若晖
胡颖凡
Original Assignee
深圳市商汤科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市商汤科技有限公司 filed Critical 深圳市商汤科技有限公司
Priority to JP2021530871A priority Critical patent/JP2022510660A/en
Priority to KR1020217020477A priority patent/KR20210096230A/en
Publication of WO2021082463A1 publication Critical patent/WO2021082463A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the difficulty of reading data will increase.
  • the storage of data sets is usually to adapt to the structure of the data set itself.
  • the data storage method of the Da taFrame type in the pandas library of the python language is powerful, but the supported data types are limited, and it is mainly for professional users.
  • the read operation mainly focuses on the data itself.
  • the embodiments of the present disclosure propose a data processing method and device, electronic equipment, and storage medium.
  • a data processing method including: determining a sample list including a plurality of samples according to a field of a sample and a parameter value corresponding to the field; The data type is used to determine the description information corresponding to the sample list; and the sample set is determined according to the sample list and the description information.
  • the sample set used to store each sample and the corresponding description information can be determined, multiple types of samples can be stored in a unified manner, and the sample set includes description information describing the data type, It is convenient to store and read sample data, can support multiple types of data storage and read, and is easy to understand.
  • each sample has a sample index
  • the determining a sample list including multiple samples according to the field of the sample and the parameter value corresponding to the field includes: determining the field as all the samples.
  • the column coordinates of the sample list, the sample index is determined as the row coordinates of the sample list;
  • the parameter value corresponding to the field is objectified to obtain the object corresponding to the sample;
  • the data in the object Add to the storage area corresponding to the column coordinates and the row coordinates to obtain the sample list.
  • the parameter values and/or annotations of the samples can be objectified, and samples of multiple data types can be stored through the sample list, which is conducive to the rapid storage and reading of samples, and reduces the resource occupation during storage and reading.
  • And can support multiple types of data storage, adapt to the storage of more complex types of data sets.
  • the description information includes description information of how to read the sample, and the description information corresponding to the sample list is determined according to the data type of the sample in the sample list, It includes: determining a reading method for reading the sample according to the data type of the sample in the sample list; obtaining the description information according to the data type of the sample and the corresponding reading method.
  • a variety of sample reading methods can be determined, which is conducive to supporting multiple types of data storage and access, and adapts to the storage and access of more complex types of data sets.
  • the description information further includes description information of a storage location of the sample, and the storage location includes a storage path of the sample set and an index position of the sample in the sample set. In this way, the precise location of the sample can be determined, making it easy to read the sample.
  • the method further includes: determining index range information used to classify the types of samples in the sample set; generating information related to the sample set based on the description information of the samples in the sample set and the index range information. The description information corresponding to the set. In this way, the index range of the sample can be determined, which is convenient for searching the sample.
  • the method further includes: reading parameter values of samples in the sample list according to the description information and the sample list.
  • the reading the parameter values of the samples in the sample list according to the description information and the sample list includes: obtaining objects in the sample list; according to the sample index, from Among the acquired objects, the first object of the first sample corresponding to the sample index is obtained; the data type of the first sample and the corresponding reading method are determined according to the description information; according to the reading In this way, the parameter value of the first sample is read from the first object.
  • the resource consumption when reading samples can be reduced, and the sample data can be stored in a unified way, and the sample data type can be stored using the sample description information, so that the data reading method can be easily obtained according to the description information, which is easy to read
  • the samples of multiple data types are conducive to quick reading of the samples.
  • the reading the parameter values of the samples in the sample list according to the description information and the sample list includes: obtaining a sample index; according to the sample index, from the sample The parameter value of the sample corresponding to the sample index is obtained from the list.
  • the reading the parameter values of the samples in the sample list according to the description information and the sample list includes: obtaining the object corresponding to the target field in the sample list;
  • the description information determines the data type and reading method of the second sample corresponding to the acquired object; according to the reading method, the parameter value of the second sample is read from the acquired object.
  • the parameter value of one or more samples in the field is read by accessing the field, which improves the flexibility of sample reading and facilitates the rapid reading of samples.
  • the reading the parameter values of the samples in the sample list according to the description information and the sample list includes: obtaining the field name of the target field; according to the field name, from Obtain the parameter value of the target field corresponding to the field name from the sample list.
  • the method further includes: performing at least one operation of query, modification, and deletion processing on the parameter value of the read sample.
  • a data processing device including: a first determining part configured to determine a sample list including a plurality of samples according to a field of the sample and a parameter value corresponding to the field; The second determining part is configured to determine the description information corresponding to the sample list according to the data type of the samples in the sample list; the third determining part is configured to determine according to the sample list and the description information Sample set.
  • each sample has a sample index
  • the first determining part is further configured to: determine the field as the column coordinates of the sample list, and determine the sample index as the The row coordinates of the sample list; object the parameter values corresponding to the fields to obtain the object corresponding to the sample; add the data in the object to the storage area corresponding to the column coordinates and the row coordinates , To obtain the sample list.
  • the description information includes description information of how to read the sample
  • the second determining part is further configured to: determine a sample for reading according to the data type of the sample in the sample list. The method of reading; the description information is obtained according to the data type of the sample and the corresponding reading method.
  • the description information further includes description information of a storage location of the sample, and the storage location includes a storage path of the sample set and an index position of the sample in the sample set.
  • the device further includes: a fourth determining part configured to determine index range information used to classify samples in the sample set; and the generating part configured to determine the index range information of the samples in the sample set according to The description information and the index range information generate description information corresponding to the sample set.
  • the device further includes: a reading part configured to read parameter values of samples in the sample list according to the description information and the sample list.
  • the reading part is further configured to: obtain objects in the sample list; according to the sample index, obtain the first object corresponding to the sample index from the obtained objects.
  • the reading part is further configured to: obtain a sample index; according to the sample index, obtain the parameter value of the sample corresponding to the sample index from the sample list.
  • the reading part is further configured to: obtain the object corresponding to the target field in the sample list; determine the data type and the data type of the second sample corresponding to the obtained object according to the description information. Reading mode; according to the reading mode, the parameter value of the second sample is read from the obtained object.
  • the reading part is further configured to: obtain the field name of the target field; according to the field name, obtain the parameter value of the target field corresponding to the field name from the sample list.
  • the device further includes: an operation part configured to perform at least one of query, modification, and deletion of the parameter value of the read sample.
  • an electronic device including: a processor; a memory configured to store executable instructions of the processor; wherein the processor is configured to execute the above-mentioned data processing method.
  • a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the foregoing data processing method is implemented.
  • a computer program including computer-readable code, when the computer-readable code runs in an electronic device, the processor in the electronic device executes the above-mentioned data processing method.
  • Fig. 1 shows a flowchart of data processing according to an embodiment of the present disclosure
  • Fig. 2 shows a schematic diagram of an exemplary sample list according to an embodiment of the present disclosure
  • Fig. 3 shows an application schematic diagram of an exemplary storage method according to an embodiment of the present disclosure
  • Fig. 4 shows a block diagram of a data processing device according to an embodiment of the present disclosure
  • Figure 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure
  • Fig. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • Fig. 1 shows a flowchart of a data processing method according to an embodiment of the present disclosure. As shown in Fig. 1, the method includes:
  • S11 Determine a sample list including multiple samples according to the fields of the samples and the parameter values corresponding to the fields;
  • S12 Determine description information corresponding to the sample list according to the data type of the sample in the sample list;
  • the sample set used to store each sample and the corresponding description information can be determined, multiple types of samples can be stored in a unified manner, and the sample set includes description information describing the data type, It is convenient to store and read sample data, can support multiple types of data storage and read, and is easy to understand.
  • the execution subject of the data processing method may be a terminal device or a server or other processing equipment, where the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, or a terminal. , Cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc.
  • the method may be implemented by a processor invoking computer-readable instructions stored in a memory or executed by a server.
  • data in the server may be stored by the storage method.
  • the data type of the sample may include multiple types, such as image, video, and/or ordinary numerical value or text data, etc.
  • the embodiment of the present disclosure does not limit the data type of the sample.
  • the sample may include one or more fields, and each field may correspond to a certain feature or a certain type of characteristic of the sample.
  • a certain sample is the profile data of a certain person, and the fields of the sample may include the height and weight of the person , Education, nationality, etc., and the sample can have data corresponding to each field.
  • the embodiments of the present disclosure do not impose restrictions on the fields.
  • the multiple samples may be stored in a datatable, and the storage in a list manner is convenient for operations such as data addition, deletion, and modification.
  • each sample has a sample index
  • the sample index may include the number or name corresponding to the sample
  • S11 may include: determining the field as the column coordinates of the sample list, The sample index is determined as the row coordinates of the sample list; the parameter values of the sample are objectified to obtain the object corresponding to the sample; the object is added to the column coordinates and the row coordinates.
  • the storage area corresponding to the coordinates is used to obtain the sample list.
  • FIG. 2 shows a schematic diagram of an exemplary sample list according to an embodiment of the present disclosure.
  • the list may use sample indexes as row coordinates and fields as column coordinates.
  • the fields of each sample can be summarized as the column coordinates of the sample list.
  • the sample can be a tuple, such as a two-dimensional tuple, and a data group composed of data in multiple fields.
  • a sample for example, sample 1 is the profile data of a certain person, and the fields of the sample may include the person's height (for example, field 1), weight (for example, field 2), education (for example, field 3), etc.
  • the other sample is a face image of a person.
  • the fields of the sample can include the person’s identity information, etc., and the fields of each sample can be summarized.
  • the column coordinates of the sample list can include height, weight, education, nationality, and identity. Information and other fields.
  • Each field corresponds to a column of data in the sample list. In some rows of the column of data, the data can be empty.
  • the list of samples includes the "nationality" field. In a sample of a person’s profile data, this field can contain data, such as "China", "United States", etc., while in a face image sample, this field There may be no data, that is, in the sample list, the data is empty in the row where the face image sample is located and the area corresponding to the column where the "nationality" field is located.
  • the sample index of the sample can be determined as the row coordinates of the sample list.
  • each sample can have a sample index, for example, sample 1, sample 2, sample 3, etc., and the sample index can be Determined as the row coordinates of the sample list.
  • the samples may be training samples used when training a neural network, each sample may have a label, and the label may be data describing a field of the sample.
  • the sample may include a face image sample.
  • the neural network compares each face image sample with a reference image (for example, a face image of a certain target person), and determines the person The similarity between the face image sample and the reference image.
  • the similarity is greater than or equal to the similarity threshold (for example, 0.5), it can be determined that the face image sample has a high similarity with the reference image and the identity verification is passed; otherwise, the identity verification fails.
  • each face image sample When training the neural network, it is necessary to label each face image sample to provide parameters for the loss function of the neural network. For example, if a face image sample is the face image of the target person, it can be marked as 1, which means that the face in the face image sample is the face of the target person. If the face image sample is not the target person's face The face image can be marked as 0, which means that the face in the face image sample is not the face of the target person.
  • the sample may have parameter values and annotations of each field. For example, the field of a certain face image sample is the identity information (for example, name or number, etc.) of the target object in the image, which is marked as 0 or 1.
  • the label and parameter value of each field in the sample can be objectified.
  • a storage area corresponding to the sample can be set up.
  • a storage space can be set up in the memory, and the label of each field in the sample can be set up.
  • the sum parameter value is stored in the storage area, and the object corresponding to the sample is obtained for easy storage and reading.
  • the storage area storing the data (label and parameter value) of the field is the object.
  • the data in the object corresponding to the sample can be added to the sample list, or the object can be associated with the sample list to initialize the sample list.
  • the storage area in which the data of the field is stored may correspond to the storage area in the sample list (for example, a certain cell in the sample list).
  • the data in the object corresponding to sample 1 can be added to the first row of the sample list, that is, the data of each field in the object corresponding to sample 1 can be added to the corresponding field in the first row
  • the storage area for example, add height data in the storage area where the row coordinates are the first row and the column coordinates are the "height" field, and the weight data is added in the row coordinates of the first row and the column coordinates are the "weight" field.
  • Each sample can be objectified in the above-mentioned manner, and the data stored in the object can be filled into the storage area of the sample list to obtain a sample list storing multiple samples.
  • the sample list can be initialized according to the sample index. For example, the data of each field of one sample can be added to the corresponding storage area, and then the data of each field of the next sample can be added, that is, Add the data of each sample according to the row direction in the list to initialize the sample list.
  • the sample list can be initialized according to the fields, that is, all the data of a field can be added to the corresponding storage area, and then the data of the next field can be added, that is, according to the column direction in the list Add data to initialize the sample list.
  • the parameter values and/or annotations of the samples can be objectified, and samples of multiple data types can be stored through the sample list, which is conducive to the rapid storage and reading of samples and reduces the resource occupation during storage and reading. , And can support multiple types of data storage, adapt to the storage of more complex types of data sets.
  • the sample in S12, can include multiple data types, and each type of sample can have a specific storage and reading method.
  • the description information can be used for each sample. Description for easy access (such as storage or reading) of multiple types of samples.
  • the sample may include a video
  • the description information may include a description of how the video is stored or read
  • the sample may also include an image
  • the description information may also include the storage of the image. Or read the description of the way.
  • the description information may be description information in a metadata (Meta Data) format, for example, dictionary type metadata, which is convenient for improving the data query speed.
  • the embodiment of the present disclosure does not limit the type of the description information.
  • the description information includes the description information of the reading method of the sample
  • S12 may include: determining the reading method for reading each sample according to the data type of the sample in the sample list ; According to the data type of the sample and the corresponding reading mode, the description information is obtained.
  • the description information may be information describing how the sample is read.
  • the reading method of each sample can be judged according to the data type of the sample. For example, if the data type of a sample is an image, the sample can be read by the image reading function, and the data type of a sample is video, then The sample can be read with the video reading function, and the reading method of each sample can be determined separately.
  • the data type of each sample can also be summarized.
  • the sample set includes multiple samples. There are three types of data for the multiple samples, namely image, video, and general data.
  • the image type can be determined by the image reading function.
  • the sample of the video type is read through the video reading function, and the sample of the common data type is read through the data reading function.
  • the embodiment of the present disclosure does not limit the data type and reading method of the sample.
  • the description information can be obtained according to the data type of the sample and the corresponding reading method.
  • the description information can be configured as dictionary data, for example, a dictionary
  • the key of is the data type
  • the value of the dictionary is the reading method corresponding to the data type.
  • the key of the dictionary is the image
  • the value of the dictionary is the image reading function.
  • the embodiment of the present disclosure does not limit the data type of the description information.
  • the description information may include description information of the storage location of the sample, and the storage location includes the storage path of the sample set and the index position of the sample in the sample set.
  • the storage path of the sample set is that the sample set is stored in the "sample set" folder on the C drive of the computer.
  • the index position of the sample in the sample set is the specific position of the sample.
  • the data of each sample may be stored in the sample set in the form of an object, that is, occupy a certain storage area in the sample set.
  • the sample set may store each sample in the form of a list, the data of the sample may occupy a certain row in the sample set, and the index position may indicate the row number.
  • the first sample is located in the first row of the list of the sample set, The two samples are located in the second row of the sample set list,...; the field information of the sample can include the storage path of the sample set and the index position of each sample.
  • the specific location of each sample can be determined according to the field information, for example, the first The 2 samples are located in the second row of the sample set list in the "sample set" folder in the C drive of the computer. For another example, some samples may only have certain fields, or multiple samples belong to the same type or the same sample file.
  • the index position may be the row and column range of the sample in the sample set, or the row and column range of multiple samples. The embodiment of the present disclosure does not limit the storage location.
  • the sample set may include samples of multiple data types, such as images, videos, ordinary numbers and/or text data, etc.
  • the storage format of the samples may include a character-separated value file (Comma-Separated Value File). Values, CSV) format, hierarchical data format 5 (Hierarchical Data Format 5, HDF5), etc.
  • the index position of the sample in the sample set may be the position range of the same type of sample generated after the same type of sample is summarized. For example, a sample file stored in the CSV format will store the index position of the CSV file in the description information.
  • the method further includes: determining index range information used to classify the types of samples in the sample set; generating and according to the description information of the samples in the sample set and the index range information of the sample categories. Descriptive information corresponding to the sample set.
  • the description information corresponding to the sample set further includes index range information for dividing the type of each sample in the sample set.
  • the process of determining the description information corresponding to the sample set in the method further includes: determining index range information used to classify the categories of each sample in the sample set; according to the description information of the samples in the sample set and the index range information of the samples, Generate description information corresponding to the sample set. For example, it can be classified according to the label of the sample.
  • the sample set can be divided into a training set, a validation set, and a test set.
  • the training set includes 5000 samples, of which 3000 samples are labeled as 1, and 2000 samples are labeled as 0.
  • the labels may not be distinguished, and the classification may be directly based on the number and index of the samples in the sample set.
  • the samples in the sample set may be training samples used when training a neural network, and the training samples may be divided into multiple categories. For example, Divide 40% of the samples into the training set, divide 30% of the samples into the test set, and divide 30% of the samples into the validation set. Or it can be divided according to the index of each sample, and the index range of each category can be determined.
  • the sample set stores each sample in the form of a list, and 10,000 samples are stored in the list.
  • the 1st-4000th sample in the list can be divided into the training set, and the 4001th-4th sample in the list can be divided into training set.
  • the 7000 samples are divided into the test set, and the 7001th-10000th samples are divided into the verification set.
  • the description information may include index range information (for example, 1st-4000th, 4001th-7000th, 7001th-10000th, etc.) for dividing sample categories.
  • index range information for example, 1st-4000th, 4001th-7000th, 7001th-10000th, etc.
  • the embodiment of the present disclosure does not limit the division method and the index range.
  • the sample set may also include other forms of data subsets, such as image subsets and video subsets.
  • the description information of the sample set includes not only the sample subsets of the above-mentioned training set, test set, and validation set and the corresponding index range description information, but also the description information of other forms of data subsets in the sample set.
  • sample reading methods can be determined, which is conducive to supporting multiple types of data storage and access, and adapts to the storage and access of more complex types of data sets.
  • the sample set (dataset) can be obtained according to the sample list and the description information corresponding to the sample list.
  • the sample list and the sample list can be combined
  • the corresponding description information is written into the sample set to obtain the file of the sample set, or the description information corresponding to the sample list and the sample list are packaged to obtain the sample set.
  • the embodiment of the present disclosure does not limit the way of obtaining the sample set.
  • the sample set includes a sample list storing multiple samples, and also includes description information that records the reading method of each sample, so as to facilitate the storage and reading of samples of multiple data types. Samples that store multiple data types provide the basis.
  • the description information can record the data type of each sample, and the reading method and other information. Based on the description information, the sample or the data of the sample in the sample set can be read.
  • the embodiments of the present disclosure do not limit the content of the description information.
  • the method further includes: reading parameter values of samples in the sample list according to the description information and the sample list.
  • the sample in the sample list can be read in a suitable manner according to the description of the sample reading method in the description information, and the reading process may include: obtaining objects in the sample list According to the sample index, from the acquired objects, obtain the first object of the first sample corresponding to the sample index; determine the data type of the first sample and the corresponding reading method according to the description information ; According to the reading method, the parameter value of the first sample is read from the first object.
  • the sample list includes a plurality of samples, and the samples are stored in the sample list in an object format.
  • each object in the sample list can be obtained (for example, by accessing the'samples' attribute, that is, accessing the sample object, all objects in the list containing all samples can be obtained).
  • the sample index in the sample list can be accessed, and the first sample to be read is selected in the sample index, that is, the first object corresponding to the first sample is selected, for example, the sample is selected through the sample index In the list, the row where the first sample is located.
  • the description information may include the reading method of each sample, and the corresponding reading method may be selected in the description information according to the data type of the first sample, for example, the first sample
  • the data type of is image
  • the data type of the first sample is video
  • the parameter value of the first sample can be read in the first object through a reading method corresponding to the data type of the first sample.
  • the first sample is information data of a certain person, the first sample may include the person's height data, weight data, educational background data, nationality data, etc.
  • the data can be read through the data reading function.
  • the data of the first sample is extracted, and the parameter values of the first sample are read through the data reading function.
  • the parameter value of one or more fields of the first sample data can also be read.
  • the height data and weight data in the data can be selected and read through the data read function. Take the height data and weight data. There is no need to read all the data of the first sample, which improves the flexibility of sample reading.
  • reading the parameter values of the samples in the sample list includes: obtaining a sample index; according to the sample index, from the sample list Obtain the parameter value of the sample corresponding to the sample index.
  • the sample index can be used to access the sample list, read the sample corresponding to the sample index, and obtain the parameter value of the sample.
  • a read instruction input by the user or the sample acquisition device can be received.
  • the read instruction carries the sample index of the sample to be read.
  • the sample index value can be set to 100, , You can get the sample in the 100th row of the list, that is, get the sample in the 100th row in the list, and read the parameter value of the sample according to the reading method of the sample.
  • the parameter value of the sample can be read according to the reading method in the description information, or the data type of the sample can be determined according to the suffix of the sample, and then the corresponding reading method can be selected to read the sample to obtain the sample The parameter value.
  • the resource consumption when reading samples can be reduced, and the sample data can be stored in a unified way, and the sample data type can be stored using the sample description information, so that the data reading method can be easily obtained according to the description information, which is easy to read
  • the samples of multiple data types are conducive to quick reading of the samples.
  • reading the parameter values of the samples in the sample list includes: obtaining the object corresponding to the target field in the sample list; according to the description The information determines the data type and reading method of the second sample corresponding to the acquired object; according to the reading method, the parameter value of the second sample is read from the acquired object.
  • the target field in the sample list can be accessed to obtain the object corresponding to the target field.
  • the target field can be accessed to obtain the object corresponding to the target field.
  • the'fields' attribute that is, accessing the field
  • the field list can include "age”, "height" and "nationality", etc., and can also be accessed by keywords in the field To access the corresponding field, for example, you can access the parameter value in the "Nationality” field through the keyword "nationality", or you can directly access the field name or keyword to access the parameter value in the field without accessing the field list.
  • each field corresponds to a column of data in the sample list, and in some areas of the column of data, the data may be empty.
  • the "nationality” field is included. In a sample of a person's profile data, this field can contain data, such as "China” or "United States", while in a face image sample, this field There is no data, that is, in the list, in the row where the face image sample is located, and the area corresponding to the column where the "nationality" field is located, the data is empty.
  • the empty area may be ignored or not. The embodiment of the present disclosure does not limit whether to ignore.
  • all the objects in the column of the target field can be obtained, that is, all the storage space for storing the data of the column.
  • the reading method of the second sample to be read can be determined according to the description information, and the target field of the second sample can also be determined in the object corresponding to the target field according to the index of the second sample.
  • the storage space of the parameter value that is, the object of the parameter value of the target field of the second sample.
  • the parameter value of the target field of the second sample may be read through the reading method.
  • the second sample is a person's profile data, and the second sample may include the person's height data, weight data, education data, nationality data, and so on.
  • the object of the second sample in this field can be determined, and the parameter values in the object of the second sample can be read through the reading method corresponding to the data data.
  • the height data of the second sample in the object of the field is read through the data reading function.
  • reading the parameter values of the samples in the sample list includes: obtaining the field name of the target field; according to the field name, from the sample list To obtain the parameter value of the target field corresponding to the field name.
  • the field name of the target field can be used to access the target field, and then obtain the parameter value of the target field.
  • the storage device or processing device can receive a read instruction.
  • the read instruction includes the field name of the target field of the sample to be read.
  • the target field can be set to "height"
  • the parameter value of the "height" field can be accessed through the field name "height”.
  • the reading method corresponding to the data type of the field in the description information can be used to read the parameter value of the field, or the data type of the parameter of the field can be determined according to the suffix of the parameter of the field, and then the corresponding reading can be determined.
  • any parameter value under the field can also be read, for example, the parameter value stored in the storage location with the index value of 100 under the "height" field can be obtained.
  • the parameter value of one or more samples in the field is read by accessing the field, which improves the flexibility of sample reading and facilitates the rapid reading of samples.
  • the storage device or data processing device will receive a read instruction, and the read instruction will include the sample data information that needs to be read, such as sample Index and field name, etc., according to the read instruction, the data type, storage location and corresponding reading method of the sample will be obtained from the description information of the sample set, so that the obtained reading method can be used to read the required data in the storage location Sample data. Therefore, a sample set containing description information can conveniently store and read various types of sample data, and the description information can facilitate users to understand and view the data stored in the sample set, which is suitable for scenarios for beginners.
  • the method further includes: performing at least one operation of query, modification, and deletion processing on the parameter value of the read sample.
  • at least one of processing such as query, modification, and deletion may be performed on the parameter value.
  • the parameter value in the object can be queried, and the parameter value can be copied.
  • the parameter value can be modified, and the modified parameter value can be saved in the object.
  • the parameter value in the object can be deleted, so that the data in the object is empty.
  • the embodiment of the present disclosure does not limit the processing manner of the parameter value.
  • Fig. 3 shows an application schematic diagram of an exemplary storage method according to an embodiment of the present disclosure.
  • multiple samples can be stored in a sample list, and the data types of the multiple samples can include image, audio, Video and/or general data (for example, numerical data, categorical data, and character data), etc.
  • Each sample can occupy one row of storage area in the sample list.
  • Each sample can include one or more fields.
  • a sample is the profile data of a certain person.
  • the fields of the sample can include the person’s height, weight, education and nationality, etc.
  • the sample can have data corresponding to each field .
  • the fields of each sample can be summarized as the column coordinates of the sample list, and the sample index of the sample is determined as the row coordinate of the sample list to obtain an empty sample list.
  • the label and parameter value of the sample can be objectified, that is, a storage area corresponding to each parameter value of the sample is set up, and the label and parameter value of the sample are stored in the storage area to obtain The object corresponding to the sample is added, and the label and parameter values in the object are added to the sample list to obtain a sample list storing multiple samples.
  • the sample can include multiple data types, and each type of sample can have a specific storage and reading method.
  • the description information in the metadata format can be used for each sample. Description, in order to store or read multiple types of samples.
  • the data type of each sample in the sample list can be summarized, and the reading method of each data type can be judged.
  • the description information is configured as dictionary data.
  • the key of the dictionary is the data type
  • the value of the dictionary is the reading mode corresponding to the data type.
  • the sample list and the description information corresponding to the sample list may be written into the sample set to obtain the file of the sample set. And by accessing the sample index or field to read the sample or a parameter value in the sample.
  • each object in the sample list can be obtained, and the sample index in the sample list can be accessed to select the first sample to be read, that is, the first sample corresponding to the first sample is selected
  • the first object Further, the corresponding reading method can be selected in the description information.
  • the data type of the first sample is an image, and the image reading function in the description information can be selected to read the first sample.
  • the first sample can be read through the reading method, or only the parameter value of one or more fields in the first sample can be read.
  • the target field in the sample list can be accessed, and all objects corresponding to the target field can be obtained (the empty area in the target field can be ignored).
  • the parameter value of the second sample in the target field can be read among all objects corresponding to the target field.
  • the data type of the second sample can be determined, and the reading method corresponding to the data type of the second sample can be determined in the description information.
  • the object of the second sample in the field can be determined, and the second sample can be read in the object according to the reading method corresponding to the data type of the second sample.
  • the parameter value of the field can be read among the objects of all parameter values of the target field, and the second sample can be read in the object according to the reading method corresponding to the data type of the second sample.
  • the storage method can be used to store multiple types of samples.
  • using this storage method can store multiple types of samples according to a unified storage method.
  • the program interface for storage and reading is convenient and concise.
  • the storage and reading methods of various samples are unified and easy to understand, which is convenient for students to learn and operate.
  • the embodiments of the present disclosure also provide data processing apparatuses, electronic equipment, computer-readable storage media, and programs. All of the above can be used to implement any image processing method provided by the embodiments of the present disclosure. For the corresponding technical solutions and descriptions, refer to the method Part of the corresponding records will not be repeated here.
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • Fig. 4 shows a block diagram of a data processing device according to an embodiment of the present disclosure.
  • the device includes: a first determining part 11 configured to according to a field of a sample and a parameter value corresponding to the field, Determine a sample list including a plurality of samples; the second determining part 12 is configured to determine the description information corresponding to the sample list according to the data type of the samples in the sample list; the third determining part 13 is configured to determine the description information corresponding to the sample list according to The sample list and the description information determine the sample set.
  • each sample has a sample index
  • the first determining part is further configured to: determine the field as the column coordinates of the sample list, and determine the sample index of the sample as The row coordinates of the sample list; objectize the parameter value corresponding to the field to obtain the object corresponding to the sample; add the data in the object to the corresponding column coordinates and the row coordinates Storage area to obtain the sample list.
  • the description information includes description information of how to read the sample
  • the second determining part is further configured to: determine a sample for reading according to the data type of the sample in the sample list. The method of reading; the description information is obtained according to the data type of the sample and the corresponding reading method.
  • the description information further includes description information of a storage location of the sample, and the storage location includes a storage path of the sample set and an index position of the sample in the sample set.
  • the device further includes: a fourth determining part configured to determine index range information used to classify samples in the sample set; and the generating part configured to determine the index range information of the samples in the sample set according to The description information and the index range information of the sample category generate description information corresponding to the sample set.
  • the device further includes: a reading part configured to read parameter values of samples in the sample list according to the description information and the sample list.
  • the reading part is further configured to: obtain objects in the sample list; according to the sample index, obtain the first object corresponding to the sample index from the obtained objects.
  • the reading part is further configured to: obtain a sample index; according to the sample index, obtain the parameter value of the sample corresponding to the sample index from the sample list.
  • the reading part is further configured to: obtain the object corresponding to the target field in the sample list; determine the data type and the data type of the second sample corresponding to the obtained object according to the description information. Reading mode; according to the reading mode, the parameter value of the second sample is read from the obtained object.
  • the reading part is further configured to: obtain the field name of the target field; according to the field name, obtain the parameter value of the target field corresponding to the field name from the sample list.
  • the device further includes: an operation part configured to perform at least one of query, modification, and deletion of the parameter value of the read sample.
  • the functions or parts included in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or parts included in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • parts may be parts of circuits, parts of processors, parts of programs or software, etc., of course, may also be units, modules, or non-modular.
  • the embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned method when executed by a processor.
  • the computer-readable storage medium may be a volatile computer-readable storage medium or a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory configured to store executable instructions of the processor; wherein the processor is configured as the aforementioned method.
  • the electronic device can be provided as a terminal, server or other form of device.
  • Fig. 5 is a block diagram showing an electronic device 800 according to an exemplary embodiment.
  • the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and Programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable and Programmable read only memory
  • PROM programmable read only memory
  • ROM read only memory
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • the power supply component 806 provides power for various components of the electronic device 800.
  • the power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • 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 input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the above-mentioned peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation.
  • the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 800.
  • the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field-available A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • ASIC application-specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD programmable logic devices
  • FPGA field-available A programmable gate array
  • controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • a computer-readable storage medium is also provided, such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
  • the embodiments of the present disclosure also provide a computer program product, including computer-readable code, and when the computer-readable code runs on a device, a processor in the device executes instructions for implementing the method provided in any of the above embodiments.
  • the computer program product can be specifically implemented by hardware, software, or a combination thereof.
  • the computer program product is specifically embodied as a computer storage medium.
  • the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc. Wait.
  • SDK software development kit
  • Fig. 6 is a block diagram showing an electronic device 1900 according to an exemplary embodiment.
  • the electronic device 1900 may be provided as a server. 6
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by the memory 1932, for storing instructions executable by the processing component 1922, such as application programs.
  • the application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to the network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-volatile computer-readable storage medium is also provided, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete the foregoing method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the embodiments of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as the instantaneous signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the embodiments of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or one or more programming instructions.
  • Source code or object code written in any combination of languages, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
  • the remote computer can be connected to the user's computer through any kind of network-including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect to the user's computer) connection).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • FPGA field programmable gate array
  • PDA programmable logic array
  • the computer-readable program instructions are executed to realize various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine that makes these instructions when executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner. Thus, the computer-readable medium storing the instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more components for realizing the specified logical function.
  • Executable instructions may also occur in a different order than the order marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the embodiments of the present disclosure relate to a data processing method and device, electronic equipment, and storage medium.
  • the method includes: determining a sample list including a plurality of samples according to a field of a sample and a parameter value corresponding to the field; The data type of the samples in the sample list is determined, and the description information corresponding to the sample list is determined; and the sample set is determined according to the sample list and the description information.
  • the sample set used to store each sample and the corresponding description information can be determined, multiple types of samples can be stored in a unified manner, and the sample set includes description information describing the data type, It is convenient to store and read sample data, can support multiple types of data storage and read, and is easy to understand.

Abstract

A data processing method and apparatus, an electronic device and a storage medium. The method comprises: determining a sample list comprising a plurality of samples according to the fields of the samples and parameter values corresponding to the fields (S11); determining description information corresponding to the sample list according to the data types of the samples in the sample list (S12); and determining a sample set according to the sample list and the description information (S13).

Description

数据处理方法及装置、电子设备和存储介质Data processing method and device, electronic equipment and storage medium
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为201911031910.5、申请日为2019年10月28日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is filed based on the Chinese patent application with the application number 201911031910.5 and the filing date on October 28, 2019, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference into this application.
技术领域Technical field
在机器学习中,尤其是在需要处理多种数据集的情况下,数据的读取难度会增大。在相关技术中,数据集的储存没有统一的方式,对于数据集存储也通常是为了适应数据集本身的结构。例如,python语言的pandas库中的Da taFrame类型的数据存储方式虽然功能强大,但是支持的数据类型受限,主要面向专业用户。另外,读取操作主要关注数据本身。In machine learning, especially when multiple data sets need to be processed, the difficulty of reading data will increase. In related technologies, there is no unified way for the storage of data sets, and the storage of data sets is usually to adapt to the structure of the data set itself. For example, the data storage method of the Da taFrame type in the pandas library of the python language is powerful, but the supported data types are limited, and it is mainly for professional users. In addition, the read operation mainly focuses on the data itself.
发明内容Summary of the invention
本公开实施例提出了一种数据处理方法及装置、电子设备和存储介质。The embodiments of the present disclosure propose a data processing method and device, electronic equipment, and storage medium.
根据本公开实施例的一方面,提供了一种数据处理方法,包括:根据样本的字段及与所述字段对应的参数值,确定包括多个样本的样本列表;根据所述样本列表中样本的数据类型,确定与所述样本列表对应的描述信息;根据所述样本列表和所述描述信息,确定样本集。According to an aspect of the embodiments of the present disclosure, there is provided a data processing method, including: determining a sample list including a plurality of samples according to a field of a sample and a parameter value corresponding to the field; The data type is used to determine the description information corresponding to the sample list; and the sample set is determined according to the sample list and the description information.
根据本公开实施例的数据处理方法,可确定用于存储各样本的样本集,以及对应的描述信息,可使用统一的方式存储多种类型的样本,且样本集中包括描述数据类型的描述信息,便于样本数据的存储和读取,可支持多种类型的数据存储和读取,易于理解。According to the data processing method of the embodiment of the present disclosure, the sample set used to store each sample and the corresponding description information can be determined, multiple types of samples can be stored in a unified manner, and the sample set includes description information describing the data type, It is convenient to store and read sample data, can support multiple types of data storage and read, and is easy to understand.
在一种可能的实现方式中,每个样本具有样本索引,所述根据样本的字段及与所述字段对应的参数值,确定包括多个样本的样本列表,包括:将所述字段确定为所述样本列表的列坐标,将所述样本索引确定为所述样本列表的行坐标;将所述字段对应的参数值进行对象化,获得与所述样本对应的对象;将所述对象中的数据添加至与所述列坐标和所述行坐标对应的存储区域,获得所述样本列表。通过这种方式,可对样本的参数值和/或标注对象化,并可通过样本列表存储多种数据类型的样本,有利于样本的快速存储和读取,减少存储和读取时的资源占用,并可支持多种类型的数据存储,适应更复杂类型的数据集的存储。In a possible implementation manner, each sample has a sample index, and the determining a sample list including multiple samples according to the field of the sample and the parameter value corresponding to the field includes: determining the field as all the samples. The column coordinates of the sample list, the sample index is determined as the row coordinates of the sample list; the parameter value corresponding to the field is objectified to obtain the object corresponding to the sample; the data in the object Add to the storage area corresponding to the column coordinates and the row coordinates to obtain the sample list. In this way, the parameter values and/or annotations of the samples can be objectified, and samples of multiple data types can be stored through the sample list, which is conducive to the rapid storage and reading of samples, and reduces the resource occupation during storage and reading. , And can support multiple types of data storage, adapt to the storage of more complex types of data sets.
在一种可能的实现方式中,所述描述信息包括对样本的读取方式的描述信息,所述根据所述样本列表中所述样本的数据类型,确定与所述样本列表对应的描述信息,包括:根据样本列表中样本的数据类型,确定用于读取样本的读取方式;根据所述样本的数据类型和对应的读取方式,获得所述描述 信息。通过这种方式,可确定多种样本的读取方式,有利于支持多种类型的数据存储和访问,适应更复杂类型的数据集的存储和访问。In a possible implementation manner, the description information includes description information of how to read the sample, and the description information corresponding to the sample list is determined according to the data type of the sample in the sample list, It includes: determining a reading method for reading the sample according to the data type of the sample in the sample list; obtaining the description information according to the data type of the sample and the corresponding reading method. In this way, a variety of sample reading methods can be determined, which is conducive to supporting multiple types of data storage and access, and adapts to the storage and access of more complex types of data sets.
在一种可能的实现方式中,所述描述信息还包括对样本存储位置的描述信息,所述存储位置包括所述样本集的存储路径及样本在所述样本集中的索引位置。通过这种方式,可确定样本的精确位置,便于读取样本。In a possible implementation manner, the description information further includes description information of a storage location of the sample, and the storage location includes a storage path of the sample set and an index position of the sample in the sample set. In this way, the precise location of the sample can be determined, making it easy to read the sample.
在一种可能的实现方式中,所述方法还包括:确定用于划分样本集中样本的类别的索引范围信息;根据所述样本集中样本的描述信息和所述索引范围信息,生成与所述样本集对应的描述信息。通过这种方式,可确定样本的索引范围,便于查找样本。In a possible implementation manner, the method further includes: determining index range information used to classify the types of samples in the sample set; generating information related to the sample set based on the description information of the samples in the sample set and the index range information. The description information corresponding to the set. In this way, the index range of the sample can be determined, which is convenient for searching the sample.
在一种可能的实现方式中,所述方法还包括:根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值。In a possible implementation manner, the method further includes: reading parameter values of samples in the sample list according to the description information and the sample list.
在一种可能的实现方式中,所述根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:获取所述样本列表中的对象;根据样本索引,从所获取的对象中,获得与所述样本索引对应的第一样本的第一对象;根据所述描述信息确定所述第一样本的数据类型及对应的读取方式;根据所述读取方式,从所述第一对象中读取所述第一样本的参数值。In a possible implementation manner, the reading the parameter values of the samples in the sample list according to the description information and the sample list includes: obtaining objects in the sample list; according to the sample index, from Among the acquired objects, the first object of the first sample corresponding to the sample index is obtained; the data type of the first sample and the corresponding reading method are determined according to the description information; according to the reading In this way, the parameter value of the first sample is read from the first object.
通过这种方式,可减少读取样本时的资源消耗,且可通过统一的方式存储样本数据,并利用样本描述信息存储样本数据类型,从而可以根据描述信息方便获取数据读取方式,便于读取多种数据类型的样本,有利于样本的快速读取。In this way, the resource consumption when reading samples can be reduced, and the sample data can be stored in a unified way, and the sample data type can be stored using the sample description information, so that the data reading method can be easily obtained according to the description information, which is easy to read The samples of multiple data types are conducive to quick reading of the samples.
在一种可能的实现方式中,所述根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:获取样本索引;根据所述样本索引,从所述样本列表中获取所述样本索引对应的样本的参数值。In a possible implementation manner, the reading the parameter values of the samples in the sample list according to the description information and the sample list includes: obtaining a sample index; according to the sample index, from the sample The parameter value of the sample corresponding to the sample index is obtained from the list.
在一种可能的实现方式中,所述根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:获取所述样本列表中目标字段对应的对象;根据所述描述信息确定所获取的对象对应的第二样本的数据类型及读取方式;根据所述读取方式,从所获取的对象中读取所述第二样本的参数值。通过这种方式,通过访问字段的方式读取一个或多个样本在该字段的参数值,提高样本读取的灵活性,有利于样本的快速读取。In a possible implementation, the reading the parameter values of the samples in the sample list according to the description information and the sample list includes: obtaining the object corresponding to the target field in the sample list; The description information determines the data type and reading method of the second sample corresponding to the acquired object; according to the reading method, the parameter value of the second sample is read from the acquired object. In this way, the parameter value of one or more samples in the field is read by accessing the field, which improves the flexibility of sample reading and facilitates the rapid reading of samples.
在一种可能的实现方式中,所述根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:获取目标字段的字段名;根据所述字段名,从样本列表中获取所述字段名对应的目标字段的参数值。In a possible implementation manner, the reading the parameter values of the samples in the sample list according to the description information and the sample list includes: obtaining the field name of the target field; according to the field name, from Obtain the parameter value of the target field corresponding to the field name from the sample list.
在一种可能的实现方式中,所述方法还包括:对读取的所述样本的参数值进行查询、修改和删除处理中至少一种操作。In a possible implementation manner, the method further includes: performing at least one operation of query, modification, and deletion processing on the parameter value of the read sample.
根据本公开实施例的一方面,提供了一种数据处理装置,包括:第一确定部分,被配置为根据样本的字段及与所述字段对应的参数值,确定包括多个样本的样本列表;第二确定部分,被配置为根据所述样本列表中样本的数据类型,确定与所述样本列表对应的描述信息;第三确定部分,被配置为根据所述样本列表和所述描述信息,确定样本集。According to an aspect of the embodiments of the present disclosure, there is provided a data processing device, including: a first determining part configured to determine a sample list including a plurality of samples according to a field of the sample and a parameter value corresponding to the field; The second determining part is configured to determine the description information corresponding to the sample list according to the data type of the samples in the sample list; the third determining part is configured to determine according to the sample list and the description information Sample set.
在一种可能的实现方式中,每个样本具有样本索引,所述第一确定部分还被配置为:将所述字段确定为所述样本列表的列坐标,将所述样本索引确定为所述样本列表的行坐标;将所述字段对应的参数值进行对象化,获得与所述样本对应的对象;将所述对象中的数据添加至与所述列坐标和所述行坐标对应的存储区域,获得所述样本列表。In a possible implementation manner, each sample has a sample index, and the first determining part is further configured to: determine the field as the column coordinates of the sample list, and determine the sample index as the The row coordinates of the sample list; object the parameter values corresponding to the fields to obtain the object corresponding to the sample; add the data in the object to the storage area corresponding to the column coordinates and the row coordinates , To obtain the sample list.
在一种可能的实现方式中,所述描述信息包括对样本的读取方式的描述信息,所述第二确定部分还被配置为:根据样本列表中样本的数据类型,确定用于读取样本的读取方式;根据所述样本的数据类型和对应的读取方式,获得所述描述信息。In a possible implementation manner, the description information includes description information of how to read the sample, and the second determining part is further configured to: determine a sample for reading according to the data type of the sample in the sample list. The method of reading; the description information is obtained according to the data type of the sample and the corresponding reading method.
在一种可能的实现方式中,所述描述信息还包括对样本存储位置的描述信息,所述存储位置包括所述样本集的存储路径及样本在所述样本集中的索引位置。In a possible implementation manner, the description information further includes description information of a storage location of the sample, and the storage location includes a storage path of the sample set and an index position of the sample in the sample set.
在一种可能的实现方式中,所述装置还包括:第四确定部分,被配置为确定用于划分样本集中样本的类别的索引范围信息;生成部分,被配置为根据所述样本集中样本的描述信息和所述索引范围信息,生成与所述样本集对应的描述信息。In a possible implementation manner, the device further includes: a fourth determining part configured to determine index range information used to classify samples in the sample set; and the generating part configured to determine the index range information of the samples in the sample set according to The description information and the index range information generate description information corresponding to the sample set.
在一种可能的实现方式中,所述装置还包括:读取部分,被配置为根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值。In a possible implementation manner, the device further includes: a reading part configured to read parameter values of samples in the sample list according to the description information and the sample list.
在一种可能的实现方式中,所述读取部分还被配置为:获取所述样本列表中的对象;根据样本索引,从所获取的对象中,获得与所述样本索引对应的第一样本的第一对象;根据所述描述信息确定所述第一样本的数据类型及对应的读取方式;根据所述读取方式,从所述第一对象中读取所述第一样本的参数值。In a possible implementation manner, the reading part is further configured to: obtain objects in the sample list; according to the sample index, obtain the first object corresponding to the sample index from the obtained objects. The first object of this book; the data type of the first sample and the corresponding reading method are determined according to the description information; the first sample is read from the first object according to the reading method The parameter value.
在一种可能的实现方式中,所述读取部分还被配置为:获取样本索引;根据所述样本索引,从所述样本列表中获取所述样本索引对应的样本的参数值。In a possible implementation manner, the reading part is further configured to: obtain a sample index; according to the sample index, obtain the parameter value of the sample corresponding to the sample index from the sample list.
在一种可能的实现方式中,所述读取部分还被配置为:获取所述样本列表中目标字段对应的对象;根据所述描述信息确定所获取的对象对应的第二样本的数据类型及读取方式;根据所述读取方式,从所获取的对象中读取所述第二样本的参数值。In a possible implementation manner, the reading part is further configured to: obtain the object corresponding to the target field in the sample list; determine the data type and the data type of the second sample corresponding to the obtained object according to the description information. Reading mode; according to the reading mode, the parameter value of the second sample is read from the obtained object.
在一种可能的实现方式中,所述读取部分还被配置为:获取目标字段的字段名;根据所述字段名,从样本列表中获取所述字段名对应的目标字段的参数值。In a possible implementation manner, the reading part is further configured to: obtain the field name of the target field; according to the field name, obtain the parameter value of the target field corresponding to the field name from the sample list.
在一种可能的实现方式中,所述装置还包括:操作部分,被配置为对读取的所述样本的参数值进行查询、修改和删除处理中至少一种操作。In a possible implementation manner, the device further includes: an operation part configured to perform at least one of query, modification, and deletion of the parameter value of the read sample.
根据本公开实施例的一方面,提供了一种电子设备,包括:处理器;被配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为:执行上述数据处理方法。According to an aspect of the embodiments of the present disclosure, there is provided an electronic device including: a processor; a memory configured to store executable instructions of the processor; wherein the processor is configured to execute the above-mentioned data processing method.
根据本公开实施例的一方面,提供了一种计算机可读存储介质,其上存 储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述数据处理方法。According to an aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the foregoing data processing method is implemented.
根据本公开实施例的一方面,提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行时实现上述数据处理方法。According to an aspect of the embodiments of the present disclosure, there is provided a computer program, including computer-readable code, when the computer-readable code runs in an electronic device, the processor in the electronic device executes the above-mentioned data processing method.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开实施例。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the embodiments of the present disclosure.
根据下面参考附图对示例性实施例的详细说明,本公开实施例的其它特征及方面将变得清楚。According to the following detailed description of the exemplary embodiments with reference to the accompanying drawings, other features and aspects of the embodiments of the present disclosure will become clear.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开实施例的技术方案。The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments in accordance with the present disclosure, and are used together with the specification to describe the technical solutions of the embodiments of the present disclosure.
图1示出根据本公开实施例的数据处理的流程图;Fig. 1 shows a flowchart of data processing according to an embodiment of the present disclosure;
图2示出根据本公开实施例的示例性的样本列表的示意图;Fig. 2 shows a schematic diagram of an exemplary sample list according to an embodiment of the present disclosure;
图3示出根据本公开实施例的示例性的存储方法的应用示意图;Fig. 3 shows an application schematic diagram of an exemplary storage method according to an embodiment of the present disclosure;
图4示出根据本公开实施例的数据处理装置的框图;Fig. 4 shows a block diagram of a data processing device according to an embodiment of the present disclosure;
图5示出根据本公开实施例的电子设备的框图;Figure 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure;
图6示出根据本公开实施例的电子设备的框图。Fig. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开实施例的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the drawings indicate elements with the same or similar functions. Although various aspects of the embodiments are shown in the drawings, unless otherwise noted, the drawings are not necessarily drawn to scale.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The dedicated word "exemplary" here means "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" need not be construed as being superior or better than other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is only an association relationship that describes associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations. In addition, the term "at least one" in this document means any one or any combination of at least two of the multiple, for example, including at least one of A, B, and C, may mean including A, Any one or more elements selected in the set formed by B and C.
另外,为了更好地说明本公开实施例,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开实施例同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开实施例的主旨。In addition, in order to better illustrate the embodiments of the present disclosure, numerous specific details are given in the following specific embodiments. Those skilled in the art should understand that the embodiments of the present disclosure can also be implemented without certain specific details. In some instances, the methods, means, elements, and circuits well-known to those skilled in the art have not been described in detail, so as to highlight the gist of the embodiments of the present disclosure.
图1示出根据本公开实施例的数据处理方法的流程图,如图1所示,所述方法包括:Fig. 1 shows a flowchart of a data processing method according to an embodiment of the present disclosure. As shown in Fig. 1, the method includes:
S11,根据样本的字段及与所述字段对应的参数值,确定包括多个样本的 样本列表;S11: Determine a sample list including multiple samples according to the fields of the samples and the parameter values corresponding to the fields;
S12,根据所述样本列表中样本的数据类型,确定与所述样本列表对应的描述信息;S12: Determine description information corresponding to the sample list according to the data type of the sample in the sample list;
S13,根据所述样本列表和所述描述信息,确定样本集。S13: Determine a sample set according to the sample list and the description information.
根据本公开实施例的数据处理方法,可确定用于存储各样本的样本集,以及对应的描述信息,可使用统一的方式存储多种类型的样本,且样本集中包括描述数据类型的描述信息,便于样本数据的存储和读取,可支持多种类型的数据存储和读取,易于理解。According to the data processing method of the embodiment of the present disclosure, the sample set used to store each sample and the corresponding description information can be determined, multiple types of samples can be stored in a unified manner, and the sample set includes description information describing the data type, It is convenient to store and read sample data, can support multiple types of data storage and read, and is easy to understand.
在一种可能的实现方式中,所述数据处理方法的执行主体可以是终端设备或服务器或其它处理设备,其中,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现或通过服务器来执行,例如,可将服务器中的数据通过所述存储方法进行存储。In a possible implementation, the execution subject of the data processing method may be a terminal device or a server or other processing equipment, where the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, or a terminal. , Cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc. In some possible implementation manners, the method may be implemented by a processor invoking computer-readable instructions stored in a memory or executed by a server. For example, data in the server may be stored by the storage method.
在一种可能的实现方式中,所述样本的数据类型可包括多种,例如图像、视频和/或普通数值或文本数据等,本公开实施例对样本的数据类型不做限制。所述样本可包括一个或多个字段,每个字段可对应于样本的某一个或某一类特征,例如,某样本为某个人的资料数据,该样本的字段可包括该人的身高、体重、学历、国籍等,且该样本可具有与各字段对应的数据。本公开实施例对字段不做限制。In a possible implementation manner, the data type of the sample may include multiple types, such as image, video, and/or ordinary numerical value or text data, etc. The embodiment of the present disclosure does not limit the data type of the sample. The sample may include one or more fields, and each field may correspond to a certain feature or a certain type of characteristic of the sample. For example, a certain sample is the profile data of a certain person, and the fields of the sample may include the height and weight of the person , Education, nationality, etc., and the sample can have data corresponding to each field. The embodiments of the present disclosure do not impose restrictions on the fields.
在一种可能的实现方式中,在S11中,可通过样本列表(datatable)来保存所述多个样本,采用列表方式存储便于数据的增、删和修改等操作。In a possible implementation manner, in S11, the multiple samples may be stored in a datatable, and the storage in a list manner is convenient for operations such as data addition, deletion, and modification.
在一种可能的实现方式中,每个样本具有样本索引,所述样本索引可以包括该样本所对应的编号或名称等,S11可包括:将所述字段确定为所述样本列表的列坐标,将所述样本索引确定为所述样本列表的行坐标;将所述样本的参数值进行对象化,获得与所述样本对应的对象;将所述对象添加至与所述列坐标和所述行坐标对应的存储区域,获得所述样本列表。In a possible implementation manner, each sample has a sample index, and the sample index may include the number or name corresponding to the sample, S11 may include: determining the field as the column coordinates of the sample list, The sample index is determined as the row coordinates of the sample list; the parameter values of the sample are objectified to obtain the object corresponding to the sample; the object is added to the column coordinates and the row coordinates. The storage area corresponding to the coordinates is used to obtain the sample list.
图2示出根据本公开实施例的示例性的样本列表的示意图,如图2所示,所述列表可以以样本索引为行坐标,以字段为列坐标。可对各样本的字段进行汇总,作为样本列表的列坐标,所述样本可以是元组,例如二维元组,由多个字段的数据组成的数据组。例如,某样本(例如样本1)为某个人的资料数据,该样本的字段可包括该人的身高(例如,字段1)、体重(例如,字段2)、学历(例如,字段3)等,另一样本为某个人的人脸图像,该样本的字段可包括该人的身份信息等,可将各样本的字段进行汇总,则样本列表的列坐标可包括身高、体重、学历、国籍和身份信息等字段。每个字段在样本列表中对应有一列数据,在该列数据的某些行,数据可为空。例如,在样本的列表中,包括“国籍”字段,在某个人的资料数据的样本中,该字段可存在数据,例如“中国”、“美国”等,而在人脸图像样本中,该字段可不存在数据, 即,在所述样本列表中,在该人脸图像样本所在行、“国籍”字段所在的列对应的区域中,数据为空。FIG. 2 shows a schematic diagram of an exemplary sample list according to an embodiment of the present disclosure. As shown in FIG. 2, the list may use sample indexes as row coordinates and fields as column coordinates. The fields of each sample can be summarized as the column coordinates of the sample list. The sample can be a tuple, such as a two-dimensional tuple, and a data group composed of data in multiple fields. For example, a sample (for example, sample 1) is the profile data of a certain person, and the fields of the sample may include the person's height (for example, field 1), weight (for example, field 2), education (for example, field 3), etc., The other sample is a face image of a person. The fields of the sample can include the person’s identity information, etc., and the fields of each sample can be summarized. The column coordinates of the sample list can include height, weight, education, nationality, and identity. Information and other fields. Each field corresponds to a column of data in the sample list. In some rows of the column of data, the data can be empty. For example, the list of samples includes the "nationality" field. In a sample of a person’s profile data, this field can contain data, such as "China", "United States", etc., while in a face image sample, this field There may be no data, that is, in the sample list, the data is empty in the row where the face image sample is located and the area corresponding to the column where the "nationality" field is located.
在一种可能的实现方式中,可将样本的样本索引确定为所述样本列表的行坐标,例如,各样本可具有样本索引,例如,样本1、样本2、样本3等,可将样本索引确定为样本列表的行坐标。In a possible implementation manner, the sample index of the sample can be determined as the row coordinates of the sample list. For example, each sample can have a sample index, for example, sample 1, sample 2, sample 3, etc., and the sample index can be Determined as the row coordinates of the sample list.
在一种可能的实现方式中,所述样本可以是训练神经网络时使用的训练样本,每个样本可具有标注,所述标注可以是描述样本的字段的数据。例如,所述样本可包括人脸图像样本,在通过神经网络进行身份验证时,神经网络将各人脸图像样本与参考图像(例如,某个目标人物的人脸图像)进行对比,并确定人脸图像样本与参考图像的相似度。在相似度大于或等于相似度阈值(例如,0.5)时,可确定人脸图像样本与参考图像的相似度较高,身份验证通过,否则,身份验证不通过。在训练该神经网络时,则需要对各人脸图像样本进行标注,为神经网络的损失函数提供参数。例如,如果某个人脸图像样本为目标人物的人脸图像,则可标注为1,表示该人脸图像样本中的人脸为目标人物的人脸,如果某个人脸图像样本不是目标人物的人脸图像,则可标注为0,表示该人脸图像样本中的人脸不是目标人物的人脸。所述样本可具有各字段的参数值以及标注,例如,某个人脸图像样本的字段为图像中的目标对象的身份信息(例如,姓名或编号等),标注为0或1。In a possible implementation, the samples may be training samples used when training a neural network, each sample may have a label, and the label may be data describing a field of the sample. For example, the sample may include a face image sample. When performing identity verification through a neural network, the neural network compares each face image sample with a reference image (for example, a face image of a certain target person), and determines the person The similarity between the face image sample and the reference image. When the similarity is greater than or equal to the similarity threshold (for example, 0.5), it can be determined that the face image sample has a high similarity with the reference image and the identity verification is passed; otherwise, the identity verification fails. When training the neural network, it is necessary to label each face image sample to provide parameters for the loss function of the neural network. For example, if a face image sample is the face image of the target person, it can be marked as 1, which means that the face in the face image sample is the face of the target person. If the face image sample is not the target person's face The face image can be marked as 0, which means that the face in the face image sample is not the face of the target person. The sample may have parameter values and annotations of each field. For example, the field of a certain face image sample is the identity information (for example, name or number, etc.) of the target object in the image, which is marked as 0 or 1.
在一种可能的实现方式中,可将样本中各字段的标注与参数值对象化,例如,可设立与样本对应的存储区域,例如,在内存中设立存储空间,将样本中各字段的标注和参数值存储在所述存储区域中,获得与样本对应的对象(object),以便于存储和读取。其中,存储了字段的数据(标注和参数值)的存储区域即为对象。In a possible implementation, the label and parameter value of each field in the sample can be objectified. For example, a storage area corresponding to the sample can be set up. For example, a storage space can be set up in the memory, and the label of each field in the sample can be set up. The sum parameter value is stored in the storage area, and the object corresponding to the sample is obtained for easy storage and reading. Among them, the storage area storing the data (label and parameter value) of the field is the object.
在一种可能的实现方式中,可将与样本对应的对象中的数据添加至样本列表中,或者将对象与样本列表关联,以将样本列表初始化。例如,可将存储了字段的数据的存储区域与样本列表中的存储区域(例如,样本列表中的某个单元格)对应。在示例中,可将与样本1对应的对象中的数据添加至样本列表的第1行,即,将样本1对应的对象中的各字段的数据,添加至第1行中与各字段对应的存储区域中,例如,将身高数据添加在行坐标为第1行,列坐标为“身高”字段的存储区域中,将体重数据添加在行坐标为第1行,列坐标为“体重”字段的存储区域中。可按照上述方式将每个样本对象化,将对象中存储的数据填入样本列表的存储区域中,可获得存储了多个样本的样本列表。In a possible implementation, the data in the object corresponding to the sample can be added to the sample list, or the object can be associated with the sample list to initialize the sample list. For example, the storage area in which the data of the field is stored may correspond to the storage area in the sample list (for example, a certain cell in the sample list). In the example, the data in the object corresponding to sample 1 can be added to the first row of the sample list, that is, the data of each field in the object corresponding to sample 1 can be added to the corresponding field in the first row In the storage area, for example, add height data in the storage area where the row coordinates are the first row and the column coordinates are the "height" field, and the weight data is added in the row coordinates of the first row and the column coordinates are the "weight" field. In the storage area. Each sample can be objectified in the above-mentioned manner, and the data stored in the object can be filled into the storage area of the sample list to obtain a sample list storing multiple samples.
在一种可能的实现方式中,可按照样本索引对样本列表进行初始化,例如,可将一个样本的各字段的数据添加至对应的存储区域,再添加下一个样本的各字段的数据,即,按照列表中的行方向添加各样本的数据,以将样本列表初始化。In a possible implementation, the sample list can be initialized according to the sample index. For example, the data of each field of one sample can be added to the corresponding storage area, and then the data of each field of the next sample can be added, that is, Add the data of each sample according to the row direction in the list to initialize the sample list.
在一种可能的实现方式中,可按照字段对样本列表进行初始化,即,可将一个字段的所有数据添加至对应的存储区域,再添加下一个字段的数据, 即,按照列表中的列方向添加数据,以将样本列表初始化。In a possible implementation, the sample list can be initialized according to the fields, that is, all the data of a field can be added to the corresponding storage area, and then the data of the next field can be added, that is, according to the column direction in the list Add data to initialize the sample list.
在一种可能的实现方式中,可以采用二维元组方式定义字符型的字段名称,以及该字段对应的样本的数值列表或数组,或者采用关键字参数方式,或者上述两种混合的方式初始化样本列表。In a possible implementation, you can use a two-dimensional tuple to define the character field name, and the numerical list or array of the sample corresponding to the field, or use the keyword parameter method, or the above two mixed methods to initialize List of samples.
通过这种方式,可对样本的参数值和/或标注对象化,并可通过样本列表存储多种数据类型的样本,有利于样本的快速存储和读取,减少存储和读取时的资源占用,并可支持多种类型的数据存储,适应更复杂类型的数据集的存储。In this way, the parameter values and/or annotations of the samples can be objectified, and samples of multiple data types can be stored through the sample list, which is conducive to the rapid storage and reading of samples and reduces the resource occupation during storage and reading. , And can support multiple types of data storage, adapt to the storage of more complex types of data sets.
在一种可能的实现方式中,在S12中,样本可包括多个数据类型,各类型的样本可具有特定的存储和读取方式,在存储多种样本时,可通过描述信息对各样本进行描述,以便于访问(如存储或读取)多个类型的样本。在一种可能的实现方式中,所述样本可包括视频,描述信息中可包括对视频的存储或读取方式的描述,所述样本还可包括图像,描述信息中还可包括对图像的存储或读取方式的描述。所述描述信息可以是元数据(Meta Data)格式的描述信息,例如字典类型的元数据,便于提高数据查询速度,本公开实施例对描述信息的类型不做限制。In a possible implementation, in S12, the sample can include multiple data types, and each type of sample can have a specific storage and reading method. When multiple samples are stored, the description information can be used for each sample. Description for easy access (such as storage or reading) of multiple types of samples. In a possible implementation manner, the sample may include a video, the description information may include a description of how the video is stored or read, the sample may also include an image, and the description information may also include the storage of the image. Or read the description of the way. The description information may be description information in a metadata (Meta Data) format, for example, dictionary type metadata, which is convenient for improving the data query speed. The embodiment of the present disclosure does not limit the type of the description information.
在一种可能的实现方式中,所述描述信息包括对样本的读取方式的描述信息,S12可包括:根据样本列表中所述样本的数据类型,确定用于读取各样本的读取方式;根据所述样本的数据类型和对应的读取方式,获得所述描述信息。In a possible implementation manner, the description information includes the description information of the reading method of the sample, and S12 may include: determining the reading method for reading each sample according to the data type of the sample in the sample list ; According to the data type of the sample and the corresponding reading mode, the description information is obtained.
在一种可能的实现方式中,所述描述信息可以是对样本的读取方式进行描述的信息。可根据样本的数据类型,对各样本的读取方式进行判断,例如,某个样本的数据类型为图像,则该样本可用图像读取函数进行读取,某个样本的数据类型为视频,则该样本可用视频读取函数进行读取,可分别确定每个样本的读取方式。也可汇总各样本的数据类型,例如,样本集中包括多个样本,所述多个样本的数据类型共有三种,分别为图像、视频和普通数据,可确定通过图像读取函数读取图像类型的样本,通过视频读取函数读取视频类型的样本,通过数据读取函数读取普通数据类型的样本。本公开实施例对样本的数据类型及读取方式不做限制。In a possible implementation manner, the description information may be information describing how the sample is read. The reading method of each sample can be judged according to the data type of the sample. For example, if the data type of a sample is an image, the sample can be read by the image reading function, and the data type of a sample is video, then The sample can be read with the video reading function, and the reading method of each sample can be determined separately. The data type of each sample can also be summarized. For example, the sample set includes multiple samples. There are three types of data for the multiple samples, namely image, video, and general data. The image type can be determined by the image reading function. The sample of the video type is read through the video reading function, and the sample of the common data type is read through the data reading function. The embodiment of the present disclosure does not limit the data type and reading method of the sample.
在一种可能的实现方式中,可根据样本的数据类型和对应的读取方式,获得所述描述信息,在一种可能的实现方式中,可将描述信息配置为字典型数据,例如,字典的键为数据类型,字典的值为与数据类型对应的读取方式,例如,字典的键为图像,字典的值为图像读取函数。本公开实施例对描述信息的数据类型不做限制。In a possible implementation manner, the description information can be obtained according to the data type of the sample and the corresponding reading method. In a possible implementation manner, the description information can be configured as dictionary data, for example, a dictionary The key of is the data type, and the value of the dictionary is the reading method corresponding to the data type. For example, the key of the dictionary is the image, and the value of the dictionary is the image reading function. The embodiment of the present disclosure does not limit the data type of the description information.
在一种可能的实现方式中,所述描述信息可包括对样本的存储位置的描述信息,所述存储位置包括所述样本集的存储路径及样本在所述样本集中的索引位置。例如,所述样本集的存储路径为所述样本集存放在计算机的C盘中的“样本集”文件夹中。In a possible implementation, the description information may include description information of the storage location of the sample, and the storage location includes the storage path of the sample set and the index position of the sample in the sample set. For example, the storage path of the sample set is that the sample set is stored in the "sample set" folder on the C drive of the computer.
在一种可能的实现方式中,所述样本在样本集中的索引位置即为样本的 具体位置。在一种可能的实现方式中,每个样本的数据可以以对象(object)的形式存储于样本集中,即,占用样本集中的某个存储区域。所述样本集可以以列表的形式存储各样本,则样本的数据可占用样本集中的某一行,所述索引位置可表示行号,例如,第1个样本位于样本集中列表的第1行,第2个样本位于样本集中列表的第2行,……;样本的字段信息中可包括样本集的存储路径及各样本的索引位置,可根据字段信息,确定每个样本的具体位置,例如,第2个样本位于计算机的C盘中的“样本集”文件夹中的样本集中列表的第2行。又例如,某些样本可能只具有某些字段,或者多个样本属于同类型或同一个样本文件,该索引位置可以是样本在样本集中的行列范围,或多个样本的行列范围。本公开实施例对存储位置不做限制。In a possible implementation, the index position of the sample in the sample set is the specific position of the sample. In a possible implementation manner, the data of each sample may be stored in the sample set in the form of an object, that is, occupy a certain storage area in the sample set. The sample set may store each sample in the form of a list, the data of the sample may occupy a certain row in the sample set, and the index position may indicate the row number. For example, the first sample is located in the first row of the list of the sample set, The two samples are located in the second row of the sample set list,...; the field information of the sample can include the storage path of the sample set and the index position of each sample. The specific location of each sample can be determined according to the field information, for example, the first The 2 samples are located in the second row of the sample set list in the "sample set" folder in the C drive of the computer. For another example, some samples may only have certain fields, or multiple samples belong to the same type or the same sample file. The index position may be the row and column range of the sample in the sample set, or the row and column range of multiple samples. The embodiment of the present disclosure does not limit the storage location.
在一种可能的实现方式中,所述样本集中可包括多个数据类型的样本,如图像、视频、普通数字和/或文本数据等,样本的存储格式可包括字符分隔值文件(Comma-Separated Values,CSV)格式、层次数据格式5(Hierarchical Data Format 5,HDF5)等,样本在样本集中的索引位置可以是汇总同一类型样本后,生成的同类型样本的位置范围。例如,以CSV格式存储的样本文件会在描述信息中存储该CSV文件的索引位置。In a possible implementation manner, the sample set may include samples of multiple data types, such as images, videos, ordinary numbers and/or text data, etc., and the storage format of the samples may include a character-separated value file (Comma-Separated Value File). Values, CSV) format, hierarchical data format 5 (Hierarchical Data Format 5, HDF5), etc. The index position of the sample in the sample set may be the position range of the same type of sample generated after the same type of sample is summarized. For example, a sample file stored in the CSV format will store the index position of the CSV file in the description information.
在一种可能的实现方式中,所述方法还包括:确定用于划分样本集中样本的类别的索引范围信息;根据所述样本集中样本的描述信息和所述样本类别的索引范围信息,生成与所述样本集对应的描述信息。In a possible implementation manner, the method further includes: determining index range information used to classify the types of samples in the sample set; generating and according to the description information of the samples in the sample set and the index range information of the sample categories. Descriptive information corresponding to the sample set.
在一种可能的实现方式中,与所述样本集对应的描述信息还包括用于划分样本集中各样本的类型的索引范围信息。所述方法中确定与所述样本集对应的描述信息的过程还包括:确定用于划分样本集中各样本的类别的索引范围信息;根据所述样本集中样本的描述信息和样本的索引范围信息,生成与所述样本集对应的描述信息。例如,可根据样本的标注进行类别划分。例如,可将样本集分为训练集、验证集和测试集,在训练集中包括5000个样本,其中,3000个样本的标注为1,2000个样本的标注为0。或者,可不区分标注,直接根据样本集中样本的数量和索引来划分,例如,所述样本集中的样本可以是训练神经网络时使用的训练样本,可将训练样本划分为多个类别,例如,可将40%的样本划分为训练集,可将30%的样本划分为测试集,并将30%的样本划分为验证集。或者可根据各样本的索引进行划分,并确定各类别的索引范围。例如,所述样本集以列表的形式存储各样本,在列表中存储了10000个样本,可将列表中的第1个-第4000个样本划分为训练集,可将列表中第4001个-第7000个样本划分为测试集,并将第7001个-第10000个样本划分为验证集。其中,描述信息中可包括对样本类别进行划分的索引范围信息(例如,第1个-第4000个、第4001个-第7000个、第7001个-第10000个等)。本公开实施例对划分方式和索引范围不做限制。In a possible implementation manner, the description information corresponding to the sample set further includes index range information for dividing the type of each sample in the sample set. The process of determining the description information corresponding to the sample set in the method further includes: determining index range information used to classify the categories of each sample in the sample set; according to the description information of the samples in the sample set and the index range information of the samples, Generate description information corresponding to the sample set. For example, it can be classified according to the label of the sample. For example, the sample set can be divided into a training set, a validation set, and a test set. The training set includes 5000 samples, of which 3000 samples are labeled as 1, and 2000 samples are labeled as 0. Or, the labels may not be distinguished, and the classification may be directly based on the number and index of the samples in the sample set. For example, the samples in the sample set may be training samples used when training a neural network, and the training samples may be divided into multiple categories. For example, Divide 40% of the samples into the training set, divide 30% of the samples into the test set, and divide 30% of the samples into the validation set. Or it can be divided according to the index of each sample, and the index range of each category can be determined. For example, the sample set stores each sample in the form of a list, and 10,000 samples are stored in the list. The 1st-4000th sample in the list can be divided into the training set, and the 4001th-4th sample in the list can be divided into training set. The 7000 samples are divided into the test set, and the 7001th-10000th samples are divided into the verification set. Wherein, the description information may include index range information (for example, 1st-4000th, 4001th-7000th, 7001th-10000th, etc.) for dividing sample categories. The embodiment of the present disclosure does not limit the division method and the index range.
样本集除了包括上述训练集、测试集和验证集三个样本类别的样本子集外,还可以包括其他形式的数据子集,例如图像子集和视频子集等。样本集的描述信息除了包括上述训练集、测试集和验证集三个样本类别的样本子集 及其对应的索引范围的描述信息外,还可包括样本集中其他形式的数据子集的描述信息。In addition to the sample subsets of the above-mentioned training set, test set, and validation set, the sample set may also include other forms of data subsets, such as image subsets and video subsets. The description information of the sample set includes not only the sample subsets of the above-mentioned training set, test set, and validation set and the corresponding index range description information, but also the description information of other forms of data subsets in the sample set.
通过这种方式,可确定多种样本的读取方式,有利于支持多种类型的数据存储和访问,适应更复杂类型的数据集的存储和访问。In this way, a variety of sample reading methods can be determined, which is conducive to supporting multiple types of data storage and access, and adapts to the storage and access of more complex types of data sets.
在一种可能的实现方式中,在S13中,可根据样本列表和样本列表对应的描述信息,获得所述样本集(dataset),在一种可能的实现方式中,可将样本列表和样本列表对应的描述信息写入样本集中,获得样本集的文件,或者,将样本列表对应的描述信息和样本列表打包获得所述样本集,本公开实施例对获得样本集的方式不做限制。In a possible implementation manner, in S13, the sample set (dataset) can be obtained according to the sample list and the description information corresponding to the sample list. In a possible implementation manner, the sample list and the sample list can be combined The corresponding description information is written into the sample set to obtain the file of the sample set, or the description information corresponding to the sample list and the sample list are packaged to obtain the sample set. The embodiment of the present disclosure does not limit the way of obtaining the sample set.
在一种可能的实现方式中,所述样本集中包括存储多个样本的样本列表,还包括记录各样本的读取方式的描述信息,以便于多种数据类型的样本的存储和读取,为存储多种数据类型的样本提供了基础。所述描述信息可记录各样本的数据类型,以及读取方式等信息。可基于描述信息,读取样本集中的样本或样本的数据。本公开实施例对描述信息的内容不做限制。In a possible implementation, the sample set includes a sample list storing multiple samples, and also includes description information that records the reading method of each sample, so as to facilitate the storage and reading of samples of multiple data types. Samples that store multiple data types provide the basis. The description information can record the data type of each sample, and the reading method and other information. Based on the description information, the sample or the data of the sample in the sample set can be read. The embodiments of the present disclosure do not limit the content of the description information.
在一种可能的实现方式中,所述方法还包括:根据所述描述信息及所述样本列表,读取所述样本列表中的样本的参数值。In a possible implementation manner, the method further includes: reading parameter values of samples in the sample list according to the description information and the sample list.
在一种可能的实现方式中,可根据描述信息中对样本的读取方式的描述,采用合适的方式读取样本列表中的样本,该读取过程可包括:获取所述样本列表中的对象;根据样本索引,从所获取的对象中,获得与所述样本索引对应的第一样本的第一对象;根据所述描述信息确定所述第一样本的数据类型及对应的读取方式;根据所述读取方式,从第一对象中读取所述第一样本的参数值。In a possible implementation manner, the sample in the sample list can be read in a suitable manner according to the description of the sample reading method in the description information, and the reading process may include: obtaining objects in the sample list According to the sample index, from the acquired objects, obtain the first object of the first sample corresponding to the sample index; determine the data type of the first sample and the corresponding reading method according to the description information ; According to the reading method, the parameter value of the first sample is read from the first object.
在一种可能的实现方式中,所述样本列表中包括多个样本,所述样本以对象的格式存储于样本列表中。在读取样本时,可获取样本列表中的各对象(例如,通过访问‘samples’属性,即,访问样本对象,可获取包含全部样本的列表的全部对象)。进一步地,可访问样本列表中的样本索引,并在样本索引中选择待读取的第一样本,即,选择了与第一样本对应的第一对象,例如,通过样本索引选择了样本列表中,第一样本所在的行。In a possible implementation manner, the sample list includes a plurality of samples, and the samples are stored in the sample list in an object format. When reading a sample, each object in the sample list can be obtained (for example, by accessing the'samples' attribute, that is, accessing the sample object, all objects in the list containing all samples can be obtained). Further, the sample index in the sample list can be accessed, and the first sample to be read is selected in the sample index, that is, the first object corresponding to the first sample is selected, for example, the sample is selected through the sample index In the list, the row where the first sample is located.
在一种可能的实现方式中,所述描述信息中可包括各样本的读取方式,可根据第一样本的数据类型,在描述信息中选择对应的读取方式,例如,第一样本的数据类型为图像,可选择描述信息中的图像读取函数来读取第一样本,第一样本的数据类型为视频,可选择描述信息中的视频读取函数来读取第一样本。In a possible implementation manner, the description information may include the reading method of each sample, and the corresponding reading method may be selected in the description information according to the data type of the first sample, for example, the first sample The data type of is image, you can select the image reading function in the description information to read the first sample, and the data type of the first sample is video, you can select the video reading function in the description information to read the first sample this.
在一种可能的实现方式中,可通过与第一样本的数据类型对应的读取方式,在第一对象中读取第一样本的参数值。例如,所述第一样本为某个人的资料数据,第一样本可包括该人的身高数据、体重数据、学历数据和国籍数据等,可通过数据读取函数读取该资料数据,可在第一对象中,提取第一样本的数据,并通过数据读取函数读取第一样本的各参数值。在一种可能的实现方式中,还可读取第一样本数据的一个或多个字段的参数值,例如,可选 取该资料数据中的身高数据和体重数据,并通过数据读取函数读取所述身高数据和体重数据。可无需将第一样本的全部数据进行读取,提高样本读取的灵活性。In a possible implementation manner, the parameter value of the first sample can be read in the first object through a reading method corresponding to the data type of the first sample. For example, the first sample is information data of a certain person, the first sample may include the person's height data, weight data, educational background data, nationality data, etc. The data can be read through the data reading function. In the first object, the data of the first sample is extracted, and the parameter values of the first sample are read through the data reading function. In a possible implementation, the parameter value of one or more fields of the first sample data can also be read. For example, the height data and weight data in the data can be selected and read through the data read function. Take the height data and weight data. There is no need to read all the data of the first sample, which improves the flexibility of sample reading.
在一种可能的实现方式中,根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:获取样本索引;根据所述样本索引,从所述样本列表中获取所述样本索引对应的样本的参数值。In a possible implementation manner, according to the description information and the sample list, reading the parameter values of the samples in the sample list includes: obtaining a sample index; according to the sample index, from the sample list Obtain the parameter value of the sample corresponding to the sample index.
在一种可能的实现方式中,可利用样本索引来访问样本列表,读取与样本索引对应的样本,并获取该样本的参数值。例如,需要读取样本数据时,可以接收到用户或样本获取设备输入的读取指令,该读取指令中携带需要读取的样本的样本索引,可设置样本索引值为100,则读取时,可获取列表中第100行的样本,即,获取列表中第100行的样本,并按照该样本的读取方式读取该样本的参数值。例如,可根据描述信息中的读取方式来读取该样本的参数值,或者根据该样本的后缀来确定该样本的数据类型,进而选择对应的读取方式来读取该样本,获得该样本的参数值。In a possible implementation manner, the sample index can be used to access the sample list, read the sample corresponding to the sample index, and obtain the parameter value of the sample. For example, when the sample data needs to be read, a read instruction input by the user or the sample acquisition device can be received. The read instruction carries the sample index of the sample to be read. The sample index value can be set to 100, , You can get the sample in the 100th row of the list, that is, get the sample in the 100th row in the list, and read the parameter value of the sample according to the reading method of the sample. For example, the parameter value of the sample can be read according to the reading method in the description information, or the data type of the sample can be determined according to the suffix of the sample, and then the corresponding reading method can be selected to read the sample to obtain the sample The parameter value.
通过这种方式,可减少读取样本时的资源消耗,且可通过统一的方式存储样本数据,并利用样本描述信息存储样本数据类型,从而可以根据描述信息方便获取数据读取方式,便于读取多种数据类型的样本,有利于样本的快速读取。In this way, the resource consumption when reading samples can be reduced, and the sample data can be stored in a unified way, and the sample data type can be stored using the sample description information, so that the data reading method can be easily obtained according to the description information, which is easy to read The samples of multiple data types are conducive to quick reading of the samples.
在一种可能的实现方式中,还可通过访问样本列表中的字段,读取某个字段对应的多个参数值,或者某个样本的该字段的参数值。In a possible implementation manner, it is also possible to read multiple parameter values corresponding to a certain field or the parameter value of the field of a certain sample by accessing the fields in the sample list.
在一种可能的实现方式中,根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:获取所述样本列表中目标字段对应的对象;根据所述描述信息确定所获取的对象对应的第二样本的数据类型及读取方式;根据所述读取方式,从所获取的对象中读取所述第二样本的参数值。In a possible implementation manner, according to the description information and the sample list, reading the parameter values of the samples in the sample list includes: obtaining the object corresponding to the target field in the sample list; according to the description The information determines the data type and reading method of the second sample corresponding to the acquired object; according to the reading method, the parameter value of the second sample is read from the acquired object.
在一种可能的实现方式中,可访问样本列表中目标字段,可获得目标字段对应的对象,例如通过访问‘fields’属性,即,访问字段,可获取包含所有样本数据字段的全部对象,即,获得多个样本在该字段下的参数所在的存储空间(如字段列表),例如,字段列表中可包括“年龄”、“身高”和“国籍”等,还可通过字段中的关键字来访问对应字段,例如,可通过关键字“国籍”来访问“国籍”字段中的参数值,或者,可直接访问字段名称或关键字来访问字段中的参数值,无需访问字段列表,例如,可直接通过字段名称“国籍”来访问字段“国籍”中的参数值。在一种可能的实现方式中,每个字段在样本列表中对应有一列数据,在该列数据的某些区域,数据可为空。例如,在样本的列表中,包括“国籍”字段,在某个人的资料数据的样本中,该字段可存在数据,例如“中国”或“美国”等,而在人脸图像样本中,该字段不存在数据,即,在所述列表中,在该人脸图像样本所在行,并且“国籍”字段所在的列对应的区域中,数据为空。在获取目标字段对应的对象时,可忽略空的区域,也可不忽略,本公开实施例对是否忽略不做限制。在获取目标字段对应的对象时,可获取到目标字段所在列的所有对象,即,存储该列数 据的所有存储空间。In a possible implementation, the target field in the sample list can be accessed to obtain the object corresponding to the target field. For example, by accessing the'fields' attribute, that is, accessing the field, you can get all the objects that contain all the sample data fields, that is , To obtain the storage space (such as the field list) where the parameters of multiple samples under the field are located. For example, the field list can include "age", "height" and "nationality", etc., and can also be accessed by keywords in the field To access the corresponding field, for example, you can access the parameter value in the "Nationality" field through the keyword "nationality", or you can directly access the field name or keyword to access the parameter value in the field without accessing the field list. For example, you can Access the parameter value in the field "nationality" directly through the field name "nationality". In a possible implementation manner, each field corresponds to a column of data in the sample list, and in some areas of the column of data, the data may be empty. For example, in the list of samples, the "nationality" field is included. In a sample of a person's profile data, this field can contain data, such as "China" or "United States", while in a face image sample, this field There is no data, that is, in the list, in the row where the face image sample is located, and the area corresponding to the column where the "nationality" field is located, the data is empty. When obtaining the object corresponding to the target field, the empty area may be ignored or not. The embodiment of the present disclosure does not limit whether to ignore. When obtaining the object corresponding to the target field, all the objects in the column of the target field can be obtained, that is, all the storage space for storing the data of the column.
在一种可能的实现方式中,可根据描述信息确定待读取的第二样本的读取方式,还可根据第二样本的索引,在目标字段对应的对象中,确定第二样本的目标字段的参数值的存储空间,即,第二样本的目标字段的参数值的对象。In a possible implementation manner, the reading method of the second sample to be read can be determined according to the description information, and the target field of the second sample can also be determined in the object corresponding to the target field according to the index of the second sample. The storage space of the parameter value, that is, the object of the parameter value of the target field of the second sample.
在一种可能的实现方式中,可在第二样本的目标字段的参数值的对象中,通过所述读取方式,读取第二样本的目标字段的参数值。例如,第二样本为某个人的资料数据,第二样本可包括该人的身高数据、体重数据、学历数据和国籍数据等。在“身高”字段对应的所有参数值的对象中,可确定第二样本在该字段的对象,并通过与资料数据对应的读取方式读取第二样本的对象中的参数值,在一种可能的实现方式中,通过数据读取函数读取第二样本在该字段的对象中的身高数据,例如,读取数据时,可先访问描述信息查询该字段的读取方式,例如,“身高”字段中的所有参数值均为浮点型数据,再根据描述信息中的浮点型数据的读取方式,从第二样本的对象中来读取第二样本在该字段的参数值。In a possible implementation manner, in the object of the parameter value of the target field of the second sample, the parameter value of the target field of the second sample may be read through the reading method. For example, the second sample is a person's profile data, and the second sample may include the person's height data, weight data, education data, nationality data, and so on. Among the objects of all parameter values corresponding to the "height" field, the object of the second sample in this field can be determined, and the parameter values in the object of the second sample can be read through the reading method corresponding to the data data. In a possible implementation, the height data of the second sample in the object of the field is read through the data reading function. For example, when reading the data, you can first access the description information to query the reading method of the field, for example, "Height All parameter values in the "field are floating-point data, and then according to the reading method of floating-point data in the description information, the parameter value of the second sample in this field is read from the object of the second sample.
在一种可能的实现方式中,根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:获取目标字段的字段名;根据所述字段名,从样本列表中获取所述字段名对应的目标字段的参数值。In a possible implementation manner, according to the description information and the sample list, reading the parameter values of the samples in the sample list includes: obtaining the field name of the target field; according to the field name, from the sample list To obtain the parameter value of the target field corresponding to the field name.
在一种可能的实现方式中,可利用目标字段的字段名来访问目标字段,进而获取目标字段的参数值。例如,用户或设备需要读取样本数据时,存储设备或处理设备可以接收读取指令,该读取指令包括需要读取的样本的目标字段的字段名,目标字段可被设置为“身高”,则读取时,可通过字段名“身高”来访问“身高”字段的参数值。例如,可利用描述信息中与该字段的数据类型对应的读取方式来读取该字段的参数值,或根据该字段的参数的后缀来确定该字段的参数的数据类型,进而确定对应的读取方式来读取该字段的参数值。进一步地,还可读取该字段下的任一参数值,例如,可获得“身高”字段下索引值为100的存储位置中存储的参数值。In a possible implementation manner, the field name of the target field can be used to access the target field, and then obtain the parameter value of the target field. For example, when a user or a device needs to read sample data, the storage device or processing device can receive a read instruction. The read instruction includes the field name of the target field of the sample to be read. The target field can be set to "height", When reading, the parameter value of the "height" field can be accessed through the field name "height". For example, the reading method corresponding to the data type of the field in the description information can be used to read the parameter value of the field, or the data type of the parameter of the field can be determined according to the suffix of the parameter of the field, and then the corresponding reading can be determined. Use the method to read the parameter value of the field. Further, any parameter value under the field can also be read, for example, the parameter value stored in the storage location with the index value of 100 under the "height" field can be obtained.
通过这种方式,通过访问字段的方式读取一个或多个样本在该字段的参数值,提高样本读取的灵活性,有利于样本的快速读取。In this way, the parameter value of one or more samples in the field is read by accessing the field, which improves the flexibility of sample reading and facilitates the rapid reading of samples.
在样本数据读取的情况下,包括在样本或字段参数值读取的情况下,存储设备或数据处理设备会接收读取指令,该读取指令会包括需要读取的样本数据信息,例如样本索引和字段名等,根据该读取指令,会从样本集的描述信息中获取样本的数据类型、存储位置和对应的读取方式,从而可以采用获取的读取方式在存储位置读取所需的样本数据。因此,包含描述信息的样本集可以方便的存储和读取多种类型样本数据,而且通过描述信息可以便于用户理解和查看样本集中存储的数据,适用于面向初学者的场景。In the case of sample data reading, including in the case of reading samples or field parameter values, the storage device or data processing device will receive a read instruction, and the read instruction will include the sample data information that needs to be read, such as sample Index and field name, etc., according to the read instruction, the data type, storage location and corresponding reading method of the sample will be obtained from the description information of the sample set, so that the obtained reading method can be used to read the required data in the storage location Sample data. Therefore, a sample set containing description information can conveniently store and read various types of sample data, and the description information can facilitate users to understand and view the data stored in the sample set, which is suitable for scenarios for beginners.
在一种可能的实现方式中,所述方法还包括:对读取的所述样本的参数值进行查询、修改和删除处理中至少一种操作。在一种可能的实现方式中,在读取某个对象中的参数值后,可对该参数值进行查询、修改和删除等处理 中的至少一种。例如,可查询到该对象中的参数值,并可对该参数值进行复制。或者可修改该参数值,并将修改后的参数值保存在所述对象中。又或者,可将该对象中的参数值删除,使该对象中的数据为空。本公开实施例对参数值的处理方式不做限制。In a possible implementation manner, the method further includes: performing at least one operation of query, modification, and deletion processing on the parameter value of the read sample. In a possible implementation manner, after reading the parameter value in an object, at least one of processing such as query, modification, and deletion may be performed on the parameter value. For example, the parameter value in the object can be queried, and the parameter value can be copied. Or, the parameter value can be modified, and the modified parameter value can be saved in the object. Alternatively, the parameter value in the object can be deleted, so that the data in the object is empty. The embodiment of the present disclosure does not limit the processing manner of the parameter value.
图3示出根据本公开实施例的示例性的存储方法的应用示意图,如图3所示,可将多个样本保存在样本列表中,所述多个样本的数据类型可包括图像、音频、视频和/或普通数据(例如,数值型数据、类别型数据和字符型数据)等。每个样本可占用样本列表中的一行存储区域。每个样本可包括一个或多个字段,例如,某样本为某个人的资料数据,该样本的字段可包括该人的身高、体重、学历和国籍等,该样本可具有与各字段对应的数据。Fig. 3 shows an application schematic diagram of an exemplary storage method according to an embodiment of the present disclosure. As shown in Fig. 3, multiple samples can be stored in a sample list, and the data types of the multiple samples can include image, audio, Video and/or general data (for example, numerical data, categorical data, and character data), etc. Each sample can occupy one row of storage area in the sample list. Each sample can include one or more fields. For example, a sample is the profile data of a certain person. The fields of the sample can include the person’s height, weight, education and nationality, etc. The sample can have data corresponding to each field .
在一种可能的实现方式中,可将各样本的字段进行汇总,作为样本列表的列坐标,并将样本的样本索引确定为所述样本列表的行坐标,可获得一个空的样本列表。In a possible implementation manner, the fields of each sample can be summarized as the column coordinates of the sample list, and the sample index of the sample is determined as the row coordinate of the sample list to obtain an empty sample list.
在一种可能的实现方式中,可将样本的标注与参数值对象化,即,设立与样本的各参数值对应的存储区域,将样本的标注和参数值存储在所述存储区域中,获得与样本对应的对象,并将对象中的标注和参数值添加至样本列表中,获得存储了多个样本的样本列表。In a possible implementation, the label and parameter value of the sample can be objectified, that is, a storage area corresponding to each parameter value of the sample is set up, and the label and parameter value of the sample are stored in the storage area to obtain The object corresponding to the sample is added, and the label and parameter values in the object are added to the sample list to obtain a sample list storing multiple samples.
在一种可能的实现方式中,样本可包括多个数据类型,各类型的样本可具有特定的存储和读取方式,在存储多种样本时,可通过元数据格式的描述信息对各样本进行描述,以便于存储或读取多个类型的样本。In a possible implementation, the sample can include multiple data types, and each type of sample can have a specific storage and reading method. When multiple samples are stored, the description information in the metadata format can be used for each sample. Description, in order to store or read multiple types of samples.
在一种可能的实现方式中,可对样本列表中各样本的数据类型进行汇总,并对各数据类型的读取方式进行判断,样本列表中的多个样本的数据类型共有三种,分别为图像、视频和普通数据,可确定通过图像读取函数读取图像类型的样本,通过视频读取函数读取视频类型的样本,以及通过数据读取函数读取普通数据类型的样本。并将描述信息配置为字典型数据,例如,字典的键为数据类型,字典的值为与数据类型对应的读取方式。In a possible implementation, the data type of each sample in the sample list can be summarized, and the reading method of each data type can be judged. There are three data types for multiple samples in the sample list, respectively: For images, videos and general data, it can be determined that the image type samples are read through the image reading function, the video type samples are read through the video reading function, and the common data type samples are read through the data reading function. The description information is configured as dictionary data. For example, the key of the dictionary is the data type, and the value of the dictionary is the reading mode corresponding to the data type.
在一种可能的实现方式中,可将样本列表和与样本列表对应的描述信息写入样本集中,获得样本集的文件。并可通过访问样本索引或字段来读取样本或样本中的某个参数值。In a possible implementation manner, the sample list and the description information corresponding to the sample list may be written into the sample set to obtain the file of the sample set. And by accessing the sample index or field to read the sample or a parameter value in the sample.
在一种可能的实现方式中,可获取样本列表中的各对象,并可访问样本列表中的样本索引,以选择待读取的第一样本,即,选择了与第一样本对应的第一对象。进一步地,可在描述信息中选择对应的读取方式,例如,第一样本的数据类型为图像,可选择描述信息中的图像读取函数来读取第一样本。并可通过所述读取方式读取第一样本,或可仅读取第一样本中的一个或多个字段的参数值。In a possible implementation manner, each object in the sample list can be obtained, and the sample index in the sample list can be accessed to select the first sample to be read, that is, the first sample corresponding to the first sample is selected The first object. Further, the corresponding reading method can be selected in the description information. For example, the data type of the first sample is an image, and the image reading function in the description information can be selected to read the first sample. The first sample can be read through the reading method, or only the parameter value of one or more fields in the first sample can be read.
在一种可能的实现方式中,可访问样本列表中的目标字段,可获得目标字段对应的所有对象(可忽略目标字段中空的区域)。可在目标字段对应的所有对象中,读取第二样本在目标字段的参数值。在一种可能的实现方式中,可确定第二样本的数据类型,并在描述信息中确定与第二样本的数据类型对 应的读取方式。进一步地,在目标字段的所有参数值的对象中,可确定第二样本在该字段的对象,可按照与第二样本的数据类型对应的读取方式在该对象中读取第二样本在目标字段的参数值。In a possible implementation manner, the target field in the sample list can be accessed, and all objects corresponding to the target field can be obtained (the empty area in the target field can be ignored). The parameter value of the second sample in the target field can be read among all objects corresponding to the target field. In a possible implementation manner, the data type of the second sample can be determined, and the reading method corresponding to the data type of the second sample can be determined in the description information. Further, among the objects of all parameter values of the target field, the object of the second sample in the field can be determined, and the second sample can be read in the object according to the reading method corresponding to the data type of the second sample. The parameter value of the field.
在一种可能的实现方式中,所述存储方法可用于对多种类型的样本的存储中,例如,在计算机教育领域,使用该存储方法可将多种类型的样本按照统一的存储方法进行存储,且存储和读取的程序接口方便简洁,各种样本存储和读取方式统一且易于理解,便于学生进行学习和操作。In a possible implementation, the storage method can be used to store multiple types of samples. For example, in the field of computer education, using this storage method can store multiple types of samples according to a unified storage method. , And the program interface for storage and reading is convenient and concise. The storage and reading methods of various samples are unified and easy to understand, which is convenient for students to learn and operate.
可以理解,本公开实施例提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开实施例不再赘述。It can be understood that the various method embodiments mentioned in the embodiments of the present disclosure can be combined with each other to form a combined embodiment without violating the principle and logic. Due to space limitations, the embodiments of the present disclosure will not be repeated.
此外,本公开实施例还提供了数据处理装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开实施例提供的任一种图像处理方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the embodiments of the present disclosure also provide data processing apparatuses, electronic equipment, computer-readable storage media, and programs. All of the above can be used to implement any image processing method provided by the embodiments of the present disclosure. For the corresponding technical solutions and descriptions, refer to the method Part of the corresponding records will not be repeated here.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above-mentioned methods of the specific implementation, the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possibility. The inner logic is determined.
图4示出根据本公开实施例的数据处理装置的框图,如图4所示,所述装置包括:第一确定部分11,被配置为根据样本的字段及与所述字段对应的参数值,确定包括多个样本的样本列表;第二确定部分12,被配置为根据所述样本列表中样本的数据类型,确定与所述样本列表对应的描述信息;第三确定部分13,被配置为根据所述样本列表和所述描述信息,确定样本集。Fig. 4 shows a block diagram of a data processing device according to an embodiment of the present disclosure. As shown in Fig. 4, the device includes: a first determining part 11 configured to according to a field of a sample and a parameter value corresponding to the field, Determine a sample list including a plurality of samples; the second determining part 12 is configured to determine the description information corresponding to the sample list according to the data type of the samples in the sample list; the third determining part 13 is configured to determine the description information corresponding to the sample list according to The sample list and the description information determine the sample set.
在一种可能的实现方式中,每个样本具有样本索引,所述第一确定部分还被配置为:将所述字段确定为所述样本列表的列坐标,将样本的所述样本索引确定为所述样本列表的行坐标;将所述字段对应的参数值进行对象化,获得与所述样本对应的对象;将所述对象中的数据添加至与所述列坐标和所述行坐标对应的存储区域,获得所述样本列表。In a possible implementation manner, each sample has a sample index, and the first determining part is further configured to: determine the field as the column coordinates of the sample list, and determine the sample index of the sample as The row coordinates of the sample list; objectize the parameter value corresponding to the field to obtain the object corresponding to the sample; add the data in the object to the corresponding column coordinates and the row coordinates Storage area to obtain the sample list.
在一种可能的实现方式中,所述描述信息包括对样本的读取方式的描述信息,所述第二确定部分还被配置为:根据样本列表中样本的数据类型,确定用于读取样本的读取方式;根据所述样本的数据类型和对应的读取方式,获得所述描述信息。In a possible implementation manner, the description information includes description information of how to read the sample, and the second determining part is further configured to: determine a sample for reading according to the data type of the sample in the sample list. The method of reading; the description information is obtained according to the data type of the sample and the corresponding reading method.
在一种可能的实现方式中,所述描述信息还包括对样本存储位置的描述信息,所述存储位置包括所述样本集的存储路径及样本在所述样本集中的索引位置。In a possible implementation manner, the description information further includes description information of a storage location of the sample, and the storage location includes a storage path of the sample set and an index position of the sample in the sample set.
在一种可能的实现方式中,所述装置还包括:第四确定部分,被配置为确定用于划分样本集中样本的类别的索引范围信息;生成部分,被配置为根据所述样本集中样本的描述信息和所述样本类别的索引范围信息,生成与所述样本集对应的描述信息。In a possible implementation manner, the device further includes: a fourth determining part configured to determine index range information used to classify samples in the sample set; and the generating part configured to determine the index range information of the samples in the sample set according to The description information and the index range information of the sample category generate description information corresponding to the sample set.
在一种可能的实现方式中,所述装置还包括:读取部分,被配置为根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值。In a possible implementation manner, the device further includes: a reading part configured to read parameter values of samples in the sample list according to the description information and the sample list.
在一种可能的实现方式中,所述读取部分还被配置为:获取所述样本列表中的对象;根据样本索引,从所获取的对象中,获得与所述样本索引对应的第一样本的第一对象;根据所述描述信息确定所述第一样本的数据类型及对应的读取方式;根据所述读取方式,从所述第一对象中读取所述第一样本的参数值。In a possible implementation manner, the reading part is further configured to: obtain objects in the sample list; according to the sample index, obtain the first object corresponding to the sample index from the obtained objects. The first object of this book; the data type of the first sample and the corresponding reading method are determined according to the description information; the first sample is read from the first object according to the reading method The parameter value.
在一种可能的实现方式中,所述读取部分还被配置为:获取样本索引;根据所述样本索引,从所述样本列表中获取所述样本索引对应的样本的参数值。In a possible implementation manner, the reading part is further configured to: obtain a sample index; according to the sample index, obtain the parameter value of the sample corresponding to the sample index from the sample list.
在一种可能的实现方式中,所述读取部分还被配置为:获取所述样本列表中目标字段对应的对象;根据所述描述信息确定所获取的对象对应的第二样本的数据类型及读取方式;根据所述读取方式,从所获取的对象中读取所述第二样本的参数值。In a possible implementation manner, the reading part is further configured to: obtain the object corresponding to the target field in the sample list; determine the data type and the data type of the second sample corresponding to the obtained object according to the description information. Reading mode; according to the reading mode, the parameter value of the second sample is read from the obtained object.
在一种可能的实现方式中,所述读取部分还被配置为:获取目标字段的字段名;根据所述字段名,从样本列表中获取所述字段名对应的目标字段的参数值。In a possible implementation manner, the reading part is further configured to: obtain the field name of the target field; according to the field name, obtain the parameter value of the target field corresponding to the field name from the sample list.
在一种可能的实现方式中,所述装置还包括:操作部分,被配置为对读取的所述样本的参数值进行查询、修改和删除处理中至少一种操作。In a possible implementation manner, the device further includes: an operation part configured to perform at least one of query, modification, and deletion of the parameter value of the read sample.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的部分可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or parts included in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments. For specific implementation, refer to the description of the above method embodiments. For brevity, here No longer.
在本公开实施例以及其他的实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是单元,还可以是模块也可以是非模块化的。In the embodiments of the present disclosure and other embodiments, "parts" may be parts of circuits, parts of processors, parts of programs or software, etc., of course, may also be units, modules, or non-modular.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性计算机可读存储介质或非易失性计算机可读存储介质。The embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned method when executed by a processor. The computer-readable storage medium may be a volatile computer-readable storage medium or a non-volatile computer-readable storage medium.
本公开实施例还提出一种电子设备,包括:处理器;被配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory configured to store executable instructions of the processor; wherein the processor is configured as the aforementioned method.
电子设备可以被提供为终端、服务器或其它形态的设备。The electronic device can be provided as a terminal, server or other form of device.
图5是根据一示例性实施例示出的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。Fig. 5 is a block diagram showing an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
参照图5,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。5, the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组 件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and Programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。The power supply component 806 provides power for various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. 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 input signals from the user. The touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module. The above-mentioned peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: home button, volume button, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器, 磁传感器,压力传感器或温度传感器。The sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation. For example, the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components. For example, the component is the display and the keypad of the electronic device 800. The sensor component 814 can also detect the electronic device 800 or the electronic device 800. The position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact. The sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field-available A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, a computer-readable storage medium is also provided, such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,当计算机可读代码在设备上运行时,设备中的处理器执行用于实现如上任一实施例提供的方法的指令。The embodiments of the present disclosure also provide a computer program product, including computer-readable code, and when the computer-readable code runs on a device, a processor in the device executes instructions for implementing the method provided in any of the above embodiments.
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically implemented by hardware, software, or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium. In another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc. Wait.
图6是根据一示例性实施例示出的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图6,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。Fig. 6 is a block diagram showing an electronic device 1900 according to an exemplary embodiment. For example, the electronic device 1900 may be provided as a server. 6, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by the memory 1932, for storing instructions executable by the processing component 1922, such as application programs. The application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above-described methods.
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to the network, and an input output (I/O) interface 1958 . The electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to complete the foregoing method.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开实施例的各个方面的计算机可读程序指令。The present disclosure may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the embodiments of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。The computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon The protruding structure in the hole card or the groove, and any suitable combination of the above. The computer-readable storage medium used here is not interpreted as the instantaneous signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
用于执行本公开实施例操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。The computer program instructions used to perform the operations of the embodiments of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or one or more programming instructions. Source code or object code written in any combination of languages, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network-including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect to the user's computer) connection). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions. The computer-readable program instructions are executed to realize various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开实施例的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Here, various aspects of the embodiments of the present disclosure are described with reference to flowcharts and/or block diagrams of methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计 算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine that makes these instructions when executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner. Thus, the computer-readable medium storing the instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。It is also possible to load computer-readable program instructions on a computer, other programmable data processing device, or other equipment, so that a series of operation steps are executed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , So that the instructions executed on the computer, other programmable data processing apparatus, or other equipment realize the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions, and operations of the system, method, and computer program product according to multiple embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more components for realizing the specified logical function. Executable instructions. In some alternative implementations, the functions marked in the block may also occur in a different order than the order marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Without departing from the scope and spirit of the described embodiments, many modifications and changes are obvious to those of ordinary skill in the art. The choice of terms used herein is intended to best explain the principles, practical applications, or technical improvements of the technologies in the market, or to enable other ordinary skilled in the art to understand the embodiments disclosed herein.
工业实用性Industrial applicability
本公开实施例涉及一种数据处理方法及装置、电子设备和存储介质,所述方法包括:根据样本的字段及与所述字段对应的参数值,确定包括多个样本的样本列表;根据所述样本列表中样本的数据类型,确定与所述样本列表对应的描述信息;根据所述样本列表和所述描述信息,确定样本集。根据本公开实施例的数据处理方法,可确定用于存储各样本的样本集,以及对应的描述信息,可使用统一的方式存储多种类型的样本,且样本集中包括描述数据类型的描述信息,便于样本数据的存储和读取,可支持多种类型的数据存储和读取,易于理解。The embodiments of the present disclosure relate to a data processing method and device, electronic equipment, and storage medium. The method includes: determining a sample list including a plurality of samples according to a field of a sample and a parameter value corresponding to the field; The data type of the samples in the sample list is determined, and the description information corresponding to the sample list is determined; and the sample set is determined according to the sample list and the description information. According to the data processing method of the embodiment of the present disclosure, the sample set used to store each sample and the corresponding description information can be determined, multiple types of samples can be stored in a unified manner, and the sample set includes description information describing the data type, It is convenient to store and read sample data, can support multiple types of data storage and read, and is easy to understand.

Claims (25)

  1. 一种数据处理方法,包括:A data processing method, including:
    根据样本的字段及与所述字段对应的参数值,确定包括多个样本的样本列表;Determine a sample list including multiple samples according to the fields of the samples and the parameter values corresponding to the fields;
    根据所述样本列表中样本的数据类型,确定与所述样本列表对应的描述信息;Determine the description information corresponding to the sample list according to the data type of the sample in the sample list;
    根据所述样本列表和所述描述信息,确定样本集。According to the sample list and the description information, a sample set is determined.
  2. 根据权利要求1所述的方法,其中,每个样本具有样本索引,根据样本的字段及与所述字段对应的参数值,确定包括多个样本的样本列表,包括:The method according to claim 1, wherein each sample has a sample index, and determining a sample list including a plurality of samples according to a field of the sample and a parameter value corresponding to the field includes:
    将所述字段确定为所述样本列表的列坐标,将所述样本索引确定为所述样本列表的行坐标;Determining the field as the column coordinates of the sample list, and determining the sample index as the row coordinates of the sample list;
    将所述字段对应的参数值进行对象化,获得与所述样本对应的对象;Objectify the parameter value corresponding to the field to obtain the object corresponding to the sample;
    将所述对象中的数据添加至与所述列坐标和所述行坐标对应的存储区域,获得所述样本列表。The data in the object is added to the storage area corresponding to the column coordinates and the row coordinates to obtain the sample list.
  3. 根据权利要求1或2所述的方法,其中,所述描述信息包括对样本的读取方式的描述信息,The method according to claim 1 or 2, wherein the description information includes description information of how the sample is read,
    所述根据所述样本列表中所述样本的数据类型,确定与所述样本列表对应的描述信息,包括:The determining the description information corresponding to the sample list according to the data type of the sample in the sample list includes:
    根据样本列表中样本的数据类型,确定用于读取样本的读取方式;According to the data type of the sample in the sample list, determine the reading method used to read the sample;
    根据所述样本的数据类型和对应的读取方式,获得所述描述信息。The description information is obtained according to the data type of the sample and the corresponding reading mode.
  4. 根据权利要求1-3任一项所述的方法,其中,所述描述信息还包括对样本存储位置的描述信息,所述存储位置包括所述样本集的存储路径及样本在所述样本集中的索引位置。The method according to any one of claims 1 to 3, wherein the description information further includes description information of the storage location of the sample, and the storage location includes the storage path of the sample set and the location of the sample in the sample set. Index position.
  5. 根据权利要求1-4任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1-4, wherein the method further comprises:
    确定用于划分样本集中样本的类别的索引范围信息;Determine the index range information used to classify the types of samples in the sample set;
    根据所述样本集中样本的描述信息和所述样本类别的索引范围信息,生成与所述样本集对应的描述信息。According to the description information of the samples in the sample set and the index range information of the sample category, the description information corresponding to the sample set is generated.
  6. 根据权利要求1-5任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值。According to the description information and the sample list, read the parameter values of the samples in the sample list.
  7. 根据权利要求6所述的方法,其中,所述根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:The method according to claim 6, wherein said reading parameter values of samples in said sample list according to said description information and said sample list comprises:
    获取所述样本列表中的对象;Obtaining objects in the sample list;
    根据样本索引,从所获取的对象中,获得与所述样本索引对应的第一样本的第一对象;According to the sample index, obtain the first object of the first sample corresponding to the sample index from the acquired objects;
    根据所述描述信息确定所述第一样本的数据类型及对应的读取方式;Determine the data type of the first sample and the corresponding reading method according to the description information;
    根据所述读取方式,从第一对象中读取所述第一样本的参数值。According to the reading method, the parameter value of the first sample is read from the first object.
  8. 根据权利要求6所述的方法,其中,所述根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:The method according to claim 6, wherein said reading parameter values of samples in said sample list according to said description information and said sample list comprises:
    获取样本索引;Get sample index;
    根据所述样本索引,从所述样本列表中获取所述样本索引对应的样本的参数值。According to the sample index, the parameter value of the sample corresponding to the sample index is obtained from the sample list.
  9. 根据权利要求6所述的方法,其中,所述根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:The method according to claim 6, wherein said reading parameter values of samples in said sample list according to said description information and said sample list comprises:
    获取所述样本列表中目标字段对应的对象;Obtaining the object corresponding to the target field in the sample list;
    根据所述描述信息确定所获取的对象对应的第二样本的数据类型及读取方式;Determine the data type and reading mode of the second sample corresponding to the acquired object according to the description information;
    根据所述读取方式,从所获取的对象中读取所述第二样本的参数值。According to the reading method, the parameter value of the second sample is read from the acquired object.
  10. 根据权利要求6所述的方法,其中,所述根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值,包括:The method according to claim 6, wherein said reading parameter values of samples in said sample list according to said description information and said sample list comprises:
    获取目标字段的字段名;Get the field name of the target field;
    根据所述字段名,从样本列表中获取所述字段名对应的目标字段的参数值。According to the field name, the parameter value of the target field corresponding to the field name is obtained from the sample list.
  11. 根据权利要求6-10任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 6-10, wherein the method further comprises:
    对读取的所述样本的参数值进行查询、修改和删除处理中至少一种操作。At least one operation of query, modification and deletion processing is performed on the parameter value of the read sample.
  12. 一种数据处理装置,包括:A data processing device includes:
    第一确定部分,被配置为根据样本的字段及与所述字段对应的参数值,确定包括多个样本的样本列表;The first determining part is configured to determine a sample list including multiple samples according to the fields of the samples and the parameter values corresponding to the fields;
    第二确定部分,被配置为根据所述样本列表中样本的数据类型,确定与所述样本列表对应的描述信息;The second determining part is configured to determine the description information corresponding to the sample list according to the data type of the sample in the sample list;
    第三确定部分,被配置为根据所述样本列表和所述描述信息,确定样本集。The third determining part is configured to determine a sample set according to the sample list and the description information.
  13. 根据权利要求12所述的装置,其中,每个样本具有样本索引所述第一确定部分还被配置为:The apparatus according to claim 12, wherein each sample has a sample index and the first determining part is further configured to:
    将所述字段确定为所述样本列表的列坐标,将所述样本索引确定为所述样本列表的行坐标;Determining the field as the column coordinates of the sample list, and determining the sample index as the row coordinates of the sample list;
    将所述字段对应的参数值进行对象化,获得与所述样本对应的对象;Objectify the parameter value corresponding to the field to obtain the object corresponding to the sample;
    将所述对象中的数据添加至与所述列坐标和所述行坐标对应的存储区域,获得所述样本列表。The data in the object is added to the storage area corresponding to the column coordinates and the row coordinates to obtain the sample list.
  14. 根据权利要求12或13所述的装置,其中,所述描述信息包括对样本的读取方式的描述信息,所述第二确定部分还被配置为:The device according to claim 12 or 13, wherein the description information includes description information of how to read the sample, and the second determining part is further configured to:
    根据样本列表中样本的数据类型,确定用于读取样本的读取方式;According to the data type of the sample in the sample list, determine the reading method used to read the sample;
    根据所述样本的数据类型和对应的读取方式,获得所述描述信息。The description information is obtained according to the data type of the sample and the corresponding reading mode.
  15. 根据权利要求12-14任一项所述的装置,其中,所述描述信息还包括对样本存储位置的描述信息,所述存储位置包括所述样本集的存储路径及样本在所述样本集中的索引位置。The device according to any one of claims 12-14, wherein the description information further includes description information of the storage location of the sample, and the storage location includes the storage path of the sample set and the location of the sample in the sample set. Index position.
  16. 根据权利要求12-15任一项所述的装置,其中,所述方法还包括:The device according to any one of claims 12-15, wherein the method further comprises:
    第四确定部分,被配置为确定用于划分样本集中样本的类别的索引范围信息;The fourth determining part is configured to determine index range information used to classify the types of samples in the sample set;
    生成部分,被配置为根据所述样本集中样本的描述信息和所述样本类别的索引范围信息,生成与所述样本集对应的描述信息。The generating part is configured to generate description information corresponding to the sample set according to the description information of the samples in the sample set and the index range information of the sample category.
  17. 根据权利要求12-16任一项所述的装置,其中,所述方法还包括:The device according to any one of claims 12-16, wherein the method further comprises:
    读取部分,被配置为根据所述描述信息及所述样本列表,读取所述样本列表中样本的参数值。The reading part is configured to read the parameter values of the samples in the sample list according to the description information and the sample list.
  18. 根据权利要求17所述的装置,其中,所述读取部分还被配置为:The device according to claim 17, wherein the reading part is further configured to:
    获取所述样本列表中的对象;Obtaining objects in the sample list;
    根据样本索引,从所获取的对象中,获得与所述样本索引对应的第一样本的第一对象;According to the sample index, obtain the first object of the first sample corresponding to the sample index from the acquired objects;
    根据所述描述信息确定所述第一样本的数据类型及对应的读取方式;Determine the data type of the first sample and the corresponding reading method according to the description information;
    根据所述读取方式,从所述第一对象中读取所述第一样本的参数值。According to the reading method, the parameter value of the first sample is read from the first object.
  19. 根据权利要求17所述的装置,其中,所述读取部分还被配置为:The device according to claim 17, wherein the reading part is further configured to:
    获取样本索引;Get sample index;
    根据所述样本索引,从所述样本列表中获取所述样本索引对应的样本的参数值。According to the sample index, the parameter value of the sample corresponding to the sample index is obtained from the sample list.
  20. 根据权利要求17所述的装置,其中,所述读取部分还被配置为:The device according to claim 17, wherein the reading part is further configured to:
    获取所述样本列表中目标字段对应的对象;Obtaining the object corresponding to the target field in the sample list;
    根据所述描述信息确定所获取的对象对应的第二样本的数据类型及读取方式;Determine the data type and reading mode of the second sample corresponding to the acquired object according to the description information;
    根据所述读取方式,从所获取的对象中读取所述第二样本的参数值。According to the reading method, the parameter value of the second sample is read from the acquired object.
  21. 根据权利要求17所述的装置,其中,所述读取部分还被配置为:The device according to claim 17, wherein the reading part is further configured to:
    获取目标字段的字段名;Get the field name of the target field;
    根据所述字段名,从样本列表中获取所述字段名对应的目标字段的参数值。According to the field name, the parameter value of the target field corresponding to the field name is obtained from the sample list.
  22. 根据权利要求17-21任一项所述的装置,其中,所述装置还包括:The device according to any one of claims 17-21, wherein the device further comprises:
    操作部分,被配置为对读取的所述样本的参数值进行查询、修改和删除处理中至少一种操作。The operation part is configured to perform at least one operation of query, modification and deletion of the parameter value of the read sample.
  23. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    被配置为存储处理器可执行指令的存储器;A memory configured to store executable instructions of the processor;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至11中任意一项所述的方法。Wherein, the processor is configured to call instructions stored in the memory to execute the method according to any one of claims 1 to 11.
  24. 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至11中任意一项所述的方法。A computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 11 is implemented.
  25. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行时实现权利要求1至11中任意一项所述的方法。A computer program comprising computer readable code, when the computer readable code runs in an electronic device, a processor in the electronic device executes the method according to any one of claims 1 to 11.
PCT/CN2020/095955 2019-10-28 2020-06-12 Data processing method and apparatus, electronic device and storage medium WO2021082463A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021530871A JP2022510660A (en) 2019-10-28 2020-06-12 Data processing methods and their devices, electronic devices, and storage media
KR1020217020477A KR20210096230A (en) 2019-10-28 2020-06-12 Data processing methods and devices, electronic devices and storage media

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911031910.5A CN110569329B (en) 2019-10-28 2019-10-28 Data processing method and device, electronic equipment and storage medium
CN201911031910.5 2019-10-28

Publications (1)

Publication Number Publication Date
WO2021082463A1 true WO2021082463A1 (en) 2021-05-06

Family

ID=68786157

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/095955 WO2021082463A1 (en) 2019-10-28 2020-06-12 Data processing method and apparatus, electronic device and storage medium

Country Status (5)

Country Link
JP (1) JP2022510660A (en)
KR (1) KR20210096230A (en)
CN (1) CN110569329B (en)
TW (1) TWI755890B (en)
WO (1) WO2021082463A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569329B (en) * 2019-10-28 2022-08-02 深圳市商汤科技有限公司 Data processing method and device, electronic equipment and storage medium
CN113642408A (en) * 2021-07-15 2021-11-12 杭州玖欣物联科技有限公司 Method for processing and analyzing picture data in real time through industrial internet
TWI772233B (en) * 2021-11-29 2022-07-21 大陸商常州欣盛半導體技術股份有限公司 Automatic integration method of cof test data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192148A (en) * 2006-12-01 2008-06-04 深圳迈瑞生物医疗电子股份有限公司 New and old application program compatible data processing method and its data storage method
CN106126692A (en) * 2016-06-29 2016-11-16 北京奇虎科技有限公司 The searching method of a kind of sample data and device
CN108509485A (en) * 2018-02-07 2018-09-07 深圳壹账通智能科技有限公司 Preprocess method, device, computer equipment and the storage medium of data
CN110569329A (en) * 2019-10-28 2019-12-13 深圳市商汤科技有限公司 Data processing method and device, electronic equipment and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI222057B (en) * 1998-10-22 2004-10-11 Ibm Method to automatically retrieve information and data, computer readable medium, and method and system of automatically selecting encoding parameters
CN101470734A (en) * 2007-12-29 2009-07-01 北大方正集团有限公司 Data identification and analyzing method and apparatus
CN102110202B (en) * 2009-12-29 2014-01-01 比亚迪股份有限公司 Method for reading DRM file in mobile terminal file system
CN102253810B (en) * 2010-05-17 2014-02-05 深圳市世纪光速信息技术有限公司 Method, apparatus and system used for reading data
US9076152B2 (en) * 2010-10-20 2015-07-07 Microsoft Technology Licensing, Llc Semantic analysis of information
US9378065B2 (en) * 2013-03-15 2016-06-28 Advanced Elemental Technologies, Inc. Purposeful computing
CN104503707B (en) * 2014-12-24 2018-03-06 华为技术有限公司 Read the method and device of data
CN105094707B (en) * 2015-08-18 2018-03-13 华为技术有限公司 A kind of data storage, read method and device
CN108351898B (en) * 2015-10-30 2021-10-08 安客诚公司 Automated interpretation for structured multi-field file layout
CN109189822B (en) * 2018-08-08 2022-01-14 北京大数据研究院 Data processing method and device
CN109522424B (en) * 2018-10-16 2020-04-24 北京达佳互联信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192148A (en) * 2006-12-01 2008-06-04 深圳迈瑞生物医疗电子股份有限公司 New and old application program compatible data processing method and its data storage method
CN106126692A (en) * 2016-06-29 2016-11-16 北京奇虎科技有限公司 The searching method of a kind of sample data and device
CN108509485A (en) * 2018-02-07 2018-09-07 深圳壹账通智能科技有限公司 Preprocess method, device, computer equipment and the storage medium of data
CN110569329A (en) * 2019-10-28 2019-12-13 深圳市商汤科技有限公司 Data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
KR20210096230A (en) 2021-08-04
TW202117707A (en) 2021-05-01
JP2022510660A (en) 2022-01-27
TWI755890B (en) 2022-02-21
CN110569329A (en) 2019-12-13
CN110569329B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
WO2020029966A1 (en) Method and device for video processing, electronic device, and storage medium
WO2021051650A1 (en) Method and apparatus for association detection for human face and human hand, electronic device and storage medium
WO2021082463A1 (en) Data processing method and apparatus, electronic device and storage medium
RU2615632C2 (en) Method and device for recognizing communication messages
US8775969B2 (en) Contact searching method and apparatus, and applied mobile terminal
US11334723B2 (en) Method and device for processing untagged data, and storage medium
WO2017092121A1 (en) Information processing method and device
WO2018090688A1 (en) Input method, device and electronic device
WO2023078414A1 (en) Related article search method and apparatus, electronic device, and storage medium
KR20130117021A (en) Method for searching content of message and an electronic device thereof
TW201837752A (en) Feedback response method and device
US11373038B2 (en) Method and terminal for performing word segmentation on text information, and storage medium
TWI739633B (en) Storage and reading method, electronic equipment and computer-readable storage medium
CN112328809A (en) Entity classification method, device and computer readable storage medium
WO2019144724A1 (en) Expression input method and apparatus
WO2023092975A1 (en) Image processing method and apparatus, electronic device, storage medium, and computer program product
CN106959970B (en) Word bank, processing method and device of word bank and device for processing word bank
CN110019657B (en) Processing method, apparatus and machine-readable medium
US20170060822A1 (en) Method and device for storing string
US10423706B2 (en) Method and device for selecting information
CN110929122A (en) Data processing method and device and data processing device
CN113312475B (en) Text similarity determination method and device
CN107544969B (en) Method for optimizing size of static lexicon and electronic equipment
CN113093920A (en) Entry information display method, device and system
CN113918029A (en) Input method and device

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021530871

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20882363

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20217020477

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20882363

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 210922)

122 Ep: pct application non-entry in european phase

Ref document number: 20882363

Country of ref document: EP

Kind code of ref document: A1